VoiceRecognition Android Taking Too Long To React

社会主义新天地 提交于 2021-02-11 12:35:11

问题


I'm trying to find a way to get the SpeechRecognizer to react to speech a lot quicker. I have found that the process from onBeginning of speech onwards is pretty fast, but I need the actual reaction to speech meaning onBeginning of speech to have a timelimit before deciding what word is said. Let me know possible suggestions.


回答1:


Your question isnt very clear but if you want more fine-grained control over when speech should start recording or the minimum length of the speech etc. you can set quite a few extras in the RecognizerIntent to customize it to your needs such as

EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS , EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS and EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS.

Read up on these here.



来源:https://stackoverflow.com/questions/16432585/voicerecognition-android-taking-too-long-to-react

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!