From e8ce37e77629103224ed04ad2915de8f5102ca18 Mon Sep 17 00:00:00 2001 From: picklesrus Date: Wed, 9 May 2018 09:20:49 -0700 Subject: [PATCH] Fix a copy/paste comment error and initialize current_utterance differently --- src/extensions/scratch3_speech/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/extensions/scratch3_speech/index.js b/src/extensions/scratch3_speech/index.js index 117362f68..a0bc78847 100644 --- a/src/extensions/scratch3_speech/index.js +++ b/src/extensions/scratch3_speech/index.js @@ -33,8 +33,8 @@ const serverURL = 'wss://speech.scratch.mit.edu'; const finalResponseTimeoutDurationMs = 3000; /** - * The amount of time to wait between when we stop sending speech data to the server and when - * we expect the transcription result marked with isFinal: true to come back from the server. + * The max amount of time the Listen And Wait block will listen for. It may listen for less time + * if we get back results that are good and think the user is done talking. * Currently set to 10sec. This should not exceed the speech api limit (60sec) without redoing how * we stream the microphone data data. * @type {int} @@ -76,7 +76,7 @@ class Scratch3SpeechBlocks { * @type {String} * @private */ - this._currentUtterance = null; + this._currentUtterance = ''; /** * Similar to _currentUtterance, but set back to '' at the beginning of listening block.