For context, I previously used Vapi but encountered multiple reliability issues, which is why I am exploring LiveKit as a more stable solution. Some of the problems we faced were:
Sometimes Vapi failed to connect and showed errors like “meeting room closed” or “Assistant Did Not Receive Customer Audio”.
In one case, Vapi ended the session with call.in-progress.error-vapifault-worker-died, and all transcription and audio were lost. No recordings or logs were available afterward, which was very problematic.
If TTS/STT/LLM failed internally, Vapi simply switched to a fallback without sending any webhook or event notification. At minimum, a webhook indicating failure would be very helpful.
Recently their VAD has not been working correctly, causing frequent AI interruptions while the user is still speaking.
Because of these issues, I want to ensure our implementation on LiveKit is robust.
Additionally, I have a couple of implementation questions:
When the interview starts, I want to capture the agent’s audio stream for recording.
If the user changes their microphone during the interview, I want to update the audio track with the newly selected microphone in LiveKit.
Could you please guide me on the best way to implement these behaviors and also help diagnose the invalid token signal connection error?
If the user changes their microphone during the interview, I want to update the audio track with the newly selected microphone in LiveKit.
If you are using our Agents UI built in media controls (which I would strongly recommend), Media controls | LiveKit Documentation, this is handled for you.
also help diagnose the invalid token signal connection error?
That’s showing the regions endpoint called a few times, then stopping with the log message ‘stopping region refetch after…’ which is coming from the file I linked directly above. I still think this is your token logic somehow, perhaps run the starter with its own token server and see if you observe the same as me, you just have to set the 3 LIVEKIT_ variables in the .env file, and (optionally) your agent name.