Skip to main content
Every voice channel turns the caller’s audio into text with a speech recognition (ASR) provider, and turns the agent’s replies into audio with a speech synthesis (TTS) provider. You declare each provider as a model group in integrations.yml, then name that group on the channel’s asr or tts, or as voice.asr and voice.tts in agent.yml. Recognition and synthesis are chosen separately, so you can mix providers. To use a provider that is not built in, see Custom speech providers.

Choose a provider

Set provider on the model group, and choose models and voices per language in language_map. Point the channel, or agent.yml, at the group’s id:
integrations.yml
Set the API key in your environment or .env. If a key is missing, Mantle logs the missing variable and the voice conversation can’t start. In the Inspector, you see a “Voice isn’t set up yet” warning. Configure Speechmatics Agent STT as its own model group:
integrations.yml
Gradium supports real-time speech recognition and synthesis over WebSockets. Set it up as two model groups, with the recognition language and synthesis voice in language_map:
integrations.yml
Gradium uses GRADIUM_API_KEY for both providers. Its default synthesis voice is YTpq7expH9539ERJ; set a different voice for each language as needed.

Defaults

If the Inspector omits a side, and voice.asr or voice.tts does not set it either, that side still works with only DEEPGRAM_API_KEY, using Deepgram’s earlier models: Those defaults are English, even if agent.language is another language. For another language, set language_map on the model group. Telephony channels have no defaults, so set both sides on the channel or in agent.yml.

Speech recognition settings

Settings other than provider, api_key, and language_map go on the ASR model, next to provider.

Speech synthesis settings

Settings other than provider, api_key, and language_map go on the TTS model, next to provider. For example, select an Inworld voice and language in language_map:
integrations.yml
For Inworld speech recognition, select the provider and language in language_map:
integrations.yml
All speech synthesis engines also accept timeout (seconds, default 30). Synthesized replies are cached in memory, so a repeated line, such as a greeting, plays without a new provider request.

Regional endpoints

To keep audio in a region, use the provider’s regional endpoint. For Deepgram, use a full WebSocket URL for both speech recognition and speech synthesis. Include the API path for the selected engine. Existing ASR configs with a host-only endpoint continue to work, but use a full URL for new configs:
integrations.yml
Check your provider’s documentation for the hosts available to your account. To change the default Deepgram host without editing integrations.yml, set DEEPGRAM_BASE_URL, for example wss://api.eu.deepgram.com. Rasa adds the API path for each engine. An endpoint in integrations.yml still wins. For Speechmatics, region selects the Agent STT endpoint. The default global endpoint routes to the nearest region; set eu, us, or au to pin a region.

Troubleshoot setup

Keep keys out of integrations.yml, shared logs, and source control. When switching providers, keep the other groups in model_groups. Speech settings belong on the speech model group. The channel, or voice.asr and voice.tts in agent.yml, names that group. Both are read from the live project; restart to pick them up. Changing skills, or which group orchestrator.model_group names, needs rasa train. See integrations.yml for configuration lifecycles. Use Test and monitor voice to distinguish recognition, turn handling, tool, and playback failures before tuning a provider.

See also