问题
I am capturing audio through alsa using ffmpeg and writing it to a wav file. But as it's being written I need to send the captured audio to some 3rd party. I have tried few methods including node-growing-file but not able to succeed.
Is there a way I can read the file as a stream as long as it's being written and process it as required.
回答1:
I don't know why this question was down voted. But after a lot of googling I found a NPM which does this job for you:
Tailing Stream NPM
It will read the audio file as long as it's being written and give you the output as stream.
来源:https://stackoverflow.com/questions/47028476/read-the-audio-file-while-its-being-written-in-nodejs