npm.io
1.1.1 • Published 2 years ago

audiojenkins

Licence
ISC
Version
1.1.1
Deps
1
Size
8 kB
Vulns
0
Weekly
0

Audio Jenkins

This is a small utility package to help with speech recognition programmes. It can record audio from microphone into file, play recorded file into ReadbleStream and return it, or just play microphone output into ReadbleStream.

Dependencies

Usage

Stream microphone output in audioStream and in file.

import * as AudioJenkins from 'audiojenkins';
const audioStream = await AudioJenkins.getAudioStream(
  { 
    outputFileName: 'audio.wav',
    audioRecorderOptions: {
      silence: 0,
    }
  }
);

Stream audio file in audioStream. Yoi should not use inputFileName option with other options.

import * as AudioJenkins from 'audiojenkins';
const audioStream = await AudioJenkins.getAudioStream({ inputFileName: 'audio.wav' });