Is it possible to customize the SpeechRecognizer UI for Android?

I have implemented SpeechRecognizer in Android Wear, but this UI looks the same as "Ok Google", so it confuses the user into thinking they are talking to our application, they are actually talking to the "OK Google" UI.

Is there a way to customize the SpeechRecognizer UI so we can avoid this confusion?


source to share

2 answers

I don't think so at the moment. When I try to do this, I get this error message "SpeechRecognizer: no voice recognition service selected". Looking at Google Glass, it seems that based on this information, it is not available, but it could be. Hopefully this is true for Android Wear too.

Is it possible to use Android voice recognition (as a custom service) in Google Glass?



Custom ui can of course be used. Create one, show it and run the recognizer from code

     sr = SpeechRecognizer.createSpeechRecognizer(getApplicationContext());
    sr.setRecognitionListener(new Speachlistener());
    if (recognizerIntent == null) {
        recognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
        recognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
        recognizerIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, getApplication().getPackageName());
        recognizerIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 5);

    }catch (Exception e) 




All Articles