I just used speechmatics + diarisation (with speak...
# ask-ai
b
I just used speechmatics + diarisation (with speaker id). It works in console locally but when I deploy it doesnt work in playdround. I get it stucked on "Waiting for agent audio track"
t
Thanks for reaching out, Boris. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m sorry you’re stuck on “Waiting for agent audio track.” I’ll help troubleshoot. A few likely causes and quick checks: What I’m responding to: your Speechmatics + diarisation works locally in console but when deployed the playground shows “Waiting for agent audio track.” Quick checks (please confirm results): • Is TTS/audio output enabled in your agent? Verify
session.output.set_audio_enabled(True)
or that you call
session.say()
/
session.generate_reply()
in the deployed code. • Did you deploy your Speechmatics API key as a secret? Run
lk agent secrets list
and confirm
SPEECHMATICS_API_KEY
is present. • Are you running text-only mode in deployment? Text-only or disabled audio will not publish an audio track. • Any errors in logs when the agent connects? Please share the output of
lk agent logs
around the time the room connects. If those are OK, try these targeted debugging steps: 1. Add logging to confirm audio publishing:
Copy code
@session.on("agent_state_changed")
   def on_agent_state_change(ev):
       print(f"Agent state: {ev.new_state}")
1. Force a simple spoken reply to test audio publishing:
Copy code
await session.say("Hello", allow_interruptions=False)
1. Check room participants / published tracks (look for agent
AudioTrack
) or observe
track_published
events. If you share: • a short snippet of your deployment entrypoint (where you configure output/TTS and call
session.say()
), • the
lk agent logs
lines when the agent connects, I can point to the exact setting to change. Sources: Google AI and LiveKit | LiveKit Docs | Text and transcriptions | LiveKit docs | Speechmatics STT plugin guide | LiveKit docs | Agents (Python) | livekit/livekit_composite | DeepWiki | How to detect when an agent has finished speaking