Speak Easy with Raspberry Pi

Installing a speech-to-text machine learning model on a Raspberry Pi does not have to be a pain with the help of Dmitry Maslov's guide.

Nick Bild
9 months agoMachine Learning & AI
The fast way to speech-to-text capabilities (📷: Hardware.ai)

With recent architectural advances in the design of machine learning models, they are running smoothly on less powerful hardware platforms than ever before. And this fact has allowed us hackers to include machine learning-powered capabilities into all manner of projects that we work on. The exact tools used vary for each use case, but a very common need is in converting speech to text. This allows for verbal commands to be given to a computer, which can control a smart home, interact with a large language model chatbot, or just about anything else.

But just because we can do these things now does not mean that they are always easy to do. It is not at all uncommon that installing all the dependencies and frameworks, and troubleshooting problems will lead to hours and hours of work. And since installing that speech-to-text model is just a supporting function, not the main point of your project, it can be an unwelcome diversion that distracts you from the real problems that you need to solve.

Dmitry Maslov feels your pain and knows that while you may need to install a speech-to-text model on your Raspberry Pi, NVIDIA Jetson, or other development board, it is not something you want to waste time on. So, Maslov put together a brief video tutorial to help you make short work of this chore. By following a few steps, you can have your own speech-to-text system up and running in a matter of minutes, without it taking your focus off of more important goals.

In the video, a Raspberry Pi with a fresh copy of Raspberry Pi OS is used for demonstration purposes (although, other single board computers can be used similarly). Just a few dependencies, like git and pip, need to be installed, then a fork of whispercpp created by Maslov to correct some issues with the source repository must be cloned. After issuing a few more commands, the system is already accurately transcribing spoken language.

So how does it work, you ask? Right out of the box, it is already very close to real-time. Not bad at all! But what if your project is already heavily taxing your poor little single board computer, and you do not have any spare processor cycles? No problem, Maslov also discusses how faster-whisper can be integrated into whispercpp. This package offers the same speech-to-text capabilities, but is far faster than real-time. In one demonstration, an 11 second audio clip was shown to be transcribed in about 1.5 seconds.

If you have a need for voice control in any upcoming projects, be sure to check out the video. There are also some helpful links in the video’s description to get you on your way.

Nick Bild
R&D, creativity, and building the next big thing you never knew you wanted are my specialties.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles