Open ialex87 opened 8 years ago
If you would like to send me a message, I am happy to host these for the forum. I think it would be a big help.
I have requested access to the files, please let me know if you give access
I thought it was opened. Now access is open for sure ;)
Hi MrDeath, The link to sphinxbase is the same as from pocketsphinx. Can you post the correct link to sphinxbase? Thanks, Robin
Hey, thanks for correction. I have updated it.
This is great help, so thanks a lot!
Will your packages work with Phonetisaurus from the experimental debian repo?
What steps are still required to be made? So far I found
Did I miss something ( as it's not working properly at the moment )
As I remember Phonetisaurus it's already build, and it's in official documentation. and Yes, should work. :)
On Thu, Jan 21, 2016 at 9:45 AM, Patrick Steiner notifications@github.com wrote:
This is great help, so thanks a lot!
Will your packages work with Phonetisaurus from the experimental debian repo?
What steps are still required to be made? So far I found
- cloneing and building Jasper itself
- building Phonetisaurus model
Did I miss something ( as it's not working properly at the moment )
— Reply to this email directly or view it on GitHub https://github.com/jasperproject/jasper-client/issues/436#issuecomment-173517813 .
Kind regards,
Iepuras Alex IT system engineer Mob : +373 68105008 Skype : alex_iepuras e-mail : iepurasalex@gmail.com Web : www.ialex.info http://ialex.info
Sorry to ask again, but already did spend more time then with any other tech on this ..
Is my assumption correct, that after installing your packages the only thing left to do is
Thanks again, Patrick
I would suggest you to go through install documentation, but instead of compiling from sources sphinx and other, just install them from deb packages.
On Thu, Jan 21, 2016 at 9:58 AM, Patrick Steiner notifications@github.com wrote:
Sorry to ask again, but already did spend more time then with any other tech on this ..
Is my assumption correct, that after installing your packages the only thing left to do is
- cloneing and building Jasper itself
- building Phonetisaurus model
Thanks again, Patrick
— Reply to this email directly or view it on GitHub https://github.com/jasperproject/jasper-client/issues/436#issuecomment-173521604 .
Kind regards,
Iepuras Alex IT system engineer Mob : +373 68105008 Skype : alex_iepuras e-mail : iepurasalex@gmail.com Web : www.ialex.info http://ialex.info
Hi, just wondering if you are going to create a Phonetisaurus package. The one from the experimental repository gives the following error:
The following packages have unmet dependencies:
So it would be great to get a package for phonetisaurus as well.
Thanks in advance. Robin
Updated phonetisaurus https://drive.google.com/open?id=0ByR-0pXyV40pX3dybHphaFVZZ1U As I remember, you should add it last. Just run .sh script to install it.
Is Phonetisaurus still supposed to be downloaded via the extra
repository (as described under Installing Phonetisaurus, m2m-aligner and MITLM
in http://jasperproject.github.io/documentation/installation/#installing-sphinx)? I get the following error if I install just your packages:
ERROR:client.vocabcompiler:Fatal compilation Error occured, cleaning up...
Traceback (most recent call last):
File "/home/pi/jasper/client/vocabcompiler.py", line 163, in compile
self._compile_vocabulary(phrases)
File "/home/pi/jasper/client/vocabcompiler.py", line 271, in _compile_vocabulary
self._compile_dictionary(vocabulary, self.dictionary_file)
File "/home/pi/jasper/client/vocabcompiler.py", line 320, in _compile_dictionary
g2pconverter = PhonetisaurusG2P(**PhonetisaurusG2P.get_config())
File "/home/pi/jasper/client/g2p.py", line 90, in __new__
"$PATH.")
OSError: Can't find command 'phonetisaurus-g2p'! Please check if Phonetisaurus is installed and i
n your $PATH.
So I got it to work, finally! Here are my notes to install Jasper on the latest Raspbian:
raspi-config
, expand the file system, reboot/etc/network/interfaces
:
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.51
netmask 255.255.255.0
gateway 192.168.1.1
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.52
netmask 255.255.255.0
#gateway 192.168.1.1 # can only have 1 gateway directive in this file
# see http://raspberrypi.stackexchange.com/questions/13895/solving-rtnetlink-answers-file-exists-when-running-ifup
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
/etc/wpa_supplicant/wpa_supplicant.conf
:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="your SSID here"
psk="your PSK here"
}
sudo apt-get update
sudo apt-get upgrade --yes
sudo apt-get install vim git-core python-dev python-pip bison libasound2-dev libportaudio-dev python-pyaudio --yes
phonetisaurus.tgz
sudo dpkg --install cmuclmtk_0.8-1_armhf.deb pocketsphinx_0.8-1_armhf.deb openfst_1.3.4-1_armhf.deb sphinxbase_0.8-1_armhf.deb
sudo apt-get install htop iotop tmux vim
find / -name "alsa.conf" 2>/dev/null
(can also be alsa-base.conf
on older raspbian) => /usr/share/alsa/alsa.conf
speaker-test
(worked for me)arecord tmp.wav
(didn't work for me)arecord -l
card 1
=> edit /usr/share/alsa/alsa.conf
: defaults.pcm.card 0
=> defaults.pcm.card 1
arecord tmp.wav
should work nowspeaker-test
doesn't work anymore, but speaker-test -Dplughw:0,0
does. Remember the plughw:0,0
for later. You can find this using aplay -l
. Might differ on your system, use aplay -l
and test around until you hear sound.nano ~/.bash_profile
:export LD_LIBRARY_PATH="/usr/local/lib"
source .bashrc
nano ~/.bashrc
LD_LIBRARY_PATH="/usr/local/lib"
export LD_LIBRARY_PATH
PATH=$PATH:/usr/local/lib/
export PATH
git clone https://github.com/jasperproject/jasper-client.git jasper
sudo pip install --upgrade setuptools; sudo pip install -r jasper/client/requirements.txt
chmod +x ~/jasper/jasper.py
phonetisaurus.tgz
. cd
into the extracted directory and run ./compile-fst.sh
. Might have to use export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
if you haven't resourced your .bashrc
(e.g. . ~/.bashrc
or re-login). Take a break now, this can take a while
Move the compiled files with mv ~/g014b2b ~/phonetisaurus
sudo reboot
cd jasper/client; python populate.py
. Here's what mine looks like:carrier: ''
first_name: Thomas
gmail_password: ''
last_name: Toye
phone_number: ''
prefers_email: true
stt_engine: sphinx
timezone: Europe/Brussels
espeak
: sudo apt-get install espeak
sudo apt-get install python-pymad; sudo pip install --upgrade gTTS
/home/pi/jasper/jasper.py
ImportError: cannot import name IncompleteRead
: sudo apt-get remove python-pip; sudo easy_install pip
(or pip install requests -U
)Phonetisaurus 0.7.8 is no longer available since Google Code is dead, so we grab an archive that contains it and use that. Phonetisaurus 0.8.0x did not compile for me.
sudo apt-get install subversion autoconf libtool automake gfortran g++ --yes
wget https://mitlm.googlecode.com/files/mitlm-0.4.1.tar.gz
wget https://m2m-aligner.googlecode.com/files/m2m-aligner-1.2.tar.gz
cd m2m-aligner-1.2/
sudo make
cd mitlm-0.4.1/
sudo ./configure
sudo make install
wget https://www.dropbox.com/s/1bgavg07qx8fe5w/phonetisaurus-googlecode-archive.tgz?dl=0
tar xzf phonetisaurus-googlecode-archive.tgz?dl=0
cd phonetisaurus-googlecode-archive/downloads
tar xzf phonetisaurus-0.7.8.tgz
cd phonetisaurus-0.7.8/src
sudo make
sudo cp ~/builds/phonetisaurus-googlecode-archive/downloads/phonetisaurus-0.7.8/phonetisaurus-g2p /usr/local/bin/phonetisaurus-g2p
sudo cp ~/builds/m2m-aligner-1.2/m2m-aligner /usr/local/bin/m2m-aligner
Change this line
cmd = ['aplay', '-D', 'plughw:1,0', str(filename)]
To this
cmd = ['aplay', '-D', 'plughw:0,0', str(filename)]
~/jasper/jasper.py
. It should work now!Thanks for these detailed steps @thomastoye!
Please whoever is keeping the latest version please contact me, as I am working on a place to store these for the community, and if we worked together it would be 1000x easier.
@thomastoye, thanks for writing this down. This saves lots of people time!
How is your experience on a RPi2? The level of recognised words is very poor on my setup and was wondering how others are experiencing Jasper.
Did you use any overclocking?
@PatrickSteiner
I'm on a Raspberry Pi B+, no RPI 2 yet. I, too, found the level of recognized words very low. I tested Google's STT, and found it to be much better than PocketSphinx but I quickly hit the API limit (and I don't want everything I say flowing to Google). I've found it to be workable though, since it just listens for keywords. I see things like "INFO:client.stt:Transcribed: ['GARBLE GARBLE TIME WARBLE GARBLE']" in the console, but it still works fine.
try wit.ai it's better :)
@thomastoye
Thanks for the guide. My input would be that I wouldn't edit the /usr/share/alsa/alsa.conf
file.
Just create a new conf file like so sudo nano /etc/asound.conf
and add your config there.
So for example, in your instructions where you change the system alsa.conf file:
defaults.pcm.card 0 => defaults.pcm.card 1
Instead you would create the new asound.conf file
sudo nano /etc/asound.conf
and add
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}
I'm using Raspbian Jessie and I've been able to install from the repositories. However, in my profile.yml
I had to replace this line:
hmm_dir: '/usr/local/share/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k'
by this other line:
hmm_dir: '/usr/share/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k'
I know this has been said already but is it possible to get these steps updated on the docs? If I saw this three days ago it would have saved me a whole lot of head banging, keyboard smashing debugging. @MrDeath, @thomastoye, @crespum, your comments saved me.
@thomastoye thanks for sharing your notes. Just want to add new links where to download mitlm and m2m.
mitlm 0.4.1 https://github.com/mitlm/mitlm/releases/download/v0.4.1/mitlm_0.4.1.tar.gz
m2m-aligner https://m2m-aligner.googlecode.com/files/m2m-aligner-1.2.tar.gz
Another thing is the last instruction. The code below can be found in ~/jasper/clients/tts.py
cmd = ['aplay', '-D', 'plughw:0,0', str(filename)]
When I try to compile phonetisaurus with the version downloaded with the dropbox link above I get the following compile errors:
mkdir -p ../bin ../lib ../phonetisaurus ../rnnlm
g++ -std=c++0x -fPIC -Wall -Wno-sign-compare -O2 -I3rdparty/sparsehash -I3rdparty/utfcpp -I3rdparty/rnnlm -std=c++11 -c util.cc -o util.o
In file included from /usr/local/include/fst/label-reachable.h:34:0,
from /usr/local/include/fst/lookahead-matcher.h:28,
from /usr/local/include/fst/lookahead-filter.h:29,
from /usr/local/include/fst/compose.h:31,
from /usr/local/include/fst/fstlib.h:63,
from util.h:32,
from util.cc:30:
/usr/local/include/fst/interval-set.h: In member function ‘void fst::IntervalSet
Any idea why that is? Installed openfst from the deb-package from the first post in this thread.
Thank you, that worked for me. But I suggest to update the documentation of the install process. It seems to be slightly outdated.
Actually I just wanted to share with you deb binary packages for PocketSphinx STT. It's a pain in the ass to compile them, and it's not "right way" to install them by "make install". Use the right way, and track you packages.
So please welcome binary files compiled on rPi2.
cmuclmtk_0.8-1_armhf.deb - https://drive.google.com/open?id=0ByR-0pXyV40paVR4R3Ryd09XWUU openfst_1.3.4-1_armhf.deb - https://drive.google.com/open?id=0ByR-0pXyV40pNlZZY0p6MUVpWW8 pocketsphinx_0.8-1_armhf.deb - https://drive.google.com/open?id=0ByR-0pXyV40pLTR1T3ZnM0xNdFE sphinxbase_0.8-1_armhf.deb - https://drive.google.com/open?id=0ByR-0pXyV40pdlpqMmhQQk9odDg
Phonetisaurus - https://drive.google.com/open?id=0ByR-0pXyV40pX3dybHphaFVZZ1U