Closed klren0312 closed 5 years ago
I would recommend adding error handlers so that you can see what goes wrong, e.g. with the pump utility: https://github.com/mafintosh/pump
const mp3Stream = fs.createReadStream(`./${req.file.path}`)
const decoder = new lame.Decoder()
const output = fs.createWriteStream(path.resolve(__dirname, './sample_pcm.pcm'))
pump(mp3Stream, decoder, output, (err) => {
console.error(err.stack)
})
I use pump, but it has no err throw, is undefined..., but pcm file is also empty
I think my mp3 file has some problem
the sample_pcm.pcm is empty file