filmov
tv
How to Create a Custom Skill for Mycroft AI Voice Assistant on Raspberry Pi | Digi-Key Electronics
Показать описание
In this tutorial, we will build a custom skill for the Mycroft AI voice assistant to listen for custom phrases, respond with a voice prompt, and control some hardware.
Smart speakers use voice assistants, like Alexa and Siri, to respond to spoken commands and perform a number of tasks, such as giving us the weather forecast, news updates, search results, etc. They can even order items and play games with us.
However, many of the popular voice assistants are proprietary, which are difficult to customize. As a result, we can turn to the open-source Mycroft AI platform if we want to easily implement our own functionality, which is known as a “skill.”
In this tutorial, we show you how to load the Mycroft AI service onto a Raspberry Pi using a pre-built image known as Picroft. We register the device on the Mycroft homepage, as the voice assistant requires powerful machine learning programs that run on Internet-connected servers.
Next, we connect an LED and servomotor to the Raspberry Pi and install dependencies that will allow us to control the hardware via Python.
Finally, we create a custom Mycroft skill using Python that listens for a couple of key phrases and responds by blinking the LED and moving the servo. The skill will also respond using a custom phrase with Mycroft’s voice synthesis program.
The written form of this guide can be found here:
The idea for this tutorial came from Jayy’s desire for a companion bot that can hold a conversation or perform simple actions when requested. By using a voice assistant program, we can begin to create something that approximates artificial intelligence and offer a higher degree of interaction with humans.
Creating a Mycroft skill requires implementing several functions in a custom class that inherits the MycroftSkill class. Mycroft will automatically instantiate an object of our class and call certain functions within that class. We use a decorator and callback function to handle commands that have been interpreted by Mycroft’s intention parser and that match our declared intention statements.
Product Links:
Raspberry Pi 4B:
Pololu Micro Maestro servo controller:
Related Videos:
Jayy’s companion bot with Mycroft AI:
Related Project Links:
How to Create a Custom Skill for Mycroft AI on Raspberry Pi:
Related Articles:
Python Programming Tutorial: Getting Started with the Raspberry Pi:
Learn more:
Smart speakers use voice assistants, like Alexa and Siri, to respond to spoken commands and perform a number of tasks, such as giving us the weather forecast, news updates, search results, etc. They can even order items and play games with us.
However, many of the popular voice assistants are proprietary, which are difficult to customize. As a result, we can turn to the open-source Mycroft AI platform if we want to easily implement our own functionality, which is known as a “skill.”
In this tutorial, we show you how to load the Mycroft AI service onto a Raspberry Pi using a pre-built image known as Picroft. We register the device on the Mycroft homepage, as the voice assistant requires powerful machine learning programs that run on Internet-connected servers.
Next, we connect an LED and servomotor to the Raspberry Pi and install dependencies that will allow us to control the hardware via Python.
Finally, we create a custom Mycroft skill using Python that listens for a couple of key phrases and responds by blinking the LED and moving the servo. The skill will also respond using a custom phrase with Mycroft’s voice synthesis program.
The written form of this guide can be found here:
The idea for this tutorial came from Jayy’s desire for a companion bot that can hold a conversation or perform simple actions when requested. By using a voice assistant program, we can begin to create something that approximates artificial intelligence and offer a higher degree of interaction with humans.
Creating a Mycroft skill requires implementing several functions in a custom class that inherits the MycroftSkill class. Mycroft will automatically instantiate an object of our class and call certain functions within that class. We use a decorator and callback function to handle commands that have been interpreted by Mycroft’s intention parser and that match our declared intention statements.
Product Links:
Raspberry Pi 4B:
Pololu Micro Maestro servo controller:
Related Videos:
Jayy’s companion bot with Mycroft AI:
Related Project Links:
How to Create a Custom Skill for Mycroft AI on Raspberry Pi:
Related Articles:
Python Programming Tutorial: Getting Started with the Raspberry Pi:
Learn more:
Комментарии