npm.io
0.0.5 • Published 2 years ago

@types/voice-activity-detection

Licence
MIT
Version
0.0.5
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/voice-activity-detection

Summary

This package contains type definitions for voice-activity-detection (https://github.com/Jam3/voice-activity-detection).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/voice-activity-detection.

index.d.ts

declare function vad(
    audioContext: AudioContext,
    stream: MediaStream,
    options?: vad.VoiceActivityDetectionOptions,
): { connect: () => void; disconnect: () => void; destroy: () => void };

declare namespace vad {
    interface VoiceActivityDetectionOptions {
        fftSize?: number | undefined;
        bufferLen?: number | undefined;
        smoothingTimeConstant?: number | undefined;
        minCaptureFreq?: number | undefined;
        maxCaptureFreq?: number | undefined;
        noiseCaptureDuration?: number | undefined;
        minNoiseLevel?: number | undefined;
        maxNoiseLevel?: number | undefined;
        avgNoiseMultiplier?: number | undefined;
        onVoiceStart?: (() => void) | undefined;
        onVoiceStop?: (() => void) | undefined;
        onUpdate?: ((val: number) => void) | undefined;
    }
}

export = vad;

Additional Details

  • Last updated: Tue, 07 Nov 2023 1536 GMT
  • Dependencies: none

Credits

These definitions were written by JohnDoeAntler.