문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top