tony-ist / audiojenkins

Small utility for testing speech recognition. Can record from mic into file, play file as audio stream or play mic output as audio stream.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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' });

Development

  • Make changes to audiojenkins
  • Create a tarball
mkdir ~/npm-packages
npm run pack
  • Use tarball in package.json in some other project
"audiojenkins": "file:~/npm-packages/audiojenkins-[version].tgz",

About

Small utility for testing speech recognition. Can record from mic into file, play file as audio stream or play mic output as audio stream.


Languages

Language:TypeScript 100.0%