Exception on "Hotword detected" block

165 views
Skip to first unread message

czarn...@gmail.com

unread,
Aug 28, 2019, 4:37:30 AM8/28/19
to Automate
Hello,

I'm experimenting with controlling Automate with voice commands. The best results so far were provided by "Google Now voice command" block, however, its operation is not reliable (catches the spoken command maybe half the time).
The block "Hotword detected" looked promising when it was first introduced some time ago, but when I try to run a flow that contains this block, I get the following error in the flow's log:

java.lang.IllegalStateException: Hotword keyphrase unsupported

Logcat shows the following stack trace:

onTaskFailure: com.llamalab.automate.stmt.HotwordDetected$a@aaa8c4c[flowId=33, fiberId=32683, statementId=6]
java.lang.IllegalStateException: Hotword keyphrase unsupported
at com.llamalab.automate.AutomateVoiceInteractionService.checkHotwordEnrolled(Unknown Source:52)
at com.llamalab.automate.AutomateVoiceInteractionService.startHotwordRecognition(Unknown Source:21)
at com.llamalab.automate.stmt.HotwordDetected$a.a(Unknown Source:10)
at com.llamalab.automate.AutomateVoiceInteractionService.addListener(Unknown Source:12)
at com.llamalab.automate.stmt.HotwordDetected$a.a(Unknown Source:3)
at com.llamalab.automate.at.a(Unknown Source:15)
at com.llamalab.automate.stmt.HotwordDetected.b(Unknown Source:17)
at com.llamalab.automate.AutomateService.b(Unknown Source:40)
at com.llamalab.automate.AutomateService.a(Unknown Source:96)
at com.llamalab.automate.AutomateService.e(Unknown Source:49)
at com.llamalab.automate.AutomateService.a(Unknown Source:164)
at com.llamalab.automate.AutomateService.handleMessage(Unknown Source:140)
at android.os.Handler.dispatchMessage(Handler.java:102)
at com.llamalab.android.os.e.dispatchMessage(Unknown Source:5)
at android.os.Looper.loop(Looper.java:193)
at com.llamalab.android.os.c.run(Unknown Source:28)

My phone is Xiaomi Mi 5 with custom ROM based on LineageOS 9 but the same happened on official MIUI ROM based on Android 8. I'm not sure if this is a bug in Automate or just some incompatibility with my phone. The Google Assistant works quite well here, but I'd like to handle some commands on my own.

Henrik "The Developer" Lindqvist

unread,
Aug 28, 2019, 3:27:35 PM8/28/19
to Automate
That means Automate can't find the particular "hotword component" it depends on. I think the Google Assistant uses some kind of local implementation when it's missing. Anyhow there's not much Automate can do.
I'll likely implement a setting for users to choose another "hotword component", if that's even possible.

czarn...@gmail.com

unread,
Aug 28, 2019, 4:01:47 PM8/28/19
to Automate
I see. May this be related to the variant of GApps present on the phone? I have installed the 'nano' variant of Open GApps. If time permits I'll experiment with other variants. If you implement the mentioned setting I will happily provide feedback.
BTW. thank you for Automate - it's basically an irreplaceable tool for me :)

Henrik "The Developer" Lindqvist

unread,
Aug 28, 2019, 6:37:37 PM8/28/19
to Automate
Maybe. Look for system apps named "enrollment", e.g. Ok Google enrollment, X Google enrollment.
Reply all
Reply to author
Forward
0 new messages