Hello! My goal is to have at the end of every agent session:
1. Audio track for the agent participant — I already have this through track egress to S3
2. Audio track for the human participant — I already have this through track egress to S3
3. Mixed audio track (with both tracks synchronized correctly) — I asked about this in
#egress
4.
Transcript with timestamps matching the mixed audio track, so our users can click on an utterance and jump to the corresponding place in the audio
Does anyone here have any tips on how to get a synchronized transcript (4)?
I know the common answer to this question is to use the chat history, but it doesn't have timestamps that are anywhere close to being accurate enough and it has several artifacts, such as many single-worded assistant messages that cannot be heard on the recording because the message got interrupted before it could even play. I tried to backfill timestamps based on agent state and user state change events, and that's
better but it's still off and there's no way to get at the actual audio frame time from the VAD since it's all private and concrete implementations (no
interface
to wrap and snoop on things). I'm using the JS SDK with Silero, Deepgram, Cartesia.
I think I'm just going to re-transcribe everything after the fact, but if anyone has any better ideas or if this can be improved, I'd love to hear it!