I'm using a locally hosted Livekit playground webr...
# ask-ai
l
I'm using a locally hosted Livekit playground webrtc web client for a voice agent. The voice agent ignore any text input into the "Enter Message" field, is there a bug and has it been resolved with later versions?
t
Thanks for reaching out, Chris. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks for reaching out! Could you please let me know if the issue happens when you press the Enter key, click the Send button, or maybe both? Also, if you happen to see any error messages in the browser console when you try to send a message, that info would be really helpful. I'm here to help you get this sorted out! Sources: Text and transcriptions | LiveKit docs | Agents v0.x migration guide - Node.js | LiveKit Docs | Agents v0.x migration guide - Python | LiveKit docs | examples/demo/demo.ts | README.md
l
nothing happens when pressing the enter key or click send, browser logs as follows, nothing happen when enter is pressed {room 'room-onG5-UMZS', roomID: 'RM_Z67Xqy7dsmhk', participant: 'identity-5nKc', pID: 'PA_6WueoTVvJXU6', trackID: undefined, …}_ 1. enabled 2. : 3. true 4. kind 5. : 6. "video" 7. muted 8. : 9. false 10. pID 11. : 12. "PA_6WueoTVvJXU6" 13. participant 14. : 15. "identity-5nKc" 16. room 17. : 18. "room-onG5-UMZS" 19. roomID 20. : 21. "RM_Z67Xqy7dsmhk" 22. source 23. : 24. "camera" 25. streamID 26. : 27. "18a6d260-20fc-4d7c-8fe1-21419fc1655d" 28. streamTrackID 29. : 30. "18a6d260-20fc-4d7c-8fe1-21419fc1655d" 31. trackID 32. : 33. undefined
t
Hi there! I understand how important it is for the "Enter" key and "Send" button in the LiveKit playground to work smoothly when sending messages. From your logs, it looks like the input might not be getting processed, so let's work through some troubleshooting steps together: 1. Check the "Send" button state: Please make sure the button isn’t disabled once you type something in the input field. If it stays disabled, it might mean the input isn’t being recognized properly. 2. Verify the "onSend" callback: The message sending relies on an "onSend" callback being set up correctly. If this is missing, the input won’t go through. 3. Inspect the browser console: Take a peek at the browser console for any JavaScript errors that could be stopping the "onKeyDown" or "onClick" events from working. 4. Ensure room connection: The chat needs an active connection to a LiveKit room, so double-check that the room is connected and initialized properly. 5. Test with text input: Make sure the message field isn’t empty when you try to send a message. If you try these steps and still run into trouble, please don’t hesitate to reach out. I’m here to help you through this and provide any additional debugging tips you might need! Sources: web/src/components/auth.tsx | Troubleshooting & Common Issues | livekit/livekit_composite | DeepWiki | README.md | examples/demo/demo.ts
l
when you enter the text it appears in the scrolling transcript so the button and field must be working, it is not being received by the realtime API
t
I understand how frustrating it can be when the message shows up in the transcript but isn’t received by the Realtime API. Let’s work through this together to get it sorted out. Here are some helpful steps to troubleshoot and resolve the issue: 1. Verify the "modalities" configuration: Please check that your agent is set up with
modalities=["text", "audio"]
. If it’s only
["text"]
, the API won’t generate audio, and it will fall back to using Text-to-Speech (TTS). 2. Check backend logs: Keep an eye out for warnings like "text response received from realtime API, falling back to use a TTS model." This usually means the API didn’t send audio. 3. Monitor the "response_done" event: See if the response status shows as "incomplete" or "failed," which might be due to content filtering, server errors, or rate limits. 4. Validate API key and model: Double-check that your API key has access to the Realtime API and that the model you’re using supports audio output. 5. Test with default presets: Try using a known working preset like "Helpful AI" or "Customer Support" in the LiveKit Realtime Playground to compare and see if the issue persists. These steps should guide you toward identifying and fixing the problem. If you hit any bumps or have specific errors pop up while troubleshooting, please don’t hesitate to reach out—I’m here to help! Sources: livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/realtime/real... | web/src/data/presets.ts
l
where would I check this: Verify the "modalities" configuration: Please check that your agent is set up with
modalities=["text", "audio"]
. If it’s only
["text"]
, the API won’t generate audio, and it will fall back to using Text-to-Speech (TTS).
t
Let's walk through how to verify and configure the "modalities" setting for your agent together. Here’s what you can do: 1. Check the agent's configuration: First, find where your agent is initialized in the code. Look for a parameter like
modalities=["text", "audio"]
. If you see it set to just
["text"]
, you can update it to include "audio" as well. 2. Inspect agent logs: When the agent starts up, it logs its configuration. Look out for a log entry similar to:
starting MultimodalAgent with config: {config.to_dict()}
. This will help you confirm which modalities are active. 3. Use the playground UI: The LiveKit playground UI has a handy "Response modalities" hover card that shows the current setting (like "Audio + Text"). It’s a quick way to double-check your configuration. 4. Dynamic updates: If you want to change modalities while a session is running, you can use the
pg.updateConfig
RPC method to update things on the fly. The agent will log any changes with the details. If you have any questions or need a hand finding or adjusting these settings, please don’t hesitate to reach out. I’m here to help! Sources: OpenAI Realtime API plugin guide | LiveKit docs | Azure OpenAI Realtime API and LiveKit | LiveKit Docs | Text and transcriptions | LiveKit docs | How to Set Up Speech-to-Text Input with Text-Only Output in LiveKit Agents | web/src/components/modalities-selector.tsx