The Speech Recognition function does not work with "UseLegacy" unchecked (with Android 11)

Hi everyone

Hope all is well!

The Speech Recognition function does not work with "UseLegacy" unchecked.

I created an app with UseLegacy unchecked today and it does not work.
I can't get result from the function.

If I check the UseLegacy checkbox, it works. *The Google dialog pop up.

Please let me know if you know what I should check or what I should do to prevent
this with UseLegacy unchecked.

I remember that in the past, if I unchecked UseLegacy and activated speech recognition, it would run without the Google dialog. Even if it was silent, I got the following error past.

Error 3802: Client Side Error
Error 3806: No Match

However, the app I made today does not show the above error and does not seem to be working.

*Details
App inventor 2

SpeechRecognizer_Propertiy_UseLegacy

Blocks

SpeechRecognizer_test.aia (12.5 KB)

Device
Model: Galaxy S10e
OS: Android 11

Thanks.

Hi All

Additional explanation of this situation.

Apps that I have created and built in the past with similar descriptions have worked fine.
However, when I build it today with the exact same configuration, it does not work.

As a test, I imported the extension"ScSpeechRecognizerV9_1.aix" and used the function "IsListening" to check the status of speech recognition, but the result was false (= not working).


"ScSpeechRecognizerV9_1.aix" is an extension of SpeechRecognizer.

ScSpeechRecognitionV9_1

The extension has the below function.
IsListening (Boolean, Read only) - You can find out if he is currently listening.

I checked my device's status of listenig. However the result of the function is "false".



blocks

Hi everyone

I tried to use my tablet device of old model.
I can use the speech recognizer function without "UseLegacy".


The old device details
Device model: Huawei d-01J
Android version:7


Its my opinion that the cause of the problem could be the android version.
If anyone has a device with Android 11, could you please run the SpeechRecognizer function with UseLegacy unchecked?

Thanks.

Your SpeechRecognizer_test.aia works fine on an Android 8.1 using UseLegacy unchecked.

Yes indeed. Your code works well on your Android 7 and my Android 8.1 but not on your Android 11. Do you get any error messages?

2 Likes

Thank you for trying it!

No error message is displayed.

I added the block of "When Screen1 ErrorOccurred" to test it, and the same thing I can't get any error message.

blocks

I used the Screen Recording feature of Android 11 to take a video of the screen in action.
(This video is not interesting because there is no movement at all except for the button presses.)

Thanks for the report. We've replicated the issue on our end and will work on a fix.

2 Likes

I have put together a potential fix here:

3 Likes

Thank you for your help. I look forward to using this Speech Recognizer.

I'm not familiar with GitHub, does that mean this issue currently in the following state?

1)The cause of the problem has been identified and the effect of the fix has been confirmed.
2)A fixed version will be released in the future after review from "mit-cml/core-reviewers".

The pull request is the suggested change in order to fix your issue. Other members of the team will need to review the change and test it before merging. Once it is merged it will be released as part of the next App Inventor update.

In the meantime if the issue on Android 11 is blocking you from making progress, you can use the older companion available from code.appinventor.mit.edu (you will need to sideload it), as that version targets Android 10 and doesn't have the additional security checks enforced against it like you're seeing on Android 11.

1 Like

Note that this fix is now deployed on ai2-test.appinventor.mit.edu. If you want to test, you will need to sideload the companion provided by that server (2.61t2u) since this change required a new companion.

1 Like

Thank you for dealing with this issue.
I tried "ai2-test.appinventor.mit.edu" and "companion(2.61t2u)" , so Speech recognizer function works well in Android11 as connecting USB.

However I build and install the apk file, the function do not work in Android 11. Does it's a test version, so it doesn't work with apk files?

1 Like

Just check this....

1 Like

Are you building the app on the test server? If so, you should get the appropriate permissions. If not, please PM me the compiled APK and I will run an analysis on it.

1 Like

Thanks for the info. Sorry it took me so long to reply.
The current version is working fine, so I'll use it as is for now.

Sorry it took me so long to reply.
It's working fine now! Thanks for responding!

MIT App Inventor 2 nb188 (November 11, 2021)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.