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

Access output text from 3rd party apps #42

Closed
hugbear opened this issue Jan 6, 2024 · 2 comments
Closed

Access output text from 3rd party apps #42

hugbear opened this issue Jan 6, 2024 · 2 comments

Comments

@hugbear
Copy link

hugbear commented Jan 6, 2024

I've been able to successfully invoke FUTO V.I. from MacroDroid (automation app) by sending the intent provided in the Readme (android.speech.action.RECOGNIZE_SPEECH implicit intent). The voice recognition floating window starts in listening mode, processes the speech, accurately recognizes the speech and then it immediately closes.

Is there a way the recognized text could be provided to / accessed by the invoking app to be further processed?

For what it's worth, this is the Macrodroid macro and these are the 'Send Intent' parameters I used (basically, nothing but the "Action" field has been set).

@abb128
Copy link
Collaborator

abb128 commented Jan 7, 2024

Referring to the Android documentation, you're supposed to start the activity using startActivityForResult, and in results if you get the EXTRA_RESULTS as ArrayList, the first element will contain the output text. Some other voice recognizers may return multiple results in the array list sorted by confidence, but FUTO Voice Input only returns one.

@hugbear
Copy link
Author

hugbear commented Jan 7, 2024

Thank you. This does answer my question (although it seems MacroDroid can't do startActivityForResult - at least for now).

L.E. Looks I've been approaching this problem totally wrong. It turns out MacroDroid has a „Voice Input” action, which simply works flawlessly without the Send Intent hassle. Sorry for the trouble...

@hugbear hugbear closed this as completed Jan 11, 2024
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

2 participants