Live data from Hacker News

Show HN: I built a sub-500ms latency voice agent from scratch

ntik.me

161–168 of 168 posts

Re: Show HN: I built a sub-500ms latency voice agent from scratch

#161
post #82

Earlier quoted context omitted.

Huh, the grandfather was suggestion to have the computer think while you speak. That's different from banning the computer from thinking before they speak, ain't it?

Thinking while I'm speaking means it isn't listening to everything I've said before thinking what to say. If I start my reply with "no, because...", and it's already formulating its response based on the "no" and not what comes after the because, then it's not thinking before it speaks.

The model can have a reasonable good guess of what you are trying to say, and use 'speculative' thinking. Just like CPU's use branch prediction.

In the common case, you say what the model predicted, and thus the model can use its speculative thinking. In the rare case where you deviated from the prediction, the model thinks from scratch.

(You can further cut down on latency, by speculatively thinking about the top two predictions, instead of just the top prediction. Just costs you more parallel compute.)

This is also all very similar to a chess player who thinks about her next turn, on your turn.

Re: Show HN: I built a sub-500ms latency voice agent from scratch

#163
Great writeup. The speaking vs listening framing is underrated. TTFT with Groq and colocation are both real wins that don't get talked about enough.

For anyone wanting this production ready out of the box, Dograh is an OSS project built on the same principles and goes much beyond ( https://github.com/dograh-hq/dograh ).

Groq, Flux(Deepgram), instant barge-in cancel, full streaming pipeline etc .but also telephony, echo handling, tool calls for external services, variable extraction, and domain dictionary baked in. All the parts needed in production are already solved.

Re: Show HN: I built a sub-500ms latency voice agent from scratch

#166
The barge-in cancellation challenge is real — we've found that tracking the exact timing of when Twilio's media stream sends the interrupt signal vs when ElevenLabs actually stops generating is the key to isolating whether it's a network, provider, or orchestration-layer issue. Have you tried correlating Twilio's call event timestamps with ElevenLabs' generation logs?

I built something that automates exactly this kind of cross-provider investigation across Twilio + ElevenLabs + Deepgram — happy to share if you want

Re: Show HN: I built a sub-500ms latency voice agent from scratch

#167
post #36

Oh, this is really interesting to me. This is what I worked on at Amazon Alexa (and have patents on). An interesting fact I learned at the time: The median delay between human speakers during a conversation is 0ms (zero). In other words, in many cases, the listener starts speaking before the speaker is done. You've probably experienced this, and you talk about how you "finish each other's sentences". It's because you…

> The median delay between human speakers during a conversation is 0ms (zero). In other words, in many cases, the listener starts speaking before the speaker is done. This reminds me of a great diversity training at a previous employer, where we dug into the different expectations of when and how to take your turn in conversation and how that can create a lot of friction just from different cultural/familial habits.…

Yeah, I am American but my wife is Japanese and she found it irritating and inexplicable that my friends and I would interrupt each other while talking. This number probably varies significantly by culture.

Re: Show HN: I built a sub-500ms latency voice agent from scratch

#168

Earlier quoted context omitted.

> The median delay between human speakers during a conversation is 0ms (zero). In other words, in many cases, the listener starts speaking before the speaker is done. This reminds me of a great diversity training at a previous employer, where we dug into the different expectations of when and how to take your turn in conversation and how that can create a lot of friction just from different cultural/familial habits.…

Yeah, I am American but my wife is Japanese and she found it irritating and inexplicable that my friends and I would interrupt each other while talking. This number probably varies significantly by culture.

This is because in Japanese, the verb (or the main predicate) almost always comes at the very end of the sentence. Half of the time, you have a chance to get the whole phrase wrong.

The same, but rarer, may happen in German when a long, complex sentence ends with "nicht", flipping the whole meaning.

Post reply on HN