Voice Control - finite loop count
Posted: 07 Jun 2020 09:14
My aim is a better handling of voice control in connection with my SmartHome.
I run Automagic on several Android devices that have the AMAD Flowset to communicate with the SmartHome software FHEM (see http://www.fhem.de).
When I activate the Voice Control in Automagic, I have two different options:
1. Without User Interface -> Then only a beep occurs to signalize to the user that he/she should start to speak. While this is ok, failure to receive such an input results in an audio meesage that the "input could not be detected" (or so, I do not know the English wording of this message). Voice Control therefore stops after the failure to detect audio input. Here, I am searching for two things: a.) setting the timeout for detecting a failure and (more important) b.) suppression of the audio failure message.
2. With User Interface -> The signal to the user is a beep plus a window from com.google.android.googlequicksearchbox showing a microphone. Failure to receive audio input then after timeout results in a modified alert window asking to repeat the audio input. Here then I run into problems. I can easily use the alert window as a trigger, check the window text and, if I wish, click the "Repeat" button with Autonmagic. I can also count the number of repetitions, if also the second, third, ... etc. attempt to detect audio fails. However: Automagic neither allows an infinite number of repetitions, nor does it allow for a controlled exit from this loop.
If I keep the repetitions running indefinitely (without audio input, of course), the Automagic Voice Control action crashes after some 5 repetitions of the sequence "asking for audio input" -> "no audio input" -> "alert window asking for repetition" -> "Automagic pressing the Repeat-button". In the editor, this Action then is kept highlighted, no further audio input may be given. The only way out is to stop Automagic service, and to restart it manually.
Of course it is always (well, at least before the 5th repetition) possible to get out of this loop by providing audio input to the speech recognition engine. But what if nobody is at home?
I'd like to learn about a controlled way to break the Voice Control action without audio input when using the option "With User Interface" - say after a finite number of 3 repetitions. And also I'd like to learn a way to get out of the blocking condition once Voice Control is crashed.
Regards
pah
I run Automagic on several Android devices that have the AMAD Flowset to communicate with the SmartHome software FHEM (see http://www.fhem.de).
When I activate the Voice Control in Automagic, I have two different options:
1. Without User Interface -> Then only a beep occurs to signalize to the user that he/she should start to speak. While this is ok, failure to receive such an input results in an audio meesage that the "input could not be detected" (or so, I do not know the English wording of this message). Voice Control therefore stops after the failure to detect audio input. Here, I am searching for two things: a.) setting the timeout for detecting a failure and (more important) b.) suppression of the audio failure message.
2. With User Interface -> The signal to the user is a beep plus a window from com.google.android.googlequicksearchbox showing a microphone. Failure to receive audio input then after timeout results in a modified alert window asking to repeat the audio input. Here then I run into problems. I can easily use the alert window as a trigger, check the window text and, if I wish, click the "Repeat" button with Autonmagic. I can also count the number of repetitions, if also the second, third, ... etc. attempt to detect audio fails. However: Automagic neither allows an infinite number of repetitions, nor does it allow for a controlled exit from this loop.
If I keep the repetitions running indefinitely (without audio input, of course), the Automagic Voice Control action crashes after some 5 repetitions of the sequence "asking for audio input" -> "no audio input" -> "alert window asking for repetition" -> "Automagic pressing the Repeat-button". In the editor, this Action then is kept highlighted, no further audio input may be given. The only way out is to stop Automagic service, and to restart it manually.
Of course it is always (well, at least before the 5th repetition) possible to get out of this loop by providing audio input to the speech recognition engine. But what if nobody is at home?
I'd like to learn about a controlled way to break the Voice Control action without audio input when using the option "With User Interface" - say after a finite number of 3 repetitions. And also I'd like to learn a way to get out of the blocking condition once Voice Control is crashed.
Regards
pah