Voice In, Visuals Out: The Agony and the Ecstasy - Allen Pike, Forestwalk Labs
AI Engineer · 13 min · 104 sentences · from YouTube's caption track
Each timecode opens YouTube at the start of that sentence. Line anchors (#s42) are the cue ids in the WebVTT, and every line carries its start and end seconds. All transcripts has every talk, and the whole corpus as one file.
- 00:01All right.
- 00:03I'm Alan Pike.
- 00:04And today I'm going to be sharing some of what we've learned building voice in visuals out experiences using AI.
- 00:14Here we go.
- 00:16So this is Andrej Karpathy.
- 00:20And he made an argument last month that voice is the human preferred input for AIs.
- 00:31But that we prefer visuals as the output.
- 00:36And he knows a thing or two about this stuff.
- 00:40But that's not how we have been for the most part building or using AI.
- 00:49We've been typing to it.
- 00:52It's been typing back maybe with some markdown.
- 00:55But there's some real breakthroughs over the last few months where both of this visuals in and audio or the audio in and visuals out experience is now um really feasible.
- 01:08We can create really delightful experiences with it.
- 01:12The visuals outside is pretty intuitive, right?
- 01:16Of course a third of our brain is dedicated to processing visual information.
- 01:21We love looking at things.
- 01:24And models have recently got to the point where they can generate rich HTML, tool calling.
- 01:30So we can have these experiences where there's visualizations that come back, explain things, help us understand, communicate the the responses from these models.
- 01:42They can give us interactive um controls that allows to explore and understand and modify and change and and and direct the models.
- 01:53And they can even respond with beautiful illustrations and images, right?
- 02:01And so the the ceiling on the visuals out piece has really lifted and we have a lot more capability of what we can do in terms of responding from these models.
- 02:15The more controversial half of Karpathy's argument though is this idea of voice as the preferred input.
- 02:23We've long sort of idealized and fantasized about speaking to an AI and having this real-time conversation where it understands what we need and it and it reacts appropriately in real-time.
- 02:39But the experiences that most people have had so far with voice interfaces have been more like trying to get Siri to turn the lights on and it's not working
- 02:49or like this guy that is like trying to get ChatGPT voice mode to do things, but it keeps being like awkward and confused, right?
- 03:01The models that we have so far, the experiences that people most people have seen are both slow and dumb, which is like not a great combination.
- 03:14And so a lot of people are down on voices as an input.
- 03:18But speaking is the ultimate way that as humans we communicate.
- 03:24When we're speaking, we have more words per minute than when we're typing.
- 03:31But we also convey more with each word.
- 03:35There's a huge difference in between if you say to me okay versus if you say okay.
- 03:46And that's why when we have something that is really important that we need to communicate or get through to somebody, we will jump on a call.
- 03:59And we will or we'll speak in person.
- 04:02So that we can get through that high bandwidth uh communication.
- 04:08Um and so what we've done at Forest Walk is we have built an agent that is in our calls that can help us out in real time.
- 04:18And so the other day I mentioned to my co-founder in call on a call that I'd seen a bug with the Slack integration or at least I thought I had.
- 04:29And she responded that she had seen the same bug.
- 04:34And so I just said, "Okay, well, let's file that as a Linear issue."
- 04:40And the voice agent within a second responded that it had done so.
- 04:45And that feels perfectly natural when you get it really dialed in.
- 04:51That you have are speaking either incidentally or you know, with a purpose intentionally speaking to the AI and it responds in a way that is not interruptive of you.
- 05:04It doesn't need to be voice.
- 05:05It is just taking action on your intent.
- 05:10And so this is we're going to see this experience more and more in the coming months and years.
- 05:16But there's a huge barrier, a huge challenge to making this actually work and feel good.
- 05:22And that is the tyranny of latency.
- 05:29It's really difficult to get a response through that whole chain fast enough.
- 05:35We we've known since the '60s that to have a computer react to us fast enough that it feels instant, it needs to react in about 100 milliseconds, a tenth of a second.
- 05:51And so of course we are always aspiring to get our products to react that fast.
- 05:57And sometimes we can achieve that, but with networking and everything it can be challenging depending on what work needs to get done.
- 06:04And so sometimes we might flex up to a thousand milliseconds.
- 06:08Right?
- 06:08You get a full second.
- 06:09It's about the limit before people start to lose their train of thought.
- 06:12They ask Siri to do something, takes more than a second, we're off to something else mentally, right?
- 06:19And so we're always in that play in between those two kind of human limits of trying to respond within a second, ideally within 100 milliseconds.
- 06:30But if we want to have a seamless voice conversation with it an AI or another human, the limit is much more aggressive.
- 06:41We need to have a 200 millisecond latency or less if we want to have a fully conversive people are verbalizing something and they are interrupting or interjecting or agreeing
- 06:56and forming that sort of connection for a full voice in voice out uh conversation.
- 07:03Um and so imagine trying to do that where you have a network request, uh maybe you take turns speech to text, uh and then you do some sort of model inference on that text,
- 07:13and then send it back on the network.
- 07:15It's like a ridiculous uh amount of of work to do in 200 milliseconds.
- 07:20Um there are some clever approaches of trying to work around that.
- 07:26Uh Thinking Machines and Neolab has uh a really thoughtful architecture where they were demoing recently, um just a few weeks ago, a they've time sliced into 200 millisecond chunks like that 200 millisecond
- 07:39goal, and and has a model that's doing continuous inference in and out at 200 millisecond slices.
- 07:46Um so there are ways around it for voice in voice out, but there's also just we don't need to wait for novel architectures.
- 07:57We can just switch to having voice in visuals out and then we benefit from the more forgiving visual response envelope that people have.
- 08:09That if you have something that appears on screen within a second of what you've you've said, it feels like it has met that it's keeping with within your attention span.
- 08:20It's reacting to you in a way that feels seamless.
- 08:24Um and so we've been building for that over the last few months and it's a lot of fun and we've learned a lot doing that.
- 08:30And so I want to finish up just by sharing three of the things that we found um to be really important for getting within that latency envelope and making the experience feel really delightful
- 08:43um for for people who are using it.
- 08:46So the first one is that in order to respond in a way that feels seamless, you have to use a really fast model.
- 08:57Cuz that's not just a model that is so small um that it can respond fast enough in a few hundred milliseconds.
- 09:03Of course it it does need to be.
- 09:05Um but it also has to be on an inference platform that prioritizes latency.
- 09:10So when GPT-5 mini came out, we were excited that um that okay, well, yeah, we get this more intelligent model and presumably it'll be fast.
- 09:20But then in practice we were seeing latencies of 5,000 milliseconds, 7,000 P95, sometimes 10,000 millisecond latency for this small model.
- 09:29It was cheaper than the bigger model, but we weren't consistently or even ever seeing it respond fast enough.
- 09:38Um Haiku is much better um in terms of of that that P95 latency.
- 09:43So, you you really need a a kind of a Haiku class model as the one that's responding in this real-time and and or one of the smaller open-source ones.
- 09:54And then if there is a larger chunk of work that needs to get done, then that model then hands off or sends off an asynchronous message to a larger model that can think,
- 10:03and then the continuous real-time model or soft real-time model that's responding quickly then can re- interleave in those responses if it's doing something heavier.
- 10:13Um so, that's number one you need to have a fast model.
- 10:16Obviously, with a a short enough context that you're providing it that it can respond in a few hundred milliseconds.
- 10:22Um the second thing that's really critical if we're going to have this feeling of it being really responsive is to have short intervals of how quickly we're sending out for inference.
- 10:35So, traditionally for like a voice application, you might listen to the user for a few seconds and then they stop, you listen for a second of silence, and then you have
- 10:46uh some sort of inference goes on, and then you're you're blown your budget by a pretty wide margin just for waiting for silence.
- 10:55So, if we're going to have our something up on screen within a second, um then when we want to have our inference pretty eagerly responding as the person is talking,
- 11:04even if we're not entirely sure they've stopped talking, being willing to send inference every 1 or 2 seconds as they speak cuz you know, we sometimes have a sentence where, you know, we ask, "Oh, hey, we're going to want to change this and actually also list to this other thing."
- 11:20It feels much more seamless if you're doing those things as people talk.
- 11:24Um so, you have to have a a model and an an infrastructure where you're able to get these fast turns going.
- 11:31And then finally, in order to actually make all of that work, you need to have a stable caching regimen.
- 11:39So, we have this huge improvement in the way that we work with LLMs over the last year where we have on the different platforms different ideas of this prefix caching where if the beginning of the context you send to the model is the same each time,
- 11:56then you can get up to 90% cheaper, faster inference um depending on the conditions.
- 12:02And so, you need to lean heavily into this architecture really I think for for most applications we're moving towards this, whether it's like a long-running agent or it's a frequently running agent, the same principle applies
- 12:14that we want to the first 90% of the context window if we can to be the same from request to request, and then just use that final 10%, and then also, of course, minimize the number of output tokens
- 12:27so that you can get these really fast and relatively affordable inference turns to create that that delightful experience.
- 12:35Um So, these are some of the the techniques we've found really useful.
- 12:40Um I would love to hear from anybody who um has been exploring and experimenting, whether it's with real-time or any way that people are pushing the boundaries of creating delightful experiences
- 12:53uh with these models.
- 12:55Uh I'd love to chat, share what we've been learning.
- 12:57Uh and I hope some of this inspires some of you to go out and uh build something great.
- 13:04Thanks.