Voice Activity Detection (VAD)

WebRTC

This module contains the webrtc component for voice activity detection (vad)

class spokestack.vad.webrtc.VoiceActivityDetector(sample_rate=16000, frame_width=20, vad_rise_delay=0, vad_fall_delay=0, mode=0, **kwargs)[source]

This class detects the presence of voice in a frame of audio.

Parameters
  • sample_rate (int) – sample rate of the audio (Hz)

  • frame_width (int) – width of the audio frame: 10, 20, or 30 (ms)

  • vad_rise_delay (int) – rising edge delay (ms)

  • vad_fall_delay (int) – falling edge delay (ms)

  • mode (int) – named constant to set mode for vad

close()[source]

Close interface for use in pipeline

Return type

None

reset()[source]

Resets the current state

Return type

None

class spokestack.vad.webrtc.VoiceActivityTrigger[source]

Voice Activity Detector trigger pipeline component