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

How to stop recording after silence #61

Open ReeceKenney opened 3 years ago

ReeceKenney commented 3 years ago

Does anyone know how to stop recording after the volume threshold drops below a cetain amount? I'd like for recording to stop automatically when the user stops talking. I see the threshold, thresholdStart and thresholdEnd options and they sound like they might be what I'm looking for but I don't actually see any info on how to use these. I've had a play around with some values for these options but the recording has always just kept going.

Is it possible to know if the user has stopped talking rather than when there is silence? If there is any noise in the room when the user is talking, it wouldn't really work checking for silence.

Thanks,