で音声認識できたので、pocketsphinx-0.8
無事にインストールできました。Ubuntu 12.04
pocketsphinx_continuous
今のところセットアップ後import pocketsphinx
の方法python
pocketsphinx-0.8
ImportError: No module named pocketsphinx
で音声認識できたので、pocketsphinx-0.8
無事にインストールできました。Ubuntu 12.04
pocketsphinx_continuous
今のところセットアップ後import pocketsphinx
の方法python
pocketsphinx-0.8
ImportError: No module named pocketsphinx
PocketSphinx などのように、大文字と小文字が区別されるに違いありません。
Pythonインタラクティブシェルの関数を使用して検索しhelp()
ます..
matthew@speedy:~/openstack/nova$ python
Python 2.7.3 (default, Sep 26 2012, 21:51:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help()
Welcome to Python 2.7! This is the online help utility.
If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://docs.python.org/2.7/tutorial/.
Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules. To quit this help utility and
return to the interpreter, just type "quit".
To get a list of available modules, keywords, or topics, type "modules",
"keywords", or "topics". Each module also comes with a one-line summary
of what it does; to list the modules whose summaries contain a given word
such as "spam", type "modules spam".
help> modules phinx
Here is a list of matching modules. Enter any module name to get more help.
matplotlib.sphinxext
matplotlib.sphinxext.ipython_console_highlighting - reST directive for syntax-highlighting ipython interactive sessions.
matplotlib.sphinxext.mathmpl
matplotlib.sphinxext.only_directives
matplotlib.sphinxext.plot_directive - A directive for including a matplotlib plot in a Sphinx document.
だから、私にとっては単純なインポートです:
matthew@speedy:~/Downloads/pocketsphinx-0.8$ sudo apt-get install python-pocketsphinx
...
>>> import pocketsphinx
>>> dir(pocketsphinx)
['Decoder', 'LatLink', 'LatLinkIterator', 'LatNode', 'LatNodeIterator', 'Lattice', '__builtins__', '__doc__', '__file__', '__name__', '__package__']
ソースからのインストールは難しかったですが(諦めました)、ubuntu libのインストールは簡単でした。
このサイトは、ソースからインストールするのに役立つようです: http://www.cs.columbia.edu/~ecooper/CS4706/ps-mac.html
pocketphinx が正しくインストールされていれば、このコマンドは機能するはずです。
import pocketsphinx
それでも問題が解決しない場合は、try/except ブロックに入れてください。
try:
import pocketsphinx
except:
pass
import pocketsphinx
Ubuntu に pocketphinx をインストールするには、次のコマンドを使用できます。
sudo apt-get install python-pocketsphinx