Author Topic: Control Spotify  (Read 52782 times)

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Control Spotify
« on: November 13, 2016, 03:06:29 PM »
I created a plugin to control the Spotify desktop application. Download link here

In the zip file there is a Spotify profile too with all the commands.
« Last Edit: November 03, 2018, 07:06:14 PM by OmiCron »

Malic

  • Full Member
  • ***
  • Posts: 102
Re: Control Spotify desktop application
« Reply #1 on: April 27, 2017, 12:32:55 AM »
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

  • Guest
Re: Control Spotify desktop application
« Reply #2 on: April 28, 2017, 08: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: 4647
  • RTFM
Re: Control Spotify desktop application
« Reply #3 on: April 28, 2017, 01: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

  • Guest
Re: Control Spotify desktop application
« Reply #4 on: April 29, 2017, 12:30:14 AM »
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: 4647
  • RTFM
Re: Control Spotify desktop application
« Reply #5 on: April 29, 2017, 01: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

  • Full Member
  • ***
  • Posts: 102
Re: Control Spotify desktop application
« Reply #6 on: May 04, 2017, 05: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

  • Guest
Re: Control Spotify desktop application
« Reply #7 on: June 04, 2017, 03: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)

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify desktop application
« Reply #8 on: July 30, 2017, 10: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

  • Full Member
  • ***
  • Posts: 102
Re: Control Spotify desktop application
« Reply #9 on: September 13, 2017, 08: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?

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify desktop application
« Reply #10 on: September 13, 2017, 08: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.

Patrick Lavoie

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

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify desktop application
« Reply #12 on: November 03, 2018, 07:04:46 PM »
I'm ready to announce the resurrection of the VoiceAttack Spotify plugin! After Spotify shut down the local API to control the application, I made a complete rewrite of the plugin using their Web API. Don't worry, the old commands are still there, but a bunch of new ones appeared! The good thing about the Web API is that it opens a lot of possibilities.

So, you can download it here. I included an updated demo VoiceAttack profile into the zip file, so check it out. Please note that my demo profile has the prefix "music" for almost all the commands.

If you have any questions, suggestions or if you find any bugs, just drop me an email and I will look into it. Spread the word, the plugin is back and better than ever!

theadmiralcrunch

  • Guest
Re: Control Spotify
« Reply #13 on: November 08, 2018, 12:25:17 AM »
Just tried it, and it seems to be crashing my Voice Attack. It's a fresh install of VA 1.7.2, and the crash only happens when I've got plugins enabled with the plugin installed. It successfully opens the "succesfully connected" webpage, but voice attack crashes right after.

This is what I get from the VoiceAttackFault.txt


Quote
11/7/2018 11:19:37 PM***************************************************************************************
System.MissingMethodException: Method not found: 'System.String System.String.Format(System.IFormatProvider, System.String, System.Object, System.Object)'.
   at Microsoft.ApplicationInsights.TelemetryClient.Initialize(ITelemetry telemetry)
   at Microsoft.ApplicationInsights.TelemetryClient.Track(ITelemetry telemetry)
   at Microsoft.ApplicationInsights.TelemetryClient.TrackEvent(EventTelemetry telemetry)
   at Microsoft.ApplicationInsights.TelemetryClient.TrackEvent(String eventName, IDictionary`2 properties, IDictionary`2 metrics)
   at Spotify.SpotifyPlugin.<>c.<VA_Init1>b__17_0(Object sender, AuthSuccessEventArgs e) in S:\Projects\VoiceAttack\Spotify\Spotify\SpotifyPlugin.cs:line 97
   at SpotifyAPI.Web.Auth.SecureWebAPIFactory.<>c__DisplayClass57_0.<<GetWebApiAsync>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__5(Object state)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4647
  • RTFM
Re: Control Spotify
« Reply #14 on: November 08, 2018, 12:44:35 AM »
It appears this plugin includes "telemetry", in other words it sends information to someone when you use it, aside from that required for it to function.

I don't see that mentioned anywhere, nor does there appear to be an opt-out.

I'd want to know about this sort of thing were I using this plugin, even if it's all anonymized.

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #15 on: November 08, 2018, 08:56:14 AM »
It appears this plugin includes "telemetry", in other words it sends information to someone when you use it, aside from that required for it to function.

I don't see that mentioned anywhere, nor does there appear to be an opt-out.

I'd want to know about this sort of thing were I using this plugin, even if it's all anonymized.

You are right, I'm using telemetry to track bugs. If it can be a concern for some people, I will add a mention and a way to opt out.

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #16 on: November 08, 2018, 09:34:49 AM »
Just tried it, and it seems to be crashing my Voice Attack. It's a fresh install of VA 1.7.2, and the crash only happens when I've got plugins enabled with the plugin installed. It successfully opens the "succesfully connected" webpage, but voice attack crashes right after.

This is what I get from the VoiceAttackFault.txt


Quote
11/7/2018 11:19:37 PM***************************************************************************************
System.MissingMethodException: Method not found: 'System.String System.String.Format(System.IFormatProvider, System.String, System.Object, System.Object)'.
   at Microsoft.ApplicationInsights.TelemetryClient.Initialize(ITelemetry telemetry)
   at Microsoft.ApplicationInsights.TelemetryClient.Track(ITelemetry telemetry)
   at Microsoft.ApplicationInsights.TelemetryClient.TrackEvent(EventTelemetry telemetry)
   at Microsoft.ApplicationInsights.TelemetryClient.TrackEvent(String eventName, IDictionary`2 properties, IDictionary`2 metrics)
   at Spotify.SpotifyPlugin.<>c.<VA_Init1>b__17_0(Object sender, AuthSuccessEventArgs e) in S:\Projects\VoiceAttack\Spotify\Spotify\SpotifyPlugin.cs:line 97
   at SpotifyAPI.Web.Auth.SecureWebAPIFactory.<>c__DisplayClass57_0.<<GetWebApiAsync>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__5(Object state)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

For your problem, I suspect you don't have .Net Framework 4.6.1 installed. I will try to target .Net 4.5 instead because this is the version that VoiceAttack using. I will check it out after work to release a new version.

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #17 on: November 08, 2018, 08:46:47 PM »
New version 2.1.0.0:

Quote
  • Added to the documentation the data collection via telemetry.
  • Added a way to opt out from telemetry.
  • Fixed a null reference exception.
  • Downgraded the .Net Framework from 4.6.1 to 4.6 to ensure a minimum requirements.


The minimum .Net Framework I can go is 4.6, so ensure to have this version installed. Note that you can have multiple version of .Net Framework installed side by side. The latest version does not include the prior ones.

theadmiralcrunch

  • Guest
Re: Control Spotify
« Reply #18 on: November 09, 2018, 05:03:07 AM »
Working great for me, now! I didn't even have framework 4.6. Installed it, and everything's great.

Frici

  • Newbie
  • *
  • Posts: 15
Re: Control Spotify
« Reply #19 on: November 14, 2018, 10:38:55 AM »
New version 2.1.0.0:

Quote
  • Added to the documentation the data collection via telemetry.
  • Added a way to opt out from telemetry.
  • Fixed a null reference exception.
  • Downgraded the .Net Framework from 4.6.1 to 4.6 to ensure a minimum requirements.


The minimum .Net Framework I can go is 4.6, so ensure to have this version installed. Note that you can have multiple version of .Net Framework installed side by side. The latest version does not include the prior ones.

This might be being silly or blind but where is the documentation? I don't see it either on the website or the .zip itself. :o

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #20 on: November 24, 2018, 08:22:07 AM »
New version 2.1.0.0:

Quote
  • Added to the documentation the data collection via telemetry.
  • Added a way to opt out from telemetry.
  • Fixed a null reference exception.
  • Downgraded the .Net Framework from 4.6.1 to 4.6 to ensure a minimum requirements.


The minimum .Net Framework I can go is 4.6, so ensure to have this version installed. Note that you can have multiple version of .Net Framework installed side by side. The latest version does not include the prior ones.

This might be being silly or blind but where is the documentation? I don't see it either on the website or the .zip itself. :o

Sorry for the delay, but I don't always receive notification from this thread, I don't know why... The documentation is when you start VoiceAttack with the plugin, a Web page opens to activate the plugin with Spotify Web services. There are two collapsed panels with the documentation and changelogs.

Eomerr

  • Guest
Re: Control Spotify
« Reply #21 on: July 25, 2019, 10:09:42 AM »
I am not seeing the documentation in the zip file for this plugin. Is there someplace i can see the current commands to use this?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4647
  • RTFM
Re: Control Spotify
« Reply #22 on: July 25, 2019, 10:13:33 AM »
Did you import the included profile ("Spotify-Profile.vap")? It contains example commands.


Also, in the post above yours the plugin author states:
The documentation is when you start VoiceAttack with the plugin, a Web page opens to activate the plugin with Spotify Web services. There are two collapsed panels with the documentation and changelogs.

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #23 on: July 25, 2019, 10:17:57 AM »
I am not seeing the documentation in the zip file for this plugin. Is there someplace i can see the current commands to use this?

As Pfeil says, there is an included demo profile to test it out that you can import in VoiceAttack. For detailed documentation, when you install the plugin and launch VoiceAttack, a web page opens and you have to sign-in in Spotify and authorize the plugin and after that, you will have a page with all the documentation. This page will open each time you launch VoiceAttack because this is the authentification process with Spotify.

Haha, ninja Pfeil!

Eomerr

  • Guest
Re: Control Spotify
« Reply #24 on: July 25, 2019, 02:47:19 PM »
The only command I have working is to launch spotify. I notice in the directions it says premium do I have to buy a premium version to play spotify?

 Play (Premium only) // For free subscriptions, use VoiceAttack Key Press command "Play/Pause".
Pause (Premium only) // For free subscriptions, use VoiceAttack Key Press command "Play/Pause".

Can someone give me a couple command examples to play a song or playlist? 
I have tried Playlist Country, Play Song Name etc  nothing happens.


Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #25 on: July 25, 2019, 02:59:19 PM »
The only command I have working is to launch spotify. I notice in the directions it says premium do I have to buy a premium version to play spotify?

 Play (Premium only) // For free subscriptions, use VoiceAttack Key Press command "Play/Pause".
Pause (Premium only) // For free subscriptions, use VoiceAttack Key Press command "Play/Pause".

Can someone give me a couple command examples to play a song or playlist? 
I have tried Playlist Country, Play Song Name etc  nothing happens.

When is indicated "Premium", you need to have Spotify Premium subscription. The plugin is totally free. Please, note that my demo profile has "music" as a command prefix. So, almost every command should be said as "music play", "music next" and so on.

The plugin does not support yet free text commands to play songs or playlists. So, if you have a playlist named "Good Night" in Spotify, you need to create a corresponding VoiceAttack command like "music playlist good night" (or whatever you like your command) with the URL to that playlist. In other words, for every playlists or songs that you want in VoiceAttack, you need to create a corresponding command. I do think I have an example in the demo profile for that.

Eomerr

  • Guest
Re: Control Spotify
« Reply #26 on: July 25, 2019, 03:08:04 PM »
Thank you for replying so quickly, its working now,, I missed the Music prefex and thank you for the help on the play lists as well.

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #27 on: July 25, 2019, 03:09:06 PM »
Thank you for replying so quickly, its working now,, I missed the Music prefex and thank you for the help on the play lists as well.

No problem! :D

blueknight

  • Newbie
  • *
  • Posts: 14
Re: Control Spotify
« Reply #28 on: October 13, 2019, 06:17:37 PM »
Thank you for the playlist working.
Question though, is there a way to active the playlist in Shuffle mode?
I got it working by copying the toggle shuffle command after the initial command, but is that the cleanest way of doing this?

Malic

  • Full Member
  • ***
  • Posts: 102
Re: Control Spotify
« Reply #29 on: November 10, 2019, 02:52:38 AM »
Is there a way to queue up a song, or remove the next song in the queue, or do something to change play lists, but also return to a song in a previous playlist?

Am trying to figure out a way to use the playlist change feature to change playlists for Elite: Dangerous, and be context specific, so exploration music or combat music, but also return to a previous song when something else ends.

A lot of people like to put the Mass Effect music in the galaxy map, but is just the returning to the previous playlist is the bit that I cannot figure out right now

smokejuice

  • Guest
Re: Control Spotify
« Reply #30 on: December 18, 2019, 04:13:25 AM »
All I get is this:

6:58:46.611 [Spotify] Unsuccessfully authenticated with Spotify (Exchange token not returned by server.).
6:58:46.611 [Spotify] Unsuccessfully authenticated with Spotify (Exchange token not returned by server.).
6:58:23.695 Plugin 'Spotify Plugin - litpixi.com/va-spotify/' initialized.
6:58:23.691 [Spotify] This plugin needs authorization to your Spotify account. A Web page should have opened in your browser and you have to authorize it.

I gave it permission, so that's not the problem. But I can't get it to authenticate with my Spotify. Do you have any idea what could be the problem? Please help!
Thank you!

(yeah I know this is a bit of a necro, but I'd love to get your plugin working :D)

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #31 on: January 10, 2020, 08:58:14 PM »
For all, if you post something in this topic, please, send me an email at info@litpixi.com to notify me, because I rarely receive any notification when someone is posting something here.

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #32 on: January 10, 2020, 09:12:07 PM »
Thank you for the playlist working.
Question though, is there a way to active the playlist in Shuffle mode?
I got it working by copying the toggle shuffle command after the initial command, but is that the cleanest way of doing this?

In Spotify, when I load a playlist and enable the shuffle and after I load a new playlist, I see that the shuffle is still enabled. So, I think the way you do is the good way, but you do miss something. You may want to get the value of the variable "Spotify_IsShuffleEnabled" to know if you have to toggle the shuffle again because it might still be enabled.

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #33 on: January 10, 2020, 09:14:18 PM »
Is there a way to queue up a song, or remove the next song in the queue, or do something to change play lists, but also return to a song in a previous playlist?

Am trying to figure out a way to use the playlist change feature to change playlists for Elite: Dangerous, and be context specific, so exploration music or combat music, but also return to a previous song when something else ends.

A lot of people like to put the Mass Effect music in the galaxy map, but is just the returning to the previous playlist is the bit that I cannot figure out right now

I will have to dig if this is possible. Stay tuned.

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #34 on: January 10, 2020, 09:17:26 PM »
All I get is this:

6:58:46.611 [Spotify] Unsuccessfully authenticated with Spotify (Exchange token not returned by server.).
6:58:46.611 [Spotify] Unsuccessfully authenticated with Spotify (Exchange token not returned by server.).
6:58:23.695 Plugin 'Spotify Plugin - litpixi.com/va-spotify/' initialized.
6:58:23.691 [Spotify] This plugin needs authorization to your Spotify account. A Web page should have opened in your browser and you have to authorize it.

I gave it permission, so that's not the problem. But I can't get it to authenticate with my Spotify. Do you have any idea what could be the problem? Please help!
Thank you!

(yeah I know this is a bit of a necro, but I'd love to get your plugin working :D)

You should try to disconnect from the Spotify website and clear the cache and cookies of your browser, and retry the authentification process.

CptJohnCle

  • Newbie
  • *
  • Posts: 5
Re: Control Spotify
« Reply #35 on: January 19, 2021, 09:45:02 AM »
so I am resurrecting this thread.

I downloaded the plugin put the file in c:\program files X86\voiceattack\Apps

imported the profile.

The only thing that works is the launch spotify. I get no authentication for spotify

There was an error "PLUGIN NOT LOADED"

The problem was that under settings of Voice Attack I had a box "enable plugins" that wasnt checked. So plugins will not load (obviously)

also if you look at the commands all those commands are prefaced with the word "Music" so you must say "Music Next" to skip a track etc.

Works great today's date is 1/19/2021

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #36 on: February 12, 2021, 03:36:01 PM »
Great news everyone!

I re-wrote the Spotify integration part of the plugin and now, the authorization web page should only open once or very rarely.

So, go to http://www.litpixi.com/va-spotify/ to download the new version.

LSDMT

  • Newbie
  • *
  • Posts: 1
Re: Control Spotify
« Reply #37 on: February 12, 2021, 10:04:31 PM »
Great news everyone!

I re-wrote the Spotify integration part of the plugin and now, the authorization web page should only open once or very rarely.

So, go to http://www.litpixi.com/va-spotify/ to download the new version.

THANK YOU, OMICRON!!!

(wayne & garth:  we're not worthy!!)

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #38 on: April 08, 2022, 06:55:45 AM »
New version 3.0.1.3 available.

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #39 on: April 17, 2022, 01:18:14 PM »

SmallShoes

  • Newbie
  • *
  • Posts: 1
Re: Control Spotify
« Reply #40 on: February 04, 2023, 08:24:41 PM »
Why am I getting this error? Do I have to have a Spotify Premium account to get this to work? If so, that's pretty disappointing.

"7:19:36.115 [Spotify] Error while executing an action to Spotify (One or more errors occurred.Player command failed: Premium required)."

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #41 on: February 04, 2023, 09:29:04 PM »
Why am I getting this error? Do I have to have a Spotify Premium account to get this to work? If so, that's pretty disappointing.

"7:19:36.115 [Spotify] Error while executing an action to Spotify (One or more errors occurred.Player command failed: Premium required)."

Yep ! Spotify limits their own API if you are not premium.

Wolfang42

  • Newbie
  • *
  • Posts: 13
Re: Control Spotify
« Reply #42 on: July 21, 2023, 04:12:29 PM »
Has anyone gotten this to work ?

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #43 on: July 21, 2023, 08:21:51 PM »
Has anyone gotten this to work ?

Are you talking about how to download it ? If so, my website is currently down, but I moved everything into GitHub.

Download link : https://github.com/OmiCron07/VoiceAttack-Spotify-Plugin/releases

Wolfang42

  • Newbie
  • *
  • Posts: 13
Re: Control Spotify
« Reply #44 on: July 21, 2023, 09:51:51 PM »
I downloaded it and put the "Spotify" folder into the APPS folder, but the plugin is not loading and does not appear on the plugin manager list

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #45 on: July 21, 2023, 09:55:59 PM »
From memory, you have to enable plugins in the VoiceAttack settings.

Wolfang42

  • Newbie
  • *
  • Posts: 13
Re: Control Spotify
« Reply #46 on: July 21, 2023, 10:23:28 PM »
They are enabled. As I said, it does not appear on the plugin list at all. I've plenty of other plugins working.

Patrick Lavoie

  • Newbie
  • *
  • Posts: 23
Re: Control Spotify
« Reply #47 on: July 21, 2023, 10:46:09 PM »
No logs in the main screen ?

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2800
Re: Control Spotify
« Reply #48 on: July 21, 2023, 10:50:47 PM »
Make sure the file is not blocked by Windows:
https://www.thewindowsclub.com/fix-windows-blocked-access-file

Just felt compelled to throw that out there as it’s happened to me in other situations.

Wolfang42

  • Newbie
  • *
  • Posts: 13
Re: Control Spotify
« Reply #49 on: July 21, 2023, 10:52:42 PM »
Just "Profile changed to Spotify"

I renamed it from "Default" to "Spotify"

I did not see a blocked file pop.  The files in the Spotify folder are there and under the APPS folder.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2800
Re: Control Spotify
« Reply #50 on: July 21, 2023, 10:54:31 PM »
I know this sounds weird, but try moving your other plugins out of the plugin folder temporarily and see if it shows up.

Wolfang42

  • Newbie
  • *
  • Posts: 13
Re: Control Spotify
« Reply #51 on: July 21, 2023, 10:57:20 PM »
No logs in the main screen ?

Ok I see you updated the file in "released" 2 hours ago.  I downloaded that one and it's working.  THanks!!

Wolfang42

  • Newbie
  • *
  • Posts: 13
Re: Control Spotify
« Reply #52 on: July 21, 2023, 11:03:38 PM »
I remember I tried this last year or 2 years ago.  The command "Launch Spotify" has TTS say "Expression Error."  Perhaps VA syntax has changed since this was created?

Code: [Select]
Say, 'Launching Spotify'
Run application 'spotify:'
Pause 3 seconds
Execute external plugin, 'Spotify Plugin - github.com/OmiCron07/VoiceAttack-Spotify-Plugin' using context 'UpdateState' and wait for return
Say, '{EXP: IIF({BOOL:Spotify_IsRunning}, 'Successfully launched Spotify', 'Spotify seems to not be running')}'  (and wait until it completes)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4647
  • RTFM
Re: Control Spotify
« Reply #53 on: July 22, 2023, 12:38:28 AM »
No...the syntax has not changed

That "Expression Error" would be because the Boolean variable "Spotify_IsRunning" has not been set.


Do you have the Spotify application install on your machine, or are you running Spotify in your web browser?

Wolfang42

  • Newbie
  • *
  • Posts: 13
Re: Control Spotify
« Reply #54 on: July 22, 2023, 01:19:28 AM »
The app is installed. The command loads it fine.

Seems that variable is not getting set for some reason.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4647
  • RTFM
Re: Control Spotify
« Reply #55 on: July 22, 2023, 01:35:14 AM »
Are the other commands in the profile working?

Wolfang42

  • Newbie
  • *
  • Posts: 13
Re: Control Spotify
« Reply #56 on: July 22, 2023, 01:44:42 AM »
Yes once I start something manually.  Seems the variable is now being set. I had to load the app manually and now it works ok.  Thank you all.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2800
Re: Control Spotify
« Reply #57 on: August 30, 2023, 10:20:26 PM »
Did you enable plugin support and restart VA?

krztoff

  • Newbie
  • *
  • Posts: 1
Re: Control Spotify
« Reply #58 on: August 30, 2023, 10:30:43 PM »
Did you enable plugin support and restart VA?

Thanks.  The problem was an incomplete install.  I redownloaded and reextracted and now the plugin loads - however now I cannot get it to recognize any commands other than "launch spotify". 

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4647
  • RTFM