Question

I'm starting my final year project. I will do an android application, which will take commands from the user, and then process the input in order to show results.

My question is, what ways can I use to process the input( what I mean by input here is the data or text after transferring speech to text)?

I have found some ways to do that like matching the input with data stored already(template matching), but Im looking for something more better and smarter that that (and if there are any suggested references).

Thanks

Was it helpful?

Solution

I would suggest you start with a very basic and clearly defined set of keyword rules of your own:

    @Override
    public void onResults(final Bundle results) {

        final ArrayList<String> heardVoice = results.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);

        if(heardVoice != null && !heardVoice.isEmpty()) {

            for(String result: heardVoice){

                if(result.contains("bluetooth")){
                    if(result.contains("on")){

                        // turn on bluetooth
                        break;
                    } else if(result.contains("off")){

                        // turn off bluetooth
                        break;
                    }
                }
            }
        }
    }

Once you've understood these basic keyword parameters, you can then look to using a Natural Language Processing (NLP) model and the performance of your code.

There are many examples out there, but the Apache OpenNLP is a good place to start, with comprehensive documentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top