Configuration options for the Live API | Firebase AI Logic
Configuration options for the Live API
Even with the basic implementation for the Live API, you can build engaging and powerful interactions for your users. You can optionally customize the experience even more by using the following configuration options:
- Response voice and language
- Transcriptions for audio input and output
- Voice activity detection (VAD)
- Session management
Response voice and language
You can make the model respond in a specific voice and influence the model to respond in different languages.
Specify a response voice
| Voice name | Description | Gender | Demo |
|---|---|---|---|
Achernar |
Soft | Female | Your browser doesn't support the audio element. |
Achird |
Friendly | Male | Your browser doesn't support the audio element. |
Algenib |
Gravelly | Male | Your browser doesn't support the audio element. |
Algieba |
Smooth | Male | Your browser doesn't support the audio element. |
Alnilam |
Firm | Male | Your browser doesn't support the audio element. |
Aoede |
Breezy | Female | Your browser doesn't support the audio element. |
Autonoe |
Bright | Female | Your browser doesn't support the audio element. |
Callirrhoe |
Easy-going | Female | Your browser doesn't support the audio element. |
Charon |
Informative | Male | Your browser doesn't support the audio element. |
Despina |
Smooth | Female | Your browser doesn't support the audio element. |
Enceladus |
Breathy | Male | Your browser doesn't support the audio element. |
Erinome |
Clear | Female | Your browser doesn't support the audio element. |
Fenrir |
Excitable | Male | Your browser doesn't support the audio element. |
Gacrux |
Mature | Female | Your browser doesn't support the audio element. |
Iapetus |
Clear | Male | Your browser doesn't support the audio element. |
Kore |
Firm | Female | Your browser doesn't support the audio element. |
Laomedeia |
Upbeat | Female | Your browser doesn't support the audio element. |
Leda |
Youthful | Female | Your browser doesn't support the audio element. |
Orus |
Firm | Male | Your browser doesn't support the audio element. |
Puck |
Upbeat | Male | Your browser doesn't support the audio element. |
Pulcherrima |
Forward | Female | Your browser doesn't support the audio element. |
Rasalgethi |
Informative | Male | Your browser doesn't support the audio element. |
Sadachbia |
Lively | Male | Your browser doesn't support the audio element. |
Sadaltager |
Knowledgeable | Male | Your browser doesn't support the audio element. |
Schedar |
Even | Male | Your browser doesn't support the audio element. |
Sulafat |
Warm | Female | Your browser doesn't support the audio element. |
Umbriel |
Easy-going | Male | Your browser doesn't support the audio element. |
Vindemiatrix |
Gentle | Female | Your browser doesn't support the audio element. |
Zephyr |
Bright | Female | Your browser doesn't support the audio element. |
Zubenelgenubi |
Casual | Male | Your browser doesn't support the audio element. |
To specify a response voice, set the voice name within the speechConfig object as part of the model configuration.
Influence the response language
The Live API models automatically choose the appropriate language for their responses.
Languages supported by all audio-generating models
| Language | BCP-47 Code | Language | BCP-47 Code |
|---|---|---|---|
| Arabic (Egyptian) | ar-EG | German (Germany) | de-DE |
| English (US) | en-US | Spanish (US) | es-US |
| French (France) | fr-FR | Hindi (India) | hi-IN |
| Indonesian (Indonesia) | id-ID | Italian (Italy) | it-IT |
| Japanese (Japan) | ja-JP | Korean (Korea) | ko-KR |
| Portuguese (Brazil) | pt-BR | Russian (Russia) | ru-RU |
| Dutch (Netherlands) | nl-NL | Polish (Poland) | pl-PL |
| Thai (Thailand) | th-TH | Turkish (Turkey) | tr-TR |
| Vietnamese (Vietnam) | vi-VN | Romanian (Romania) | ro-RO |
| Ukrainian (Ukraine) | uk-UA | Bengali (Bangladesh) | bn-BD |
| English (India) | en-IN & hi-IN bundle | Marathi (India) | mr-IN |
| Tamil (India) | ta-IN | Telugu (India) | te-IN |
If you want the model to respond in a non-English language or always in a specific language, you can use influence the model's responses by using system instructions like these examples:
Reinforce to the model that a non-English language may be appropriate
Listen to the speaker carefully. If you detect a non-English language, respond in the language you hear from the speaker. You must respond unmistakably in the speaker's language.Tell the model to always respond in a specific language
RESPOND IN LANGUAGE. YOU MUST RESPOND UNMISTAKABLY IN LANGUAGE.
Transcriptions for audio input and output
As part of the model's response, you can receive transcriptions of the audio input and the model's audio response. You set this configuration as part of the model configuration.
- For transcription of the audio input, add
inputAudioTranscription. - For transcription of the model's audio response, add
outputAudioTranscription.
Note the following:
- You can configure the model to return transcriptions of both input and output, or you can configure it to return only one or the other.
- The transcripts are streamed along with the audio, so it's best to collect them like you do text parts with each turn.
- The transcription language is inferred from the audio input and the model's audio response.
Voice activity detection (VAD)
The model automatically performs voice activity detection (VAD) on a continuous audio input stream. VAD is enabled by default.
Session management
Learn about the following sessions-related topics:
- Advanced capabilities, including:
- Session-related limits, including connection and session length limits, session context window limits, and rate limits.
- Options for handling session limits, including: