Code example for SpeechRecognizer

Methods: setRecognitionListener

0
        } 
 
        @Override 
        public void onRmsChanged(float rms) { }
 
        private void handleResults(Bundle bundle, boolean provisional) {
            if (mContinuous && provisional) {
                // In continuous mode, Android's recognizer sends final results as provisional. 
                provisional = false;
            } 
 
            ArrayList<String> list = bundle.getStringArrayList(
                    SpeechRecognizer.RESULTS_RECOGNITION);
            String[] results = list.toArray(new String[list.size()]);
 
            float[] scores = bundle.getFloatArray(SpeechRecognizer.CONFIDENCE_SCORES);
 
            nativeOnRecognitionResults(mNativeSpeechRecognizerImplAndroid,
                                       results,
                                       scores,
                                       provisional);