Practical overview
When it fits
Use PocketSphinx when a development project needs compact, speaker-independent speech recognition, or when audio must be aligned to text already known.
Who it is for
- Developers embedding speech recognition in compact applications
- People building continuous speech transcription workflows
- Users who need word, phone, or state alignment for audio with a known transcript
Documented uses
- Recognize speech in a single-channel audio file or standard-input stream.
- Detect speech segments and return recognized text with timing and probability fields.
- Align a recording to supplied words, with optional phone- or state-level alignment.
Requirements & limits
- The command-line tool expects single-channel, 16-bit PCM input; the README suggests SoX for converting other formats.
- The former bundled audio library has been removed, so audio capture workflows use external tools such as SoX.
- The README describes CMake builds for Linux and Windows but expresses uncertainty about macOS.
- The README identifies the project as open source and directs users to the LICENSE file for terms of use.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install the Python module in a virtual environment
Create a virtual environment and install the PocketSphinx Python module from the repository’s top-level directory.
Before you start
- A Python 3 installation
- A local checkout of the PocketSphinx repository
Steps
Create a virtual environment with the command below.
python3 -m venv ~/ve_pocketsphinxActivate it with
. ~/ve_pocketsphinx/bin/activate.From the repository’s top-level directory, run the command below.
pip install .
Expected outcome
The Python module is installed in the activated virtual environment.
Guide limitations
- This recipe covers installation, not running a recognition task.
- The README says the listed audio dependencies are useful for example code but are not strictly necessary to build and install.
Build and install the C library and bindings
Use CMake to build and install PocketSphinx.
Before you start
- A local checkout of the PocketSphinx repository
- CMake and a build environment
- Access to
/usr/local, or a different install prefix
Steps
From the repository’s top-level directory, configure with
cmake -S . -B build.Build with
cmake --build build.Install with
cmake --build build --target install.
Expected outcome
The C library and bindings are built and installed to the configured prefix.
Guide limitations
- The README says CMake should give reasonable results on Linux and Windows but notes uncertainty about macOS.
- The README directs users without access to
/usr/localto set a different prefix with-DCMAKE_INSTALL_PREFIXin the first CMake command.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- cmusphinx/pocketsphinx · Official homepage title · retained in its source language

