Here is my tutorial to make Jasper work on fedora 20. It’s a veeerrrryyyyyy easy one but it took me some time just to find what was not working correctly.
First of all head to the official tutorial and follow every step of the manual method.
Once everything is install, you should have problem with the phonetisaurus package such as :
WARNING:client.g2p:Command 'phonetisaurus-g2p --model=/mnt/Data/Mad Maker/Jasper/phonetisaurus/g014b2b.fst --input=/tmp/tmpXKWPJ0.g2p --words --isfile' return with exit status 127 WARNING:client.g2p:Command 'phonetisaurus-g2p --model=/mnt/Data/Mad Maker/Jasper/phonetisaurus/g014b2b.fst --input=/tmp/tmpAICArY.g2p --words --isfile' return with exit status 127
status 127 means that the command was not found. Indeed if you try using the command phonetsaurus-g2p by itself, you will have something like :
phonetisaurus-g2p: error while loading shared libraries: libfst.so.1: cannot open shared object file: No such file or directory
However, if you try to input the command
ls -l /usr/local/lib/libfst* in your terminal, you should have this out put if the install was successful :
-rwxr-xr-x. 1 root root 924 29 nov. 16:23 /usr/local/lib/libfst.la -rwxr-xr-x. 1 root root 960 29 nov. 16:23 /usr/local/lib/libfstscript.la lrwxrwxrwx. 1 root root 21 29 nov. 16:23 /usr/local/lib/libfstscript.so -> libfstscript.so.1.0.0 lrwxrwxrwx. 1 root root 21 29 nov. 16:23 /usr/local/lib/libfstscript.so.1 -> libfstscript.so.1.0.0 -rwxr-xr-x. 1 root root 109918335 29 nov. 16:23 /usr/local/lib/libfstscript.so.1.0.0 lrwxrwxrwx. 1 root root 15 29 nov. 16:23 /usr/local/lib/libfst.so -> libfst.so.1.0.0 lrwxrwxrwx. 1 root root 15 29 nov. 16:23 /usr/local/lib/libfst.so.1 -> libfst.so.1.0.0 -rwxr-xr-x. 1 root root 6614868 29 nov. 16:23 /usr/local/lib/libfst.so.1.0.0
One can see that libfst.so.1 is there !! So what is happening ?
Very easy solution you just have to to add ‘/usr/local/lib’ to your LD_LIBRARY_PATH environment variable, e.g.:
since the good softlinks are already here.
Didn’t I said it would be easy ? 😛
One more thing you need to do if you installed pocketsphinx from the yum repos is not to forget to add this :
<br />pocketsphinx: fst_model: '../phonetisaurus/g014b2b.fst' hmm_dir: '/usr/share/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k'
to your Jasper profile. This would be the location of /hub4wsj_sc_8k.
Sadly it’s not over.
Now you have two choice :
- either you use the official Jasper to be sure to have the latest version and you apply the patch I’m going to present next
or you go over to my own Jasper repository and download the fedora20 branch by using
git clone https://github.com/MalcolmMielle/jasper-client -b fedora20
If you chose to download the official Jasper (and in my opinion, you should) here is the only and very small patch that is going to make your life easier.
- Git clone the repo.
- Now, install the library needed by Jasper with
sudo pip install --upgrade setuptools sudo pip install -r jasper/client/requirements.txt
- Once it’s done, start by creating a profile with
- Now launch Jasper with
python jasper.py… Weird, you can hear nothing while Jasper should be talking to you ? It’s actually normal and the patch is here to solve this.
Currently, you need to configure your output soundcard as hw:0,1 and your input soundcard as hw:0,0. It sucks, people from Jasper knows it, and this patch solves the problem. At least in Fedora20.
If you’re too lazy to click on the link (gowd !) then open
client/tts.py and replace line 66 (if it didn’t change) from
cmd = ['aplay', '-D', 'hw:1,0', str(filename)]
cmd = ['aplay', str(filename)]
And you should be able to hear Jasper pretty voice now !
Now you just have to plug some microphone and you’re ready to play with Jasper. =)
That’s all folks.
And go try out my modules for jasper. Any feedback is welcome !