Traceback (most recent call last):
File "voice.py", line 2, in <module>
import pocketsphinx
File "sphinxbase.pxd", line 150, in init pocketsphinx (pocketsphinx.c:7935)
ValueError: PyCapsule_GetPointer called with invalid PyCapsule object
I have tried re-install pocketsphinx but it still shows the same error.
Please help.
thank you for patience reading
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It contains new SWIG Python API which should work on your system without PyCapsule issues. You can find examples of new API in pocketsphinx/swig/python/test folder.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a .py file as meintioned below:
import sys
import pocketsphinx
if name == "main":
hmdir = "/usr/share/pocketsphinx/model/hmm/wsj1"
lmdir = "/usr/share/pocketsphinx/model/lm/wsj/wlist5o.3e-7.vp.tg.lm.DMP"
dictd = "/usr/share/pocketsphinx/model/lm/wsj/wlist5o.dic"
wavfile = sys.argv[1]
speechRec = pocketsphinx.Decoder(hmm = hmdir, lm = lmdir, dict = dictd)
wavFile = file(wavfile,'rb')
speechRec.decode_raw(wavFile)
result = speechRec.get_hyp()
print result
but is gives following error:
Traceback (most recent call last):
File "voice.py", line 2, in <module>
import pocketsphinx
File "sphinxbase.pxd", line 150, in init pocketsphinx (pocketsphinx.c:7935)
ValueError: PyCapsule_GetPointer called with invalid PyCapsule object
I have tried re-install pocketsphinx but it still shows the same error.
Please help.
thank you for patience reading
You can download latest sphinxbase and pocketsphinx from github:
http://github.com/cmusphinx
It contains new SWIG Python API which should work on your system without PyCapsule issues. You can find examples of new API in pocketsphinx/swig/python/test folder.