WeBAD Demo

Web Browser Audio Detection/Speech Recording Events API

This sample shows how to implement an audio/speech detection in the browser, using a ScriptProcessor (Web Audio API).
Github repo: https://github.com/solyarisoftware/webad

To open/close the console: CTRL-SHIFT-J on Chrome, or CTRL-SHIFT-K on Firefox.



REAL-TIME EVENTS/STATUS
Status Value
microphone
audio
speech
recording


CONFIGURATION PARAMETERS
Parameter Value
SAMPLE_POLLING_MSECS
MAX_INTERSPEECH_SILENCE_MSECS
MIN_SIGNAL_DURATION
VOLUME_SIGNAL
VOLUME_SILENCE
VOLUME_MUTE
MIN_AVERAGE_SIGNAL_VOLUME

EVENTS EMITTED
Event name Category Description
signal audio sample volume is high, so probably user is speaking
silence audio sample volume is pretty low, the mic is on but there is not speech
mute audio sample volume is almost zero, the mic is off
unmutedmic microphone micro is UNMUTED (passing from OFF to ON)
mutedmic microphone micro is MUTED (passing from ON to OFF)
prespeechstart recording speech recording start
speechstart recording speech initial chunk start
speechstop recording speech recording stop
speechabort recording speech recording aborted