如何在python的模块pocketsphinx中调用模块pocketshinx? 因此,我试图在pocketsphinx模块文件夹中的pocketsphinx.py中使用一个方法,但它给了我一个错误:

如何在python的模块pocketsphinx中调用模块pocketshinx? 因此,我试图在pocketsphinx模块文件夹中的pocketsphinx.py中使用一个方法,但它给了我一个错误:,python,python-3.6,pocketsphinx,Python,Python 3.6,Pocketsphinx,ModuleNotFoundError:没有名为“pocketsphinx.pocketsphinx”的模块;'“pocketsphinx”不是一个包 我不知道发生了什么,因为它可以很好地为斯芬克斯贝斯做同样的事情。“import pocketsphinx”可以工作,但没有输入我需要的确切方法调用decoder\u default\u config。代码如下: 根据网站上的文档,它看起来是正确的用法。你可能缺少依赖项吗?我刚用“pip install pocketsphinx”安装了它,你知道我

ModuleNotFoundError:没有名为“pocketsphinx.pocketsphinx”的模块;'“pocketsphinx”不是一个包

我不知道发生了什么,因为它可以很好地为斯芬克斯贝斯做同样的事情。“import pocketsphinx”可以工作,但没有输入我需要的确切方法调用decoder\u default\u config。代码如下:
根据网站上的文档,它看起来是正确的用法。你可能缺少依赖项吗?我刚用“pip install pocketsphinx”安装了它,你知道我还需要做什么吗?如果你键入
pip show pocketsphinx
它会显示你可能缺少的任何依赖项(比如swig?)'C:\Users\ellag>python-m pip show pocketsphinx名称:pocketsphinx版本:0.1.15摘要:CMU Sphinxbase和pocketsphinx库的python接口主页:作者:Dmitry Prazdnichnov作者电子邮件:dmitry@prazdnichnov.name许可证:BSD位置:c:\users\ellag\appdata\local\programs\python\python36\lib\site软件包需要:Required by:'它似乎没有显示任何内容。根据网站上的文档,它看起来是正确的用法。你可能缺少依赖项吗?我刚用“pip install pocketsphinx”安装了它,你知道我还需要做什么吗?如果你键入
pip show pocketsphinx
它会显示你可能缺少的任何依赖项(比如swig?)'C:\Users\ellag>python-m pip show pocketsphinx名称:pocketsphinx版本:0.1.15摘要:CMU Sphinxbase和pocketsphinx库的python接口主页:作者:Dmitry Prazdnichnov作者电子邮件:dmitry@prazdnichnov.name许可证:BSD位置:c:\users\ellag\appdata\local\programs\python\python36\lib\site软件包需要:要求:'它似乎没有显示任何东西
import pyaudio as py
from pocketsphinx.pocketsphinx import *
from sphinxbase.sphinxbase import *
import glob
import os, sys
model=(r'C:\Users\ellag\AppData\Local\Programs\Python\Python36\Lib\site-packages\pocketsphinx\model')
config = Decoder_default_config()
config.set_string('-hmm', os.path.join(model, 'en-us\en-us'))
config.set_string('-dict', os.path.join(model, 'en-us\cmuict-en-us.dict'))
config.set_string('-kws', os.path.join(model, 'kws_file'))
decoder = Decoder(config)
p = py.PyAudio()
stream = p.open(format=py.paInt16,channels=1,rate=16000,input=True)
stream.start_stream()
While True:
    buf=stream.read(1024)
    Decoder.process_raw(buf, False, False)
    if Decoder.hyp() != None:
        print(seg.word, seg.prob)
        letter=seg.word()