Am trying to call the speech-to-text api of google console for nodejs and apparently is working, but when i try to run the example provider for here the example node MicrophoneStream.js and doing the installation like this here, am having the following error.
STDERR: sox FAIL sox: Sorry, there is no default audio device configured
i dont really know how to pass the device with arguments and i assuming is the default microphone but not sure cause in some page i found a possible value for this like "AUDIOWAVE", also configured in my system and still not working.
the recorder
object have a function record and i can start the recorder from that passing arguments ( i suppose are passed to sox binaries ), like this
.record({
sampleRateHertz: sampleRateHertz,
threshold: 0, //silence threshold
recordProgram: 'rec', // Try also "arecord" or "sox"
silence: '5.0', //seconds of silence before ending
})
so i try to pass the STDERR argument cause i though was the default device parameter but dont work.
anyway if somebody can help i will gratefully and also if can share with me a documentation reference for all the possibles .record arg and description that's gonna be great. thanks.
here is the complete trace
record Started recording +0ms
record { sampleRate: 16000,
record channels: 1,
record compress: false,
record threshold: 0,
record thresholdStart: null,
record thresholdEnd: null,
record silence: '5.0',
record recorder: 'sox',
record endOnSilence: false,
record audioType: 'wav',
record sampleRateHertz: 16000,
record STDERR: '2- USB2.0 MIC',
record recordProgram: 'rec' } +2ms
record sox --default-device --no-show-progress --rate 16000 --channels 1 --encoding signed-integer --bits 16 --type wav - +10ms
Listening, press Ctrl+C to stop.
record STDERR: sox FAIL sox: Sorry, there is no default audio device configured
record +131ms
record Recording ended +2ms
sox has exited with error code 1.