say verb converts text to speech and plays it to the caller. It supports multiple TTS vendors, languages, voices, and advanced options such as looping, early media, and fallback synthesizers.
Configuration
The following table lists the available parameters:Synthesizer options
Synthesizer options let you pass settings to the speech provider, such as the speaking rate, the voice style, or text normalization. Use them when the standardsynthesizer parameters, such as voice and language, don’t cover a speech provider setting.
Configure options
Add the settings tosynthesizer.options. Settings that the speech provider expects as query parameters go in a queryOptions object inside options:
- Nesting: Nest the fields the way the speech provider’s API does. ElevenLabs options are mostly flat, but Google expects
speakingRateandpitchinsideaudioConfig. - Supported fields: Each speech provider accepts only the fields listed in Options by speech provider. If a field isn’t one of them, Voice Gateway ignores that field and applies the rest.
- Invalid values: If a value has the wrong type or is out of range, Voice Gateway ignores all the options for that request and synthesizes the speech without them.
- Parameters that options can’t override: Set the voice, language, and engine with
synthesizer.voice,synthesizer.language, andsynthesizer.engine. Options can’t override them.
Options by speech provider
The tables list the fields that you can set for each speech provider. Fields that start withqueryOptions. go in the queryOptions object inside options.
ElevenLabs
ElevenLabs
Google
For details, see the Google Cloud Text-to-Speech API.
To select the voice and the gender, use
synthesizer.voice and synthesizer.gender.Example:AWS
AWS
For details, see the Amazon Polly API.
To select the engine and the language, use
synthesizer.engine and synthesizer.language.Example:Deepgram
Deepgram