Bring Song Identification Back to Google Assistant 2017-09-19

Learn how to use AutoVoice and AutoShare to bring back this long lost feature!

  1. joaomgcd
    Google Assistant is missing a very important feature: song identification.
    But with the help of Tasker, AutoVoice and AutoShare you can now bring it back!
    Here's how it'll look like in the end:

    You'll need:
    These apps all have free 7 day trials but you'll need to unlock the full versions to keep functionality after that.

    STEP 1 - CREATE GOOGLE ASSISTANT SHORTCUT


    (i) To make it easier to call this command let's create a shortcut. This makes it so that you don't need to say "ask AutoVoice" all the time and just have to say the "what song is this" command itself.

    • Open Google Assistant
    • Tap the icon on the top right
    • Tap the menu button -> Settings
    • Select Shortcuts
    • Add a shortcut that calls the command Ask AutoVoice what song is this.
    (i) The commands you set for this shortcut can be anything you want, like what song is this, what's this song, what am I listening to or anything else you want.
    • Test this command. You'll see that it'll run the AutoVoice command.
    /!\ If your AutoVoice account isn't linked yet you'll get a prompt to do so. After the account is linked do the command again so it looks like in the video


    STEP 2 - CREATE PROFILE IN TASKER


    • In Tasker create a new profile with the AutoVoice Recognized event condition
    • Set the command to what song is this
    • Set the response to checking now...
    • Accept and create a new task


    STEP 3 - CALL GOOGLE APP'S SONG IDENTIFICATION


    • In the task add an AutoShare action
    • Import the Google Now Music Search intent like shown in the video
    • Back in AutoShare select the Google Now app
    • Select the Music Search action
    • Back out to tasker and run the task just to confirm that it starts identifying a song



    Now if you open Google Assistant and say what song is this (or any of the phrases you set in the shortcut) it'll start identifying the currently playing song! :)


    STEP Extra 1 - GET SONG INFO BACK INTO TASKER


    As an extra step you may even want to get the song info back into Tasker! Check it out...

    • Add an AutoInput Query UI action
    • Start the Variable Setup process
    • Go to the screen where the song was recognized
    • Click Accept in the AutoInput notification
    • In AutoInput select the items that correspond to the song title, album and artist
    • Set the Text field to Google Play so that AutoInput waits until this text is present to check the on-screen values.
    (i) Google Play is the text that appears in the song recognition screen after the song is recognized in Get on Google Play. By setting the text AutoInput will wait until this shows up to get the results
    • Back in Tasker add a flash action with the variables you just created: %song, %artist and %album


    STEP Extra 2 - REPLACE UNWANTED TEXT


    If you now test the task you'll see that you'll get the values back, but that the %artist variable contains the text Artist: and %album contains the text Album: which is undesired. Let's remove these so we get the actual artist and album in the variables.

    • Add a Variable Search Replace action just after the AutoInput UI Query action
    • Set Variable to %artist
    • Set Search to Artist: (with a space at the end)
    • Enable the Replace Matches option
    (i) This will make Tasker replace the Artist: with nothing, leaving you with just the artist name in the variable
    • Do the same for the %album variable, but replace Album: instead.


    Now if you run the task you'll have all of the song info right there in the Task :cool:
    Akalsharan and techieimposter like this.