gillesdemey / node-record-lpcm16

:microphone: Records a 16-bit signed-integer linear pulse modulation code encoded audio file.
ISC License
212 stars 59 forks source link

Start time of recording after silence #47

Closed ranjannayyar closed 6 years ago

ranjannayyar commented 6 years ago

I want to be able to get the time when a new recording starts after silence. To my knowledge, a new recording starts immediately when the last one ends but no data is recorded until there is any sound. I need timestamps on the audio so I can match it back to transcription later. If you can help that would be appreciated.

ranjannayyar commented 6 years ago

essentially I am trying this but it is not working: file.on('pipe', function (){console.log("started recording")}). I have also tried file.on('start', ...)

ranjannayyar commented 6 years ago

I made it work. I used byteswritten function to see when the file recording actually starts i.e. when bytes transfered are more than 0, at other times during silence it remains at zero.