Add input device for external STT via ACTION_RECOGNIZE_SPEECH#294
Add input device for external STT via ACTION_RECOGNIZE_SPEECH#294
ACTION_RECOGNIZE_SPEECH#294Conversation
|
I downloaded the apk, and using it with whisperIME, it only outputs "you" every time. I also tested it with Futo Voice Input and it worked well.
Thanks for implementing this! |
|
tested it. If you press and hold the button in whisper input while speaking it works. |
|
in a updated version I moved the button to the bottom, like in the input method. That makes it easier to use |
|
When using an "external" voice input you should maybe not play the sound and display "listening". Otherwise this might interfere with the behavior of the external input. E.g. my whisper input does not use voice activity detection. In order to start it you have to press and hold the button, but your display already says "listening" before the user presses my mic button. |
0e65023 to
b0baa2b
Compare
|
Thank you for the feedback! New testing APK: https://github.com/Stypox/testing-apks/releases/download/14/app-debug.apk
I wanted to distinguish it from "System service" which is the other way to access other app's STT, which would feel seamless because it would run in the background. So one would be called "popup" and the other "service". But I will add an explanation to the settings to explain everything better anyway.
Fixed, now it just switches back to the loaded-not-listening state (which is what would happen with Vosk too).
It turns out // Unfortunately the user could choose Dicio itself (starting SttPopupActivity), but there
// is no way to avoid this unless we use an Intent.createChooser() with
// `EXTRA_EXCLUDE_COMPONENTS`. A chooser, however, wouldn't allow the user to press
// "Always"/"Just once", and also wouldn't make it possible to check for availability like
// with .resolveIntent() (since the intent always resolves to the choooser).
Done, now it shows "Waiting...". It still plays the "no input" sound if the request is canceled though, which I think is ok. |
Much better |
Also rename system_popup to external_popup
|
Looks great! Thanks again! |
|
I have tested it, seems to be functional, no bugs detected. |
should probably be changed to |

I hate the
ActivityForResultManagerbut I don't know if there is any other way to start an activity for result from an object that does not strictly belong to an activity.Fixes part of #197 (the other part would be implementing yet another InputDevice with
RecognitionService). This PR is anyway quite experimental as I didn't plan for the possibility to start the popup of another app to obtain input, but it seems to work.References: #169 #293 woheller69/whisperIME#53 (comment). Note: with whisperIME all I get as speech is always just "you" independently of what I say, though I don't understand well how the whisperIME popup works, and I am not sure if my code is correct in the first place.
Please test this Dicio APK app-debug.apk along with this whisperIME APK woheller69/whisperIME#53 (comment) . Thank you
@woheller69!TODO:
Edit: I tested this with FUTO Voice input and the code in this PR seems to be behaving correctly:
Screen_recording_20250227_005009.webm