TTS

class pipecat.services.deepgram.tts.DeepgramTTSService(*, api_key, voice='aura-2-helena-en', base_url='', sample_rate=None, encoding='linear16', **kwargs)[source]

Bases: TTSService

Parameters:
  • api_key (str)

  • voice (str)

  • base_url (str)

  • sample_rate (int | None)

  • encoding (str)

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]