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

Push: openStream

You hold a handle and push frames into it as the microphone produces them.
SttStream exposes pushFrame(_:), flush(), finish(), and close().

Pull: transcribeStream

You already have an AsyncStream<AudioInput> and want events back.

Signatures

AudioFormatSpec

Choosing between them

Push suits a live microphone: you already have a callback delivering buffers, so you push each one as it lands. Pull suits a source you can express as an AsyncStream, such as a file being read in chunks or audio arriving over the network.