Thom Rogers
Thom Rogers

Reputation: 1433

Create modules for Linux install of PocketSphinx?

I am trying to get Python 3.4 working with PocketSphinx on a Linux (Ubuntu 14.04 OS) machine. Yesterday, I successfully installed both sphinxbase-5prealpha and pocketsphinx-5prealpha. I confirmed my install by successfully running pocketsphinx_continuous -inmic yes

I'm trying to move on to the Python API for but can't find the python modules (sphinxbase and pocketsphinx) anywhere in my directories. I searched the web but can only find references to installing/creating a pocketsphinx file as relates to Windows install.

How do I create modules sphinxbase and pocketsphinx in my Linux installation? And where should they live in relation to ../MySphinxDirectory?

Upvotes: 1

Views: 787

Answers (1)

Gunther
Gunther

Reputation: 2665

You can install the python modules for pocketsphinx and sphinxbase through pip.

Just run:

sudo pip install pocketsphinx

The sphinxbase module is a requirement of pocketsphinx so it will be installed automatically when you install the pocketsphinx package.

Then in your python program, you should be able to import modules from them using:

from pocketsphinx.pocketsphinx import ...
from sphinxbase.sphinxbase import ...

The pocketsphinx repository includes an example you can test with if you do not already have one.

Upvotes: 2

Related Questions