"Hey Mycroft!"

Getting Started with the
Open Source Home Assistant

Sarah Withee
@geekygirlsarah

Slides/code/notes:  geekygirlsarah.com/hey-mycroft

"Hey Mycroft"

"Hey Mycroft!"

Getting Started with the
Open Source Home Assistant

Sarah Withee
@geekygirlsarah

Slides/code/notes:  geekygirlsarah.com/hey-mycroft

"Hey Mycroft": Getting Started with the OSS Home Assistant

  1. Intro to Mycroft
  2. How Do You Get One?
  3. Intro to Skills
  4. Example Skill 1
  5. Example Skill 2
  6. Example Skill 3
  7. Conclusion

@geekygirlsarah #NDCLondon

Intro to Mycroft

  • It's a home assistant (like Alexa, Google Home, etc.)
  • It's entirely open source
  • Speech recognition is done on the device
  • If you opt-in, you can send to the cloud

@geekygirlsarah #NDCLondon

Intro to Mycroft

Pros:

  • It protects your privacy
  • You can see all of its "thinking"
  • You can build it yourself!
  • Free!*

@geekygirlsarah #NDCLondon

* minus cost of device or parts

Intro to Mycroft

Cons:

  • Depending on device, can be slow
  • Upgrades are slower
  • New skills are slow to come out

@geekygirlsarah #NDCLondon

How Do You Get One?

@geekygirlsarah #NDCLondon

Mark I                             Mark II

How Do You Get One?

@geekygirlsarah #NDCLondon

How Do You Get One?

Running on Pi:

  1. Download image: https://github.com/MycroftAI/enclosure-picroft/tree/stretch
  2. Flash it
  3. Turn it on and configure hardware
  4. Pair it

@geekygirlsarah #NDCLondon

How Do You Get One?

Running on Linux:

  1. Clone repo: git clone https://github.com/MycroftAI/mycroft-core.git
  2. cd mycroft-core
  3. bash dev_setup.sh
  4. bash start_mycroft.sh all
    bash start_mycroft.sh debug
  5. Pair it

@geekygirlsarah #NDCLondon

How Do You Get One?

Running on Linux:

  1. Clone repo: git clone https://github.com/MycroftAI/mycroft-core.git
  2. cd mycroft-core
  3. bash dev_setup.sh
  4. bash start_mycroft.sh all
    bash start_mycroft.sh debug

  5. Pair it

@geekygirlsarah #NDCLondon

How Do You Get One?

Pairing:

  1. Go to home.mycroft.ai
  2. Type in the code Mycroft reads
  3. Start doing stuff!

@geekygirlsarah #NDCLondon

Intro to Skills

Components to Mycroft Core:

  • Audio playback service
  • Messagebus service
  • Skill service
  • Voice capture service
  • Enclosure service

@geekygirlsarah #NDCLondon

Intro to Skills

How do we make a skill?

  • Identify our intent
  • Determine the words to respond to
  • Write code to produce a spoken response

@geekygirlsarah #NDCLondon

Intro to Skills

Definitions:

  • Wake word: Word(s) to activate Mycroft
  • Utterance: phrase spoken by user
  • Intent: How a utterance is matched to skill
  • Dialog: Phrase spoken by Mycroft

@geekygirlsarah #NDCLondon

Intro to Skills

Layout of code:

  • mycroftai/mycroft-core:
    Mycroft AI code

 

  • mycroftai/mycroft-skills:
    All Mycroft AI skills available to activate

@geekygirlsarah #NDCLondon

Intro to Skills

@geekygirlsarah #NDCLondon

Intro to Skills

@geekygirlsarah #NDCLondon

Intro to Skills

/

/dialog/

/dialog/en-gb/

/dialog/en-gb/hello.world.dialog

/vocab/

/vocab/en-gb/

/vocab/en-gb/hello.world.voc

/README.md

/__init__.py

@geekygirlsarah #NDCLondon

Intro to Skills

/

/dialog/

/dialog/en-gb/

/dialog/en-gb/hello.world.dialog

/vocab/

/vocab/en-gb/

/vocab/en-gb/hello.world.voc

 

@geekygirlsarah #NDCLondon

/README.md

/__init__.py

/requirements.sh

/requirements.txt

Minimum required files:

Intro to Skills

@geekygirlsarah #NDCLondon

Tweet something to #MycroftAtNDC

Example Skills

(show the code!)

https://github.com/geekygirlsarah/talk-hey_mycroft_getting_started/

@geekygirlsarah #NDCLondon

Example Skills

Send the skill to the world!:

  • Push your code to GitHub
  • Clone the mycroftai/mycroft-skills
  • Add your skill as a submodule
  • Create a PR

@geekygirlsarah #NDCLondon

Conclusion

@geekygirlsarah #NDCLondon

  • Mycroft AI is open source
  • All voice recognition and speech is rendered locally (not in the cloud)
  • Skills are easily to write in Python

"Hey Mycroft": Getting Started with the OSS Home Assistant

By Sarah Withee

"Hey Mycroft": Getting Started with the OSS Home Assistant

  • 1,411