Install & Compatibility
Where this runs
tested against v5.1.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.10
✕ build_error
✕ build_error
py 3.12
✕ build_error
✕ build_error
py 3.9
✕ build_error
✕ build_error
55MB installed
● package 55MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
pocketsphinx
✓ import pocketsphinx
The correct import is just 'import pocketsphinx'. No module alias changed.
Decoder
✓ from pocketsphinx import Decoder
✗ from pocketsphinx import LiveSpeech
LiveSpeech is a convenience wrapper; Decoder is the core class for manual control.
Minimal example using Decoder to process raw audio bytes.
import pocketsphinx
decoder = pocketsphinx.Decoder()
decoder.start_utt('test')
decoder.process_raw(b'Some audio data', False, False)
decoder.end_utt()
print(decoder.hypothesis())
Errors
Common errors & fixes
AttributeError: module 'pocketsphinx' has no attribute 'Decoder'
Incorrect import path. The module is not a package with submodules; `import pocketsphinx` gives the module directly.
fixUse `from pocketsphinx import Decoder` or `import pocketsphinx; decoder = pocketsphinx.Decoder()`.
pocketsphinx.pocketsphinx.Decoder not found
Old API path. v5 removed the nested package.
fixUse `from pocketsphinx import Decoder`.
Upgrade
Version history
5.1.1latest on PyPI · released Jun 6, 2026
Audit
Dependencies
No dependency data recorded yet.