What I’ve Learned Building Voice Applications: Best practices for building apps based on AI’s evolving voice-in, voice-out stack
Open the sourceAndrew Ng shares best practices for building voice applications. He contrasts direct voice-in, voice-out models, which suit quick prototypes and low-stakes conversations, with an STT → LLM/agentic workflow → TTS pipeline that gives more control and accuracy. He presents a pre-response technique for hiding the latency that pipeline adds, and he encourages builders to prototype voice apps quickly.
- He says voice-in, voice-out models like OpenAI's RealTime API are great for quick prototypes and low-stakes conversations, but their output is hard to control. - He notes that text-based generation allows guardrails, double-checking output, and agentic reasoning before anything reaches the user. - He observes that voice models seem to reason less well than text models, perhaps because brief voice responses leave less room for chain-of-thought. - For high-control applications he uses an STT → LLM/agentic workflow → TTS pipeline, because the reasoning is done in text. - He describes cutting latency by having the system speak a quick pre-response while the agentic workflow builds the full answer, which brought latency from 5-9 seconds down to about 0.5-1 seconds. - He argues that prototyping voice apps is much easier than people realize, while reliable production systems take longer.
Based on Andrew Ng's public content. Not affiliated with or endorsed by Andrew Ng.
Quotes from this video
“This is great for building quick-and-dirty prototypes, and it also works well for low-stakes conversations where making an occasional mistake is okay.”
“This STT LLM/Agentic workflow TTS pipeline, where the reasoning is done in text, allows for more accurate responses.”
“we can make sure that (i) issuing the refund is consistent with our business policy and (ii) we will call the API to issue the refund (and not just promise a refund without issuing it).”
“users of voice applications are very sensitive to”
“Our goal was to approach human face-to-face conversational latency, which is around 0.3-1 seconds.”
“I think generating a pre-response followed by a full response, to quickly acknowledge the user’s query and also reduce the perceived latency, will be an important technique,”
“Prototyping voice applications is much easier than most people realize!”
“if you have a voice application in mind, I hope you’ll start building prototypes and see how far you can get!”