bambocher/pocketsphinx-python

an error

Opened this issue · 0 comments

hello,
I wanted to use the Speech_recognition library in my Python programs, but I ran into some problems:

Traceback (most recent call last):
File "C:\Users\duo'duo'lan\AppData\Roaming\Python\Python311\site-packages\speech_recognition_init_.py", line 729, in recognize_sphinx
from pocketsphinx import pocketsphinx, Jsgf, FsgModel
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'Jsgf' from 'pocketsphinx' (unknown location)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\PycharmProjects\new_s\货币转换器\demo02.py", line 32, in
test = r.recognize_sphinx(v,language='zh-cn')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\duo'duo'lan\AppData\Roaming\Python\Python311\site-packages\speech_recognition_init_.py", line 732, in recognize_sphinx
raise RequestError("missing PocketSphinx module: ensure that PocketSphinx is set up correctly.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
speech_recognition.RequestError: missing PocketSphinx module: ensure that PocketSphinx is set up correctly.

Can you help me solve this problem? thank you.