因爲我第一次安裝 JUICER時遇到了不少問題,如今把這些問題都記錄下來,給一樣第一次安裝使用的同窗一點借鑑。html
前面已經安裝了Torch3和Tracter,這都是爲安裝Juicer作的準備,如今安裝Juicer也容易了。flex
1,下載源碼ui
wget http://juicer.amiproject.org/juicer/sources/juicer-1.0.tar.gzspa
2,編譯準備.net
首次編譯結果命令行
- -- checking for module 'tracter'
- -- found tracter, version 1.0
- -- checking for module 'torch'
- -- package 'torch' not found
- -- HTK not found
- -- libresample not found
- -- RtAudio not found
- -- Found SPTK: /usr/lib/libSPTK.a
- -- Configuring done
- -- Generating done
- -- Build files have been written to: /juicer/dep/juicer-1.0/build
修改FindTorch3.cmake文件,操做以下:xml
- set(TORCH3_DIR "/juicer/dep/Torch3")
修改FindHTK.cmake文件,操做以下:htm
- set(HTK_DIR "/juicer/dep/htk/")
修改FindLibResample.cmake文件,操做以下:blog
- set(LIBRESAMPLE_DIR "/usr")
- ....
- set(LIBRESAMPLE_LIBRARIES
- ${LIBRESAMPLE_DIR}/lib64/libresample.so
- )
修改FindRtAudio.cmake文件,操做以下:ip
- set(RTAUDIO_DIR "/juicer/dep/rtaudio-4.0.11/")
若是不這麼修改的話,就設置環境變量,效果是同樣的。
3,編譯
- cmake -D CMAKE_INSTALL_PREFIX=/usr/local/juicer/ ../
結果以下:
- [root@localhost build]# cmake -D CMAKE_INSTALL_PREFIX=/usr/local/juicer/ ../
- -- checking for module 'torch'
- -- package 'torch' not found
- -- Using HTK dir: /juicer/dep/htk/
- -- Using libresample dir: /usr
- -- Using RtAudio dir: /juicer/dep/rtaudio-4.0.11/
- -- Configuring done
- -- Generating done
- -- Build files have been written to: /juicer/dep/juicer-1.0/build
- [root@localhost build]#
torch沒有關係,這是由於沒有使用torch.pc的緣由,咱們指定了靜態庫文件。就是libtorch.a
繼續。。。
- [root@localhost build]# make
- [ 2%] Generating htkparse.y.h, htkparse.y.cpp
- /bin/sh: bison: command not found
- make[2]: *** [src/htkparse.y.h] Error 127
- make[1]: *** [src/CMakeFiles/static-lib.dir/all] Error 2
- make: *** [all] Error 2
- [root@localhost build]#
這個小問題,yum install bison
繼續。。。
- [root@localhost build]# make
- [ 2%] Generating htkparse.y.h, htkparse.y.cpp
- [ 5%] Generating htkparse.l.cpp
- /bin/sh: flex: command not found
- make[2]: *** [src/htkparse.l.cpp] Error 127
- make[1]: *** [src/CMakeFiles/static-lib.dir/all] Error 2
- make: *** [all] Error 2
這也是小問題,yum install flex
而後就很順利了,幾個主要的命令行都生成了,以下:
- [root@localhost juicer]# cd bin/
- [root@localhost bin]# ls
- aux2eps.pl cdgen gramgen map-labels.pl
- build-wfst do-star-closure.pl juicer untieModels.sh
- build-wfst-mit fstRemoveAux.pl lexgen
- build-wfst-openfst genwfstseqs logical2physical.pl