Solved Redact a message with "Ok Google" + Touchless chat + Autovoice, is it possible?

Discussion in 'Touchless Chat' started by distante, Jan 26, 2016.

  1. distante

    distante New Member

    Joined:
    Jan 23, 2016
    Messages:
    27
    Likes Received:
    0
    I'm currently testing Touchless Chat and Autovoice, my Goal is to be able - when I'm driving, without internet connection and listening music from my phone- to:
    1. Hear an incoming Telegram Message or SMS (just from three contacts)
    2. Redact and send a Telegram Message or SMS (again just to this three contacts)
    3. Use "ok google" to begin the process of redact the new chat.
    So far I had setup AutoVoice to Detect the Ok Google command, and disable Google Now.
    Then I created an "AutoVoice Ok Google Now" profile that triggers a Task, here is where I don't know what to do.

    I have added the "Send Message" action but looks like that just work with a specific message to a specific sender. I try to launch an action like the one triggered by the "write chat" widget (Touchless Chat)

    Is this possible ?

    edit: Extra info, OnePlus One, CM 12.1 (Android 5.1.1) Rooted
     
    Last edited: Jan 26, 2016
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,055
    Likes Received:
    768
    Hmm, how are you going to send a telegram message if you're offline in the first place? :)
     
  3. distante

    distante New Member

    Joined:
    Jan 23, 2016
    Messages:
    27
    Likes Received:
    0
    I have google app (ok google) firewalled (Droid wall) . It cannot use data connections, just WiFi. Because my data plan is really small, I use it just to text messages / apps.
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,055
    Likes Received:
    768
    Oh, I see. So in your Task you should use the "AutoVoice" action and get your message there. Then use the Touchless Chat action to actually send the message. Hope this helps
     
  5. distante

    distante New Member

    Joined:
    Jan 23, 2016
    Messages:
    27
    Likes Received:
    0
    Ah I see, correct me if I'm wrong please, the "algorithm" should be:

    - Capture "Ok google" command to trigger task
    - Cancel "Ok google"
    - trigger voice recognition
    - Say Contact and save it in a variable
    - trigger voice recognition
    - Say message and save it in a variable
    - Send Message with TouchlessChat using vars contact and message
    - Be happy

    Or is there another faster way that I'm missing?
     
    Last edited: Jan 27, 2016
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,055
    Likes Received:
    768
    Yes, specially the "Be happy" part :) That's it!
     
  7. distante

    distante New Member

    Joined:
    Jan 23, 2016
    Messages:
    27
    Likes Received:
    0
    I have a problem just before the "be happy" part. Kind of a debug thing, because it works.

    When I say a wrong name, Touchless Chat speaks an error message, the message have his text in English but my TTS is in Spanish, so it says something that no one understands :eek:
    How can change the error text to Spanish or make it to read it in English?

    And just to be sure, if I removed the "AutoVoice is listening" popup, will the process be a little bit faster?

    Thanks :rolleyes:
     
    Last edited: Jan 27, 2016
  8. distante

    distante New Member

    Joined:
    Jan 23, 2016
    Messages:
    27
    Likes Received:
    0
    Also, I noted another problem.

    I was testing all the above with a WiFi.

    When there's no Internet connection, and I say "Ok google", autovoice don't kill google now but it stays there. If I connect my data, the Google App thinks there's a Internet connection available and gets killed as expected launching the task correctly BUT autovoice recognition tries to use Google server to catch my voice, this (since google doesn't have Internet) doesn't work.

    Is there a way to use the internal voice recognition all the way in autovoice? Touchless Chat recognize my voice without problems even in airplane mode.
     
  9. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,055
    Likes Received:
    768
    Yes, use the AutoVoice Recognize action in Tasker and it should work even offline :)
    Have you tried changing that contact's language to spanish? Sorry for the trouble
     
  10. distante

    distante New Member

    Joined:
    Jan 23, 2016
    Messages:
    27
    Likes Received:
    0
    I think the problem with the error in two languages happen because I needed to put Google app in English so the "offline" commands from ok google were present and didn't stop the task.

    In the other hand, what I want to do seams to be impossible, because even when I block the data connection from the Google app and all the other ones involved, every time that an Google input voice popup appears "it knows" there's a Data connection available and tries to send the voice to Google servers.

    There is a xposed module that forced to all the input voice popup in all apps use offline mode. But it isn't updated since almost two years. Maybe you could take a lock at it for inner "private voice detection" in AutoApps :p

    I suppose I will use direct Touchless Chat with OK Google without block the Google search data connection. I hope it doesn't eat too much data.

    Another thing that I Think I can do, is close the data connection with auto input before listening, capture all my info, and then reestablish the data. A little bit over the top but if my data doesn't allow me too much voice interactions I will need to do this.

    The good thing about this process is that I had founded (and bought) 3 awesome AutoApps :D

     
  11. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,055
    Likes Received:
    768

Share This Page