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

Add options for silence cutoff and individualized thresholds #26

Closed iniq closed 7 years ago

iniq commented 7 years ago

For our project, we found that using the current 'silence' parameters was insufficient - we needed some cases where we could allow a pause of longer than 1s before recording was cut off, and we wanted the activation threshold to be different from the cutoff threshold.

I added additional options to support this, with defaults. Additionally, the current option for threshold, if provided, will still continue to work as it does in the existing version and apply to both activation and cutoff.

gillesdemey commented 7 years ago

LGTM, probably makes #11 and #14 obsolete but I'm more in favor of this approach since it splits up the thresholds into separate params.