mic-to-speech
Watches your microphone stream to pull out speech segments that you can save to a file, or send to an endpoint for speech recognition. Ideal for saving audio for conversation monitoring and assistant apps that work like Google Home or Amazon Alexa.
Supports Mac, Windows, Linux and Raspberry Pi.
Usage
const MicToSpeech = ; let micToSpeech = ; micToSpeech; micToSpeechstart;console
Example Usage
Save raw audio to disk every time speech like audio is detected
const MicToSpeech = ;const fs = ; let micToSpeech = ; micToSpeech
Note: This is a header-less wav file, so you will need a compatible software to play them. On a Mac you can play them with play:
play -b 16 -e signed -c 1 -r 16000 someDatedFile.raw
Have a two way AI conversation with speech recognition
'use strict'; const ElizaBot = ;const say = ;const MicToSpeech = ;const Speech = ; // create our instance of elizaconst eliza = ; // in a standard env this will pick up and watch the microphoneconst micToSpeech = ; micToSpeech; let { // you said this to eliza console; // Eliza to respond eliza ;}; let { console; say;}; // Have Eliza start the conversation with an initial statement;