DefinitelyTyped/types/node-microphone/node-microphone-tests.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

17 lines
323 B
TypeScript

import Microphone from "node-microphone";
const mic = new Microphone({
channels: 1,
bitwidth: 16,
endian: "little",
device: "default",
encoding: "signed-integer",
rate: 44100,
additionalParameters: {}
});
const stream = mic.startRecording();
stream.pipe(process.stdout);
mic.stopRecording();