Skip to main content
Two shapes. Pick by where your audio comes from.

Push: openStream

Pull: transcribeStream

Signatures

Note that openStream returns a promise here.

Live from the microphone

Always close the stream and stop the capture. A leaked MediaStream keeps the browser’s recording indicator lit.

Choosing between them

Push suits a live microphone, since the capture API already hands you frames in a callback. Pull suits a source you can express as an async iterable, such as chunks arriving over the network.