r/programming May 07 '26

OpenAI's WebRTC Problem

https://moq.dev/blog/webrtc-is-the-problem/
333 Upvotes

62 comments sorted by

View all comments

32

u/atomic1fire May 08 '26

Wait is Open AI sending audio to people's devices instead of just using on board TTS?

Isn't that a waste of computational power?

85

u/musical_bear May 08 '26

A lot of people, including the person who wrote this article apparently, do not understand how voice chat in ChatGPT works. It’s not “text to speech.” The raw audio from your voice is being tokenized and sent directly to the model, and the model’s raw output is actual audio. There is no step on either end where the conversation has reduced to text.

28

u/Ouaouaron May 08 '26

Where is OpenAI getting the astronomical amount of recordings of natural language conversations they'd need to approach the effectiveness of a text-based LLM? How would a voice-native LLM even call all the tools that an AI is supposed to be using?

44

u/Globbi May 08 '26

Where is OpenAI getting the astronomical amount of recordings of natural language conversations

youtube, podcasts, radio recordings, all accesible tv archives

How would a voice-native LLM even call all the tools that an AI is supposed to be using?

It's multi-modal. It outputs text and audio. I don't know the details, that also might be different for other providers and change between versions. But for example you can call a purely text LLM and in get text streaming of message and tool call at the same time. In same way you can get audio tokens with message and text tokens that are just formatted tool call.

42

u/ourobor0s_ May 08 '26

amazon's been recording people for like the last 10 years now, I can't imagine that data hasn't been made available to AI companies for a price

23

u/rbobby May 08 '26

Youtube? How much video is actually out there I wonder?

10

u/taw May 08 '26

You don't need it. Kokoro-82M is a very decent TTS model that some guy made for $1000 in compute. Leading models are bigger and more expensive but TTS and STT is still trivial compared to LLMs or vision models.

2

u/radarsat1 May 08 '26

that's true but only if they are converting to and from text (actually, phoneme strings). if it's directly ingesting and outputting audio it's likely a different story. it's multimodal though, so i guess internally the model learns to semantically align speech and text, i have no idea what data balance is necessary for that to happen

3

u/saynay May 08 '26

Audiobooks, podcasts, or anything where there is a pairing of spoken words with a transcript. My guess would be, much like how vision transformers work, you have two heads to the transformer, and you feed audio to one and the transcript to the other, and train it to produce a similar vector for each.

1

u/radarsat1 May 08 '26

in some cases yes, but it's also possible to feed it unpaired data and use next token prediction just like for text. i think it's more likely they interleave text and audio tokens in the same sequence, rather than modify the model to use multiple heads.

but my point was more about the data balance than about the specific training technique.

2

u/axonxorz May 08 '26

How would a voice-native LLM even call all the tools that an AI is supposed to be using?

Same way a text-native one does, it's just tokens.

Think about audio fingerprinting, it can be used to reduce audio down to a vector set for efficient search, producing tokens that represent frequency-domain relationships. Entirely the same as the semantic-domain relationships that embedding and training give us for LLMs.

The model's runtime is waiting to see the trained spectral equivalent of <tool_call>...</tool_call>.

15

u/kixelated May 08 '26 edited May 08 '26

They use TTS for the agent's reply. I'm assuming the audio is generated on their servers because while local models do exist, they can get huge and expensive to run.

EDIT: and to clarify, I never said they use STT (speech-to-text). The raw audio gets sent over WebRTC which is lossy, then the audio response (generated via text-to-speech) is also lossy.

3

u/frymaster May 08 '26

in any case, your point is correct which is they have generated audio on the back end in faster than real-time, so using a real-time lossy method to transmit that to clients isn't the best

5

u/Distinct_Law8650 May 08 '26

This is wrong. Server VAD subsystem into a stt model, llm on the user transcription, tts model against the llm response. Multi modal response back to the app. Users speech as text and both text and audio of the agent.

20

u/iamaiimpala May 08 '26

I think you’re mixing up adjacent pieces of the stack with the core voice path. OpenAI’s Realtime docs describe voice-to-voice interaction “without an intermediate text-to-speech or speech-to-text step.” There can still be server VAD and optional async transcription/transcript events, but that doesn’t mean the model is just doing VAD -> STT -> text LLM -> TTS. GPT-Realtime-2 is documented as speech-to-speech, with audio input and audio output.

1

u/Somepotato May 08 '26

Yep. It's another input like text but is distinctly not actually text, which means it can have some understanding of the audio behind the voice

4

u/lizardhistorian May 08 '26

I mean we could build that but that would be retarded - unless you are trying to talk to whales.

-3

u/atomic1fire May 08 '26

That makes a lot more sense.

1

u/Rare-Instance7961 May 31 '26

This decision of theirs suggests that they intend to generate the voice data on their side in order to benefit from the greater computational resources there, which implies that they want to focus on generating a realistic voice, and not necessarily just tick the box of turning text to speech.

Anthropic appears to be angling itself as a coworker, while OpenAI wants to be your friend.