*** id: 6278079e-ea18-4634-b150-877071640502 unlisted: false hide\_title: false slug: /reference/ai/languages title: languages description: >- Configure the spoken language of your AI Agent, as well as the TTS engine, voice, and fillers. max-toc-depth: 3 ---------------- [tts-providers]: /docs/platform/voice/tts#providers [voices-and-languages]: /docs/platform/voice/tts [swaig-functions]: /docs/swml/reference/ai/swaig/functions [deepgram-codes]: https://developers.deepgram.com/docs/models-languages-overview#nova-3 Use `ai.languages` to configure the spoken language of your AI Agent, as well as the TTS engine, voice, and fillers. ## **Properties** An array of objects that accept the following properties. Name of the language ("French", "English", etc). This value is used in the system prompt to instruct the LLM what language is being spoken. 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][deepgram-codes]. If a different STT model was selected using the [`openai_asr_engine` parameter](/docs/swml/reference/ai/params#paramsopenai_asr_engine), you must select a code supported by that engine. String format: `.`. Select engine from `gcloud`, `polly`, `elevenlabs`, or `deepgram`. Select voice from [TTS provider reference][tts-providers]. For example, `"gcloud.fr-FR-Neural2-B"`. See [`voice` usage](#use-voice-strings) for more details. Enables 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` Only works with `Cartesia` TTS engine. An array of strings to be used as fillers in the conversation when the agent is calling a [`SWAIG function`][swaig-functions]. The filler is played asynchronously during the function call. The model to use for the specified TTS engine (e.g. `arcana`). Check the [TTS provider reference][tts-providers] for the available models. 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 targed fillers, consider using `function_fillers` . The 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` Only works with [`Cartesia`](/docs/platform/voice/tts/cartesia) TTS engine. TTS engine-specific parameters for this language. 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. 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. An array of strings to be used as fillers in the conversation and when the agent is calling a [`SWAIG function`][swaig-functions]. **Deprecated**: Use `speech_fillers` and `function_fillers` instead. The engine to use for the language. For example, `"elevenlabs"`. **Deprecated.** Set the engine with the [`voice`](#use-voice-strings) parameter. ## Use `voice` strings Compose the `voice` string using the `.` 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][tts-providers] for guides on configuring voice ID 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][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 languages: - name: English code: en-US voice: elevenlabs.rachel speech_fillers: - one moment please, - hmm... - let's see, ``` ```json { "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 languages: - name: Mandarin code: cmn-TW voice: gcloud.cmn-TW-Standard-A - name: English code: en-US voice: elevenlabs.rachel ``` ```json { "languages": [ { "name": "Mandarin", "code": "cmn-TW", "voice": "gcloud.cmn-TW-Standard-A" }, { "name": "English", "code": "en-US", "voice": "elevenlabs.rachel" } ] } ``` ### Configure per-language ElevenLabs parameters Configure different stability and similarity values for each language using `languages[].params`: ```yaml 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 ``` ```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 } } ] } } ```