honoru88 / google-glass-api

Automatically exported from code.google.com/p/google-glass-api
0 stars 0 forks source link

Cannot configure the speech recognition delay #496

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
XE16.1

I am trying to recognize speech and, despite...

speechRecognitionIntent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_COMPLETE_SI
LENCE_LENGTH_MILLIS, 1000);
speechRecognitionIntent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_POSSIBLY_CO
MPLETE_SILENCE_LENGTH_MILLIS, 1000);

... there's still a noticeable delay of about 2-3 seconds before the recognizer 
callback is fired.

Original issue reported on code.google.com by eug...@wearableintelligence.com on 30 Apr 2014 at 1:00

GoogleCodeExporter commented 9 years ago
Full code:

            speechRecognitionIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
            speechRecognitionIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
            speechRecognitionIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, "en-US");
            speechRecognitionIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 5);
            speechRecognitionIntent.putExtra(RecognizerIntent.EXTRA_PARTIAL_RESULTS, true);

speechRecognitionIntent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_COMPLETE_SI
LENCE_LENGTH_MILLIS, 1000);
speechRecognitionIntent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_POSSIBLY_CO
MPLETE_SILENCE_LENGTH_MILLIS, 1000);

            speechRecognitionIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, context.getPackageName());

Original comment by eug...@wearableintelligence.com on 30 Apr 2014 at 1:01