TTS
- class pipecat.services.groq.tts.GroqTTSService(*, api_key, output_format='wav', params=None, model_name='playai-tts', voice_id='Celeste-PlayAI', sample_rate=48000, **kwargs)[source]
Bases:
TTSService
- Parameters:
api_key (str)
output_format (str)
params (InputParams | None)
model_name (str)
voice_id (str)
sample_rate (int | None)
- class InputParams(*, language=Language.EN, speed=1.0)[source]
Bases:
BaseModel
- Parameters:
language (Language | None)
speed (float | None)
- language: Language | None
- speed: float | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- GROQ_SAMPLE_RATE = 48000
- can_generate_metrics()[source]
- Return type:
bool
- async run_tts(text)[source]
Run text-to-speech synthesis on the provided text.
This method must be implemented by subclasses to provide actual TTS functionality.
- Parameters:
text (str) – The text to synthesize into speech.
- Yields:
Frame – Audio frames containing the synthesized speech.
- Return type:
AsyncGenerator[Frame, None]