40 LXF249May 2019 3334May 20195AP4i15
Open source smart home
urtherskillscanbefoundfromtheMycroft
Marketplaceathttps://market.mycroft.ai/
skills–don’tworry,they’refree).Youcan
installthemdirectlyfromthere,verballywithsomething
like“HeyMycroftinstallcoinflip”, or manually at the
Mycroft CLI. You can also install skills from the
mycroft-skills GitHub repo. You’ll also find excellent
documentation on how to write your own there.
If you have a Spotify Premium account, there’s a
skill for that. You can either play tracks through other
devices via Spotify Connect, or play them through
whatever Mycroft’s running on. Add the Spotify skill
from the Marketplace; you should see a message like
INFO - Will install [‘mycroft-spotify’] from the
marketplace
in the CLI. Before you can use the Spotify skill, you’ll
need to enter some credentials. In the links to the left of
the Marketplace, navigate to My Account > Profile.
From here follow the Skills link at the top of the page.
Scroll down to the Spotify Skill section and enter your
Spotify credentials. You’ll be asked to bestow
permissions on our Mycroft skill, and hopefully will be
greeted with a successful connection message. Don’t
forget to click Save at the top of the page to yet again
confirm your intent. This second confirmation is
necessary because besides the API connection to
Spotify, which is done by an OAuth, a further device
authentication is necessary, which requires the Skill to
retain your Spotify credentials. See the documentation
at http://bit.ly/lxf249spotify^4 if you want to log in via
Facebook, or generally find out more about the project.
You can now ask (or type into the CLI) queries such
as “What Spotify devices are available”, “Show my
playlists”, or “What song is this”. You can also issue
demands, for example “Play discover weekly”, “Play Get
Free by Major Lazer” (not again!–Ed) and “Stop playing”.
In the Skills configuration page in your Mycroft Profile,
under Remote Control Device you can also change the
default playback device, having Spotify stream to your
Mycroft device, if you like.
Interestingly, just as we complete this feature, some
big news has surfaced in the voice recognition world.
Mozilla has just released, under a Creative Commons
licence, version 2.0 of the Common Voice dataset.
This includes thousands of hours of matched audio
and transcription in 18 different languages, including
Welsh (lechyd da!–Ed). It enables smaller projects
access to an open dataset the like of which was
previously only available to large companies.
Mycroft has its own anonymous voice-data
collection feature, which you can opt into at the bottom
of the Basic Settings on the Mycroft Account page.
Looking ahead, the company will likely incorporate the
Common Voice data into the collaboration it already
has with the Mozilla DeepSpeech team (https://
research.mozilla.org/machine-learning). One day
the goal is for DeepSpeech to be the default Speech to
Text (STT) engine in Mycroft, but at present it requires
considerable GPU power to run at adequate speeds. In
future this can be farmed-out to the cloud, and indeed
Mycroft already has a pool of GPU-heavy machines that
can take care of the grunt work for ML-savvy Mycroft
openHaband otHerpLatForms
We’ve barely scratched the surface of what openHAB is capable of,
but it’s just one of a number of platforms that can interoperate to one
degree or another among themselves and indeed Mycroft.
For example, there’s a Minecraft plug-in for openHAB, so you can
control actual devices in your house from the voxellated world of the
game. It uses the popular SpigotMC plug-in – look it up. You can also
use openHAB to communicate with Nest devices and Amazon Echo.
We could actually write a whole feature spanning the diverse
selection of robots and circuits it’s capable of interfacing with (well,
if you’re offering... – Ed).
There’s also a Mycroft skill for controlling devices connected via
the popular open source Home Assistant platform (www.home-
assistant.io), which can talk to all sorts of things like Sonos audio
systems, Alexa, Google Assistant and Z-Wave devices. Like openHAB,
Home Assistant has a smartphone app and offers a handy web
interface – and we could probably devote a whole lot more space to it
than these three sentences.
Google Assistant has its own Python library. Naturally we’d rather
you used something that didn’t come from Mountain View, but since
you may already be using it, maybe you’ll be interested in hacking it.
You can check out the sample code at http://bit.ly/lxf249python 3.
The Mycroft
add-ons page
has several IoT
offerings, and
there are several
platforms outside
of Mycroft.
WetakealookatsomemoreMycroftskill-duggeryandpeerinto the
future of its development.
augmenting our skill set
F
The Spotify skill unfortunately won’t pay your Spotify bill. But it does
need some access to your account.
3) https://github.com/googlesamples/assistant-sdk-python/
4) https://github.com/forslund/spotify-skill