Overview
Groq’s TTS API provides fast text-to-speech synthesis with multiple voice options. The service operates at a fixed 48kHz sample rate and offers efficient audio streaming for real-time applications.API Reference
Complete API documentation and method details
Groq TTS Docs
Official Groq API documentation and models
Example Code
Working example with Groq STT and LLM
Installation
To use Groq services, install the required dependencies:GROQ_API_KEY
.
Get your API key by signing up at Groq
Console.
Frames
Input
TextFrame
- Text content to synthesize into speechTTSSpeakFrame
- Text that should be spoken immediatelyTTSUpdateSettingsFrame
- Runtime configuration updatesLLMFullResponseStartFrame
/LLMFullResponseEndFrame
- LLM response boundaries
Output
TTSStartedFrame
- Signals start of synthesisTTSAudioRawFrame
- Generated audio data chunks (WAV format)TTSStoppedFrame
- Signals completion of synthesisErrorFrame
- API or processing errors
Voice Models
Groq TTS supports various voice options through the PlayAI model:Voice ID | Description | Gender |
---|---|---|
Celeste-PlayAI | Natural, conversational voice | Female |
Iris-PlayAI | Professional, clear voice | Female |
Oliver-PlayAI | Warm, friendly voice | Male |
William-PlayAI | Authoritative, confident voice | Male |
Voice availability may vary. Check the Groq
documentation for the latest
available voices.
Audio Configuration
Sample Rate
- Fixed at 48kHz - Groq TTS only supports 48,000 Hz sample rate
- Automatic resampling if pipeline uses different rates
Usage Example
Basic Configuration
InitializeGroqTTSService
and use it in your pipeline:
Dynamic Configuration
Make settings updates by pushing aTTSUpdateSettingsFrame
for the GroqTTSService
:
Metrics
The service provides comprehensive metrics:- Time to First Byte (TTFB) - Latency from text input to first audio
- Processing Duration - Total synthesis time
Learn how to enable Metrics in your Pipeline.
Additional Notes
- Fixed Sample Rate: Service operates at 48kHz only - resampling handled automatically
- Speed Control: Adjust speech rate from 0.5x to 2.0x normal speed