Smart house with his own hands: Voice-activated music with Yandex. music
Music Web Services / / December 19, 2019
Editor's Note: When I saw the video of Dmitry, where he ran the voice of the house Lady Gaga and exhibited the light level by 70%, the head slipped thought - "Hey! And in fact this is the smart home. " Dmitry is building a smart home that adapts to him, listening to his voice. And it looks steeper any there the Enterprise! In a series of articles, which begins this material, our guest will tell how to build solutions shown. It is so simple that looks like magic!
Many Android users probably already tried the Russian equivalent of Siri voice assistant called "Assistant to the Russian." He is able to accept voice commands and perform various actions with the device.
But, of course, few people realize that this application is still open, and the voice platform to build add-ons that can expand the existing capabilities assistant.
Being an Android-developer of voice applications, I became interested in the opportunity to get work as an assistant, not only from the device on which it is installed, but also beyond. Or rather - to create an addon that allows Assistant can perform voice commands on a remote computer, TV, or even a single e-outlet!
For this I received from developers, "Assistant to Russian» API for third-party developers (as long as it is still in testing and has no public documentation) and tried to realize the possibility of site management Yandex-Music.
What came of it can be seen in the video ↓
Now assistant can run any track that finds on Yandex. Music, stop, look for another, etc. In general, all that should be able to ordinary player. Only with your voice!
Assistant at the same time connected to the browser due to touch your phone to an NFC tag. Wow-effect in the company of friends is guaranteed!
To make things work, will need a computer running Windows, from the Chrome browser, Java 6 and application assistant to Connect.
On your computer, you need to run the "Connect Wizard" and specify the NFC-tag code or any other code generated by, for example, on the website QrCoder. This is required if there is no NFC on your phone and then connect to a computer, you can use QR code.
On the smartphone, you must set the "Assistant to the Russian" and addon Assistant Connect. After installing the add-Assistant will understand how to deal with the new team and the phrase "put to music" will offer to connect with the computer.
After the "magic touch" to the NFC on the computer will start with chrome already open site Yandex Music and Assistant to enter into the context of communication with this website. Now all voice calls from the user will be taken only in the "music" context, and for outputs, simply say "Cancel" or "Exit".
As the same is not just for music has been Yandex, but also with any other site, can be seen below:
In this case, you do not need to install on your computer, and the browser can work at anywhere - even on a Smart TV.
Everything described one can repeat at home. This shows how voice technology can work outside of the device on which they are traditionally used in recent years. And the "Assistant to the Russian" at the same time allows the programmer to implement the most unusual approaches.
In the next article I will show the realization of opportunities to voice control electronic devices and home theater XBMC with the help of the same add-on to the "Assistant to the Russian."