Error installing Pocketsphinx? Raspbian Pi Zero (Raspbian Jessie)

It will probably be marked as duplicate, but I have no luck, so we go.

I am trying to develop "Jarvis" as setup with Python2.7. I'm hoping to use Pocketsphinx as part of this. I tried to do this on my Windows 10 machine, but Pocketsphinx requires Swig, and it completely failed on the Windows 10 machine (I'm still working on it.) So, I went over to my Raspberry Pi Zero, as it is Anyway I will try to implement a real program.

I got Swig to install just fine. None of the problems that Windows 10 experienced. Then I tried to install Pocketsphinx and everything went down to the toilet. After the failure, the installation failed. I read that I need to download a python developer for version 2.7. Got it, and everything seemed to be going well. I got a bunch of things rolling around the screen, and it seemed like it might work. Nope. This is when I got this:

deps / sphinxbase / src / libsphinxad / ad_pulse.c: 44: 30: fatal error: pulse / pulseaudio.h: no such file or directory

turn on

compilation completed.

error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

Clearing ... Command / usr / bin / python -c "import setuptools, tokenize; file = '/tmp/pip-build-Wt0cIJ/pocketsphinx/setup.py'; exec (compilation (getattr (toattize, 'open', open) (file) .read (). replace ('\ r \ n', '\ n'), file, 'exec')) "install --record / tmp / pip-UOA_Nf-record / install-record. txt --single-version-external-managed -compile failed with error code 1 in / tmp / pip -build-Wt0cIJ / pocketsphinx Traceback (last last call): File "/ usr / bin / pip", line 9, in load_entry_point ('pip == 1.5.6', 'console_scripts', 'pip') () File "/usr/lib/python2.7/dist-packages/pip/init.py", line 248, in main return command .main (cmd_args) File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in the main text = '\ n'.join (complete_log) UnicodeDecodeError:' ascii 'codec not can decode byte 0xe2 at position 51: orders out of range number (128)

I really like to look at the bugs today. Has anyone understood me? I admit that I'm still just starting in the programming world, but it makes my brain begin to hiss.

+13
swig raspbian pocketsphinx
source share
2 answers

As Peter Britten mentioned, install on libpulse-dev . I can confirm that this worked for me:

 sudo apt-get install libpulse-dev 
+28
source share

If this still does not work, try installing the following:

 sudo apt-get install portaudio19-dev swig 

I know for sure that this error can also be caused by the lack of installed portaudio19-dev. Swig is also a requirement, but may cause another error. You may also need to install pulseaudio to prevent a RuntimeError.

+1
source share

All Articles