WebAudio streaming with fetch : DOMException: Unable to decode audio data

后端 未结 2 1728
情深已故
情深已故 2021-01-14 18:03

I\'m trying to play an infinite stream coming from the fetch API using Chrome 51. (a webcam audio stream as Microsoft PCM, 16 bit, mono 11025 Hz)

The code works almo

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-14 18:45

    Making the wav stream sound correctly implies to add WAV headers to the chunks as Raymond suggested, plus some webaudio magic and paquet ordering checks;

    Some cool guys helped me to setup that module to handle just that and it works beautifully on Chrome : https://github.com/revolunet/webaudio-wav-stream-player

    Now works on Firefox 57+ with some config flags on : https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/getReader#Browser_compatibility

提交回复
热议问题