0
votes

Ok, so far I ran the following commands using brew to install the following packages in a newly created virtual environment (in order):

brew install python
brew install --HEAD watsonbox/cmu-sphinx/cmu-sphinxbase
brew install --HEAD watsonbox/cmu-sphinx/cmu-pocketsphinx
brew install gst-python
brew install gtk+

Including all dependencies (as brew automatically does this).

And with this, I can successfully run the pocketsphinx install check:

pocketsphinx_continuous -inmic yes

However, I cannot seem to run the code at the end of this tutorial. Is this because I omitted a package to install, or is it that it isn't this easy to install pocketsphinx with gstreamer?

There are two problems that arise. One is with creating the pipeline:

self.pipeline = gst.parse_launch('autoaudiosrc ! audioconvert ! audioresample ! pocketsphinx ! fakesink')

I get this error:

GLib.Error: gst_parse_error: no element "autoaudiosrc" (1)

When I look it up, I find another problem with using the following command to confirm my integration of gstreamer with pocketsphinx:

gst-inspect-1.0 pocketsphinx

Terminal returns the following:

No such element or plugin 'pocketsphinx'

More researching, I find that I needed to export the GST_PLUGIN_PATH in the .bash_profile, once done so, the error remains.

My final conclusion is that the file pocketsphinx.so is missing from my /usr/local/lib/gstreamer-1.0 path. Any ideas of where I went wrong in the installation process, or if I completely installed it the wrong way in the first place?

I am currently using OSX v10.11.3 and Python 2.7.11.

1
You need to add more details on what fails exactly. You need to provide software versions you use, exact commands you run and the output logs. You do not need to install gtk or gstreamer to run pocketsphinx, the example files to use pocketsphinx with python are provided in pocketsphinx sources. - Nikolay Shmyrev
Sorry, i'm kinda still new to the whole asking question process. Updated the question with far more clarification. - satvikb

1 Answers

1
votes

The problem of missing "pocketsphinx" seems different with missing of other elements (such as "autoaudiosrc").

Did you solve problem with "autoaudiosrc" after use GST_PLUGIN_PATH? If it still remains, that means you have not installed GStreamer plugins packages.

GStreamer is divided to many packages:
- gstreamer (core framework)
- gst-plugins-base
- gst-plugins-good
- gst-plugins-bad
- gst-plugins-ugly
- gst-libav
- gst-python
...
(full list here https://gstreamer.freedesktop.org/modules/)

You only install gst-python, so probably you just have gstreamer core and gst-python.

For the case with "pocketsphinx.so", maybe it is installed to another directory. Try searching for it, and point GST_PLUGIN_PATH there.