Read the audio file while it's being written in NodeJS

六月ゝ 毕业季﹏ 提交于 2019-12-02 16:37:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!