diff --git a/README.md b/README.md index 66cbcbe..68cece5 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ setTimeout(() => { // Dispose (stop sox process and listeners) after 30s setTimeout(() => { - console.log("dispose all listeners and free ressources") + console.log("dispose all listeners and free resources") clap.dispose() }, 30000) ``` @@ -129,12 +129,13 @@ You can pass a configuration object and override the default values when you cre ```bash // DEFAULT CONFIG var CONFIG = { - AUDIO_SOURCE: 'hw:1,0', // this is your microphone input. If you dont know it you can refer to this thread (http://www.voxforge.org/home/docs/faq/faq/linux-how-to-determine-your-audio-cards-or-usb-mics-maximum-sampling-rate) - DETECTION_PERCENTAGE_START : '5%', // minimum noise percentage threshold necessary to start recording sound - DETECTION_PERCENTAGE_END: '5%', // minimum noise percentage threshold necessary to stop recording sound + AUDIO_SOURCE: 'alsa hw:1,0', // this is your microphone input. If you dont know it you can refer to this thread (http://www.voxforge.org/home/docs/faq/faq/linux-how-to-determine-your-audio-cards-or-usb-mics-maximum-sampling-rate) + DETECTION_PERCENTAGE_START : '10%', // minimum noise percentage threshold necessary to start recording sound + DETECTION_PERCENTAGE_END: '10%', // minimum noise percentage threshold necessary to stop recording sound CLAP_AMPLITUDE_THRESHOLD: 0.7, // minimum amplitude threshold to be considered as clap CLAP_ENERGY_THRESHOLD: 0.3, // maximum energy threshold to be considered as clap - MAX_HISTORY_LENGTH: 10 // all claps are stored in history, this is its max length + CLAP_MAX_DURATION: 1500, + MAX_HISTORY_LENGTH: 100 // all claps are stored in history, this is its max length } const clap = new ClapDetector(CONFIG) ```