demo · v135

Recognize from a MediaStreamTrack

Chrome 135 lets you hand SpeechRecognition.start() a MediaStreamTrack instead of grabbing the default mic. Pick a device, start, see live transcript.

SpeechRecognition: ? Track overload: probe at start Microphone: ?
transcript appears here…

event log

the code

const stream = await navigator.mediaDevices.getUserMedia({
  audio: { deviceId: { exact: chosenId } }
});
const [track] = stream.getAudioTracks();

const rec = new SpeechRecognition();
rec.interimResults = true;
rec.continuous = true;
rec.onresult = (e) => { /* render transcript */ };

// NEW in Chrome 135: pass the track directly.
rec.start(track);

see also