Anysoftkeyboard: Voice typing is only available via Google Voice Typing

Created on 13 Mar 2017  路  8Comments  路  Source: AnySoftKeyboard/AnySoftKeyboard

Steps to reproduce

  1. Click on the mic button
  2. Google Voice Typing pops up

Expected behaviour

The user should be asked (in the settings or upon pressing the mic button) which form of voice typing they want to use. In general, there are 3 different possible forms: SpeechRecognizer service, RecognizerIntent activity, IME (with voice subtype). Each of these can have multiple installed implementations on Android. The user should be given a choice.

Actual behaviour

If Google's infrastructure is not installed on the device (e.g. CyanogenMod without Google Play services) then RecognizerIntent pops up. (That's a sensible behavior, although a SpeechRecognizer service based solution would be nicer, like done in SlideIT keyboard.) However, if Google's infrastructure is on the device (e.g. Nexus 5X) then no choice is given.

Android OS version:
Android 7.1.2

Device manufacturer and model:
Nexus 5X

The fix should probably start with generalizing the line:
https://github.com/AnySoftKeyboard/AnySoftKeyboard/blob/master/app/src/main/java/com/google/android/voiceime/ImeTrigger.java#L38

As an alternative service/activity/IME to test against, one could consider https://github.com/Kaljurand/K6nele.

Most helpful comment

Hello, I was surprised to find out that after installing K玫nele ASK opened the service, but then typed nothing. I鈥檓 not a developer, but is there any way to speed up this improvement? It鈥檚 really important to me.

All 8 comments

Support if different voice services would be great. Another option should be the complete removal og the button.

Returning to this issue...

The simplest fix to this issue (with least GUI overhead) is to change the line
https://github.com/AnySoftKeyboard/AnySoftKeyboard/blob/master/app/src/main/java/com/google/android/voiceime/ImeTrigger.java#L38 from

private static final String VOICE_IME_PACKAGE_PREFIX = "com.google.android";

to

private static final String VOICE_IME_PACKAGE_PREFIX = getThePrefixFromTheSettings();

The settings could have a simple EditText (pre-populated with ""com.google.android", if you wish), or ideally a drop-down with all the available IMEs that have a "voice" type.

This fix is trivial to implement and would solve the main issue here, that an open source app like AnySoftKeyboard is locked in to using a closed-source app like Google's IME...

This issue is stale because it has been open 400 days with no activity. Remove stale label or comment or this will be closed in 8 days

Why was this closed without any meaningful explanation?

@kalujrand the bot has some issues and needs manual label removal. Reopening.

There's also kaldi, android demo is here. The code doesn't seem long.

Hello, I was surprised to find out that after installing K玫nele ASK opened the service, but then typed nothing. I鈥檓 not a developer, but is there any way to speed up this improvement? It鈥檚 really important to me.

Was this page helpful?
0 / 5 - 0 ratings