Markdown source

Transcript: Voice In, Visuals Out: The Agony and the Ecstasy - Allen Pike, Forestwalk Labs

Source Video

Local Cache

Transcript

All right. I'm Alan Pike. And today I'm going to be sharing some of what we've learned building voice in visuals out experiences using AI. Here we go. So this is Andrej Karpathy. And he made an argument last month that voice is the human preferred input for AIs. But that we prefer visuals as the output. And he knows a thing or two about this stuff. But that's not how we have been for the most part building or using AI. We've been typing to it. It's been typing back maybe with some markdown.

But 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. We can create really delightful experiences with it. The visuals outside is pretty intuitive, right? Of course a third of our brain is dedicated to processing visual information. We love looking at things. And models have recently got to the point where they can generate rich HTML, tool calling. So we can have these experiences where there's visualizations that come back, explain things, help us understand, communicate the the responses from these models.

They can give us interactive um controls that allows to explore and understand and modify and change and and and direct the models. And they can even respond with beautiful illustrations and images, right? And 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. The more controversial half of Karpathy's argument though is this idea of voice as the preferred input. We'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.

But 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 or like this guy that is like trying to get ChatGPT voice mode to do things, but it keeps being like awkward and confused, right? The 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. And so a lot of people are down on voices as an input. But speaking is the ultimate way that as humans we communicate. When we're speaking, we have more words per minute than when we're typing.

But we also convey more with each word. There's a huge difference in between if you say to me okay versus if you say okay. And 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. And we will or we'll speak in person. So that we can get through that high bandwidth uh communication. Um 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.

And 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. And she responded that she had seen the same bug. And so I just said, "Okay, well, let's file that as a Linear issue." And the voice agent within a second responded that it had done so. And that feels perfectly natural when you get it really dialed in. That 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. It doesn't need to be voice.

It is just taking action on your intent. And so this is we're going to see this experience more and more in the coming months and years. But there's a huge barrier, a huge challenge to making this actually work and feel good. And that is the tyranny of latency. It's really difficult to get a response through that whole chain fast enough. We 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. And so of course we are always aspiring to get our products to react that fast.

And sometimes we can achieve that, but with networking and everything it can be challenging depending on what work needs to get done. And so sometimes we might flex up to a thousand milliseconds. Right? You get a full second. It's about the limit before people start to lose their train of thought. They ask Siri to do something, takes more than a second, we're off to something else mentally, right? And 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. But if we want to have a seamless voice conversation with it an AI or another human, the limit is much more aggressive.

We 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 and forming that sort of connection for a full voice in voice out uh conversation. Um 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, and then send it back on the network. It's like a ridiculous uh amount of of work to do in 200 milliseconds. Um there are some clever approaches of trying to work around that.

Uh 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 goal, and and has a model that's doing continuous inference in and out at 200 millisecond slices. Um 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. We can just switch to having voice in visuals out and then we benefit from the more forgiving visual response envelope that people have.

That 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. It's reacting to you in a way that feels seamless. Um 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. And 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 um for for people who are using it.

So the first one is that in order to respond in a way that feels seamless, you have to use a really fast model. Cuz that's not just a model that is so small um that it can respond fast enough in a few hundred milliseconds. Of course it it does need to be. Um but it also has to be on an inference platform that prioritizes latency. So 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. But then in practice we were seeing latencies of 5,000 milliseconds, 7,000 P95, sometimes 10,000 millisecond latency for this small model.

It was cheaper than the bigger model, but we weren't consistently or even ever seeing it respond fast enough. Um Haiku is much better um in terms of of that that P95 latency. So, 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.

And 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, and 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. Um so, that's number one you need to have a fast model. Obviously, with a a short enough context that you're providing it that it can respond in a few hundred milliseconds.

Um 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. So, 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 uh 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.

So, 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, even 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." It feels much more seamless if you're doing those things as people talk. Um so, you have to have a a model and an an infrastructure where you're able to get these fast turns going.

And then finally, in order to actually make all of that work, you need to have a stable caching regimen. So, 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, then you can get up to 90% cheaper, faster inference um depending on the conditions.

And 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 that 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 so that you can get these really fast and relatively affordable inference turns to create that that delightful experience. Um So, these are some of the the techniques we've found really useful.

Um 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 uh with these models. Uh I'd love to chat, share what we've been learning. Uh and I hope some of this inspires some of you to go out and uh build something great. Thanks.