AutoVoice Simple match / no-match not working

Discussion in 'AutoApps' started by plb, Nov 2, 2017.

  1. plb

    plb New Member

    I am getting started with autovoice with a regex.
    Eventually I would like to be able to say "I just spent 5 dollars on a coffee in the airport category travel" and have it populate a spreadsheet with 5||dollars||on a coffee in the airport||travel.
    However, I can't get it to recognize something as simple as "I spent 5"!
    When my command is "I just spent" then I get a match.
    When I add the simplest possible regex to this command: "I just spent (<amt>[0-9]+)" or even "I just spent (<amt>5|25)"
    then it never matches. I confirm that I have the checkmark next to regular expressions checked.
    Also (separate issue - probably just something simple in tasker?) my "no match" condition does a simple flash of "Autovoice match failed %avcomm" but the variable %avcomm is printed as a literal rather than being expanded as a variable. This makes it difficult to debug.
    Any suggestions for either of these problems is greatly appreciated.
     
    Last edited: Nov 2, 2017
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Can you please try this in AutoVoice:
    • clear logs
    • enable system logs
    • enable the profile with the regex that isn't matching
    • do command
    • export logs and paste them here

    Thanks!
     
  3. plb

    plb New Member

    Sorry, newbie question. When you say "in AutoVoice ... export logs" where do I do that? I see in the "Toasts and Logs" section I can copy several different kinds of logs, but those aren't the system logs that you referred to, I don't believe... If this is what you are looking for, which of those logs? (Profile Matches - Hard, Trigger Wrods, Recognition, etc.) Or are you saying to go into Tasker or something to find the logs? I searched for how to export logs but I just come across a bunch of requests like your request above...
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    I really mean those logs in AutoVoice :) There's a button on the top right to export them. But don't forget to enable system logs first. Thanks!
     
  5. plb

    plb New Member

    Here's the 3 screens in auto voice - I'm sure I'm missing something obvious. [​IMG][​IMG][​IMG]

    Sent from my SM-G955U1 using Tapatalk
     
  6. plb

    plb New Member

    Sorry - the top of one got cut off... Reposting...[​IMG]

    Sent from my SM-G955U1 using Tapatalk
     
  7. plb

    plb New Member

    Maybe this? Sharing from the copy icon?

    version 3.0.6.bf

    OS Build NRD90M.G955U1UEU1AQH3
    OS Code 24
    Device SM-G955U1
    Manufacturer samsung
    Product dream2qlteue

    Trigger Words - 2017-11-02 17:24:37.380 - Removed trigger words:
    I just spent five
    I just spent 5
    I just spent V
    hi just spent 5
    Recognition - 2017-11-02 17:24:34.515 - Clearing last command id
    Recognition - 2017-11-02 17:24:34.515 - No command matched
    Profile Matches - Hard - 2017-11-02 17:24:32.491 - "i just spent (?:<amt>5|25)" matches "i just spent 5": false
    Profile Matches - Hard - 2017-11-02 17:24:32.491 - "i just spent (?:<amt>5|25)" matches "i just spent v": false
    Profile Matches - Hard - 2017-11-02 17:24:32.491 - "i just spent (?:<amt>5|25)" matches "hi just spent 5": false
    Profile Matches - Hard - 2017-11-02 17:24:32.490 - "i just spent (?:<amt>5|25)" matches "i just spent five": false
    Trigger Words - 2017-11-02 17:24:32.378 - Added trigger words:
    I just spent five
    I just spent 5
    I just spent V
    hi just spent 5
    Trigger Words - 2017-11-02 17:24:32.378 - Current trigger words:
    I just spent five
    I just spent 5
    I just spent V
    hi just spent 5
    Profile Matches - Hard - 2017-11-02 17:24:32.351 - "Anything" matches "i just spent five": true
    Profile Matches - Hard - 2017-11-02 17:24:32.351 - No Last Command Id matches No Last Matched Command Id
    Recognition - 2017-11-02 17:24:32.331 - Got commands: Received possible commands:
    i just spent five
    i just spent 5
    i just spent v
    hi just spent 5

    Recognition - 2017-11-02 17:24:26.693 - Getting Voice command...
    Recognizer - 2017-11-02 17:24:26.691 - Not using headset.
    Recognizer - 2017-11-02 17:24:26.690 - Action: com.twofortyfouram.locale.intent.action.FIRE_SETTING

    Sent from my SM-G955U1 using Tapatalk
     
  8. plb

    plb New Member

    I've narrowed it down. This works

    I just spent ([0-9]+)

    This doesn't

    I just spent (<amt>[0-9]+)

    I tried using a different keyboard on my phone in case the angle brackets were somehow the wrong character, but that didn't work either...

    Sent from my SM-G955U1 using Tapatalk
     
  9. joaomgcd

    joaomgcd Administrator Staff Member

    Yes, that's it :) thanks.

    The regex should be
    Code (Text):
    i just spent (?<amt>5|25)
    and not
    Code (Text):
    i just spent (?:<amt>5|25)
    Hope this helps :)
     
  10. plb

    plb New Member

    That was it. Thanks!

    Sent from my SM-G955U1 using Tapatalk
     
  11. joaomgcd

    joaomgcd Administrator Staff Member

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice