Vibeleaderboard
← All Intel
Intel / post

Ng: Why Voice Agents Need Text Pipelines and Pre-Responses

Source
x.com
Publisher
Andrew Ng
Date
Andrew Ng@AndrewYNg

The Voice Stack is improving rapidly. Systems that interact with users via speaking and listening will drive many new applications. Over the past year, I’ve been working closely with https://t.co/zpIxRSuky4, AI Fund, and several collaborators on voice-based applications, and I will share best practices I’ve learned in this and future posts. Foundation models that are trained to directly input, and often also directly generate, audio have contributed to this growth, but they are only part of the story. OpenAI’s RealTime API makes it easy for developers to write prompts to develop systems that deliver voice-in, voice-out experiences. 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. I encourage you to try it! However, compared to text-based generation, it is still hard to control the output of voice-in voice-out models. In contrast to directly generating audio, when we use an LLM to generate text, we have many tools for building guardrails, and we can double-check the output before showing it to users. We can also use sophisticated agentic reasoning workflows to compute…

Read the full post on X

Context

Voice applications can be built two ways: with models that take in and produce audio directly, or with a pipeline that transcribes speech to text, reasons over the text with one or more calls, and turns the answer back into speech. In a February 2025 letter, Andrew Ng recommends the text pipeline when an needs a high degree of control over what it says. He calls voice-in, voice-out tools such as OpenAI’s Realtime good for quick prototypes and low-stakes conversations where an occasional mistake is acceptable, but says their output is still harder to control.

The advantage of working in text is that there are more tools for checking output before the user hears it. His example is a customer-service agent about to say it will issue a refund: in text, the system can first confirm that the refund is consistent with business policy and that it will actually call the API to issue it, rather than promising a refund it never makes. He says the equivalent safeguards for voice-in, voice-out models are much less mature, and that in his experience their reasoning also seems weaker, perhaps because spoken answers have to be brief.

The cost of the pipeline is delay, and users of voice applications are very sensitive to it. When Ng and collaborators worked with RealAvatar, an AI Fund portfolio company, to build an avatar of him, the agentic workflow initially took 5 to 9 seconds to respond. Their fix was a pre-response: the system quickly says something short, like “Sure, I can help with that,” which buys time for the workflow to produce the full answer. With that and other optimizations, he reports of around 0.5 to 1 seconds, against roughly 0.3 to 1 seconds for face-to-face human conversation. Those figures come from that one system, which he describes as still a work in progress.

Terms in this piece · Glossary
  • Large language model — A model trained on large amounts of data to process and generate language.
  • Application — Software arranged so that a person can use it; in this course, the software around a model that accepts your request, prepares the context and shows the reply.
  • API — Application programming interface: the agreed set of operations, inputs and outputs through which one piece of software uses another.
  • Latency — The time between asking for a result and having it, including the model's generation time, tool calls, retries and any queueing.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

More from Andrew Ng
Recommended reads