Android things: Use Speech for text in raspberry Pi 3 using android

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 the code does not work, it gives an exception like

Device

does not support speech in the text

Is there a way to support speech in text for Raspberry Pi using Android stuff or any package or apk, you need to install it on Raspberry Pi to support speech to text. Please, help

+4
source share
1 answer

Standalone voice recognition does not work on Android Things, but there are cloud-based ways to send sound to the server and return user transcription, such as the Google Cloud Speech API .

, , Dialogflow API, Google . Google Assistant SDK, Google.

+1

Source: https://habr.com/ru/post/1694630/


All Articles