Author Topic: Control Spotify desktop application  (Read 2767 times)

OmiCron

  • Newbie
  • *
  • Posts: 4
Control Spotify desktop application
« on: November 13, 2016, 03:06:29 pm »
I created a plugin to control the Spotify desktop application. All information and download link here : http://www.litpixi.com/va-spotify/

In the zip file there is a Spotify profile too with all the commands.

Malic

  • Newbie
  • *
  • Posts: 13
Re: Control Spotify desktop application
« Reply #1 on: April 26, 2017, 11:32:55 pm »
Had a few people on my streams complain about this behavior too, but once VA and Spotify are started, you have to have Spotify sit there for 1 to 10 mins with no commands given before it "hooks".

Can see the volume slider move when the command is given but it seems to be random in how it takes to hook into the program to make it actually work.

I have had it work immediately to 30 mins before it randomly connects to control volume.  Part of my checklist now is to make sure both are on the night before so I can make sure it is connected for my morning streams. 

Am playing in VR so it makes it really nice to use voice commands.

SpecialTater

  • Newbie
  • *
  • Posts: 2
Re: Control Spotify desktop application
« Reply #2 on: April 28, 2017, 07:34:14 am »
I cannot seem to get a single command to work - spoken commands like "song name" are detected correctly by the recognition engine, but never recognised as commands. The only commands that work are "Music status" and "Close the music player"

Or am I doing it wrong?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1062
  • RTFM
Re: Control Spotify desktop application
« Reply #3 on: April 28, 2017, 12:46:22 pm »
The commands that aren't working are suffixes; They require a "Music" prefix, E.G. "Music song name" or "Music play".

SpecialTater

  • Newbie
  • *
  • Posts: 2
Re: Control Spotify desktop application
« Reply #4 on: April 28, 2017, 11:30:14 pm »
Thanks, got some of the commands being recognised. My next issue may be related what Malic referred to:

16:12:44 - Recognized : 'music song name' (derived command) (Confidence 97)

Gives the response "The current song is not set" even though Spotify is playing a track.

Volume also gives me grief:
16:23:35 - Recognized : 'music volume' (derived command) (Confidence 97) (response is always "The current volume is 100", even though it's not 100)
16:24:03 - Unrecognized : 'music volume to 50'






Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1062
  • RTFM
Re: Control Spotify desktop application
« Reply #5 on: April 29, 2017, 12:24:55 pm »
16:12:44 - Recognized : 'music song name' (derived command) (Confidence 97)

Gives the response "The current song is not set" even though Spotify is playing a track.

Volume also gives me grief:
16:23:35 - Recognized : 'music volume' (derived command) (Confidence 97) (response is always "The current volume is 100", even though it's not 100)
If the Spotify API has changed since the last time the plugin was updated(newest file is dated 2016-11-13), it may not be fully functional; You'll have to contact the plugin author about that.


16:24:03 - Unrecognized : 'music volume to 50'
The command would be "music set the volume to 50", clunky as that is(you can modify the command phrase to rectify that).

Malic

  • Newbie
  • *
  • Posts: 13
Re: Control Spotify desktop application
« Reply #6 on: May 04, 2017, 04:30:14 am »
I have redone several of the commands to be standalone, as in instead of  "Music, Volume 40", or "Music, Previous Track"  It is just "Volume 40", or "Previous Track".

Just changed it from command suffix to full command and deleted the Music prefix.  If it is triggering on other words, maybe bump up the minimum confidence level.

My reply above was more for the fact that the plugin is a hit or miss when it "hooks"

I can use the commands and change volume, and can see the volume slider move in the volume mixer in windows, but it can take 1 to 10 minutes for it to actually effect spotify.  Once it hooks it is fine, but until then it is just giving volume commands until you hear a change.

savan12986

  • Newbie
  • *
  • Posts: 1
Re: Control Spotify desktop application
« Reply #7 on: June 04, 2017, 02:09:41 pm »
Tried the plugin, but was unable to get it to function.

For those interested, I've found a way to get VA to control volume increase and decrease without needing an external plugin/application. All other basic media controls work as a generic key press through VA.

You need to break the command into 2:

Increase Volume:
Press Media Play / Pause key and hold for 0.025 seconds and release
Execute command, 'Increase Volume2' (and wait until it completes)
Press Media Play / Pause key and hold for 0.025 seconds and release

Note: (You have to pause the music first or the process is not listed as spotify, it's listed as the name of the song currently playing, so you can't control it if a different song is playing from when you set the command up)(when paused it always shows up as spotify)

Increase Volume2:
Press Left Ctrl+Up keys and hold for 0.025 seconds and release
Press Left Ctrl+Up keys and hold for 0.025 seconds and release
Press Left Ctrl+Up keys and hold for 0.025 seconds and release

Note:  In Increase Volume2 you have to click the check box "send this command to" then under the drop box select spotify (Just like in the note for Increase Volume, Spotify must be running but not playing to be able to select the process from the list) (I've tried combining these into 1 action but you cant send the pause command to spotify while a song is playing since the process name is different)

OmiCron

  • Newbie
  • *
  • Posts: 4
Re: Control Spotify desktop application
« Reply #8 on: July 30, 2017, 09:15:54 pm »
Sorry all to never replied to this thread, I didn't receive any notification there were replies in my thread...

I updated the plugin (v1.1.0.0) with some fixes for the "not set" and the initial connection to Spotify. Feel free to say if there are any other bugs, in this thread or at the email on my website.

And yeah, please note that my included profile has "music" as prefix for all my commands but "close the music player".

Malic

  • Newbie
  • *
  • Posts: 13
Re: Control Spotify desktop application
« Reply #9 on: September 13, 2017, 07:21:45 am »
Had a few people asking about this since I stream with this plugin, but it does not seem the newest version has the .VAP file with the commands included anymore?

OmiCron

  • Newbie
  • *
  • Posts: 4
Re: Control Spotify desktop application
« Reply #10 on: September 13, 2017, 07:51:07 am »
Had a few people asking about this since I stream with this plugin, but it does not seem the newest version has the .VAP file with the commands included anymore?

You are right, I forgot to repackage it with the latest version. I will get a new package version uploaded with the sample profile tonight.

OmiCron

  • Newbie
  • *
  • Posts: 4
Re: Control Spotify desktop application
« Reply #11 on: September 13, 2017, 05:51:04 pm »
Re-uploaded with the VAP profile -> http://www.litpixi.com/va-spotify/