@types/bumblebee-hotword
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

Installation

npm install --save @types/bumblebee-hotword

Summary

This package contains type definitions for bumblebee-hotword (https://github.com/jaxcore/bumblebee-hotword).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bumblebee-hotword.

index.d.ts

/// <reference types="node" />

import { EventEmitter } from "events";

export = Bumblebee;

declare class Bumblebee extends EventEmitter {
    constructor();

    setVoiceProcessor(Proc: Bumblebee.VoiceProcessor): void;
    addHotword(name: string, data?: Uint8Array, sensitivity?: number): void;
    setHotword(w: string): void;
    setSensitivity(s: number): void;
    stop(): void;
    setWorkersPath(path: string): void;
    detectionCallback(keyword: string): void;
    errorCallback(e: Error): void;
    audioProcessCallback(data: any, sampleRate: any): void;
    audioAnalyserCallback(audioAnalyser: AnalyserNode, gainNode: GainNode): void;
    start(): void;
    setMuted(muted: boolean): void;
    setMicVolume(vol: number): void;
}

declare namespace Bumblebee {
    interface VoiceProcessor {
        start(
            engines: VoiceEngine[],
            volume: number,
            downsamplerScript: string,
            errorCallback: (e: Error) => void,
            audioProcessCallback: (data: any) => void,
            audioContextCallback: (analyzer: AnalyserNode, gainNode: GainNode) => void,
        ): void;
        stop(): void;
    }

    interface VoiceEngine {
        processFrame(data: any): void;
    }

    class SpectrumAnalyser {
        constructor(analyser: AnalyserNode, canvas: HTMLCanvasElement);
        setColors(linecolor: string, bgcolor: string): void;
        setLineColor(linecolor: string): void;
        setBackgroundColor(bgColor: string): void;
        draw(): void;
        start(): void;
        stop(): void;
        setMuted(muted: boolean): void;
    }
}

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: @types/node

Credits

These definitions were written by sheunglaili.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/bumblebee-hotword

Weekly Downloads

5

Version

0.0.4

License

MIT

Unpacked Size

5.91 kB

Total Files

5

Last publish

Collaborators

  • types