cool-salesmen-60705
10/12/2025, 9:49 PMtall-airline-16756
10/12/2025, 9:50 PMtall-airline-16756
10/12/2025, 9:51 PMgenerate_reply(), you can update the TTS (Text-to-Speech) voice configuration for your agent. While the generate_reply() method itself doesn’t take a voice parameter directly, you can easily change the voice just before calling it.
Here’s a friendly step-by-step on how to do this:
1. Use the update_options() method on your agent's TTS instance to switch the voice. For example:
self.tts.update_options(voice="desired_voice")
self.session.generate_reply()
Another great way is to set the voice right when you initialize the agent’s TTS, like this:
tts = inworld.TTS(voice="Ashley")
If you’d like me to share more details or examples for specific TTS providers, just let me know—I’m here to help!
Sources: Gemini Live API plugin | LiveKit Docs | Text-to-speech (TTS) models | LiveKit Docs | basics/say_in_voice.py | Introducing LiveKit Inference: A unified model interface for voice AI | Groq TTS plugin guide | LiveKit Docscool-salesmen-60705
10/12/2025, 9:52 PMtall-airline-16756
10/12/2025, 9:52 PMgpt_realtime, you can easily set the voice parameter when you initialize, or even switch it up on the fly using the update_options method. I’m here to help you through it!
Initial Voice Selection:
from livekit.plugins import openai
agent = openai.realtime.RealtimeModel(voice="shimmer")
This will set your voice to "shimmer". You also have other great options like "alloy", "echo", "fable", "onyx", and "nova" to choose from.
Dynamic Voice Switching:
# Initialize the model with default voice
model = openai.realtime.RealtimeModel(voice="marin")
session = model.session()
# Switch to a different voice during runtime
model.update_options(voice="onyx")
After this, all the text-to-speech will use your new voice. If you want, I’d be happy to walk you through more examples or answer any questions you have!
Sources: livekit-plugins/livekit-plugins-ultravox/livekit/plugins/ultravox/realtime/... | pipeline-tts/tts_comparison/README.md | OpenAI Realtime API plugin guide | LiveKit Docs | web/src/data/presets.ts