AutoVoice Natural Language unavailable after some time

Discussion in 'AutoApps' started by lechuck, Jul 18, 2018.

  1. lechuck

    lechuck New Member

    Joined:
    May 31, 2017
    Messages:
    28
    Likes Received:
    0
    hey there,

    i am experience a strange behavior with autovoice and natural language respectively. once in a while (but pretty often) tasker does not receive any voice command through autovoice. it just stops. i have to toggle wifi to make it work again. internet and wifi still works for other stuff, so that is not a problem.

    i always thought it is my wifi that is causing it but few days ago i figured it is autovoice itself. when ever i kill and restart the app or when i enter the natural language menu inside of the app, the voice commands work again.

    so, do you have any idea why autovoice/natural language goes into some kind of an idling mode after some time?
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    How are you saying the voice commands? To Google Assistant?
     
  3. lechuck

    lechuck New Member

    Joined:
    May 31, 2017
    Messages:
    28
    Likes Received:
    0
    Yep, over Google Assistant.
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    That sounds like something is killing AutoVoice in the background and breaking its ability to receive commands in the background.

    To make sure Tasker and the AutoApps run in the foreground:
    - make sure Tasker is enabled
    - enable foreground notification in Tasker settings
    - enable the "Use reliable alarms" option
    - Disable battery optimization for the apps
    - Make sure the Android Settings -> Apps -> Tasker -> Battery -> Background activity option is enabled (this setting may be somewhere else on different OEMs, but it's a very important setting that might be disabled by default on some devices)
    - Make sure that you disable any "battery saving" apps like Greenify, etc
    - On Xiaomi devices enable "Auto Start" for the apps and "Display on Lock Screen" under "Other Permissions"
    - On Huawei devices disable Powergenie which stops apps from running in the background. Try going to Settings -> Battery, then tapping on the gear in the upper right corner. Disable "Close excessively power-intensive apps". Or use ADB:
    To disable powergenie use:
    adb shell pm disable-user com.huawei.powergenie

    To enable powergenie:
    adb shell pm enable com.huawei.powergenie

    Hope this helps!
     
  5. lechuck

    lechuck New Member

    Joined:
    May 31, 2017
    Messages:
    28
    Likes Received:
    0
    Thanks for the suggestions, unfortunately everything you mentioned was already set up. :/

    im running it on a 2012 nexus 7 (as a smart mirror), android 7.1.2

    right now i have an extra profile which kills autovoice every 2 hours and restarts it again right after. dirty workaround but it seems to work.
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Ok, glad that works... I'm sorry, but AutoVoice doesn't do that itself so it really must be something on your system
     
  7. Malversan

    Malversan New Member

    Joined:
    Nov 2, 2018
    Messages:
    8
    Likes Received:
    0
    This issue is becoming a show-stopper for me, as it renders the entire AutoVoice purpose completely useless.

    I have triple-checked that Tasker is alive and responding to other events. It's just AutoVoice not responding in any way to Google Assistant conversational commands (”ask autovoice to...”). And it happens ALWAYS after some time not using it.

    Then I open Tasker, AutoVoice, other random plugins... I close other apps randomly... and eventually it works again. But only for some time, before it stops responding again after some idle time.

    This is very frustrating when the intention is to use Assistant and Tasker to command home automation. Join and IFTTT are also unuseful, as they execute actions with ridiculous latencies of some minutes. So AutoVoice should be the only ”instantly” option... if it worked.

    I have the theory (maybe wrong) that AutoVoice should have a service to be kept alive in the background, as Google Assistant seems to NOT awake AutoVoice to use the conversational Assistant API. Other plugins have that option to assure event monitoring. In fact I have never had any problem with any other plugin linked to Tasker, just with AutoVoice when used from Google Assistant.

    Kind regards.
    (Using Android 8.0 in spanish)
     
  8. lechuck

    lechuck New Member

    Joined:
    May 31, 2017
    Messages:
    28
    Likes Received:
    0
    well, unfortunately my "workaround" isn't really reliable. it happens sometimes that it stops working right after killing and restarting tasker or autovoice. i really have no idea what is stopping the service. works only after a manual wifi toggle.
     
  9. joaomgcd

    joaomgcd Administrator Staff Member

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

    lechuck New Member

    Joined:
    May 31, 2017
    Messages:
    28
    Likes Received:
    0
    not really, that was one of the first things i tried, without any luck.

    yeah but what? thats the big question :)
     
  11. Malversan

    Malversan New Member

    Joined:
    Nov 2, 2018
    Messages:
    8
    Likes Received:
    0
    I have checked that entire list three times before posting here.

    As I already reported, Tasker is confirmed to be alive. It's even receiving events from AutoInput and other plugins.

    That's exactly the bug we're reporting.

    Please have in mind that this bug (AutoVoice not responding) happens when triggering AutoVoice FROM GOOGLE ASSISTANT (conversational command ”ask autovoice to...”), before Tasker handling enters the scene. If AutoVoice isn't alive at that moment, Tasker has nothing to do with it.

    Can you currently assure that AutoVoice is always alive to process external events/calls from GA, as long as Tasker is alive? The tests say no. Maybe a keep-alive-service in AutoVoice could help?
     
  12. lechuck

    lechuck New Member

    Joined:
    May 31, 2017
    Messages:
    28
    Likes Received:
    0
    @Malversan could you figure out a pattern? i tried to but it appeared to happen just randomly (without knowing whats going on).

    keeping the autovoice service makes sense, but sometimes not event restarting autovoice helps (in my case). the only way to solve it for me is to toggle wifi manually and it works shortly after.
     
  13. Malversan

    Malversan New Member

    Joined:
    Nov 2, 2018
    Messages:
    8
    Likes Received:
    0
    I cannot identify any pattern, if I could I would have reported it for sure.

    I suffer exactly the same behaviour as you: the bug appears randomly, and also disappears after some random actions (I have never tried toggling the WiFi, by the way).

    And I agree, even opening AutoVoice manually doesn't help most of the times. Sometimes editing and saving a Tasker profile helps... Sometimes resynchronizing my Logitech hub with the Tasker Harmony plugin... And sometimes nothing of the above works. It's truly frustrating and exasperating.
     
    Last edited: Nov 2, 2018
  14. lechuck

    lechuck New Member

    Joined:
    May 31, 2017
    Messages:
    28
    Likes Received:
    0
    what device are you using? i assume you use natural language as well?
     
  15. Malversan

    Malversan New Member

    Joined:
    Nov 2, 2018
    Messages:
    8
    Likes Received:
    0
    I use voice commands predefined in Tasker using the AutoVoice plugin.

    Device: Elephone U Pro, Android 8.0 in spanish.
     
  16. booge

    booge New Member

    Joined:
    Nov 4, 2018
    Messages:
    1
    Likes Received:
    0

    How do i change the name of a device on autovoice. seems you cant add 2 device with the same name. it thinks you are just adding the same one
     
  17. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    AutoVoice receives messages from Google Assistant via GCM. Maybe something on your device is killing Google Play Services?
    AutoVoice doesn't need to be "awake" to receive the messages. It's Google Play Service's job to wake up AutoVoice when a message is received and deliver it to AutoVoice.
     
  18. Malversan

    Malversan New Member

    Joined:
    Nov 2, 2018
    Messages:
    8
    Likes Received:
    0
    I'm pretty sure I could not kill Google Play Services even if I wanted to. It's always there, and a basic piece for Android synchronization with all Google services that are working in my device.

    But that ”awakening” is not always working, I cannot tell why.

    I'm experimenting with the Tasker side of the equation (it's checked that Tasker is always working) and I think I can say that:

    - Reliable alarms should not only be set, but also be set to ”Always”. That seems to help.

    - Also setting an icon for the Tasker foreground notification seems to help a bit. I'm aware this has very little sense, but... it seems AutoVoice responds more often when the notification has an icon.

    Any additional ideas should be appreciated. To me AutoVoice seems currently the only way for home automation voice commands, as Join/IFTTT notifications have ridiculously big latencies (it seems the mobile polls for push notifications at random intervals).
     
  19. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    A question: if you enable Natural Language toasts in AutoVoice, do you get those when the commands are not working?
     
  20. Malversan

    Malversan New Member

    Joined:
    Nov 2, 2018
    Messages:
    8
    Likes Received:
    0
    I did not have them enabled because I do not use natural language features, but I have enabled them for testing and the answer is no.

    When commands are not working there is no toast at all, even with all toast options enabled.
     

Share This Page