Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speech to text is not working with api 30 or more #693

Closed
KINGMOHIT opened this issue Jul 14, 2022 · 14 comments
Closed

Speech to text is not working with api 30 or more #693

KINGMOHIT opened this issue Jul 14, 2022 · 14 comments

Comments

@KINGMOHIT
Copy link

I tested plyer sst for various devices with api version 31 and it worked fine in devices with Android 9 or less but with Android 10 or more it doesn't enabled microphone. May be the issue is that microphone is not working

@HyTurtle
Copy link
Contributor

HyTurtle commented Jul 14, 2022

Is there anything reported in the logcat that can be addressed?

@KINGMOHIT
Copy link
Author

KINGMOHIT commented Jul 14, 2022

07-15 00:40:34.816 1565 2456 I AppsFilter: interaction: PackageSetting{8dccecb oli.oli/10402} -> PackageSetting{f1e9383 com.google.android.googlequicksearchbox/10219} BLOCKED
07-15 00:40:34.816 1565 2456 W ActivityManager: Unable to start service Intent { act=android.speech.RecognitionService cmp=com.google.android.googlequicksearchbox/com.google.android.voicesearch.serviceapi.GoogleRecognitionService } U=0: not found
07-15 00:40:34.817 32341 32341 E SpeechRecognizer: bind to recognition service failed
07-15 00:40:35.253 1088 1619 D AudioAnalytics: gc(1700, 2000): log size:1700 item map size:7, item map items:1700
07-15 00:40:35.320 18772 2464 D HeadsetPhoneState: sendDeviceStateChanged. mService=1 mSignal=3 mRoam=0 mBatteryCharge=3
No nothing. But the way I tested it the problem is with api version 30+ APIs are not supported for stt.

@KINGMOHIT
Copy link
Author

https://github.com/Android-for-Python/Android-for-Python-Users#plyer I just find out this ... Please look into it. I worked for 8 months straight and at the end moment while submitting the app to console. I understood the problem

@HyTurtle
Copy link
Contributor

If it is just that query that needs added then that could potentially be added/provided via extra_manifest_xml in buildozer/p4a. plyer isn't really setup to automatically provide/inject such files - other than say suggesting that param (if it does sort it) in the examples; so could probably close the issue.

@KINGMOHIT
Copy link
Author

KINGMOHIT commented Jul 15, 2022

This is may be off topic but I am getting error Open quote is expected for attribute "android:name" associated with an element type "action". in buildozer. I just copy pasted those xml codes

@HyTurtle
Copy link
Contributor

HyTurtle commented Jul 15, 2022

Can you show precisely what you copied/ran and where you are getting that error

<queries>
    <intent>
        <action android:name="android.speech.RecognitionService" />
    </intent>
</queries>

should be what you're adding/including

@KINGMOHIT
Copy link
Author

Execution failed for task ':generateReleaseBuildConfig'.
org.xml.sax.SAXParseException; systemId: file:/mnt/e/New/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/Oli/src/main/AndroidManifest.xml; lineNumber: 45; columnNumber: 30; Open quote is expected for attribute "android:name" associated with an element type "action".

above is the exact error

I have attached my xml file in txt format
and in buildozer
android.extra_manifest_xml =z.xml
z.txt

@KINGMOHIT
Copy link
Author

also the file in which it is giving error
AndroidManifest.txt
e

@HyTurtle
Copy link
Contributor

HyTurtle commented Jul 16, 2022

seems to have removed the quotes...
what happens if you escape them?
android:name=\"android.speech.RecognitionService\"

failing that try manually adding it to the template

@KINGMOHIT
Copy link
Author

No doesn't work

@HyTurtle
Copy link
Contributor

HyTurtle commented Jul 18, 2022

escaping the characters does seem to build correctly here;

    <queries>
            <intent>
                <action android:name=\"android.speech.RecognitionService\" />
            </intent>
        </queries>

@KINGMOHIT
Copy link
Author

thanks above code solves the issue

@znerl
Copy link

znerl commented Aug 6, 2022

for me that doesn't work...

trying to get this code running:

main.py:

main.py

adding this to buildozer.spec :

android.extra_manifest_xml = z.xml

z.xml :
<queries> <intent> <action android:name=\"android.speech.RecognitionService\" /> </intent> </queries>

Nothing happens just [] is written in the results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants