You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 27, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 27, 2023. It is now read-only.
Python pocketsphinx 'module' object has no attribute 'Decoder' #3
And from ipython the import sometimes work (and I get the Decoder), sometimes I receive the error ValueError: PyCapsule_GetPointer called with invalid PyCapsule object
Traceback (most recent call last):
File "fa2.py", line 14, in <module>
ps = Pocketsphinx(**config)
File "/usr/local/lib/python2.7/site-packages/pocketsphinx/__init__.py", line 90, in __init__
super(Pocketsphinx, self).__init__(config)
File "/usr/local/lib/python2.7/site-packages/pocketsphinx/pocketsphinx.py", line 273, in __init__
this = _pocketsphinx.new_Decoder(*args)
RuntimeError: new_Decoder returned -1
Activity
Arti3DPlayer commentedon Apr 12, 2015
print dir(ps)['builtins', 'doc', 'file', 'loader', 'name', 'package', 'path']print ps.__file__sebpiq commentedon Jun 18, 2015
Same error here :(
sebpiq commentedon Jun 18, 2015
And from ipython the import sometimes work (and I get the
Decoder), sometimes I receive the errorValueError: PyCapsule_GetPointer called with invalid PyCapsule objectsidja commentedon Sep 25, 2015
Same here
nshmyrev commentedon Oct 17, 2015
PyCapsule error means you are using very outdated pocketsphinx version 0.8. Please use latest version.
Our model is now .lm.bin
Virenferns commentedon Apr 18, 2019
I am facing this error while running this code:
TypeError: init() got an unexpected keyword argument 'hmm'
CODE:
from os import environ, path
import sys,os
import pocketsphinx as ps
import sphinxbase
print (dir(ps))
MODELDIR = "C:\Anaconda3\Lib\site-packages\pocketsphinx\model"
DATADIR = "C:\Anaconda3\Lib\site-packages\pocketsphinx\data"
def decodeSpeech(hmmd,lmdir,dictp,wavfile):
speechRec = ps.Decoder(hmm = hmmd, lm = lmdir, dict = dictp)
wavFile = os(wavfile,'rb')
wavFile.seek(44)
speechRec.decode_raw(wavFile)
result = speechRec.get_hyp()
return result[0]
if name == "main":
hmdir = path.join(MODELDIR, 'en-us/en-us')
lmd = path.join(MODELDIR, 'en-us/en-us.lm.bin')
dictd = path.join(MODELDIR, 'en-us/cmudict-en-us.dict')
wavfile = path.join(DATADIR, 'goforward.raw')
recognised = decodeSpeech(hmdir,lmd,dictd,wavfile)
sairajrapuru commentedon Aug 20, 2019
This results in :
Request @bambocher to re-open this issue.