diff --git a/.travis/unittest.sh b/.travis/unittest.sh index 23f15094c8e51132cff350e786654e3bab29cee1..ad223eb4a9c1f57896762ad38d0b3fa5de5c496b 100755 --- a/.travis/unittest.sh +++ b/.travis/unittest.sh @@ -8,8 +8,8 @@ abort(){ unittest(){ cd $1 > /dev/null - if [ -f "requirements.txt" ]; then - pip install -r requirements.txt + if [ -f "setup.sh" ]; then + sh setup.sh fi if [ $? != 0 ]; then exit 1 diff --git a/deep_speech_2/README.md b/deep_speech_2/README.md index 23e0b412b59da4ccfea7a4ce4303faec479ff234..0cdb203d21ef5fa854a011f2f0381078cabcb874 100644 --- a/deep_speech_2/README.md +++ b/deep_speech_2/README.md @@ -5,7 +5,7 @@ Please replace `$PADDLE_INSTALL_DIR` with your own paddle installation directory. ``` -pip install -r requirements.txt +sh setup.sh export LD_LIBRARY_PATH=$PADDLE_INSTALL_DIR/Paddle/third_party/install/warpctc/lib:$LD_LIBRARY_PATH ``` diff --git a/deep_speech_2/requirements.txt b/deep_speech_2/requirements.txt index c37e88ffe75dfda401726f485fd9928cbb477fab..0183ecf01fc1eb2507e00b3b97a6db92b6e2258e 100644 --- a/deep_speech_2/requirements.txt +++ b/deep_speech_2/requirements.txt @@ -1,4 +1,3 @@ SoundFile==0.9.0.post1 wget==3.2 -scikits.samplerate==0.3.3 -scipy==0.13.0b1 +scipy==0.13.1 diff --git a/deep_speech_2/setup.sh b/deep_speech_2/setup.sh new file mode 100644 index 0000000000000000000000000000000000000000..1ae2a5eee0f9cfd5b4318b29cf037165f78f2b73 --- /dev/null +++ b/deep_speech_2/setup.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# install python dependencies +if [ -f 'requirements.txt' ]; then + pip install -r requirements.txt +fi +if [ $? != 0 ]; then + echo "Install python dependencies failed !!!" + exit 1 +fi + +# install scikits.samplerate +curl -O "http://www.mega-nerd.com/SRC/libsamplerate-0.1.9.tar.gz" +if [ $? != 0 ]; then + echo "Download libsamplerate-0.1.9.tar.gz failed !!!" + exit 1 +fi +tar -xvf libsamplerate-0.1.9.tar.gz +cd libsamplerate-0.1.9 +./configure && make && make install +cd - +rm -rf libsamplerate-0.1.9 +rm libsamplerate-0.1.9.tar.gz +pip install scikits.samplerate==0.3.3 +if [ $? != 0 ]; then + echo "Install scikits.samplerate failed !!!" + exit 1 +fi + +echo "Install all dependencies successfully."