ai.languages
Use ai.languages to configure the spoken language of your AI Agent, as well as the TTS engine, voice, and fillers.
An array of objects that accepts the languages parameters.
Parameters
`English`Name of the language ("French", "English", etc). This value is used in the system prompt to instruct the LLM what language is being spoken.
`en-US`Set the language code for ASR
Note: If a different STT model was selected using the openai_asr_engine parameter, you must select a code supported by that engine.
Standard-tier voice picked by SignalWireString format: <engine id>.<voice id>.
Select engine from gcloud, polly, elevenlabs, or deepgram. Select voice from TTS provider reference.
For example, "gcloud.fr-FR-Neural2-B".
See voice usage for more details.
NoneEnables emotion for the set TTS engine. This allows the AI to express emotions when speaking. A global emotion or specific emotions for certain topics can be set within the prompt of the AI.
Valid values: auto
IMPORTANT: Only works with Cartesia TTS engine.
NoneAn array of strings to be used as fillers in the conversation when the agent is calling a SWAIG function. The filler is played asynchronously during the function call.
NoneThe model to use for the specified TTS engine (e.g. arcana). Check the TTS provider reference for the available models.
NoneAn array of strings to be used as fillers in the conversation. This helps the AI break silence between responses.
Note: speech_fillers are used between every 'turn' taken by the LLM, including at the beginning of the call. For more targed fillers, consider using function_fillers.
NoneThe speed to use for the specified TTS engine. This allows the AI to speak at a different speed at different points in the conversation. The speed behavior can be defined in the prompt of the AI.
Valid values:* auto
IMPORTANT: Only works with Cartesia TTS engine.
NoneTTS engine-specific parameters for this language. Accepts the params parameters.
NoneSWAIG function.Deprecated: Use speech_fillers and function_fillers instead.`gcloud`"elevenlabs".Deprecated. Set the engine with the voice parameter.Language params
Use languages[].params to configure TTS engine-specific parameters for individual languages. These settings override global ai.params values for this specific language.
0.75The similarity slider dictates how closely the AI should adhere to the original voice when attempting to replicate it. The higher the similarity, the closer the AI will sound to the original voice. Valid values range from 0.0 to 1.0.
Important: Only works with ElevenLabs TTS engine.
0.50The stability slider determines how stable the voice is and the randomness between each generation. Lowering this slider introduces a broader emotional range for the voice. Valid values range from 0.0 to 1.0.
Important: Only works with ElevenLabs TTS engine.
Use voice strings
Compose the voice string using the <engine id>.<voice id> syntax.
First, select your engine using the gcloud, polly, elevenlabs, or deepgram identifier.
Append a period (.), and then the specific voice ID (for example, en-US-Casual-K) from the TTS provider.
Refer to SignalWire's Supported Voices and Languages
for guides on configuring voice IDs strings for each provider.
Supported voices and languages
SignalWire's cloud platform integrates with leading text-to-speech providers. For a comprehensive list of supported engines, languages, and voices, refer to our documentation on Supported Voices and Languages.
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 from ElevenLabs.
- YAML
- JSON
languages:
- name: English
code: en-US
voice: elevenlabs.rachel
speech_fillers:
- one moment please,
- hmm...
- let's see,
{
"languages": [
{
"name": "English",
"code": "en-US",
"voice": "elevenlabs.rachel",
"speech_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
- name: English
code: en-US
voice: elevenlabs.rachel
{
"languages": [
{
"name": "Mandarin",
"code": "cmn-TW",
"voice": "gcloud.cmn-TW-Standard-A"
},
{
"name": "English",
"code": "en-US",
"voice": "elevenlabs.rachel"
}
]
}
Configure global ElevenLabs parameters
Configure stability and similarity globally for all ElevenLabs voices using ai.params:
- YAML
- JSON
ai:
params:
eleven_labs_stability: 0.6
eleven_labs_similarity: 0.8
languages:
- name: English
code: en-US
voice: elevenlabs.josh
{
"ai": {
"params": {
"eleven_labs_stability": 0.6,
"eleven_labs_similarity": 0.8
},
"languages": [
{
"name": "English",
"code": "en-US",
"voice": "elevenlabs.josh"
}
]
}
}
Configure per-language ElevenLabs parameters
Configure different stability and similarity values for each language using languages[].params:
- YAML
- JSON
ai:
languages:
- name: English
code: en-US
voice: elevenlabs.josh
params:
stability: 0.6
similarity: 0.8
- name: Spanish
code: es-ES
voice: elevenlabs.maria
params:
stability: 0.4
similarity: 0.9
{
"ai": {
"languages": [
{
"name": "English",
"code": "en-US",
"voice": "elevenlabs.josh",
"params": {
"stability": 0.6,
"similarity": 0.8
}
},
{
"name": "Spanish",
"code": "es-ES",
"voice": "elevenlabs.maria",
"params": {
"stability": 0.4,
"similarity": 0.9
}
}
]
}
}
Mixed configuration
Per-language params override global params:
- YAML
- JSON
ai:
params:
eleven_labs_stability: 0.5
eleven_labs_similarity: 0.75
languages:
- name: English
code: en-US
voice: elevenlabs.josh
# Uses global defaults: stability=0.5, similarity=0.75
- name: Spanish
code: es-ES
voice: elevenlabs.maria
params:
stability: 0.3
# Overrides only stability, similarity still uses global 0.75
{
"ai": {
"params": {
"eleven_labs_stability": 0.5,
"eleven_labs_similarity": 0.75
},
"languages": [
{
"name": "English",
"code": "en-US",
"voice": "elevenlabs.josh"
},
{
"name": "Spanish",
"code": "es-ES",
"voice": "elevenlabs.maria",
"params": {
"stability": 0.3
}
}
]
}
}