I am building a voice to voice agent in Android SD...
# ask-ai
l
I am building a voice to voice agent in Android SDK using Gemini Live. I am sending text using sendText function from Livekit SDK to topic "lk.chat" but agent is not replying to me either in voice or text.
t
Thanks for reaching out, Pulkit. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm here to help you make sure your Gemini Live agent responds smoothly to text sent via the
sendText
function in the LiveKit Android SDK. Let's walk through a few important points together: • First, please double-check that you're using the
sendText
method on the
LocalParticipant
and that the topic is set to
lk.chat
. This is the default topic that Gemini Live agents listen to for text input. • Next, make sure that text input is enabled for your agent. Usually, this is on by default, but if you're working with
RoomInputOptions
, just confirm that
text_enabled
isn’t set to
False
. • Also, verify that your agent is set up to respond with voice. The agent should take the text input and reply with audio using the voice you’ve configured (like "Puck"). • If you'd like the agent to send back text responses as well, please check that the
modalities
parameter in the agent’s configuration includes both
AUDIO
and
TEXT
. If after trying these steps things still aren’t working as expected, please don’t hesitate to reach out. I’m here to help you troubleshoot further and get everything running perfectly! Sources: Text and transcriptions | LiveKit docs | Sending text | LiveKit docs | Gemini Live API plugin | LiveKit docs
l
how to verify this • Also, verify that your agent is set up to respond with voice. The agent should take the text input and reply with audio using the voice you’ve configured (like "Puck").
t
Let's make sure your Gemini Live agent is all set to respond with voice. Here's how you can check: • Take a look at the
modalities
parameter in your agent's configuration. If you see
AUDIO
there (like
["AUDIO"]
or
["TEXT", "AUDIO"]
), it means your agent is ready to respond with voice. • Usually, the
modalities
parameter defaults to
["AUDIO"]
, which means audio responses will be enabled using the chosen voice (for example, "Puck"). • If you find that
modalities
is set to
["TEXT"]
, then your agent will only reply in text, and you'd need a separate TTS plugin to get voice responses. If you can access the agent's code, you might want to check the
RealtimeModel
initialization to confirm everything’s in place. It would look something like this:
Copy code
RealtimeModel(
    model="gemini-2.5-flash-native-audio-preview-09-2025",
    voice="Puck",
    modalities=["AUDIO"]
)
Feel free to reach out if you'd like me to walk you through this or if you have any other questions. I'm here to help! Sources: Gemini Live API plugin | LiveKit docs | Gemini Live API plugin | LiveKit docs | web/src/components/code-viewer.tsx
l
It is working fine with WebClient in text mode, but not working with Android SDK.
t
It sounds like you're experiencing some trouble with the Gemini Live agent working in the WebClient but not in the Android SDK. Let's walk through some steps together to help troubleshoot this: • Verify Audio Configuration: Please double-check that the audio encoding settings are consistent across platforms. The Gemini Live API expects specific audio formats (16kHz input, 24kHz output), so matching these is key. • Check Activity Detection: Make sure manual activity detection is set up correctly. On Android, you might need to explicitly call
start_user_activity()
to keep things running smoothly. • Session Management: It's important to manage the session lifecycle carefully, including handling session resumption and retry logic, especially since mobile networks can behave differently. • Permissions and Audio Focus: Could you verify that the Android app has microphone permissions enabled and is managing audio focus properly? This often makes a big difference. • Logs and Diagnostics: Try enabling detailed logging in the Android SDK and compare those logs with the WebClient. This can help spot any signaling or media flow issues. If you’re still running into problems after these checks, it would be really helpful if you could share a few details with us: • Your Android SDK version and device model • The Android OS version you’re using • Console logs from the Android app • Your network type (WiFi or mobile data) and any quality metrics you can provide • The exact steps you take to reproduce the issue With this information, we’ll be in a great position to get to the bottom of the issue and find a solution that works for you. Please feel free to reach out anytime—we’re here to help! Sources: Voice Assistant Applications | livekit/livekit_composite | DeepWiki | livekit-plugins/livekit-plugins-google/livekit/plugins/google/realtime/real... | README.md | Troubleshooting & Common Issues | livekit/livekit_composite | DeepWiki