How to get access to mic on Google Home device? - dialogflow-es

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.

Related

Stream music from streaming platform (Deezer, Spotify, Soundcloud) to Web Audio API

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

Automate\Control Spofity remotely

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.

libspotify register device for remote control

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.

Does the Spotify API stream advertisements as well

I am developing an Application which has a feature for searching and playing a song from spotify using the Spotify API. This is my first time using this API and wanted to know would the user (who is listening to the song) hear an audio advertisement, the same way we hear ads on the spotify desktop free account or he can listen to any number of songs without any ads.
No, libspotify applications will not have adverts played, and libspotify doesn't support advertisements at all. However, because of this, only Spotify Premium users can log into an application using libspotify.

Ad network for Chromecast app

My Chromecast app isn't for video but rather shows an information flow (sorry to be vague). I want the app to be free and monetized by occasional and/or banner onscreen ads, on the TV not the mobile device. In order to do this I need an ad network (AdWords, etc.) that has a fit for the display-only, full screen, non-clickable, nature of Chromecast but has a JavaScript/REST/etc. API that I can use from browser on the Chromecast device. Anyone have a suggestion? Google?
You might check Vistar Media. They have ads that play on TVs you see in public spaces such as Hotel Lobbies. You would need to probably have significant volume. I think Brightroll might have some media as well. You could potentially run video ads from someone like Virool.

Resources