I’ve lightly modified the LiveKit starters for Rea...
# agents
p
I’ve lightly modified the LiveKit starters for React and Node to enable text chat separately to joining a call. The user joins the room, the agent joins the room, I can chat, the agent answers - great. But, I’m a little unsure if I’ve done things the right way. I get this output from the server every time I send a chat message:
Copy code
[13:15:31.903] INFO (66547): Creating speech handle
    speech_id: "speech_7aff71f2-c89"
[13:15:34.603] INFO (66547): onInputSpeechStopped
    userTranscriptionEnabled: false
What’s a speech handle, and why does one get created every time I send a chat message? On web, I’m just using:
Copy code
import { useChat } from '@livekit/components-react';

const { send } = useChat();
With my own orchestration around it of course.
l
I'm pretty sure this is expected behaviour and you're doing everything correctly. I see the same message if I modify the node starter to disable audio (so I have a text only agent). I'm not an expert on the code, but it looks like the speech handle is created every turn, regardless of whether audio is enabled: https://github.com/livekit/agents-js/blob/main/agents/src/voice/agent_activity.ts#L1100, presumably because it's also required for transcription, resulting in a confusing log message in this case.