AutoVoice Help With Answering WhatsApp Messages

Discussion in 'AutoApps' started by chrimen, Oct 20, 2018.

  1. chrimen

    chrimen New Member

    Joined:
    Oct 12, 2018
    Messages:
    8
    Likes Received:
    0
    I'm not great with tasker but I've developed the following profile to read back a message but first ask me which language I want use. Once I establish the language it'll read back the message. If I want to reply it won't actually send the message nor clear the WhatsApp notification. I'm not sure what action I should be using to send to grab my message and send it via whatsapp. Please help the profile is below.
    Code (Text):
    WhatsApp Respond Language Prompt (20)
       A1: Flash [ Text:Replying to %antitle Long:Off ]
       A2: Say [ Text:You have a whatsapp message from %antitle, would you like to hear it Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
       A3: AutoVoice Recognize [ Configuration:

    Voice command without headset
    Command: "(?<state>yes|no) (regex)"
    Error if Not Recognized: true
    Error if No Match: true
    Use Regex Replacements: true Timeout (Seconds):120 ]
       A4: If [ %avcomm ~R no ]
       A5: AutoNotification Actions [ Configuration:Intercept Action ID: %anbutton2action Timeout (Seconds):0 ]
       A6: Say [ Text:Okay. Notification cleared Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
       A7: Else If [ %avcomm ~R yes ]
       A8: Say [ Text:Which language would you like to proceed in Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
       A9: AutoVoice Recognize [ Configuration:

    Voice command without headset
    Command: "(?<state>english|spanish) (regex)"
    Error if Not Recognized: true
    Error if No Match: true
    Use Regex Replacements: true Timeout (Seconds):120 ]
       A10: If [ %avcomm ~R english ]
       A11: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
       A12: Say [ Text:%antext Engine:Voice:com.google.android.tts:eng-usa Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
       A13: Say [ Text:Would you like to reply Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
       A14: AutoVoice Recognize [ Configuration:

    Voice command without headset
    Command: "(?<state>yes|no) (regex)"
    Error if Not Recognized: true
    Error if No Match: true
    Use Regex Replacements: true Timeout (Seconds):120 ]
       A15: If [ %avcomm ~R yes ]
       A16: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
       A17: Say [ Text:What is the message you would like to reply with Engine:Voice:com.google.android.tts:eng-usa Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
       A18: AutoVoice Recognize [ Configuration:Hide Dialog: true

    Voice command without headset
    Command: "all"
    Error if Not Recognized: true Timeout (Seconds):120 ]
       A19: Variable Set [ Name:%message To:%avcomm Recurse Variables:Off Do Maths:Off Append:Off ]
       A20: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
       A21: Say [ Text:Send message containing %message, is this correct Engine:Voice:com.google.android.tts:eng-usa Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
       A22: AutoVoice Recognize [ Configuration:Hide Dialog: true

    Voice command without headset
    Command: "(?<state>yes|no) (regex)"
    Error if Not Recognized: true
    Error if No Match: true
    Use Regex Replacements: true Timeout (Seconds):120 ]
       A23: Goto [ Type:Action Number Number:17 Label: ] If [ %avcomm ~R no ]
       A24: AutoNotification Reply [ Configuration:Reply ID: %anreplyaction
    Reply Text: %message Timeout (Seconds):0 ]
       A25: Say [ Text:Message sent, notification cleared Engine:Voice:com.google.android.tts:eng-usa Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
       A26: AutoNotification Actions [ Configuration:Intercept Action ID: %anbutton2action Timeout (Seconds):0 ]
       A27: Else If [ %avcomm ~ no ]
       A28: Say [ Text:Notification cleared Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
       A29: AutoNotification Actions [ Configuration:Intercept Action ID: %anbutton2action Timeout (Seconds):0 ]
       A30: End If
       A31: Else If [ %avcomm ~R spanish ]
       A32: Say [ Text:%antext Engine:Voice:com.samsung.SMT:spa-MEX Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
       A33: Say [ Text:Desea contestar Engine:Voice:com.samsung.SMT:spa-MEX Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
       A34: AutoVoice Recognize [ Configuration:

    Voice command without headset
    Command: "(?<state>si|no) (regex)"
    Error if Not Recognized: true
    Error if No Match: true
    Use Regex Replacements: true Timeout (Seconds):120 ]
       A35: If [ %avcomm ~R si ]
       A36: Say [ Text:Cual es su mensaje Engine:Voice:com.samsung.SMT:spa-MEX Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
       A37: AutoVoice Recognize [ Configuration:Language Code: com.google.android.tts:spa-usa
    Hide Dialog: true

    Voice command without headset
    Command: "all"
    Error if Not Recognized: true Timeout (Seconds):120 ]
       A38: Variable Set [ Name:%message To:%avcomm Recurse Variables:Off Do Maths:Off Append:Off ]
       A39: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
       A40: Say [ Text:Su mensaje es %message, desea enviarlo Engine:Voice:com.samsung.SMT:spa-MEX Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
       A41: AutoVoice Recognize [ Configuration:Hide Dialog: true

    Voice command without headset
    Command: "(?<state>si|no) (regex)"
    Error if Not Recognized: true
    Error if No Match: true
    Use Regex Replacements: true Timeout (Seconds):120 ]
       A42: Goto [ Type:Action Number Number:36 Label: ] If [ %avcomm ~R no ]
       A43: AutoNotification Reply [ Configuration:Reply ID: %antitle
    Reply Text: %message Timeout (Seconds):0 ]
       A44: Say [ Text:Mensaje enviado Engine:Voice:com.samsung.SMT:spa-MEX Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
       A45: AutoNotification Actions [ Configuration:Intercept Action ID: %andismissaction Timeout (Seconds):0 ]
     
    Last edited by a moderator: Oct 22, 2018
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    What part of that isn't working exactly?
     
  3. chrimen

    chrimen New Member

    Joined:
    Oct 12, 2018
    Messages:
    8
    Likes Received:
    0
    A24 and A43 this is where I want it to send the message to whatsapp. It simply won't send. Am I using the right action?
    Also A5 which is supposed to clear the notification doesn't clear the notification.
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Are you running that task standalone? Or is that part of profile?
     
  5. chrimen

    chrimen New Member

    Joined:
    Oct 12, 2018
    Messages:
    8
    Likes Received:
    0
    It's part of the profile.
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Can you post the full profile please? Thanks
     
  7. chrimen

    chrimen New Member

    Joined:
    Oct 12, 2018
    Messages:
    8
    Likes Received:
    0
    I do appreciate your help. After reading around alot I realized I'm a complete noob at this and have done only simple profiles.
    Below is a simple profile. It's modeled after the SMS profile in with tweaks for what's app. Having trouble on action #12. The recorded message doesn't send. And action #14. The notification isn't cleared.

    Profile: Hands Free WhatsApp (25)
    State: AutoNotification Intercept [ Configuration:Notification Apps: WhatsApp
    Get All Fields : true ]
    Enter: Test (2)
    A1: Say [ Text:You've received a whatsapp message from %antitle Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
    A2: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
    A3: Say [ Text:%antext Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
    A4: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
    A5: Say [ Text:What is the message you would like to reply with Engine:Voice:com.google.android.tts:eng-usa Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
    A6: AutoVoice Recognize [ Configuration:Hide Dialog: true

    Voice command without headset
    Command: "all"
    Error if Not Recognized: true Timeout (Seconds):120 ]
    A7: Variable Set [ Name:%message To:%avcomm Recurse Variables:Off Do Maths:Off Append:Off ]
    A8: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
    A9: Say [ Text:Send message containing %message, is this correct Engine:Voice:com.google.android.tts:eng-usa Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
    A10: AutoVoice Recognize [ Configuration:Hide Dialog: true

    Voice command without headset
    Command: "(?<state>yes|no) (regex)"
    Error if Not Recognized: true
    Error if No Match: true
    Use Regex Replacements: true Timeout (Seconds):120 ]
    A11: Goto [ Type:Action Number Number:5 Label: ] If [ %avcomm ~R no ]
    A12: AutoNotification Reply [ Configuration:Reply ID: %anreplyaction
    Reply Text: %message Timeout (Seconds):0 ]
    A13: Say [ Text:Message sent Engine:Voice:com.google.android.tts:eng-usa Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
    A14: AutoNotification Actions [ Configuration:Intercept Action ID: %anbutton2action Timeout (Seconds):0 ]
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Can you try enabling the "Has Reply Action" option in the AutoNotification Intercept condition? Thanks! :)
     
  9. chrimen

    chrimen New Member

    Joined:
    Oct 12, 2018
    Messages:
    8
    Likes Received:
    0
    Thanks it works now.
    Quick question on autovoice recognize I've tried talking to it in Spanish and it don't always recognize the language. I've changed the language package in the action to Spanish and it still has trouble. any suggestions?
    Thanks again
     
  10. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Hi. How exactly did you select the Spanish language? Can you clarify?
     
  11. chrimen

    chrimen New Member

    Joined:
    Oct 12, 2018
    Messages:
    8
    Likes Received:
    0
    Autovoice recognize
    Language settings
    Language code
    and I pasted in com.google.android.tts:spa-usa
     
  12. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Try using just es-ES for example.
     
  13. chrimen

    chrimen New Member

    Joined:
    Oct 12, 2018
    Messages:
    8
    Likes Received:
    0
    It all works perfectly now. Thanks again for all the help!!!!
     
  14. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806

Share This Page