AutoVoice Listen and respond to SMS messages

Discussion in 'AutoApps' started by scotts, Aug 3, 2015.

  1. scotts

    scotts Member

    Joined:
    Jun 19, 2015
    Messages:
    140
    Likes Received:
    1
    I've created the below Profile and having a combination of difficulties. I'm using this Profile with my BT Headset. I have disabled Moto Voice.

    1) When I enable the 'Use Headset' option in AV, AV Recognize will actually use the phone speaker, not my BT headset. However, if I disable 'Use Headset', AV Recognize correctly uses my BT headset.

    2) Without the 'Use Headset' option, some of the Say Actions will use my phone speaker instead of my BT headset.

    3) If using the 'Error if No Match' option, the Task will stop, but it doesn't release my BT headset. I must manually press my BT headset button to release it. This is why I had to add a few 'Stop' Actions.

    My phone:
    Moto X 2nd gen
    Lollipop 5.1
    Standard, non-rooted ROM

    Profile...

    Profile: Listen To SMS-Contact (54)
    Notification: no
    Event: Received Text [ Type:SMS Sender:C:ANY Content:* ]
    State: Variable Value [ %DrivingMode Set | %PACTIVE ~ *,BT Headset,* ]
    Enter: Anon (92)
    A1: [X] Stop [ With Error:Off Task: ] If [ %SMSRN ~ %SMSsender & %TIMES < %SMStime + 5 ]
    A2: [X] Variable Set [ Name:%SMSsender To:%SMSRN Do Maths:Off Append:Off ]
    A3: [X] Variable Set [ Name:%SMStime To:%TIMES Do Maths:Off Append:Off ]
    A4: [X] Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]
    A5: [X] If [ %Offhook Set ]
    A6: [X] Vibrate [ Time:50 ]
    A7: [X] Variable Set [ Name:%NewSMS To:1 Do Maths:Off Append:Off ]
    A8: [X] Stop [ With Error:Off Task: ]
    A9: [X] End If
    A10: Say [ Text:Text from %SMSRN Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:Off Network:On Continue Task Immediately:Off Continue Task After Error:On ]
    A11: Say [ Text:Do you want to hear it? Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:Off Network:On Continue Task Immediately:Off Continue Task After Error:On ]
    A12: AutoVoice Recognize [ Configuration:Hide Dialog: true

    Voice command without headset
    Command: "yes (exact)"
    Precision: 3
    Don't Trigger Conditions: true Package:com.joaomgcd.autovoice Name:AutoVoice Recognize Timeout (Seconds):120 ]
    A13: Stop [ With Error:Off Task: ] If [ %avcomm !~ yes ]
    A14: Variable Clear [ Name:%avcomm Pattern Matching:Off ]
    A15: Say [ Text:%SMSRB Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:Off Network:On Continue Task Immediately:Off Continue Task After Error:On ]
    A16: Say [ Text:Would you like to reply? Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:Off Network:On Continue Task Immediately:Off Continue Task After Error:On ]
    A17: AutoVoice Recognize [ Configuration:Hide Dialog: true

    Voice command without headset
    Command: "yes (exact)"
    Precision: 3
    Don't Trigger Conditions: true Package:com.joaomgcd.autovoice Name:AutoVoice Recognize Timeout (Seconds):120 ]
    A18: Stop [ With Error:Off Task: ] If [ %avcomm !~ yes ]
    <Message>
    A19: Say [ Text:What's your message? Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:Off Network:On Continue Task Immediately:Off Continue Task After Error:On ]
    A20: AutoVoice Recognize [ Configuration:Hide Dialog: true

    Voice command without headset
    Command: "all"
    Don't Trigger Conditions: true Package:com.joaomgcd.autovoice Name:AutoVoice Recognize Timeout (Seconds):120 ]
    A21: Variable Set [ Name:%smsmessage To:%avcomm Do Maths:Off Append:Off ]
    A22: Variable Clear [ Name:%avcomm Pattern Matching:Off ]
    A23: Say [ Text:I heard %smsmessage Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:Off Network:On Continue Task Immediately:Off Continue Task After Error:On ]
    A24: Say [ Text:Send this? Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:Off Network:On Continue Task Immediately:Off Continue Task After Error:On ]
    A25: AutoVoice Recognize [ Configuration:Hide Dialog: true

    Voice command without headset
    Command: "yes (exact)"
    Precision: 3
    Don't Trigger Conditions: true Package:com.joaomgcd.autovoice Name:AutoVoice Recognize Timeout (Seconds):120 ]
    A26: If [ %avcomm ~ yes ]
    A27: Say [ Text:Sending message Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:Off Network:On Continue Task Immediately:Off Continue Task After Error:On ]
    A28: Send SMS [ Number:%SMSRF Message:%smsmessage Store In Messaging App:Off Continue Task After Error:On ]
    A29: Else
    A30: Variable Clear [ Name:%avcomm Pattern Matching:Off ]
    A31: Say [ Text:Would you like to edit? Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:Off Network:On Continue Task Immediately:Off Continue Task After Error:On ]
    A32: AutoVoice Recognize [ Configuration:Hide Dialog: true

    Voice command without headset
    Command: "yes (exact)"
    Precision: 3
    Don't Trigger Conditions: true Package:com.joaomgcd.autovoice Name:AutoVoice Recognize Timeout (Seconds):120 ]
    A33: Stop [ With Error:Off Task: ] If [ %avcomm !~ yes ]
    A34: Goto [ Type:Action Label Number:1 Label:Message ]
    A35: End If
    A36: [X] Flash [ Text:%SMSsender
    %TIMES
    %SMStime Long:On ]
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Sorry for the trouble

    About 1 and 2, that works on my BT headset. I'll try to see what the problem may be.

    About 3, that probably happens because you're using BT redirect. Can you try using the BT Ctrl action to disable your headset after the error?

    Thanks
     
  3. scotts

    scotts Member

    Joined:
    Jun 19, 2015
    Messages:
    140
    Likes Received:
    1
    I'll give it a test, though the Task will stop if I have 'Error if No Match' option enabled, not allowing to execute a Ctrl BT Action. Secondly, that does not reduce the number of Actions, just uses a different one.
     
  4. scotts

    scotts Member

    Joined:
    Jun 19, 2015
    Messages:
    140
    Likes Received:
    1
    I've tried unsuccessfully to diagnose issue #1. With 'Voice Command with headset' (BT Headset enabled), AV Recognize will use my phone mic and speaker. This also seems to disrupt the BT connection as many of the 'Say' actions will use or start to use the phone speaker rather than my BT headset. With 'Voice Command without headset' (BT disabled), most communication will go through my BT headset.

    Final thought...is it possible that my BT headset, or phone in general, has BT usability problems with non-Google apps? I say this as I receive the same type of results using Moto Voice...I will receive a faint notification sound via BT headset, though I had to communicate via phone mic/speaker. Do note though, Google Voice/Now works perfectly; everything goes to/through my BT headset just fine.
     
: autovoice

Share This Page