Question

I installed the open source Kõnele (source code) for the purpose of studying how to write and register a custom speech recognition service. As first step, before delving deep into the source code, I tried to verify that it indeed works as I expected. So, I went to my phone's System settings > Language & input > Voice recognizer and selected Kõnele as the system's recognizer:

enter image description here

I then tried various application in the phone that present the keyboard with the microphone option, expecting that when I touch the mic symbol, Kõnele will be used. Instead, however, the system always pops up Google's built-in voice search.

Why is that?

Have I missed additional settings that I need to configure (as a user) in order to make this work?

Is this a "by design" limitation of the Android OS?

Is it possible to tell Android to always use a different RecognizerIntent that isn't Google Voice Search? If so, how?

Update: I managed to find one app that seems not to ignore the additional RecognizerIntent: Google Maps:

enter image description here

To me that suggests that this has something to do with Android intent resolution. But then why do some apps do not trigger that "Complete action using" dialog, while Google Maps does?

Was it helpful?

Solution

I think you have done everything that you can as a user, but an app that wants to use the speech recognizer is of course free to ignore your configuration. E.g. it can directly choose a particular speech recognizer implementation by constructing the recognizer something like this:

SpeechRecognizer.createSpeechRecognizer(this,
    new ComponentName("com.google",
                      "com.google.Recognizer");
);

In this case, your only option is to uninstall or disable this particular implementation and hope that the app falls back to the general method:

SpeechRecognizer.createSpeechRecognizer(this);

Unfortunately, at some point Google started promoting the idea that apps directly link to the Google speech recognizer (see Add Voice Typing To Your IME). So many keyboard apps now do that (see e.g. the issue that I raised with SwiftKey), and your only option is to find one that does not...

It can also be that the app sends an intent that Kõnele does not support (the supported intents are listed in the manifest), but which would make sense to support in a speech recognition app. In this case it would be a feature request for Kõnele.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top