Overview
GroqTTSService provides fast text-to-speech synthesis using Groq’s TTS API with multiple voice options. The service operates at a fixed 48kHz sample rate and offers efficient audio streaming for real-time applications with ultra-low latency.
Groq TTS API Reference
Pipecat’s API methods for Groq TTS integration
Example Implementation
Complete example with Groq STT and LLM
Groq Documentation
Official Groq API documentation and models
Voice Options
Explore available voice models and features
Installation
To use Groq services, install the required dependencies:Prerequisites
Groq Account Setup
Before using Groq TTS services, you need:- Groq Account: Sign up at Groq Console
- API Key: Generate an API key from your account dashboard
- Voice Selection: Choose from available voice models
Required Environment Variables
GROQ_API_KEY: Your Groq API key for authentication
Configuration
GroqTTSService
Groq API key for authentication.
TTS model to use.
Voice identifier to use.
Audio output format.
Audio sample rate. Must be 48000 Hz for Groq TTS.
Runtime-configurable voice settings. See InputParams below.
InputParams
Voice and generation settings that can be set at initialization via theparams constructor argument.
| Parameter | Type | Default | Description |
|---|---|---|---|
language | Language | Language.EN | Language for speech synthesis. |
speed | float | 1.0 | Speech speed multiplier. |
Usage
Basic Setup
With Custom Settings
Notes
- Fixed sample rate: Groq TTS only supports 48kHz sample rate. Setting a different value will produce a warning.
- WAV output: The service outputs WAV-formatted audio, which is decoded internally to extract raw PCM frames.