0.0.4 • Published 2 years ago

@types/bumblebee-hotword v0.0.4

Weekly downloads
16
License
MIT
Repository
github
Last release
2 years ago

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

// Type definitions for bumblebee-hotword 0.0
// Project: https://github.com/jaxcore/bumblebee-hotword
// Definitions by: sheunglaili <https://github.com/sheunglaili>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <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: Fri, 09 Jul 2021 02:32:21 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by sheunglaili.

0.0.3

2 years ago

0.0.2

2 years ago

0.0.4

2 years ago

0.0.1

4 years ago

0.0.0

5 years ago