v135 · miscellaneous
Add MediaStreamTrack support to the Web Speech API
Add MediaStreamTrack support to the Web Speech API. The Web Speech API is a web standard API that allows developers to incorporate speech recognition and synthesis into their web pages. Currently, the Web Speech API uses the user's default microphone as the audio input. MediaStreamTrack support allows websites to use the Web Speech API to caption other so
concepts
-
Recognize from a MediaStreamTrack
Single-track mic picker: enumerate input devices, hand the chosen one to
SpeechRecognition.start(track), see live transcript. -
Per-participant captions in one tab
The intent-to-ship's headline use case: a video-conferencing tab spins up one
SpeechRecognitionper audio track. The demo binds one recognizer to the mic and a second recognizer to a Web Audio-routedMediaStreamTrack. -
Live transcription bench
Wire a mic
MediaStreamTrackstraight intoSpeechRecognitionwhile a parallel Web Audio analyser draws a meter from the same track. Proves both pipelines can read the same audio source. -
Multi-source Captions
Two independent
SpeechRecognitioninstances — each with a different language and its ownMediaStreamTrack— running simultaneously. Captions from both merge into a shared transcript labelled by source, showing the multi-participant pattern. -
Processed audio transcription
Routes mic audio through a Web Audio
BiquadFilterNode(highpass, lowpass, bandpass, or notch) then feeds the processed track intoSpeechRecognition. Side-by-side VU meters show raw vs filtered levels; live filter controls (cutoff, Q, gain) update in real time. -
Language picker
Pick a BCP-47 language tag from a grid of 10 languages and speak — the
SpeechRecognition.langattribute is set live on the track-bound recogniser. Changing language restarts the recogniser bound to the sameMediaStreamTrack, demonstrating that track binding and language selection are independent. -
N-participant captions
Add up to six participant lanes dynamically. The first uses your real microphone and produces live captions; added participants use a synthetic track to show the one-
SpeechRecognition-per-track pattern at scale. Demonstrates the conference call use case:peerConnection.ontrack→ new lane + recogniser per remote track.
why it shipped
The Web Speech API is a web standard API that allows developers to incorporate speech recognition and synthesis into their web pages. Currently, the Web Speech API uses the user's default microphone as the audio input. Adding MediaStreamTrack support will allow websites to use the Web Speech API to caption other sources of audio including remote audio tracks.