From 0730368e5d47660cce66983affb9d8b2a245120b Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Fri, 29 Oct 2021 08:52:40 +0000 Subject: [PATCH] install soundfile lib --- tools/Makefile | 2 +- tools/extras/README.md | 4 ++++ tools/extras/install_soundfile.sh | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100755 tools/extras/install_soundfile.sh diff --git a/tools/Makefile b/tools/Makefile index 87107a53..e2aba8fe 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -24,7 +24,7 @@ clean: apt.done: apt update -y - apt install -y bc flac jq vim tig tree pkg-config libflac-dev libogg-dev libvorbis-dev libboost-dev swig python3-dev + apt install -y bc flac jq vim tig tree pkg-config libsndfile1 libflac-dev libogg-dev libvorbis-dev libboost-dev swig python3-dev echo "check_certificate = off" >> ~/.wgetrc touch apt.done diff --git a/tools/extras/README.md b/tools/extras/README.md index 19c06a13..7d03c4be 100644 --- a/tools/extras/README.md +++ b/tools/extras/README.md @@ -1,3 +1,7 @@ +# install scripts +call from `tools` dir. + +## Details 1. kaldi deps gcc, mkl or openblas diff --git a/tools/extras/install_soundfile.sh b/tools/extras/install_soundfile.sh new file mode 100755 index 00000000..cbc4e00d --- /dev/null +++ b/tools/extras/install_soundfile.sh @@ -0,0 +1,18 @@ +# install package libsndfile + +WGET=wget --no-check-certificate + +SOUNDFILE=libsndfile-1.0.28 +SOUNDFILE_LIB=${SOUNDFILE}tar.gz + +echo "Install package libsndfile into default system path." +test -e ${SOUNDFILE_LIB} || ${WGET} -c "http://www.mega-nerd.com/libsndfile/files/${SOUNDFILE_LIB}" +if [ $? != 0 ]; then + echo "Download ${SOUNDFILE_LIB} failed !!!" + exit 1 +fi + +tar -zxvf ${SOUNDFILE_LIB} +pushd ${SOUNDFILE} +./configure > /dev/null && make > /dev/null && make install > /dev/null +popd \ No newline at end of file