music_prob and speech_prob are independent, not a split of 100%. A singer over a backing track scores high on both at once.
This is not AI Music Detection, which answers whether music was model-generated. See AI Music Detection.
Music & Speech Detection (batch)
Returnsapplication/json. Every field is always present.
Note that duration here is
duration_s in seconds. Most other Modulate endpoints report duration_ms.
Try it
Response
Response
What you can configure
Audio formats
Accepted extensions:.aac, .flac, .m4a, .mp3, .mp4, .ogg, .opus, .wav.
Maximum file size is 100 MB. Empty files are rejected with 400.
Music & Speech Detection (streaming)
Oneframe message per completed 192 ms window, then a done message carrying clip totals computed across everything received.
Note that
done reports duration_ms in milliseconds, where the batch response reports duration_s in seconds.
Send audio as binary WebSocket frames of any size; the server buffers and windows internally. Send an empty text frame ("") to end the stream. The server then flushes remaining audio, delivers final frames, sends done, and closes.
Try it
Messages received
Messages received
What you can configure
Audio formats
Streaming accepts a narrower set than batch.m4a, mp4, and opus are batch-only.
Container formats. wav, mp3, ogg, flac, webm, aac, aiff. The stream carries sample rate and channel count, so sample_rate and num_channels must be omitted.
Raw formats. s8, s16le, s16be, s24le, s24be, s32le, s32be, u8, u16le, u16be, u24le, u24be, u32le, u32be, f32le, f32be, f64le, f64be, mulaw, alaw. These are headerless, so sample_rate and num_channels are both required.
sample_rate accepts 8000, 11025, 16000, 22050, 32000, 44100, 48000, 96000.
Common raw configurations:
To convert a file to raw PCM:
1003, and again while decoding, closing with 4002. The second catches undecodable audio and a mismatch between the declared audio_format and the bytes sent.