anthumchris / opus-stream-decoder

Instantly decode Ogg Opus audio streams in chunks with JavaScript & WebAssembly (Wasm)
124 stars 21 forks source link

play it in <audio> #25

Closed elshnkhll closed 10 months ago

elshnkhll commented 11 months ago

I am receiving stereo 48KHZ Opus encoded audio in in variable (~170 byte) size 20ms chunks extracted from UDP/RTP packets. Can your decoder play it in

anthumchris commented 11 months ago

The decoder works with Ogg Opus files (RFC 7845), and the "encoded audio" must be the Ogg file itself.

Consider using the newer WebCodecs API to potentially decode raw Opus audio (not encapsulated within Ogg).

For use within <audio>, please see Media Capture and Streams API (Media Stream)

elshnkhll commented 10 months ago

Thanks