I am looking for a way to automate Spotify, either through controlling the desktop application or through an API that will allow me to access the data directly. What I am wanting to do is send commands that will control the play of music. I know I can do this through web automation, but are there any other ways to do this.
You can use the Spotify Connect API to control playback on Spotify. You can read more about them here and the documentation is here.
Related
I am a developer and I have a Bluetooth Lamp that has RGB and Day/Warm Light that has a third party App to control it.
My goal is to do some automation with my Lamp.
Is there a way to read what this app is sending to my Lamp is order to simulate its functionality? The thing is this App is not possible to integrate with my Google assistant so I am trying to find a way to do it my self by making my own mobile application to control my Lamp.
Or maybe my question should be something like: is there a generic App that can control generic Bluetooth Lamps?
Any information is greatly appreciated.
You could either hack the hardware itself, or you could simply snoop on the communications to hack in to the lamp controls.
Otherwise, I would check out integration platforms like IFTTT, which allows some customization of control with proprietary systems.
Do any of you, know a way to get the audio stream of a music platform and plug it to the Web Audio API ?
I am doing a music visualizer based on the Web Audio API. It currently reads sounds from the mic of my computer and process a real-time visualization. If I play music loud enough, my viz works !
But now I'd like to move on and only read the sound coming from my computer, so that the visualization render only to the music and no other sound such as people chatting.
I know I can buffer MP3 file in that API and it would work perfectly. But in 2020, streaming music is very common, via Deezer, Spotify, Souncloud etc.
I know they all have an API but they often offer an SDK where you cannot really do more than "play" music. There is no easy access to the stream of audio data. Maybe I am wrong and that is why I ask your help.
Thanks
The way to stream music to WebAudio is to use a MediaElementAudioSourceNode or MediaStreamAudioSourceNode. However, these nodes will output zero unless you're allowed to access the data. This means you have to set the CORS property correctly on your end and also requires the server to allow the access through CORS.
A google search will help with setting up CORS. But many sites won't allow access unless you have the right permissions. Then you are out of luck.
I find a "no-code" work around. At least on Ubuntu 18.04, I am able to tell Firefox to take my speakers as the "microphone input".
You just have to select the good "mic" in the list when your browser asks for mic permission.
That solution is very convenient since I do not need to write platform-specific binding-code to access to the audio stream
I want make a simple app (action) on Google Home speaker but I cannot find any docs in which is described how to get access to mic.
Is there any chance to develop VoIP app on the Google Home device?
In short - no. (Or at least not at this time.)
The only access Google provides third-party built apps is through Actions on Google, and this does not provide direct access to the microphone or to an audio stream.
Firstly, what I would like to achieve. I am building media system using Raspberry Pi device. So far there is mopidy service which as far as I know uses libspotify to play music from Spotify. Everything works really well. Except I would like to control my Raspberry Spotify playback from my desktop Spotify client or from my Android phone. Official clients do allow this feature to switch device.
I would like to implement same feature using libspotify.
I'm not even sure if it's possible using public API.
Any ideas how to achieve such thing are welcome.
Libspotify does not expose Spotify connect functionality. It's a limitation of the library and Spotify show no interest in improving it. So, this is not possible.
Is it possible to change the user agent the chromecast sends to servers?
I am trying to load a mobile video and the server requires that the user agent be from a mobile device.
Thanks.
No, you cannot change the user agent
It's a good question, but I'm afraid you won't be able.
Anyway, you can play with the host method to change/send custom headers, so maybe you can figure out how to send the request to simulate a mobile device into your servers.
Also, be careful with the media you want to play in Chromecast, there's a list of supported formats and the recommendation is to follow that "rule".