本文介紹了Android SpeechRecognizer設(shè)置識(shí)別引擎?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!
問題描述
我正在使用SpeechRecognizer將語音轉(zhuǎn)換為文本。我正在使用三星,在我將語音識(shí)別器設(shè)置為‘Samsung Powered by Vlingo’時(shí)遇到錯(cuò)誤,在我更改為‘Google’后,錯(cuò)誤消失了。我想知道有什么方法可以編程更改識(shí)別引擎嗎?謝謝。
推薦答案
我找到了問題的答案。我可以使用‘Public Static SpeechRecognizer createSpeechRecognizer(Context Context,ComponentName serviceComponent)’的方法來選擇要綁定的識(shí)別服務(wù)。
以下是實(shí)現(xiàn)。
SpeechRecognizer.createSpeechRecognizer(mContext, ComponentName.unflattenFromString("com.google.android.googlequicksearchbox/com.google.android.voicesearch.serviceapi.GoogleRecognitionService"));
謝謝大家。
這篇關(guān)于Android SpeechRecognizer設(shè)置識(shí)別引擎?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,