Question

I am attempting to develop a python application on Windows 8 using Eclipse (Juno) IDE with PyDev plugin.

I have my environment set up, with interpreter. Able to run basics like "hello, world!"

I would like to start working with CMUSphinx (Namely pocketsphinx & sphinxbase) to do some voice recognition on the Raspberry Pi (Raspbian, latest), but do not know how to import pocketsphinx and sphinxbase as usable libraries in Windows 8 so that I am able to import them in the Python script and use them like so:

import sphinxbase
import pocketsphinx

I also need to know that if I build my application while importing these two libraries, if the libraries will become part of the application and will be packaged with it so that it will run natively on my Raspberry Pi (Raspbian, latest) without me having to install and associate the libraries with my Pi.

Était-ce utile?

La solution

You need to separate two different issues - running pocketsphinx on Windows with Python and running pocketsphinx on Raspberry Pi with Python.

To run pocketsphinx on Windows with python you need to compile and install python module for Windows. You can do that with the python script python/setup_win32.py. Before running this script you need to compile pocketsphinx first according to the instructions. This script will compile and install python module into required place. For more information on this script read python distutils documentation.

To use pocketsphinx python module on Raspberry Pi which is a normal Linux system you can just compile and install pocketsphinx according to the documentation with standard configure && make && make install. The python module will be compiled automatically and should work as expected.

For more information about Python modules please read the documentation:

Python documentation on modules and packages

How do I install Python packages on Windows?

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top