Audio Formats

August 1, 2026 · View on GitHub

The native /stt endpoint accepts raw PCM bytes (16 kHz, mono, 16-bit signed).

Compat routers accept uploaded audio files in a variety of formats via the shared helper ovos_stt_http_server.audio_utils.multipart_audio_to_audiodata:

  • WAV is decoded with the stdlib wave module.
  • Any other format (mp3, flac, ogg, m4a, webm, …) is decoded via pydub, which requires ffmpeg to be available on the host.

pydub is an optional dependency — install via the [audio] extra:

pip install ovos-stt-http-server[audio]

If a non-WAV upload arrives and pydub is not installed, the server replies with 501 Not Implemented.

Vendor-specific notes

VendorDefault content-typeNotes
OpenAI Whispermultipart/form-data (file=@)accepts whatever Whisper accepts
Deepgramaudio/wav or raw PCM bodyContent-Type sniffed
Google Cloud STTbase64 in JSON bodyconfig.encoding accepts LINEAR16 or int 1
AssemblyAIbase64 in JSON or audio_url referencing /v2/uploadSDK-driven 3-step flow
Speechmaticsmultipart/form-data (data_file=@)config form field carries JSON
Azure Speechaudio/wav body (REST) or framed WS audiorest accepts ≤60s
AWS Transcribedata:audio/wav;base64,... in MediaFileUriinline only; S3 not fetched
IBM Watsonaudio/wav or audio/l16;rate=16000WS uses audio/l16
Wit.aiaudio/wav or audio/raw;rate=...;bits=...content-type drives decoding
Chromiumaudio/x-flac;rate=...FLAC encoder → pydub decoder
vosk WS / MQTTraw 16-bit PCMrate from config
kaldi-gstreameraudio/x-raw,rate=...,format=S16LE,... capsparsed from content-type
whisper.cppmultipart/form-data (file=@)any audio pydub can read

← Index · Home · API compatibility →