Hello
I've searched this forum and the internet for a similar problem, with no help.
I have a Windows 10 system with the recent built-in Ubuntu shell bash.
(Windows 10 version 1709 and
bash --version returns: GNU bash, version 4.3.11(1)-release (x8664-pc-linux-gnu))
I tried installing pocket sphinx on my Ubuntu bash, by downloading from the website (cmusphinx.github.io) the following packages:
Then, I followed the instructions on directories sphinxbase-5prealpha and pocketsphinx-5prealpha: sudo ./configure
sudo make
sudo make install
The output lines are too many and I cant check if there were any errors, but I guess they would be highlighted or written at the end of the outputs, so I believe there weren't any errors during this installation.
I did the export LD_LIBRARY_PATH and the export PKG_CONFIG_PATH.
When I run pocketsphinx_continuous -inmic yes, after a long number o lines the error occurs: Error opening audio device (null) for capture: Connection refused
(That is an expected error, since I'm running on Windows built-in bash, which doesnt have acess to my systems microfone)
What I want to do is to run pocketsphinx on python, and to do that I ran: sudo apt-get install -qq python python-dev python-pip build-essential swig libpulse-dev (returns no output) pip install --user pocketsphinx which returns
Requirement already satisfied: pocketsphinx in /usr/local/lib/python3.4/dist-packages/pocketsphinx-0.0.9-py3.4-linux-x86_64.egg (0.0.9)
Everything seems normal, but for some reason in python environment the following commands doesnt work: import speechrecognition as sr
r = sr.Recognizer()
harvard = sr.AudioFile('harvard.wav')
with harvard as source:
audio = r.record(source)
r.recognizesphinx(audio)
And i get the following feedback:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/speechrecognition/init.py", line 732, in recognizesphinx
raise RequestError("missing PocketSphinx module: ensure that PocketSphinx is set up correctly.")
speechrecognition.RequestError: missing PocketSphinx module: ensure that PocketSphinx is set up correctly.*</module></stdin>
I don't know if I didn't install something correctly, of if it is just not meant to work on this "ubuntu bash on windows". I want to run recognitions under python scripts. I tried the installation notes for windows but the first step suggests MS Visual Studio 2012 which isn't really what I want.
Can someone help me figure out whats the problem with my instalation?
Or help me how to install within the CLI on windows enviroment?
Any of these solutions would solve my problem.
I'm deeply sorry for the long question, I just wanted to make sure to give every detail in a organized way.
Thank you very much for your time.
Naslausky
Last edit: Eduardo Naslausky 2018-09-04
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your fast answer!
I wont use built-in ubuntu shell bash anymore.
There is no other way to run on Windows normal CLI/python environment?
The pocketSphinx distribution for windows is meant only for visual studio?
I have python for windows. There isnt a way to use it on python?
Sorry if I didnt understand anything, I'm just trying to be sure.
Thanks again!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You have pip from python3 which installs pocketsphinx into python 3 folder. Speech_recognition package is installed for python2.7. You need to choose a single python version and use it consistenly, then it will work. For example, you can install pip from Python 2.7 or you can install speech_recognition with pip3.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello
I've searched this forum and the internet for a similar problem, with no help.
I have a Windows 10 system with the recent built-in Ubuntu shell bash.
(Windows 10 version 1709 and
bash --version returns: GNU bash, version 4.3.11(1)-release (x8664-pc-linux-gnu))
I tried installing pocket sphinx on my Ubuntu bash, by downloading from the website (cmusphinx.github.io) the following packages:
sphinxbase-5prealpha.tar.gz;
pocketsphinx-5prealpha.tar.gz;
sphinxtrain-5prealpha.tar.gz;
Then, I followed the instructions on directories sphinxbase-5prealpha and pocketsphinx-5prealpha:
sudo ./configure
sudo make
sudo make install
The output lines are too many and I cant check if there were any errors, but I guess they would be highlighted or written at the end of the outputs, so I believe there weren't any errors during this installation.
I did the export LD_LIBRARY_PATH and the export PKG_CONFIG_PATH.
When I run pocketsphinx_continuous -inmic yes, after a long number o lines the error occurs:
Error opening audio device (null) for capture: Connection refused
(That is an expected error, since I'm running on Windows built-in bash, which doesnt have acess to my systems microfone)
What I want to do is to run pocketsphinx on python, and to do that I ran:
sudo apt-get install -qq python python-dev python-pip build-essential swig libpulse-dev (returns no output)
pip install --user pocketsphinx which returns
Requirement already satisfied: pocketsphinx in /usr/local/lib/python3.4/dist-packages/pocketsphinx-0.0.9-py3.4-linux-x86_64.egg (0.0.9)
Everything seems normal, but for some reason in python environment the following commands doesnt work:
import speechrecognition as sr
r = sr.Recognizer()
harvard = sr.AudioFile('harvard.wav')
with harvard as source:
audio = r.record(source)
r.recognizesphinx(audio)
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/speechrecognition/init.py", line 732, in recognizesphinx
raise RequestError("missing PocketSphinx module: ensure that PocketSphinx is set up correctly.")
speechrecognition.RequestError: missing PocketSphinx module: ensure that PocketSphinx is set up correctly.*</module></stdin>
I don't know if I didn't install something correctly, of if it is just not meant to work on this "ubuntu bash on windows". I want to run recognitions under python scripts. I tried the installation notes for windows but the first step suggests MS Visual Studio 2012 which isn't really what I want.
Can someone help me figure out whats the problem with my instalation?
Or help me how to install within the CLI on windows enviroment?
Any of these solutions would solve my problem.
I'm deeply sorry for the long question, I just wanted to make sure to give every detail in a organized way.
Thank you very much for your time.
Naslausky
Last edit: Eduardo Naslausky 2018-09-04
This is a source of your troubles. The solution is to install real Linux.
Thanks for your fast answer!
I wont use built-in ubuntu shell bash anymore.
There is no other way to run on Windows normal CLI/python environment?
The pocketSphinx distribution for windows is meant only for visual studio?
I have python for windows. There isnt a way to use it on python?
Sorry if I didnt understand anything, I'm just trying to be sure.
Thanks again!
You have pip from python3 which installs pocketsphinx into python 3 folder. Speech_recognition package is installed for python2.7. You need to choose a single python version and use it consistenly, then it will work. For example, you can install pip from Python 2.7 or you can install speech_recognition with pip3.