安裝juicer

因爲我第一次安裝 JUICER時遇到了不少問題,如今把這些問題都記錄下來,給一樣第一次安裝使用的同窗一點借鑑。html

前面已經安裝了Torch3Tracter,這都是爲安裝Juicer作的準備,如今安裝Juicer也容易了。flex

1,下載源碼ui

wget  http://juicer.amiproject.org/juicer/sources/juicer-1.0.tar.gzspa

 

2,編譯準備.net

首次編譯結果命令行

 

[html]  view plain copy print ?
 
  1. -- checking for module 'tracter'  
  2. --   found tracter, version 1.0  
  3. -- checking for module 'torch'  
  4. --   package 'torch' not found  
  5. -- HTK not found  
  6. -- libresample not found  
  7. -- RtAudio not found  
  8. -- Found SPTK: /usr/lib/libSPTK.a  
  9. -- Configuring done  
  10. -- Generating done  
  11. -- Build files have been written to: /juicer/dep/juicer-1.0/build  

修改FindTorch3.cmake文件,操做以下:xml

 

 

[html]  view plain copy print ?
 
  1. set(TORCH3_DIR "/juicer/dep/Torch3")  

修改FindHTK.cmake文件,操做以下:htm

 

 

[html]  view plain copy print ?
 
  1. set(HTK_DIR "/juicer/dep/htk/")  

修改FindLibResample.cmake文件,操做以下:blog

 

 

[html]  view plain copy print ?
 
  1. set(LIBRESAMPLE_DIR "/usr")  
  2. ....  
  3. set(LIBRESAMPLE_LIBRARIES  
  4.     ${LIBRESAMPLE_DIR}/lib64/libresample.so  
  5.     )  

修改FindRtAudio.cmake文件,操做以下:ip

 

 

[html]  view plain copy print ?
 
  1. set(RTAUDIO_DIR "/juicer/dep/rtaudio-4.0.11/")  

若是不這麼修改的話,就設置環境變量,效果是同樣的。

 

3,編譯

 

[html]  view plain copy print ?
 
  1. cmake -D CMAKE_INSTALL_PREFIX=/usr/local/juicer/ ../  

結果以下:

 

 

[html]  view plain copy print ?
 
  1. [root@localhost build]# cmake -D CMAKE_INSTALL_PREFIX=/usr/local/juicer/ ../  
  2. -- checking for module 'torch'  
  3. --   package 'torch' not found  
  4. -- Using HTK dir: /juicer/dep/htk/  
  5. -- Using libresample dir: /usr  
  6. -- Using RtAudio dir: /juicer/dep/rtaudio-4.0.11/  
  7. -- Configuring done  
  8. -- Generating done  
  9. -- Build files have been written to: /juicer/dep/juicer-1.0/build  
  10. [root@localhost build]#   

torch沒有關係,這是由於沒有使用torch.pc的緣由,咱們指定了靜態庫文件。就是libtorch.a

 

繼續。。。

 

[html]  view plain copy print ?
 
  1. [root@localhost build]# make  
  2. [  2%] Generating htkparse.y.h, htkparse.y.cpp  
  3. /bin/sh: bison: command not found  
  4. make[2]: *** [src/htkparse.y.h] Error 127  
  5. make[1]: *** [src/CMakeFiles/static-lib.dir/all] Error 2  
  6. make: *** [all] Error 2  
  7. [root@localhost build]#  

這個小問題,yum install bison

繼續。。。

 

 

[html]  view plain copy print ?
 
  1. [root@localhost build]# make  
  2. [  2%] Generating htkparse.y.h, htkparse.y.cpp  
  3. [  5%] Generating htkparse.l.cpp  
  4. /bin/sh: flex: command not found  
  5. make[2]: *** [src/htkparse.l.cpp] Error 127  
  6. make[1]: *** [src/CMakeFiles/static-lib.dir/all] Error 2  
  7. make: *** [all] Error 2  

這也是小問題,yum install flex

 

而後就很順利了,幾個主要的命令行都生成了,以下:

 

[html]  view plain copy print ?
 
    1. [root@localhost juicer]# cd bin/  
    2. [root@localhost bin]# ls  
    3. aux2eps.pl          cdgen               gramgen              map-labels.pl  
    4. build-wfst          do-star-closure.pl  juicer               untieModels.sh  
    5. build-wfst-mit      fstRemoveAux.pl     lexgen  
    6. build-wfst-openfst  genwfstseqs         logical2physical.pl  
相關文章
相關標籤/搜索