Question · Dictation software
Can you run voice recognition software on a Raspberry Pi?
Yes. Open-source engines such as Vosk and whisper.cpp are published on GitHub and run offline on a Raspberry Pi, including a Raspberry Pi 4. Small models trade accuracy for size, so a Pi suits voice commands and short phrases better than long dictation into a document.
Updated October 17, 20263 min read8 cited facts, each traced to its source
Yes. Free, open-source speech recognition engines run offline on a Raspberry Pi, and you can download them from GitHub. The two engines to try are Vosk and whisper.cpp. Both need a small model. The result is good enough for voice commands and short phrases, but it is slower and less accurate than dictating on a laptop, so for long documents a desktop computer is still the better tool. Our overview of open-source dictation apps on GitHub covers the desktop options, and the dictation software overview compares every kind of app.
Open-source engines are built to run offline on a Pi
Vosk is an offline speech recognition API, and its project says it works offline "even on lightweight devices" such as the Raspberry Pi 1. Because the engine runs on the board itself, your speech does not need a network connection.
whisper.cpp is a C and C++ port of OpenAI's Whisper model. Its maintainer ran the tiny English model in real-time examples on a Raspberry Pi 4 Model B using 3 CPU threads 2. Those examples used a reduced encoder context and a USB camera's microphone, so treat them as proof that it works, not as a guarantee of your results.
Model size decides whether it fits and how well it hears you
A Pi has far less memory and processing power than a laptop, so the model you choose matters more than the engine. Vosk's small models are about 50 MB on disk and need about 300 MB of memory while they run 3. Larger models are the ones that stop fitting.
Small models trade accuracy for size. Accuracy also depends on the room, the microphone, the speaker's accent and the vocabulary. Vosk's own accuracy guide says modern systems can be very good at one time and poor at another 4. Test with your own voice and mic before you build anything on it. Accuracy is measured as a word error rate, and a published test figure is a starting point, not a promise for your room.
Speed depends on the job, not the board
Speed is where a Pi struggles most. Home Assistant's documentation says Whisper takes around 8 seconds to process a voice command on a Raspberry Pi 4 5. That is too slow for a conversation, but it is a single command, not a page of dictation.
Home Assistant's closed-ended model, Speech-to-Phrase, transcribes in under one second even on a Raspberry Pi 4 6. It only transcribes phrases it already knows. Its README says it is "not a general purpose speech recognition system" 7. That is the trade the Pi makes well: a short list of commands, fast and offline, instead of open-ended transcription.
It depends on what you want to say
- Voice commands for a home or robot. A Pi works well. Use a small model or a closed-ended system like Speech-to-Phrase, and keep the vocabulary short.
- Short notes or search terms. A small Vosk model or the tiny whisper.cpp model can be usable, but expect misheard words and check every result.
- Long dictation into a document. Use a laptop or desktop with a larger model. A Pi has too little processing power for this to feel responsive.
- Desktop dictation apps. The apps in our guide are built for computers. Handy lists Windows, macOS and Linux 8, so check each project's release page before you try to run it on a Pi.
For Linux desktops more generally, see how to use Whisper for dictation on Linux.
What to do
- Pick the engine by job. Choose Vosk when you want to call the engine from a script, for commands. Choose whisper.cpp when you want general transcription from a file or microphone.
- Start with the smallest model that understands you. Test it with the microphone you will use, in the room where you will use it.
- Time a real clip. If processing takes longer than the audio, you cannot keep up in real time. Check your result against the real-time factor, then switch to a smaller model, a closed-ended command set, or a desktop.
- Read the license of each project and model. Engines, models and apps can carry different terms, so check the repository you use before you ship anything.
- Measure accuracy on your own speech. A few minutes of your own test clips will tell you more than any figure in this answer.
Evidence
Every number on this page, with where it comes from. Open a fact to see the exact words in its source.
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
Go deeper
Related questions
- Is VoiceInk free and open source?
- What is the Handy dictation app?
- What is the Hex dictation app?
- Can you upgrade an old Dragon NaturallySpeaking to version 15 or 16?
- Does Apple have a voice to text app?
- Does Dragon NaturallySpeaking need an internet connection?
- Does Dragon NaturallySpeaking use AI?
- Does Dragon NaturallySpeaking work over Remote Desktop?