Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install script update #5

Merged
merged 7 commits into from
Apr 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# TechUnited begin
/log/
# TechUnited end

# Compiled extensionless executable files in /src/*/
# This stanza must precede wildcard patterns below!
/src/*/*
Expand All @@ -11,6 +7,12 @@
!/src/*/Makefile
!/src/*/README

# TechUnited begin
/log/
/src/gst-plugin/kaldimarshal.cc
/src/gst-plugin/kaldimarshal.h
# TechUnited end

# Compiled Object files and python ciles
*.slo
*.lo
Expand Down
16 changes: 2 additions & 14 deletions install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,6 @@ _kaldi_check_dependencies()
# Kaldi Build (Common to Installation and Update)
_kaldi_build()
{
# if environment variable CXX is unset, set it
if [ -z "$CXX" ]
then
export CXX=g++
fi

# Check g++ version before starting build
gpp_version_num=$($CXX -dumpversion | sed 's/\./ /g' | xargs printf "%d%02d%02d")
if [ $gpp_version_num -gt 70000 ]
then
echo -e "\e[34m\e[1m Unsupported g++ version. Use g++ < 7.0.* \e[0m"
return 1
fi

# Build toolkit
echo "Building toolkit..."
# Build the tools directory
Expand Down Expand Up @@ -145,6 +131,8 @@ _kaldi_build()
fi
echo " - Configured src for build"

# Make Kaldi without checks (ensures faster compilation)
sed -i '/-g # -O0 -DKALDI_PARANOID/c\-O3 -DNDEBUG' kaldi.mk
make depend -j 8 > /dev/null
make -j 8 &> $ASR_LOG/make_src.log
make_src_status=$( grep "Done" $ASR_LOG/make_src.log )
Expand Down
23 changes: 21 additions & 2 deletions setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,24 @@
#
# Environment variables to use by speech_recognition repo

export KALDI_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export GST_PLUGIN_PATH=$KALDI_ROOT/src/gst-plugin${GST_PLUGIN_PATH:+:${GST_PLUGIN_PATH}}
KALDI_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export KALDI_ROOT

GST_PLUGIN_PATH=$KALDI_ROOT/src/gst-plugin${GST_PLUGIN_PATH:+:${GST_PLUGIN_PATH}}
export GST_PLUGIN_PATH

[ -f $KALDI_ROOT/tools/env.sh ] && . $KALDI_ROOT/tools/env.sh

PATH=$KALDI_ROOT/egs/wsj/s5/utils/:$KALDI_ROOT/tools/openfst/bin${PATH:+:${PATH}}
export PATH

[ ! -f $KALDI_ROOT/tools/config/common_path.sh ] && echo >&2 "The standard file $KALDI_ROOT/tools/config/common_path.sh is not present -> Exit!" && exit 1
. $KALDI_ROOT/tools/config/common_path.sh

# Make sure that MITLM shared libs are found by the dynamic linker/loader
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/tools/mitlm-svn/lib

# Needed for "correct" sorting
LC_ALL=C
export LC_ALL