android things:Use Speech to text in Raspberry Pi 3 using android things

会有一股神秘感。 提交于 2020-01-14 10:29:42

问题


im using below code for speech to text for Raspberry Pi3

   Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
                intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
                        RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
                intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, "en-US");


                try {

                    startActivityForResult(intent, RESULT_SPEECH);
                } catch (ActivityNotFoundException a) {
                   a.printStackTrace();
                }

But code not works it gives exception as

device does not support Speech to text

Is there any way to support speech to text for Raspberry Pi using android things or any package or apk need to install on Raspberry Pi to support Speech to text. Please help


回答1:


The offline speech recognizer does not work on Android Things, but there are cloud-based ways where you send audio to a server and get back the user transcription, such as the Google Cloud Speech API.

If you have a specific set of intents that you are listening to, you may want to check out the Dialogflow API, which uses Google Cloud Speech behind the scenes with natural language processing. There is also the Google Assistant SDK, which would let you embed the full Google Assistant.



来源:https://stackoverflow.com/questions/49166326/android-thingsuse-speech-to-text-in-raspberry-pi-3-using-android-things

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