DefinitelyTyped/types/node-microphone/index.d.ts
Andreas May f58b03ab6e
type definitions for node-microphone (#45180)
* type definitions for node-microphone

* removed blank lines

* fixed export issue

* added the allowSyntheticDefaultImports tsc option
2020-06-03 18:14:24 -07:00

26 lines
714 B
TypeScript

// Type definitions for node-microphone 0.1
// Project: https://github.com/MexXxo/node-microphone#readme
// Definitions by: Andreas May <https://github.com/Maanex>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
interface MicrophoneOptions {
endian?: 'big' | 'little';
bitwidth?: 8 | 16 | 24;
encoding?: 'signed-integer' | 'unsigned-integer';
rate?: 8000 | 16000 | 44100;
channels?: 1 | 2;
device?: 'hw:0,0' | 'plughw:1,0' | 'default';
additionalParameters?: any;
}
declare class Microphone {
constructor(options?: MicrophoneOptions);
startRecording(): NodeJS.WriteStream;
stopRecording(): void;
}
export = Microphone;