Callingai

languages

View as MarkdownOpen in Claude

Use ai.languages to configure the spoken language of your AI Agent, as well as the TTS engine, voice, and fillers.

Use ai.multilingual instead when a single call may move between languages and you want the agent to follow the caller. If your agent only ever speaks one language, set the voice on a single entry, or leave languages out and set the voice directly.

languages and multilingual are mutually exclusive. If both are set, SignalWire uses multilingual and ignores languages entirely. To use languages, remove the multilingual key rather than emptying it.

Properties

ai.languages
object[]

An array of objects that accept the following properties.

languages[].name
stringRequired

Name of the language (“French”, “English”, etc). This value is used in the system prompt to instruct the LLM what language is being spoken.

languages[].code
string | string[]Required

Set the language code for ASR (Automatic Speech Recognition) (STT (Speech-to-text)) purposes. By default, SignalWire uses Deepgram’s Nova-3 STT engine, so this value should match a code from Deepgram’s Nova-3 language codes table.

Supply an array to have this voice listen for up to three codes at once.

Set it to multi to have the engine transcribe whichever of its supported languages the caller speaks, rather than one fixed language. The agent still answers in this entry’s single voice. To answer in the caller’s language as well, use ai.multilingual instead, which builds on the same code-switching mode and adds a voice per language.

If a different STT model was selected using the openai_asr_engine parameter, you must select a code supported by that engine.

languages[].voice
stringRequired

String format: <engine id>.<voice id>, with an optional :<model id> suffix for engines that offer a choice of model. Select engine from gcloud, polly, amazon, azure, openai, elevenlabs, deepgram, cartesia, rime, inworld, minimax, groq-tts, mistral, grok, smallest, fish, or speechify. Select voice from TTS provider reference. For example, "gcloud.fr-FR-Neural2-B" or "elevenlabs.rachel:eleven_flash_v2_5". Always name the engine: a bare voice id resolves against a default engine that can change. See voice usage for more details.

languages[].auto_emotion
booleanDefaults to false

Lets the AI vary its emotion as it speaks. A global emotion, or specific emotions for certain topics, can be set within the prompt of the AI.

Only works with the Cartesia and MiniMax TTS engines. For a fixed MiniMax emotion, use params.emotion instead.

languages[].auto_speed
booleanDefaults to false

Lets the AI vary its speaking speed during the conversation. The speed behavior can be defined in the prompt of the AI.

Only works with the Cartesia, ElevenLabs, MiniMax, Rime, Inworld, Smallest, and Fish TTS engines.

languages[].function_fillers
string[]Defaults to None

An 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.

languages[].listen_language
string | string[]

A legacy alias for code, kept so that documents written before code existed keep working. It is read only when code is absent, so it has no effect alongside code. Write code in new documents.

languages[].model
stringDefaults to None

The model to use for the specified TTS engine (e.g. coda). Set this only if the voice string does not already carry a :<model id> suffix — a suffix on the voice string wins, and this key is then ignored without a warning. Check the TTS provider reference for the available models.

languages[].speech_fillers
string[]Defaults to None

An array of strings to be used as fillers in the conversation. This helps the AI break silence between responses.

speech_fillers are used between every ‘turn’ taken by the LLM, including at the beginning of the call. For more targeted fillers, consider using function_fillers.
languages[].turn_fillers
string[]

Short backchannels played while the caller still has the floor and the agent is deliberately waiting, as when they spell a name or read out a number, to signal it is still listening. Which waits earn one is set by params.turn_filler_sources.

Unlike the language-keyed map on ai.multilingual, this is a plain array, because the entry already fixes the language.
languages[].params
objectDefaults to None

TTS engine-specific parameters for this language.

params.similarity
numberDefaults to 0.75

The 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.

Only works with the ElevenLabs TTS engine.

params.stability
numberDefaults to 0.50

The 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.

Only works with the ElevenLabs TTS engine.

params.speakingRate
numberDefaults to 1.0

Adjusts how quickly the voice speaks. Values below 1.0 slow the voice down; values above 1.0 speed it up. Valid values range from 0.5 to 1.5.

Only works with the Inworld TTS engine.

params.temperature
numberDefaults to 1.0

Controls the randomness and expressiveness of the generated speech. Lower values produce a more consistent, predictable delivery; higher values introduce more variation. Valid values range from 0.0 to 2.0.

Only works with the Inworld TTS engine.

params.speed
numberDefaults to 1.0

How quickly the voice speaks. Values below 1.0 slow the voice down; values above 1.0 speed it up. Valid values range from 0.5 to 2.0.

Only works with the MiniMax TTS engine.

params.vol
numberDefaults to 1.0

The speaking volume. Lower values are quieter. Valid values range from 0.1 to 1.0.

Only works with the MiniMax TTS engine.

params.pitch
integerDefaults to 0

The pitch shift in semitones. Negative values lower the pitch; positive values raise it. Valid values range from -12 to 12.

Only works with the MiniMax TTS engine.

params.emotion
string

A fixed emotional tone for the generated speech. Valid values are happy, sad, angry, fearful, disgusted, surprised, and neutral. To vary the emotion automatically during a conversation, use languages[].auto_emotion instead.

Only works with the MiniMax TTS engine.

languages[].pronounce
object[]

Pronunciation replacements applied only while this language is active. Each entry takes the same replace, with, and ignore_case properties as ai.pronounce, which applies to the whole call instead.

languages[].fillers
string[]Deprecated

A deprecated spelling of function_fillers, and never used for speech fillers. An explicit function_fillers on the same entry takes precedence over it. Deprecated: Use function_fillers instead.

languages[].engine
stringDeprecated

The engine to use for the language. For example, "elevenlabs". Deprecated. Set the engine with the voice parameter.

Use voice strings

Compose the voice string using the <engine id>.<voice id> syntax, optionally followed by :<model id>.

First, select your engine using the gcloud, polly, amazon, azure, openai, elevenlabs, deepgram, cartesia, rime, inworld, minimax, groq-tts, mistral, grok, smallest, fish, or speechify identifier. Append a period (.), and then the specific voice ID from the TTS provider, giving gcloud.en-US-Casual-K. Where an engine offers more than one model, append a colon (:) and the model ID, as in elevenlabs.rachel:eleven_flash_v2_5. Refer to SignalWire’s Supported Voices and Languages for guides on configuring voice ID strings for each provider.

Always include the engine. A voice ID on its own — en-US-Casual-K rather than gcloud.en-US-Casual-K — is resolved against a default engine, and that default can change. A voice string that names its engine keeps working regardless.

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

This example uses ai.languages to configure a specific English-speaking voice from ElevenLabs.

1ai:
2 languages:
3 - name: English
4 code: en-US
5 voice: elevenlabs.rachel
6 speech_fillers:
7 - one moment please,
8 - hmm...
9 - let's see,

Set multiple languages

This example uses ai.languages to configure multiple languages using different TTS engines. The code comes from the ASR engine’s list and the voice id from the TTS provider’s, so the two do not have to use the same spelling of a language.

1ai:
2 languages:
3 - name: Mandarin
4 code: zh-TW
5 voice: gcloud.cmn-TW-Standard-A
6 - name: English
7 code: en-US
8 voice: elevenlabs.rachel

Configure per-language ElevenLabs parameters

Configure different stability and similarity values for each language using languages[].params:

1ai:
2 languages:
3 - name: English
4 code: en-US
5 voice: elevenlabs.josh
6 params:
7 stability: 0.6
8 similarity: 0.8
9 - name: Spanish
10 code: es
11 voice: elevenlabs.maria
12 params:
13 stability: 0.4
14 similarity: 0.9