mardi 23 octobre 2018

Node JS Audio Player with WAV file?

I encountered a problem with WebCDR opensource project that is used to listen for the asterisk recordings , and I noticed that not all recordings get played I traced the issue that it gives a problem with the WAV file format I tried to install wav-encoder to see what is the problem and I faced the following exception on the node-js server

(node:65213) UnhandledPromiseRejectionWarning: TypeError: Unsupported format in WAV file: 0x31
    at decodeFormat (/root/node_modules/wav-decoder/index.js:67:12)
    at decodeSync (/root/node_modules/wav-decoder/index.js:37:16)
    at /root/node_modules/wav-decoder/index.js:59:13
    at new Promise (<anonymous>)
    at Object.decode (/root/node_modules/wav-decoder/index.js:58:10)
    at readFile.then (/root/webcdr-master/lib/api/recordings.js:57:23)

and the error appear on browser console

enter image description here

I managed to do a workaround but it is not applicable since I have lots of files that I need to re-convert the file to wav again with changing the bit-rate 8000

I hope that someone can help me out with a quick fix

Regards,




Aucun commentaire:

Enregistrer un commentaire