TTS
- class pipecat.services.riva.tts.RivaTTSService(*, api_key, server='grpc.nvcf.nvidia.com:443', voice_id='Magpie-Multilingual.EN-US.Ray', sample_rate=None, model_function_map={'function_id': '877104f7-e885-42b9-8de8-f6e4c6303969', 'model_name': 'magpie-tts-multilingual'}, params=None, **kwargs)[source]
Bases:
TTSService
- Parameters:
api_key (str)
server (str)
voice_id (str)
sample_rate (int | None)
model_function_map (Mapping[str, str])
params (InputParams | None)
- class InputParams(*, language=Language.EN_US, quality=20)[source]
Bases:
BaseModel
- Parameters:
language (Language | None)
quality (int | None)
- language: Language | None
- quality: int | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- async set_model(model)[source]
Set the TTS model to use.
- Parameters:
model (str) – The name of the TTS model.
- 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]
- class pipecat.services.riva.tts.FastPitchTTSService(*, api_key, server='grpc.nvcf.nvidia.com:443', voice_id='English-US.Female-1', sample_rate=None, model_function_map={'function_id': '0149dedb-2be8-4195-b9a0-e57e0e14f972', 'model_name': 'fastpitch-hifigan-tts'}, params=None, **kwargs)[source]
Bases:
RivaTTSService
- Parameters:
api_key (str)
server (str)
voice_id (str)
sample_rate (int | None)
model_function_map (Mapping[str, str])
params (InputParams | None)