#Hey, I am running into issues with the Flutter elevenlabs_agents package (https://pub.dev/packages/
1 messages · Page 1 of 1 (latest)
Short answer: I can’t verify anything specific about the community Flutter package itself in our docs, but the symptoms you describe match a few configuration issues we do document on the ElevenLabs side. Here are the checks that reliably fix “connects but agent doesn’t speak / onModeChange never fires”:
- Ensure the agent has a First message. If it’s blank, the agent will wait in listening state. You can also force a greeting per session by sending a first_message override in the WebSocket handshake (conversation_initiation_client_data → conversation_config_override → agent.first_message). (elevenlabs.io)
- Verify client events are enabled for your agent. Not all events are on by default; if the “mode change” event isn’t enabled in the agent’s Advanced settings, onModeChange won’t fire even though you’re connected. (elevenlabs.io)
- Make sure the agent isn’t set to Chat-only mode. In Chat mode, the agent won’t produce audio; you must send a text message to get a response. If you want voice, keep Chat-only off (or don’t pass textOnly). (elevenlabs.io)
- If you use dynamic variables in the First message or prompt, confirm all required variables are provided at start. Missing required dynamic variables can result in no transcript/call and apparent “silence.” You can see these errors in Call History (“Missing required dynamic variables in …”). (help.elevenlabs.io)
- Check concurrency limits for your workspace. Hitting the limit can prevent the agent from taking a turn even though the socket connects. Compare your plan’s voice concurrency and consider burst options. (help.elevenlabs.io)
- As a workaround to guarantee kickoff even without a First message, send an initial user text message programmatically right after session start (e.g., sendUserMessage). This immediately prompts the agent to respond. (elevenlabs.io)
- For deeper debugging, capture raw conversation events (e.g., via SDK onMessage/onDebug). Enterprise teams can also use the real-time conversation monitor WebSocket to inspect event flow in flight. (elevenlabs.io)
If you’ve checked
I just checked. It seems that no audio signal is captured. In the "analysis" tab at the agent it shows that the agent asks the first message but it is never heard by me. i get the state listening but no audio has been transfered to the agent it seems
Thanks—that symptom matches two common, documented causes. Please check these, in order:
- Make sure the conversation isn’t in text‑only mode
- If “text_only” is enabled (either in the agent or via overrides), the agent will generate the first message but no audio will be produced. In overrides, this is conversation.text_only; ensure it’s false or unset and that you haven’t enabled a text‑only override in the agent’s Security tab. (elevenlabs.io)
- Verify client events are enabled for your agent
- The onModeChange callback only fires if the corresponding client events are enabled for the agent. Enable the relevant events in the agent’s Advanced settings, then retry. (elevenlabs.io)
- Confirm mic/speaker permissions on device
- iOS: NSMicrophoneUsageDescription must be present in Info.plist. Android: RECORD_AUDIO (and typically MODIFY_AUDIO_SETTINGS) must be granted at runtime. (elevenlabs.io)
- If you are testing on the Android emulator, enable “Virtual microphone uses host audio input” or you’ll see no captured signal. (elevenlabs.io)
- Check output isn’t muted or routed to the wrong device
- With the Web/JS SDK you can read/set output volume (getOutputVolume/setVolume) and switch output devices (changeOutputDevice). Use these to verify audio is actually being produced and to rule out a muted/incorrect output route. (elevenlabs.io)
- Cross‑check the agent in the dashboard
- Start a voice chat with the same agent from the ElevenLabs dashboard (which uses our Web SDK) to confirm that audio is generated and playable end‑to‑end. If it plays there but not in your app, the issue is client‑side. (elevenlabs.io)
If you work through the above and still get “listening” with no captured signal, please share whether the agent is configured for text‑only, which platform you’re testing on (iOS/Android/emulator), and whether device permissions were granted so we can narrow it further.
Sources:
Overrides | ElevenLabs Documentation
JavaScript SDK | ElevenLabs Documentation
React Native SDK | ElevenLabs Documentation
Cross-platform Voice Agents with Expo React Native | ElevenLabs Documentation
JavaScript SDK | ElevenLabs Documentation
Quickstart | ElevenLabs Documentation
which events should i add to the agent to work more stable? is less more? which one are required
Short answer:
-
Required for any WebSocket-based agent session
- Send user_audio_chunk while the mic is active; that’s the user’s audio input stream. (elevenlabs.io)
- Respond to server ping with a pong to keep the socket healthy. If you use an official SDK this is handled for you. (elevenlabs.io)
- Handle audio events and play them back (queue chunks to avoid overlap) so the user actually hears the agent. (elevenlabs.io)
-
Server-to-client events you should handle for a stable UX
- conversation_initiation_metadata (read audio formats), audio, user_transcript, agent_response, agent_response_correction (for barge-in), interruption, and client_tool_call (only if you configured client tools). (elevenlabs.io)
-
Client-to-server events that are optional but recommended when needed
- conversation_initiation_client_data to pass dynamic variables and/or overrides (e.g., first_message, voice, language) at session start. Use only if you actually personalize per session. (elevenlabs.io)
- contextual_update for non-interrupting UI/context hints; send sparingly. (elevenlabs.io)
- user_message if you need to inject text instead of audio. (elevenlabs.io)
- user_activity pings (e.g., every 30–60s) to prevent turn timeouts during silence. (elevenlabs.io)
Is less more?
- Yes—send only what you need. Docs explicitly recommend not overwhelming the LLM with too many contextual updates, using reasonable user_activity intervals, and implementing robust error/reconnect/audio buffering while promptly replying to PING. (elevenlabs.io)
Minimal, reliable baseline
- Implement: user_audio_chunk send, audio playback, ping→pong, and handlers for conversation_initiation_metadata, agent_response(+correction), user_transcript, interruption. Add client_tool_call handling only if you defined client tools; add conversation_initiation_client_data only when you need per-session personalization. (elevenlabs.io)
Tip for your “listening but no audio heard” symptom
- Double-check you’re consuming audio events
I mean which events should i add to the agent to work more stable and proper?