v135 · miscellaneous

Multi-source Captions

Run two independent SpeechRecognition instances — each fed a different MediaStreamTrack — and watch source-specific recognizer state plus any captured speech in a shared transcript. This is the core pattern for captioning multiple participants or audio sources simultaneously from a single tab.

checking SpeechRecognition… checking MediaStreamTrack input…
Before Chrome 135, SpeechRecognition always used the default microphone. Now you can pass a MediaStreamTrack to SpeechRecognition.start(track), allowing multiple recognizers to run in parallel — one per participant or generated source track.

Two recognition sources

Source A — Microphone

idle
Captions will appear here…

Source B — Synthetic tone track

idle
Captions will appear here…

Shared transcript (both sources)

Start either source to see its transcripts appear here, labelled by source.

Code pattern

// Chrome 135 — pass a MediaStreamTrack to SpeechRecognition const stream = await navigator.mediaDevices.getUserMedia({ audio: true }); // Source A — microphone const trackA = stream.getAudioTracks()[0]; // Source B — a distinct generated MediaStreamTrack const ctx = new AudioContext(); const oscillator = ctx.createOscillator(); const destination = ctx.createMediaStreamDestination(); oscillator.connect(destination); oscillator.start(); const trackB = destination.stream.getAudioTracks()[0]; // Each recognizer gets its own track and language const srA = new SpeechRecognition(); srA.lang = 'en-US'; srA.interimResults = true; const srB = new SpeechRecognition(); srB.lang = 'es-ES'; srB.interimResults = true; srA.onresult = e => updateCaptions('A', e); srB.onresult = e => updateCaptions('B', e); srA.start(trackA); // Chrome 135+ srB.start(trackB);

see also