Danation / SwypeTweaks

Android Xposed module for changing the behavior of the popular keyboard app.
Apache License 2.0
12 stars 6 forks source link

[Feature Request] Use new speech recognition by Google #6

Closed ThreeDeeJay closed 6 months ago

ThreeDeeJay commented 1 year ago

Google Voice Search is ancient, long-removed from the Google Play Store and even when installed from a mirror, it doesn't seem to do anything, especially because it relies on an internet connection, unless a certain Xposed module is used, and I doubt that still works because we'd need to download the languages for offline use to begin with. The Google Search app is still a thing, but it doesn't seem to be detected. When I press the mic button, I get a toast message that mentions:

com.google.android.googlequicksearchbox/com.google.android.voicesearch.ime

So my suggestion is to use the newer, optionally offline Google Speech Recognition and Synthesis.

Perhaps we'd just need to edit this line? https://github.com/Danation/SwypeTweaks/blob/abaee60a2ea3fa62f8ced6839e85425cebcf881a/Source/src/com/danation/xposed/swypetweaks/SwypeTweaks.java#L101 to change com.google.android.voicesearch into com.google.android.tts like this, maybe?

switchIME(mIme, "com.google.android.tts/com.google.android.apps.speech.tts.googletts.settings.asr.voiceime.VoiceInputMethodService");

I'm not sure how to compile so I can't test myself.

Danation commented 12 months ago

Well, this is certainly a blast from the past 😄. I haven't looked at this in nearly a decade.

Swype was discontinued about 5 years ago. Are you still using it?

ThreeDeeJay commented 12 months ago

Hahah yup, I just couldn't get used to any of the other keyboards. Swype's features like gestures and prediction are just too good. It still works on Android 13, even with this module and a modded APK along with themes and language packs that you can download here. I know this project is old but I was hoping switching over to the new Google voice recognition activity would be relatively easy to implement, but if you forgot how to do any of this, I'd understand 😅

ThreeDeeJay commented 6 months ago

My hunch was right, editing that line was all that was needed to make this work I wasn't able to rebuild from source so I just used apkstudio to decompile, modify and recompile the APK, which I released here: https://github.com/ThreeDeeJay/SwypeTweaks/releases/latest

Still, if you ever decide to update the official APK, I've submitted a PR with the changed line https://github.com/Danation/SwypeTweaks/pull/7

Danation commented 5 months ago

Thanks for the PR! I don't think I still have signing keys, etc., in order to make an official build.

But I'm glad you got it working! 😄