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.
Well i see the question dont get any answer, but i apologize because i found a solution few months ago.
In resumen the version 14.4.2 of sox have some issues in my windows 10 OS, (i test in linux version with fedora 30.1 distribution and works correctly), so i found a solution in the node-speakable repo, just downgrading the version to 14.4.1.
I solved this problem by installing sox 14.4.1 rather than 14.4.2 (here)
i solved this problem in the same way.
anyway (there) is another way in the same post who can solved with the version 14.4.2, but i think is a little tricky cause you play with the command and not implement the library or scripts files but is still a option.