Speech input / voice controll
Moderator: Martin
Speech input / voice controll
Hi, I would please need some help to create a flow to controll my smartphone via speech input.
I want that the phone does this or that depends on what comand I speek.
E.g. I say "open contacts" and the contacts are opened, or I say "open favorites" and the favorites of my browser are opened.
So I want to determin what happens in case I say this or that.
I was thinking about to trigger the flow with a shortcut. Then I speek the command and depends on what I say different things are happening on my phone.
Would really appriciate some example flows.
Many thanks!
I want that the phone does this or that depends on what comand I speek.
E.g. I say "open contacts" and the contacts are opened, or I say "open favorites" and the favorites of my browser are opened.
So I want to determin what happens in case I say this or that.
I was thinking about to trigger the flow with a shortcut. Then I speek the command and depends on what I say different things are happening on my phone.
Would really appriciate some example flows.
Many thanks!
Re: Speech input / voice controll
Hi,
You could achieve this with a flow like this:
-trigger Shortcut
-action Input Speech
-condition Expression: value=="open favorites" --> true: action1
--> false: -condition Expression: value=="open contacts" --> true: action2
--> false: -condition Expression: value=="open xyz" --> true: action3
--> false: action Notification on Screen: command not recognized
The expressions to check the command could also use a function like matches with a regular expression.
You could also execute sub-flows for each command:
-trigger Shortcut
-action Input Speech
-action Execute Flows: VoiceCommandFlow {value}
When the command is open contacts, a flow with name VoiceCommandFlow open contacts would be executed.
Regards,
Martin
You could achieve this with a flow like this:
-trigger Shortcut
-action Input Speech
-condition Expression: value=="open favorites" --> true: action1
--> false: -condition Expression: value=="open contacts" --> true: action2
--> false: -condition Expression: value=="open xyz" --> true: action3
--> false: action Notification on Screen: command not recognized
The expressions to check the command could also use a function like matches with a regular expression.
You could also execute sub-flows for each command:
-trigger Shortcut
-action Input Speech
-action Execute Flows: VoiceCommandFlow {value}
When the command is open contacts, a flow with name VoiceCommandFlow open contacts would be executed.
Regards,
Martin
Re: Speech input / voice controll
Thanks a lot Martin, i ll try that and come back to you soon
guido
guido
Re: Speech input / voice controll
Hi Martin, two questions please:
How does the phone know what to do (where is that defined)? I mean e.g. when I say "open favorites. Is that using googles speech recognition? Can I define what happens on the phone when I say "open favorites"?
Could you explain a little further what you mean with:
"
You could also execute sub-flows for each command:
-trigger Shortcut
-action Input Speech
-action Execute Flows: VoiceCommandFlow {value}
"
Are these sub-flows part of the flow you mentioned above?
Many thanks and kind regsrds
guido
How does the phone know what to do (where is that defined)? I mean e.g. when I say "open favorites. Is that using googles speech recognition? Can I define what happens on the phone when I say "open favorites"?
Could you explain a little further what you mean with:
"
You could also execute sub-flows for each command:
-trigger Shortcut
-action Input Speech
-action Execute Flows: VoiceCommandFlow {value}
"
Are these sub-flows part of the flow you mentioned above?
Many thanks and kind regsrds
guido
Re: Speech input / voice controll
Hi,
Automagic just executes the actions you defined, so you have to create an action that does what you want, for example you could use action 'Launch App' to launch an app or 'Send SMS' etc.
The sub-flows are regular flows defined on the flow list. Only special thing about such flows is that they don't require a trigger since the flows will be executed using the action 'Execute Flows'. The flows have to be enabled, even when no trigger is set.
Regards,
Martin
Automagic just executes the actions you defined, so you have to create an action that does what you want, for example you could use action 'Launch App' to launch an app or 'Send SMS' etc.
The sub-flows are regular flows defined on the flow list. Only special thing about such flows is that they don't require a trigger since the flows will be executed using the action 'Execute Flows'. The flows have to be enabled, even when no trigger is set.
Regards,
Martin
Re: Speech input / voice controll
Thanks a lot, I think I got it know.
Kr
guido
Kr
guido
Re: Speech input / voice controll
Hi Martin, one more question please.
My current problem is not with creating the flow but with the speech recognizion. Altough it nearly records everything correctly when I speak it in german or english when I e.g. dictate a sms, it understads nearly nothing for automagic. Would you have any hint on why the value (word) put into the expression is not understood? Words that work are e.g. "test" or "one" also e.g. "inter" works but "internet" does not (although spoken plenty of times in different ways).
Kr
guido
My current problem is not with creating the flow but with the speech recognizion. Altough it nearly records everything correctly when I speak it in german or english when I e.g. dictate a sms, it understads nearly nothing for automagic. Would you have any hint on why the value (word) put into the expression is not understood? Words that work are e.g. "test" or "one" also e.g. "inter" works but "internet" does not (although spoken plenty of times in different ways).
Kr
guido
Re: Speech input / voice controll
The speech recognition itself is part of the system so there's nothing Automagic can do to improve the recognition quality.
Maybe the detected word is formatted slightly different, for example in upper case or lower case or contains a dash or some kind of punctuation. You can add a condition Debug Dialog to the flow directly after the voice recognition to see what the speech recognition really detected.
You can make the expression more tolerant by using toLowerCase and trim function to remove whitespace, something like this could work:
toLowerCase(trim(value))=="command"
Regards,
Martin
Maybe the detected word is formatted slightly different, for example in upper case or lower case or contains a dash or some kind of punctuation. You can add a condition Debug Dialog to the flow directly after the voice recognition to see what the speech recognition really detected.
You can make the expression more tolerant by using toLowerCase and trim function to remove whitespace, something like this could work:
toLowerCase(trim(value))=="command"
Regards,
Martin
Re: Speech input / voice controll
Thanks a lot Martin. I ll try that.
Kr
Guido
Kr
Guido
Re: Speech input / voice controll
Hi Martin, that worked out just fine. One last question:
How do I open the keyboard? Lets say I m in the internet on the google page and instead of clicking on the google search box to open the keyboard Automagic should open it. I tried with "Steuere UI: click..." but it doesn t do anything. When I use "Steuere UI: focus..." it put the curser into the search box but does not open the keyboard. Also when I open "input speech" after the "Steuere UI: focus..." it does not write what I say into the search box.
Many thanks
guido
How do I open the keyboard? Lets say I m in the internet on the google page and instead of clicking on the google search box to open the keyboard Automagic should open it. I tried with "Steuere UI: click..." but it doesn t do anything. When I use "Steuere UI: focus..." it put the curser into the search box but does not open the keyboard. Also when I open "input speech" after the "Steuere UI: focus..." it does not write what I say into the search box.
Many thanks
guido