Endpoint
Authentication
Pass your API key as a query parameter on the connection URL:Features
- Real-time output — frames emitted progressively after each 192ms chunk of audio
- Music detection — identifies frames containing music content
- Speech detection — identifies frames containing speech content
- Non-exclusive labels — music and speech are independent; both can be high simultaneously (e.g. music with vocals)
- Any chunk size — send audio in whatever chunk size suits your pipeline
- Container and raw PCM support — stream compressed files or raw PCM directly from a microphone
Connection parameters
Supported audio formats
Container formats —sample_rate and num_channels are ignored if supplied (the headers already carry this metadata):
mp3, wav, flac, m4a, mp4, ogg, opus, webm, aac, aiff, wma, amr, and au, plus 67 others
All 80 accepted container values
All 80 accepted container values
3g2, 3ga, 3gp, 3gpp, 8svx, aa3, aac, ac3, act, adts, aif, aifc, aiff,
amb, amr, asf, at3, au, avr, awb, bwf, c2, caf, dss, dts, dtshd,
eac3, ec3, f4a, f4b, flac, gsm, iff, m2a, m2ts, m4a, m4b, m4r, m4v,
mka, mkv, mlp, mp+, mp1, mp2, mp3, mp4, mpa, mpc, mpga, mpp, mts,
oga, ogg, ogx, oma, omg, opus, paf, pvf, qcp, ra, rf64, rm, rmvb,
snd, spx, svx, thd, ts, tta, voc, vqf, w64, wav, wave, weba, webm,
wma, wmvmp4, m4a, m4b, m4r, m4v, 3gp, 3gpp, 3ga, 3g2, f4a, f4b) must be sent in a streamable layout; otherwise the connection ends with an audio-processing error.
Raw PCM formats — sample_rate and num_channels are required:
s8, s16le, s16be, s24le, s24be, s32le, s32be, u8, u16le, u16be, u24le, u24be, u32le, u32be, f32le, f32be, f64le, f64be, mulaw, alaw, g722, vox
g722 and vox are mono-only: num_channels must be 1.
Valid sample rates: 8000, 11025, 16000, 22050, 32000, 44100, 48000, 96000
Protocol
Client → server
Server → client
Frame object
Done object
WebSocket close codes
Chunking behaviour
Audio is buffered in 192ms chunks (one output frame each). Frames are emitted as soon as each chunk is ready, so results begin arriving within 192ms of the first audio being received. At end-of-stream, any remaining audio ≥ 192ms is processed and its frames are emitted before thedone message.
Examples
Rate limits
- Concurrent connection limits apply per model