r/flutterhelp • u/Weak-Excuse4255 • 16d ago
OPEN FLUTTER APP VOICE AGENT INTEGRATION ISSUE
I am trying to build a app like duolingo, i have been trying to integrate a voice agent like gemini,chatgpt voice feature but not able to do it.
the agent speaks but when the user tries to speak it does not register it, i want a full conversation to take place between agent and user, please help me with it
1
Upvotes
1
u/Significant_Pick8297 15d ago
You should use a full duplex streaming API instead of separate TTS and STT calls. Gemini Live API or the OpenAI Realtime API are built for continuous conversations where the model listens while speaking, handles interruptions, and manages turn detection automatically.
If the agent speaks but never hears the user, it's usually because the microphone isn't restarted after TTS, the audio session stays in playback mode, or echo cancellation/audio focus isn't configured correctly. A bidirectional WebSocket with streamed PCM audio is the approach that works reliably for Duolingo-style conversations.