many-forest-60185
10/29/2025, 4:21 PMtall-airline-16756
10/29/2025, 4:21 PMtall-airline-16756
10/29/2025, 4:22 PMlanguage parameter with ISO-639-1 codes (for example, 'en' for English or 'es' for Spanish).
If you're looking to switch languages on the fly, no worries! You can use the update_options method during runtime to change languages without having to restart the agent. Here's a quick example:
self.tts.update_options(language="es") # Switch to Spanish
For a smooth multilingual experience, you might consider:
• Using a multilingual STT model to detect the language.
• Processing the recognized text with an LLM that understands multiple languages.
• Dynamically updating the TTS language with update_options.
This way, you can enjoy seamless language switching throughout your session. If you'd like, I’m here to help with more details or examples—just let me know!
Sources: Speech-to-text (STT) models | LiveKit Docs | pipeline-tts/changing_language/README.md | Cartesia TTS | LiveKit Docs | Cartesia TTS plugin guide | LiveKit Docs | livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/tts.p...many-forest-60185
10/29/2025, 4:23 PMtall-airline-16756
10/29/2025, 4:24 PMvoice parameter at runtime for Cartesia using the update_options method. This makes it super easy to switch voices dynamically during your session. The voice parameter can be:
• A voice ID string (for example, "794f9389-aac1-45b6-b726-9d9369183238").
• A custom voice embedding array.
Here’s a quick example to guide you:
self.tts.update_options(voice="794f9389-aac1-45b6-b726-9d9369183238")
Once you update it, the new voice will be used for the very next synthesized utterance. If you have any questions or want more examples, just let me know—I’m here to help!
Sources: Hume TTS plugin guide | LiveKit Docs | plugins/cartesia/src/tts.ts | livekit-plugins/livekit-plugins-google/livekit/plugins/google/tts.py