Created
April 19, 2018 22:24
-
-
Save davebenvenuti/0986fc27015bc9db9afe8edb29aa6a6d to your computer and use it in GitHub Desktop.
setup jasper on a new raspberry pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| . Burn raspbian image [TODO url] and start it up | |
| 1. run raspbi-config and setup keyboard layout, enable ssh in interfacing options | |
| 2. Setup wpa_supplicant: | |
| /etc/wpa_supplicant/wpa_supplicant.conf | |
| ``` | |
| country=«your_ISO-3166-1_two-letter_country_code» | |
| ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
| update_config=1 | |
| network={ | |
| ssid="«your_SSID»" | |
| psk="«your_PSK»" | |
| key_mgmt=WPA-PSK | |
| } | |
| ``` | |
| 2. Enable wifi: | |
| ``` | |
| sudo rfkill unblock wlan | |
| ``` | |
| 3. Define wlan0: | |
| /etc/network/interfaces.d/wlan0.conf | |
| ``` | |
| auto wlan0 | |
| allow-hotplug wlan0 | |
| iface wlan0 inet manual | |
| wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf | |
| ``` | |
| 4. run raspi-config, set to wait for network on boot | |
| 5. reboot | |
| 6. install some dependencies and other packages to make life easier | |
| ``` | |
| sudo apt install -y nano git-core python-dev bison libasound2-dev libportaudio-dev python-pyaudio tmux python-setuptools g++-5 | |
| sudo apt remove python-pip | |
| sudo easy_install pip==9.0.0 | |
| sudo ln -sf /usr/bin/g++-5 /usr/bin/g++ | |
| sudo ln -sf /usr/bin/gcc-5 /usr/bin/gcc | |
| ``` | |
| 7. install pocketsphinx | |
| ``` | |
| wget http://downloads.sourceforge.net/project/cmusphinx/sphinxbase/0.8/sphinxbase-0.8.tar.gz | |
| tar -zxvf sphinxbase-0.8.tar.gz | |
| cd ~/sphinxbase-0.8/ | |
| ./configure --enable-fixed | |
| make | |
| sudo make install | |
| wget http://downloads.sourceforge.net/project/cmusphinx/pocketsphinx/0.8/pocketsphinx-0.8.tar.gz | |
| tar -zxvf pocketsphinx-0.8.tar.gz | |
| cd ~/pocketsphinx-0.8/ | |
| ./configure | |
| make | |
| sudo make install | |
| cd .. | |
| sudo easy_install pocketsphinx | |
| ``` | |
| 8. Install CMUCLMTK | |
| ``` | |
| sudo apt install subversion autoconf libtool automake gfortran g++ --yes | |
| svn co https://svn.code.sf.net/p/cmusphinx/code/trunk/cmuclmtk/ | |
| cd cmuclmtk/ | |
| ./autogen.sh && make && sudo make install | |
| cd .. | |
| ``` | |
| 9. Install Phonetisaurus, m2m-aligner and MITLM | |
| ``` | |
| wget http://distfiles.macports.org/openfst/openfst-1.3.4.tar.gz | |
| wget https://github.com/mitlm/mitlm/releases/download/v0.4.1/mitlm_0.4.1.tar.gz | |
| wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/m2m-aligner/m2m-aligner-1.2.tar.gz | |
| wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/phonetisaurus/is2013-conversion.tgz | |
| tar -xvf m2m-aligner-1.2.tar.gz | |
| tar -xvf openfst-1.3.4.tar.gz | |
| tar -xvf is2013-conversion.tgz | |
| tar -xvf mitlm_0.4.1.tar.gz | |
| cd openfst-1.3.4/ | |
| sudo ./configure --enable-compact-fsts --enable-const-fsts --enable-far --enable-lookahead-fsts --enable-pdt | |
| sudo make install # come back after a really long time | |
| cd .. | |
| cd m2m-aligner-1.2/ | |
| sudo make | |
| cd .. | |
| cd mitlm-0.4.1/ | |
| sudo ./configure | |
| sudo make install | |
| cd .. | |
| cd is2013-conversion/phonetisaurus/src | |
| sudo make | |
| cd .. | |
| sudo cp ~/m2m-aligner-1.2/m2m-aligner /usr/local/bin/m2m-aligner | |
| sudo cp ~/is2013-conversion/bin/phonetisaurus-g2p /usr/local/bin/phonetisaurus-g2p | |
| ``` | |
| 10. Build the Phonetisaurus FST model | |
| ``` | |
| wget https://www.dropbox.com/s/kfht75czdwucni1/g014b2b.tgz | |
| tar -xvf g014b2b.tgz | |
| cd ~g014b2b | |
| ./compile-fst.sh | |
| mv ~/g014b2b ~/phonetisaurus | |
| ``` | |
| 11. Clone and setup jasper client | |
| ``` | |
| git clone https://github.com/davebenvenuti/jasper-client.git ~/jasper | |
| cd ~/jasper | |
| sudo pip install -r client/requirements.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment