0.0.4 • Published 2 years ago
@types/bumblebee-hotword v0.0.4
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.