I’m working on a little Raspberry Pi project and I hope to add some simple verbal commands to it. I’m currently playing around with some Open Source Speech/Voice Recognition tools (Also known as Speech To Text or SST). My goal is to adapt the VoxForge to the voices of my family.
- First I tried Pocketsphinx from the CMU Sphinx toolkit. I didn’t like it because it doesn’t seems to be a little bloated, and my Raspberry Pi is not quite fast enough.
- The second tool I’m messing with is the Julius along with instrunctions on Voxforge. It seems promising. I was able to get it working and the recognition works well for my voice, but I can’t seem to get it to recognize my son’s voice. He’s 9… I record his training data and adapted the voxforge Model with it, but so far it I can’t it it to pick up is voice with much accuracy.
- The third tool I’m just now playing with is Kaldi. The latest trunk has voxforge recipes included so I’m eager to try it out. After much much trail and error, I was finally able to get it it complied and working on Ubuntu. I have not attempted to get it going on the Raspberry Pi yet, but I thought I’d share my notes.
KALDI on Ubuntu 16.10
- Install some Required stuff (I’m not sure if you need all of this, but it seems to work)
- sudo apt-get install autoconf automake git libtool subversion wget zlib1g-dev libatlas-base-dev gawk perl grep perl
- Download Kaldi using git
- cd ~/
- git clone https://github.com/kaldi-asr/kaldi.git kaldi-trunk –origin golden
- Read the instructions
- cat ~/kaldi-trunk/INSTALL
- cat ~/kaldi-trunk/tools/INSTALL
- Check for dependencies using the handy included script.
- cd ~/kaldi-trunk
- extras/check_dependencies.sh
- I had an error about bash. In Ubuntu 6.10, the default system shell, /bin/sh, was changed to dash
- I did some searching around and decided to revert back to bash instead of dash. I used the following command to do this.
- sudo dpkg-reconfigure dash
- Check if everything is fixed
- sudo ./check_dependencies.sh
- Output should be: ./check_dependencies.sh: all OK.
- Okay, now according to the documentation I should have been able to compile the tools under ~/kaldi-trunk/tools but they would not compile so I was stuck for awhile
- Fix a problem File ~/kaldi-trunk/tools/openfst-1.6.1/src/include/fst/shortest-path.h
- I could not get the tools to compile so I had to do some digging. I tracked down the errors and figured out the problem was with OpenSFT-1.6.1. To fix it I had to edit one of the files in the OpenFST Source
- Replace the word “auto” with “int” on LINE 77 in file ~/kaldi-trunk/tools/openfst-1.6.1/src/include/fst/shortest-path.h
- nano ~/kaldi-trunk/tools/openfst-1.6.1/src/include/fst/shortest-path.h
- After that obscure problem fixed I was able to compile the tools without problems.
- cd ~/kaldi-trunk/tools
- make
- Fix a problem File ~/kaldi-trunk/tools/openfst-1.6.1/src/include/fst/shortest-path.h
- Finally compile Kaldi
- cd ~/kaldi-trunk/src
- ./configure –shared
- make clean
- make depend
- make
- Now I can start to play with Kaldi and compare it to Julius.
I hope this helps someone else out that is trying to get Kaldi going.
GREAT!