--- id: pocketsphinx version: "5.1.1" license: unclear license_treatment: permissive maintenance: active --- # pocketsphinx — Official Python bindings for PocketSphinx License: permissive · Maintenance: active · Downloads: 382.6K/mo ## What it is and what it does PocketSphinx is a mature, speaker-independent continuous speech recognition engine originally developed at Carnegie Mellon University. It provides Python bindings to recognize speech from live microphone streams or pre-recorded audio files, supporting both general speech-to-text transcription and keyword spotting. The package includes built-in language models and dictionaries for US English and can be extended with custom models. The library offers two main interfaces: LiveSpeech for real-time microphone input and AudioFile for processing recorded audio. It depends on sounddevice for audio I/O and requires the PortAudio library on most systems. Development has largely ceased and the engine is acknowledged to be far from state-of-the-art, but it remains actively maintained and is used in production by many projects. Use it for: - Build offline speech-to-text applications that don't require cloud API calls or internet connectivity. - Implement keyword spotting or wake-word detection in IoT or embedded voice applications. - Process batch audio files to extract transcriptions with custom language models. - Create voice command interfaces for desktop or server applications with low latency requirements. - Prototype speech recognition features without dependency on external speech recognition services. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PocketSphinx provides Python bindings for Carnegie Mellon University's open-source speech recognition engine, enabling continuous speech-to-text and keyword spotting from live microphone input or audio files. Yes, if you need offline speech recognition without cloud dependencies and can accept that the engine is mature but no longer state-of-the-art. Install friction is moderate (system library required on Linux/macOS), but prebuilt wheels ease setup. No security vulnerabilities are known. Best suited for keyword spotting, voice commands, and prototyping rather than high-accuracy transcription tasks. ## Install pip install pocketsphinx uv add pocketsphinx poetry add pocketsphinx ## Installing pocketsphinx Before you install: Medium install friction due to compiled wheels and a system dependency: PortAudio (libportaudio2 on Debian) is required for the LiveSpeech class to function. Prebuilt wheels are available for recent Python versions on common platforms. The package is actively maintained with a recent release (69 days old) and 4332 repository stars. License in practice: Licensed under a permissive BSD-like license, which allows commercial and private use with minimal restrictions. No licensing concerns for typical adoption. Quickstart: pip install pocketsphinx from pocketsphinx import LiveSpeech for phrase in LiveSpeech(): print(phrase) PortAudio library must be installed on the system (libportaudio2 on Debian-like systems) for LiveSpeech to work; AudioFile class does not require it. Verify before relying: - Whether the package's accuracy and model quality meet requirements for production speech recognition tasks. - Performance characteristics and latency for real-time transcription on typical hardware. - Availability and quality of language models beyond the default US English model. ## Package facts - License: not declared (permissive) - Python support: unspecified - Install friction: medium - Maintenance: active - Downloads: 382.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags speech recognition python, speech to text offline, keyword spotting audio, live microphone transcription, audio file speech recognition, asr library python, continuous speech recognition, speech-recognition, offline-asr, keyword-spotting [View on SkillFed](https://skillfed.io/packages/pocketsphinx) · [View on PyPI](https://pypi.org/project/pocketsphinx/)