Locate someone with a Natural Language voice command

Learn how to set a location in context so that you can the ask AutoVoice where that person is

  1. joaomgcd

    STEP 0 - SETUP YOUR API.AI ACCOUNT


    Make sure that you have setup your account and have configured AutoVoice to work with API.AI


    STEP 1 - CREATE COMMAND FOR WHEN LOCATION IS UNKNOWN


    • In AutoVoice create a new Natural Language voice command by going into the main app -> Natural Language -> Commands
    • Set the commands to something like Where's my husband and Where can I find my husband
    • Set the responses to something like I have not seen your husband


    STEP 2 - COMMAND FOR WHEN THERE'S LOCATION IN CONTEXT


    • Create another command like the one above, with the same command phrases but set the response to Your husband was last seen in #location.city at #location.time
    • After saving the command edit it by tapping on it and then set the input context to location
    (i) By setting the input context you make sure that this will only be triggered if there's an actual location in the Natural Language context.


    STEP 3 - SET LOCATION CONTEXT


    • In Tasker create a new Task
    • Add an AutoVoice Natural Language Context action
    • Set Context Name to location
    • Set Field Names to city,time
    • Set Field Values to New York,12:30pm
    • Accept and run the task
    (i) This is creating the location context and setting 2 values: city to New York and time to 12:30pm
    /!\
    In a real situation you will want to set the context every hour for example, with a real location (you can get the location name with the AutoLocation Info Tasker action) and real time (you can get the time in any format you want with the AutoTools Time Tasker action).


    If you now ask where your husband is, it'll respond with the latest location and time that was set in the AutoVoice Natural Language Context action :cool: