diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..0e0f559f1fc557091225adb0679eee564e0fddcc --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +thirdparty diff --git a/README.md b/README.md index 3010c0e536da732f1c4f042c82badaae21179f87..22d0c5386c54c23966cfc9355d1d67756a37b594 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,6 @@ Please replace `$PADDLE_INSTALL_DIR` with your own paddle installation directory sh setup.sh export LD_LIBRARY_PATH=$PADDLE_INSTALL_DIR/Paddle/third_party/install/warpctc/lib:$LD_LIBRARY_PATH ``` - -For some machines, we also need to install libsndfile1. Details to be added. - ## Usage ### Preparing Data diff --git a/requirements.txt b/requirements.txt index 721fa2811081e530a9cec3b2e403ad2372b59269..3f73ea8b8085324b3691c6af44915f0d09888221 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ wget==3.2 scipy==0.13.1 resampy==0.1.5 -https://github.com/kpu/kenlm/archive/master.zip +SoundFile==0.9.0.post1 python_speech_features +https://github.com/kpu/kenlm/archive/master.zip diff --git a/setup.sh b/setup.sh index 8cba91ecdb68b42125181331471f9ee323062a24..854f879e9e4ce11e3f66a5e63d53b117cf7067b0 100644 --- a/setup.sh +++ b/setup.sh @@ -9,7 +9,9 @@ if [ $? != 0 ]; then exit 1 fi -# install package Soundfile +# install package libsndfile +DIR="$( cd "$(dirname "$0")" ; pwd -P )" +mkdir thirdparty curl -O "http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.28.tar.gz" if [ $? != 0 ]; then echo "Download libsndfile-1.0.28.tar.gz failed !!!" @@ -17,15 +19,10 @@ if [ $? != 0 ]; then fi tar -zxvf libsndfile-1.0.28.tar.gz cd libsndfile-1.0.28 -./configure && make && make install -cd - +./configure --prefix=$DIR/thirdparty/libsndfile && make && make install +cd .. rm -rf libsndfile-1.0.28 rm libsndfile-1.0.28.tar.gz -pip install SoundFile==0.9.0.post1 -if [ $? != 0 ]; then - echo "Install SoundFile failed !!!" - exit 1 -fi # prepare ./checkpoints mkdir checkpoints