AutoVoice AutoVoice are you sure menu.

Discussion in 'Guides / Examples / Ideas Forum' started by LEGOlord208, Apr 9, 2016.

?

Did you like the task?

  1. Yes!

    0 vote(s)
    0.0%
  2. No

    0 vote(s)
    0.0%
  3. Of course not -_-

    0 vote(s)
    0.0%
  4. Well it's you, so I won't even try

    0 vote(s)
    0.0%
  5. All of the above

    0 vote(s)
    0.0%
  6. None of the above

    0 vote(s)
    0.0%
  7. Potato :3

    0 vote(s)
    0.0%
  1. LEGOlord208

    LEGOlord208 Member

    Joined:
    Feb 19, 2015
    Messages:
    38
    Likes Received:
    1
    TIP: See more tasks on Google+.
    I got some likes on my Google Plus comment asking if I should try to upload daily tasks, so I'll take that as a yes.

    When you want a confirmtion dialog in voice commands, AutoTools' Dialog doesn't really suit you since it requires your fingers to work.
    Instead, the following one!
    Though, keep in mind.
    Input a message it should say, such as "Are you sure you want to reboot" or whatever, and in the return value variable you will get either yes or no. If yes, you should proceed with your action. No says "cancelling it" automatically, no need for that.

    XML will also be uploaded.

    Code (Text):
    Are you sure (21)
        A1: If [ %par1 !Set ]
        A2: Say [ Text:Something went wrong. Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
        A3: Snackbar Without Button [ Configuration:Message: Error: No say text specified while requesting voice Package:com.nick.mowen.sceneplugin Name:Snackbar Without Button Timeout (Seconds):0 ]
        A4: Stop [ With Error:Off Task: ]
        A5: End If
        A6: Say [ Text:%par1 Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
        <Prompt>
        A7: AutoVoice Recognize [ Configuration:

    Prompt Text: Are you sure?
    Voice command without headset
    Report Partial Results: false
    Command: "all"
    Error if Not Recognized: false
    Error if No Match: false
    Don't Trigger Conditions: true
    Use Regex Replacements: false Package:com.joaomgcd.autovoice Name:AutoVoice Recognize Timeout (Seconds):120 ]
        A8: Return [ Value:no Stop:On ] If [ %avcomm !Set ]
        A9: Variable Convert [ Name:%avcomm Function:To Lower Case Store Result In: ]
        A10: If [ %avcomm ~R (i('m| am) sure|yes) ]
        A11: Return [ Value:yes Stop:On ]
        A12: Else If [ %avcomm ~R (no|cancel|i('m| am) not sure) ]
        A13: Say [ Text:Cancelling it! Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
        A14: Return [ Value:no Stop:On ]
        A15: Else
        A16: Snackbar Without Button [ Configuration:Message: I heard "%avcomm" Package:com.nick.mowen.sceneplugin Name:Snackbar Without Button Timeout (Seconds):15 ]
        A17: Say [ Text:That output was not expected. Please choose either 'Yes' or 'No'. Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
        A18: Goto [ Type:Action Label Number:1 Label:Prompt ]
        A19: End If
     

    Attached Files:

: task, potato, confirm

Share This Page