diff --git a/speech/recognize.js b/speech/recognize.js index 45112d48b94..639406ef6bb 100644 --- a/speech/recognize.js +++ b/speech/recognize.js @@ -122,7 +122,10 @@ function streamingMicRecognize () { .on('data', (data) => process.stdout.write(data.results)); // Start recording and send the microphone input to the Speech API - record.start({ sampleRate: 16000 }).pipe(recognizeStream); + record.start({ + sampleRate: 16000, + threshold: 0 + }).pipe(recognizeStream); console.log('Listening, press Ctrl+C to stop.'); } diff --git a/speech/system-test/quickstart.test.js b/speech/system-test/quickstart.test.js index 4a4b6f4ba9c..1b0407e6cf4 100644 --- a/speech/system-test/quickstart.test.js +++ b/speech/system-test/quickstart.test.js @@ -28,7 +28,7 @@ const config = { }; test.before(stubConsole); -test.after(restoreConsole); +test.after.always(restoreConsole); test.cb(`should detect speech`, (t) => { const expectedFileName = `./resources/audio.raw`;