cmusphinx/pocketsphinx
FreeA small speech recognizer
FreeFree tier
About cmusphinx/pocketsphinx
PocketSphinx is Carnegie Mellon University's open-source, lightweight speech recognition engine designed for large-vocabulary, speaker-independent, continuous speech recognition. Despite its older algorithms (some dating back to the 1970s), it remains useful for applications requiring compactness and efficiency, such as embedded systems and offline recognition. It processes single-channel 16-bit PCM audio via command-line or Python bindings and includes default acoustic and language models. Version 5.1.1 uses CMake for building and has no dependency on SphinxBase.
Key Features
Large vocabulary continuous speech recognition
Speaker-independent operation
Compact and efficient design suitable for embedded systems
Command-line interface for recognizing single-channel 16-bit PCM audio
Python bindings for integration (via pip install from source)
Default acoustic and language models included
No dependency on SphinxBase (self-contained)
CMake-based build system across Linux and Windows
Pros & Cons
Pros
- Fully open-source with permissive license
- Lightweight and efficient, runs on limited hardware
- Well-established project with decades of development history
- Python support via Cython bindings
- No external cloud dependency – entirely offline
Cons
- Recognition accuracy is lower than modern deep learning-based systems
- Only supports single-channel 16-bit PCM audio (requires conversion for other formats)
- No built-in audio capture library; relies on external tools like sox or ffmpeg
- Documentation is minimal, primarily README and command-line help
Best For
Embedded speech recognition on Raspberry Pi or similar devicesOffline voice commands in desktop applicationsAcademic research and experimentation with older ASR techniquesLightweight speech-to-text for low-resource environments
FAQ
What is PocketSphinx?
PocketSphinx is an open-source, lightweight speech recognition engine developed by Carnegie Mellon University. It supports large-vocabulary, speaker-independent, continuous speech recognition.
What audio format does PocketSphinx support?
It expects single-channel 16-bit PCM audio. For other formats, use tools like sox or ffmpeg to convert.
How do I install PocketSphinx on Linux?
Use CMake (cmake -S . -B build && cmake --build build && cmake --build build --target install) or install the Python module via pip from a virtual environment after cloning the repository.
Is PocketSphinx still maintained?
The GitHub repository shows active development with frequent commits, and the latest version as of the README is 5.1.1.