android - 增加语音识别android中RESULTS_RECOGNITION的数量

标签 android speech-recognition

我想让谷歌语音识别足够灵活,在匹配语音时给我十到十五个结果..

 // This are the intents needed to start the Voice recognizer
            Intent i = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
           // i.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
                 //   RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
            i.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, "en-US");
            i.putExtra(RecognizerIntent.EXTRA_PROMPT, "Say something");

我想增加下面给出的结果数量。它通常会给我四到五个..

ArrayList<String>  results = data
                    .getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);

有可能吗..

最佳答案

这是不可能的。从 API 级别 19 开始,您可以通过设置 EXTRA_MAX_RESULTS 来设置上限。调用 RecognizerIntent 时。但没有 EXTRA_MIN_RESULTS 来设置下限。

关于android - 增加语音识别android中RESULTS_RECOGNITION的数量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23928504/

相关文章:

c# - 使用Microsoft SpeechRecognitionEngine时如何提高结果的准确性?

android - Firebase 的 addListenerForSingleValueEvent 和 addChildEventListener 方法有什么区别?

speech-recognition - 文本转语音(语音生成)和语音转文本(语音识别)API?

python-3.x - 如何在python中分割音频文件

android - 如何在 RelativeLayout 中的两个 View 之间填充布局?

Java 语音 API 教程?

speech-recognition - Kaldi:qsub 的输出是:qsub: illegal -c value ""when trying to run the Common Voice recipe

Android-hdpi屏幕下背景变长

android - Libgdx 上的 Crashlytics

android - 使用即时应用程序在设备上安装已安装的应用程序