Play a YouTube Video on your PC with a Natural Language Voice Command

Learn how to search for a video on YouTube and play it on your PC using a simple voice command

  1. joaomgcd
    This is how it'll look like when you're done:

    STEP 1 - IMPORT YOUTUBE API IN AUTOWEB


    • Open AutoWeb -> My Web Services
    • Import the YouTube Web Service


    STEP 2 - CREATE NATURAL LANGUAGE VOICE COMMAND


    • Open Tasker and create a new profile with the AutoVoice Natural Language event condition
    • Create a new command with a command like play some video on my pc and a response like ok playing some video on your pc
    • Highlight some video and create a variable called video with the expression
    • Accept the command and create a task for the profile


    STEP 3 - FIND VIDEO ID


    • Add a flash action showing that you're going to play %video on your PC
    • Add an AutoWeb action
    • Select the YouTube API and the Search action
    • In the Query field write %video (which contains the video you said in the command)
    • In the output fields select the Video Id field so you can get that variable in Tasker
    • Add a flash action in Tasker showing the %videoid1 you found
    (i) %videoid1 is the first value in the %videoid() array, which is a list of all video ids found on youtube for the query. This way you get the first result from the search


    STEP 4 - PUSH VIDEO TO PC


    (i) https://www.youtube.com/tv?v= is a special type of URL that opens the video in TV mode. If you follow that with a video ID like we did here the video will start playing right away in full screen
    • Exit Tasker to save


    STEP 6 - TEST


    If you now say something like play nature in 4k on my pc the video should be pushed to your PC and start playing in full screen :cool:

    D Uchiha likes this.

Recent Reviews

  1. D Uchiha
    D Uchiha
    5/5,
    Finally... Thank you master joao