azstt · Azure Foundry MAI · part of stt

azstt

azstt transcribes speech with Azure Foundry's MAI models. It is stt fixed to that one provider, with the same input handling, events, daemon and configuration. Point it at a Foundry resource, name your deployment, and give it a file or a microphone.

export AZURE_STT_ENDPOINT=https://RESOURCE.services.ai.azure.com
azstt --model my-mai-transcribe-2 meeting.wav   # one JSON request, one transcript
azstt --stream talk.wav                         # realtime, 16 kHz, server VAD
azstt                                           # microphone → live lines

Two request shapes

Two ways to send audio to MAI The two request shapes azstt uses with Azure Foundry's MAI transcription. Batch: the audio is decoded to 16 kHz mono WAV, base64-encoded into a data URL and posted as JSON with the deployment name as the model to /mai/v1/audio/transcriptions, with an api-key header or an Entra bearer token; one transcript comes back. Streaming: a WebSocket to /mai/v1/realtime?intent=transcription receives a transcription session.update carrying the deployment as its model, 16 kHz PCM and server voice activity detection, then audio appends, and returns intermediate text and completed segments. A separate realtime resource, key and model can be configured. audio fileany ffmpeg input 16 kHz WAVbase64 data URL POST /mai/v1/audio/transcriptions{model: deployment, audio_url} transcript microphoneor --stream wss …/mai/v1/realtimesession.update: transcription,16 kHz PCM, server_vad segmentsintermediate → completed 16 kHz appends
A model is a deployment. MAI's model is your Foundry deployment's name, in both batch and realtime requests.
azstt --print-request --model my-mai-transcribe-2
{"method":"POST","url":"https://resource.services.ai.azure.com/mai/v1/audio/transcriptions",
 "content_type":"application/json","body":{"audio_url":"data:audio/wav;base64,…","model":"my-mai-transcribe-2"}}
azstt --print-request --stream
{"url":"wss://resource.services.ai.azure.com/mai/v1/realtime?intent=transcription","rate":16000,
 "model":"mai-transcribe-2-streaming","auth_header":"api-key","session_update":{"type":"session.update",
 "session":{"type":"transcription","audio":{"input":{"format":{"type":"audio/pcm","rate":16000},
 "noise_reduction":null,"transcription":{"model":"mai-transcribe-2-streaming"},"turn_detection":{"type":"server_vad"}}}}}}

Real output, offline, against a placeholder resource name; no key was present.

Defaults and resources