WebRTC, short for Web Real-Time Communication, is an open standard for sending audio, video, and arbitrary data directly between browsers and apps in real time, with no plugins or downloads. It is one of the most common transports for the live audio that feeds a streaming speech-to-text system, especially in browser-based voice agents and calling apps that run inside a web page.
A brief history of WebRTC
Google open-sourced WebRTC in 2011, after acquiring the media engine from Global IP Solutions, and pushed to standardize it so any browser could do real-time media without Flash or proprietary plugins.
Two bodies split the work. The W3C defined the JavaScript API that web pages call, while the IETF, through its RTCWEB working group, defined the wire protocols underneath. The W3C published WebRTC 1.0 as a formal Recommendation in 2021, though browsers had shipped interoperable builds for years before that.
How WebRTC works and is standardized
WebRTC carries media in near real time, usually over UDP to keep latency low. It handles the whole chain: capturing the microphone, encoding the audio (commonly with the Opus codec), and transporting it.
Because most users sit behind NATs and firewalls, connections are set up with ICE, which uses STUN to discover a reachable address and TURN to relay media when no direct path exists.
The media rides on RTP, and every stream is encrypted: WebRTC mandates DTLS for key exchange and SRTP for the media, so there is no unencrypted mode. The stack is built to degrade gracefully when packets are lost or delayed.
Why it matters for speech-to-text
Browser voice apps and many voice AI agent stacks stream audio to a server over WebRTC, where a recognizer produces a real-time transcript. Knowing the transport explains how audio actually travels from a microphone to the model, and why codec choice, sample rate, and network jitter all shape what the recognizer hears.
Some speech APIs accept a WebRTC stream directly. More often you terminate the session on the server, decode the Opus payload to PCM, and forward clean audio to the engine.
Frequently asked questions
What is WebRTC used for? Real-time audio, video, and data between browsers and apps: video calls, conferencing, live streaming, and browser-based voice agents that need low-latency two-way audio.
How does WebRTC work? It captures and encodes media, negotiates a peer connection with ICE, STUN, and TURN, then sends encrypted RTP over UDP, adapting as packets are lost or delayed.
Is WebRTC encrypted? Yes, always. Encryption is mandatory: DTLS handles the key exchange and SRTP protects the media, so a plain unencrypted session is not possible.
What does WebRTC stand for? Web Real-Time Communication.