ai.languages
Use ai.languages
to configure the spoken language of your AI Agent, as well as the TTS engine, voice, and fillers.
Supported Voices and Languages
SignalWire's cloud platform integrates with these leading text-to-speech providers:
- Google Cloud
- Amazon Web Services
- ElevenLabs
- Deepgram
For a comprehensive list of supported engines, languages, and voices, refer to our documentation on Supported Voices and Languages.
Parameters
If changing the language from the default, the name, code, voice, and engine parameters are required.
Name | Type | Default | Description |
---|---|---|---|
name Optional | string | English | Name of the language ("French", "English", etc). |
code Optional | string | en-US | Language code. For example, "fr-FR" . List of language codes can be found here: Google Codes. |
voice Optional | string | picked by SignalWire | Voice to use for the language. For example, "fr-FR-Neural2-B" . List of language voices can be found here Google Voices. |
function_fillers Optional | string[] | An array of strings to be used as fillers in the conversation when calling a swaig function . This helps the AI break silence between responses. | |
speech_fillers Optional | string[] | An array of strings to be used as fillers in the conversation. This helps the AI break silence between responses. | |
engine Optional | string | gcloud | The engine to use for the language. For example, "elevenlabs" . |
Examples
Set a Single Language
SWML will automatically assign the language (and other required parameters) to the defaults in the above table if left unset.
This example uses ai.language
to configure a specific English-speaking voice.
- YAML
- JSON
languages:
- name: English
code: en-US
voice: rachel
engine: elevenlabs
fillers:
- one moment please,
- hmm...
- let's see,
{
"languages": [
{
"name": "English",
"code": "en-US",
"voice": "rachel",
"engine": "elevenlabs",
"fillers": [
"one moment please,",
"hmm...",
"let's see,"
]
}
]
}
Set Multiple Languages
SWML will automatically assign the language (and other required parameters) to the defaults in the above table if left unset.
This example uses ai.language
to configure multiple languages using different TTS engines.
- YAML
- JSON
languages:
- name: Mandarin
code: cmn-TW
voice: gcloud.cmn-TW-Standard-A
engine: gcloud
- name: English
code: en-US
voice: rachel
engine: elevenlabs
{
"languages": [
{
"name": "Mandarin",
"code": "cmn-TW",
"voice": "gcloud.cmn-TW-Standard-A",
"engine": "gcloud"
},
{
"name": "English",
"code": "en-US",
"voice": "rachel",
"engine": "elevenlabs"
}
]
}