FreakingGenius - v0.1.0
    Preparing search index...

    Detects the start and end of voiced speech in a PCM audio stream.

    const vad = new VAD({ energyThreshold: 0.01, silenceHoldOffMs: 300, minSpeechDurationMs: 100 });
    vad.onEvent((e) => { if (e.type === VadEventType.SPEECH_START) stt.beginUtterance(); });
    capture.onChunk((pcm) => vad.feed(pcm));
    Index

    Constructors

    Methods

    • Processes a PCM chunk and fires VAD events if a state transition occurs.

      Parameters

      • chunk: Float32Array

        Float32 PCM samples in the range [-1, 1].

      Returns void

    • Returns true if the VAD currently considers the stream to be voiced.

      Returns boolean

      Active speech state.

    • Resets internal state (energy history and hold-off timer). Call this when starting a fresh utterance.

      Returns void