After all is done you'll be able to do something like this:
You can also do the same from an Amazon Echo if you like!
If you want to get started right away simply import the attached project! Otherwise continue reading for instructions...
It's really a very simple process! You need:
STEP 1 - CREATE AUTOVOICE COMMANDS TO PLAY MEDIA
Make sure to add alternatives with a to prefix because sometimes Google decides to send that as part of the command. Example: add play the next simpsons and to play the next simpsons.
- Create a new profile with the AutoVoice Recognized Event
- Create a command with the helper where you input the various ways you want to start playing movies/tv shows with.
- Set an appropriate response too
- Create a new task for this condition
STEP 2 - SEND THE COMMAND TO YATSE
You add the watch prefix because you only get part after play or watch in the %watchcommand variable
- Add a Variable Set action and set %watchcommand to watch %watchcommand
- Add a Yatse Command action
- Select the Parse Voice Command action
- Set the command to %watchcommand
- Exit Tasker to save and try your command
If you now say hey Google, ask AutoVoice to play Lady and The Tramp for example, Kodi will start playing it
Now let's setup a way to do any generic command in Kodi by adding commands with the Kodi prefix.
STEP 3 - CREATE GENERIC KODI COMMAND
- In AutoVoice create another command like Kodi $command
- In the task use the Yatse Command action again with the Parse Voice Command action
- Exit Tasker to save.
You're done! Now everything you say starting with Kodi will be sent as a voice command to Yatse!
To make things simpler you should setup your most used commands as AutoVoice Google Assistant Shortcuts. Then you can do stuff like this: