AutoVoice Is there a way to start/stop Autovoice programatically

Discussion in 'AutoApps' started by himself, Mar 23, 2016.

  1. himself

    himself New Member

    Joined:
    Mar 23, 2016
    Messages:
    22
    Likes Received:
    0
    I have situation where I normally run with the media stream muted so I don't have to hear the bloody speech recognition beep from Google.

    However, when my navigation app needs to speak, I want to stop autovoice from listening and unmute the media stream.

    When the navigation app is finished speaking, I want to mute the media stream and start autovoice listening continuously again.

    I know how to mute/unmute the media stream programmatically.

    Is there a way to stop autovoice from listening and then restart autovoice listening continuously?

    My device is NOT rooted.

    Regards,
    Jim
     
  2. easiuser

    easiuser Member

    Joined:
    Mar 7, 2015
    Messages:
    50
    Likes Received:
    4
    If you are using the Tasker Plugin for AutoVoice, the Action AutoVoice Continuous can be used to turn it on or off through the configuration.

    AutoVoice Continuous [ Configuration:
    Starting continuous voice recognition without headset
    Persistent Notification: false Package:com.joaomgcd.autovoice Name:AutoVoice Continuous Timeout (Seconds):0 ]

    AutoVoice Continuous [ Configuration:
    Stopping continuous voice recognition
    Persistent Notification: false Package:com.joaomgcd.autovoice Name:AutoVoice Continuous Timeout (Seconds):0 ]

    -----------------------
    If you are using Google Now, you could use AutoInput Global Action (back) to dismiss the prompt and start it again using Send Intent.

    AutoInput Global Action [ Configuration:Action: Back Package:com.joaomgcd.autoinput Name:AutoInput Global Action Timeout (Seconds):20 ]

    Send Intent [ Action: Cat:None Mime Type: Data: Extra: Extra: Extra: Package:com.google.android.googlequicksearchbox Class:com.google.android.googlequicksearchbox.VoiceSearchActivity Target:Activity ]

    ---------------
    The bigger question for me is: How do you know when the navigation app needs to speak?
     
  3. himself

    himself New Member

    Joined:
    Mar 23, 2016
    Messages:
    22
    Likes Received:
    0
    I am not using Google Now, only AutoVoice and Tasker, so a further question.

    If I am writing a C# app (written using Xamarin) or Java, what exactly do I do with the information above to turn Autovoice or Autovoice continuous on or off.

    As to your question, my nav app is Sygic which has an SDK which gives me an event anytime it is about to make a sound (or talk) and when that has ended, so this would trigger doing the above.

    I have played with an approach which may work for me. The tablet I am using is only used for non-sound apps except Sygic, so I can mute and unmute the media stream and mute and unmute the microphone across Sygic speaking. As it stands now besides the very annoying beep, AutoVoice "hears" everything Sygic says and tries to work with it, waste of cycles at a minimum.

    Regards,
    Jim
     
  4. easiuser

    easiuser Member

    Joined:
    Mar 7, 2015
    Messages:
    50
    Likes Received:
    4
    I don't have much experience with C# or Java on android but I think the developer is the only one that would be able to give you a C# or Java hook into Autovoice.

    Another approach may be to use your C# / Java program with the SDK to produce an intent that Tasker can use to trigger the Tasker actions to pause and restart AutoVoice. Tasker does have some Java capabilities but unsure if you could make use of the SDK.
     
  5. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    You should send an intent to Tasker that in turn would turn continuous on and off. :)
     

Share This Page