Speech recognition

call to ‘SpeechRecognizer1$AfterGettingText’ has too few arguments (1; must be 2)
Note: You will not see another error reported for 5 seconds.

Dismiss

Please post the code you have in your SpeechRecognizer.AfterGettingTextblock Mahendran. The error message indicates your code in that block is incorrect.

It might be caused by your SpeechRecognition setting Use Legacy or something else depending on what you are attempting to do with the Speech Recognizer.

Is this Block checked?srLegacy

Here is a simple Speech Recognition app you can try

that might work for you depending on exactly what you want to accomplish with the SpeechRecognizer.

Un-check Use legacy and try

Try it and let us know if this works the way you want. See this post https://groups.google.com/forum/#!msg/mitappinventortest/kYwFlz0rNtI/tJU3JLLLAAAJ

Regards,
Steve

@SteveJG, I’m having the same issue. It seems to me that at some point, the ‘partial’ parameter was added to the speechRecognizer.afterGettingText. The error message seems to be saying the afterGettingText method is only getting 1 parameter to use (result I assume), but it is expecting to get 2 (result, partial). Below is sample code that I’ve tried to see if I can get it to work, but it always comes back with the same error @mahendran was getting.

@mrlinnenburger

Did you uncheck the Speech Recognizer Use legacy box. That might be your issue. Sorry, I cannot check your code at the moment. You also might indicate what Android version you use. The code shown in the link works fine with 8.1 but might not with higher versions.