flaky-scooter-85113
09/17/2025, 5:29 PMtall-airline-16756
09/17/2025, 5:29 PMtall-airline-16756
09/17/2025, 5:30 PMaudio_enabled=False) for your agent, or if you're expecting audio responses? Understanding this will really help us figure out if a custom receiver for the lk.transcription text stream topic is needed. Thanks so much!
Sources: README.md | Vision Agent Quickstart | LiveKit Docs | Voice AI quickstart | LiveKit Docs | src/transcriptions/TranscriptionTile.tsx | How to Set Up Speech-to-Text Input with Text-Only Output in LiveKit Agentsflaky-scooter-85113
09/17/2025, 5:32 PMtall-airline-16756
09/17/2025, 5:32 PMtextEnabled parameter is set to true in the RoomInputOptions when you initialize the agent session. Here’s an example for you:
const roomInputOptions = {
textEnabled: true,
textInputCallback: DEFAULT_TEXT_INPUT_CALLBACK, // This is the default
};
1. Verify the text stream handler: Confirm that the RoomIO class is registering a handler for the lk.chat topic. This should happen automatically when textEnabled is true and you call start() on the RoomIO instance.
2. Check the text input callback: If you’ve customized the default callback, please make sure it calls sess.interrupt() and sess.generateReply() with the user’s input text.
3. Confirm RealtimeModel modalities: Your RealtimeModel should be set up to handle text input. By default, it supports both text and audio modalities, like this:
const DEFAULT_REALTIME_MODEL_OPTIONS = {
modalities: ['text', 'audio'],
// ...
};
1. Debug with logging: Take a look at the agent logs for any warnings about text stream handlers or other potential issues.
2. Verify agent state: Make sure your agent is properly started and connected to the playground.
For a smoother testing experience, please ensure your agent is running in dev or start mode and is correctly connected to the playground. If you’re still facing issues after these checks, just let me know! I’m here to help you troubleshoot further and get everything working perfectly.
Sources: agents/src/voice/agent.ts | Agents v0.x migration guide - Node.js | LiveKit Docs | Agents playground | LiveKit Docsflaky-scooter-85113
09/17/2025, 5:58 PMtall-airline-16756
09/17/2025, 5:59 PMtextInputCallback is not firing in LiveKit agent-js v1.0.3, don’t worry! Let’s walk through some helpful steps together to troubleshoot and get things working smoothly:
1. Enable text input: First, please double-check that textEnabled: true is explicitly set in your RoomInputOptions. Here’s a quick example to guide you:
const roomIO = new RoomIO({
agentSession,
room,
inputOptions: {
textEnabled: true, // Make sure text input is enabled
}
});
1. Verify participant identity: It’s important that the participant sending the message matches the participantIdentity your agent expects. Messages from other participants might not trigger the callback.
2. Send messages to the correct topic: The frontend should send text messages to the lk.chat topic. Here’s how you can do that:
const text = 'Hello how are you today?';
const info = await room.localParticipant.sendText(text, {
topic: 'lk.chat',
});
1. Check for handler conflicts: Sometimes, if another handler is already registered for the lk.chat topic, your registration might not go through, but without clear errors. It’s a good idea to check your logs for any warnings about handler conflicts.
2. Debug the callback: Adding some logging inside your textInputCallback can be really helpful to see if it’s being triggered:
textInputCallback: (sess, ev) => {
console.log("textInputCallback triggered", ev);
sess.interrupt();
sess.generateReply({ userInput: ev.text });
}
1. Test manual input: To isolate the issue, try bypassing the text stream and trigger input manually like this:
session.interrupt();
session.generateReply({ userInput: "Test message" });
1. Validate room initialization: Make sure that RoomIO.start() is called after the room has connected, as handler registration depends on the room’s connection state.
If you’ve tried these steps and the issue is still hanging around, please don’t hesitate to reach out. I’m here to help you dig deeper and find a solution together.
Sources: Agents 0.x migration guide | LiveKit Docs | tests/test_agent_session.py | Docs::Agents | Getting Help | livekit/livekit_composite | DeepWiki | agents/src/voice/agent_activity.tsflaky-scooter-85113
09/17/2025, 6:13 PMtall-airline-16756
09/17/2025, 6:14 PMlk.chat topic. If your code isn’t using this topic, the agent won’t receive those messages. To make sure everything runs perfectly, here are some friendly steps to follow:
1. Send text to the correct topic: Please use the sendText method with the lk.chat topic. Here’s a simple example:
const text = 'Hello, how are you today?';
const info = await room.localParticipant.sendText(text, {
topic: 'lk.chat',
});
1. Verify participant identity: It’s important to make sure the participant sending the message is the same one linked to the agent. The agent only processes messages from the participant specified in participantIdentity.
2. Check room connection state: Before sending text, please confirm the room is fully connected. The text stream handler is set up during RoomIO.start(), which depends on the room connection being ready.
3. Check for topic conflicts: Double-check that no other handlers are registered for the lk.chat topic, as this might interfere with the agent’s handler.
If you’d like, I’m here to help you with any further troubleshooting or questions you might have. Just let me know, and we can work through it together!
Sources: Text and transcriptions | LiveKit Docs | Text and transcriptions | LiveKit Docs | agents/src/voice/room_io/room_io.ts | Agents v0.x migration guide - Node.js | LiveKit Docs | Agents 0.x migration guide | LiveKit Docsflaky-scooter-85113
09/17/2025, 6:16 PMtall-airline-16756
09/17/2025, 6:16 PMflaky-scooter-85113
09/17/2025, 6:25 PMIn your agent-JS code:
1. Register a text stream handler for the 'lk.chat' topic on your room connection
2. In the handler, read the text from the stream reader.
How is this done