eshaz/wasm-audio-decoders

Output Opus frames in pcm16

Opened this issue · 0 comments

The libopus library supports outputting decoded data as int16 PCM as well as float32, but this wrapper only supports float32.

Could a variation of the methods be added to output decoded data as int16 instead? (Motivation: this is the format that OpenAI's realtime audio transcription API expects.)

Obviously I can convert the float32 data to int16 but since libopus supports int16 natively it'll be less efficient.