File tree Expand file tree Collapse file tree 13 files changed +115
-35
lines changed Expand file tree Collapse file tree 13 files changed +115
-35
lines changed Original file line number Diff line number Diff line change
1
+ tools /valgrind *
Original file line number Diff line number Diff line change
1
+ # SpeechX -- Speech Inference All in One
2
+
3
+ > Test under ` Ubuntu 16.04.7 LTS ` .
4
+
5
+ ## Build
6
+
7
+ ```
8
+ ./build.sh
9
+ ```l
10
+
11
+ ## Valgrind
12
+
13
+ > If using docker please check `--privileged` is set when `docker run`.
14
+
15
+ 1. Fatal error at startup: a function redirection which is mandatory for this platform-tool combination cannot be set up
16
+ ```
17
+ apt-get install libc6-dbg
18
+ ```
19
+
20
+ ```
21
+ pushd tools
22
+ ./setup_valgrind.sh
23
+ popd
24
+ ```
Original file line number Diff line number Diff line change
1
+ * .ark
2
+ paddle_asr_model /
Original file line number Diff line number Diff line change 2
2
3
3
SPEECHX_ROOT=$PWD /../..
4
4
SPEECHX_EXAMPLES=$SPEECHX_ROOT /build/examples
5
- SPEECHX_BIN=$SPEECHX_EXAMPLES /nnet:$SPEECHX_EXAMPLES /decoder:$SPEECHX_EXAMPLES /feat
6
5
7
6
SPEECHX_TOOLS=$SPEECHX_ROOT /tools
8
7
TOOLS_BIN=$SPEECHX_TOOLS /valgrind/install/bin
@@ -11,4 +10,5 @@ TOOLS_BIN=$SPEECHX_TOOLS/valgrind/install/bin
11
10
12
11
export LC_AL=C
13
12
13
+ SPEECHX_BIN=$SPEECHX_EXAMPLES /decoder
14
14
export PATH=$PATH :$SPEECHX_BIN :$TOOLS_BIN
Original file line number Diff line number Diff line change 2
2
set +x
3
3
set -e
4
4
5
+ . path.sh
6
+
5
7
# 1. compile
6
- if [ ! -d ../../build/examples ]; then
7
- cd ../..
8
+ if [ ! -d ${SPEECHX_EXAMPLES} ]; then
9
+ pushd ${SPEECHX_ROOT}
8
10
bash build.sh
9
- cd -
11
+ popd
10
12
fi
11
13
12
- . ../path.sh
13
14
14
15
# 2. download model
15
16
if [ ! -d ../paddle_asr_model ]; then
16
- wget https://paddlespeech.bj.bcebos.com/s2t/paddle_asr_online/paddle_asr_model.tar.gz
17
+ wget -c https://paddlespeech.bj.bcebos.com/s2t/paddle_asr_online/paddle_asr_model.tar.gz
17
18
tar xzfv paddle_asr_model.tar.gz
18
19
mv ./paddle_asr_model ../
19
20
# produce wav scp
@@ -25,8 +26,15 @@ feat_wspecifier=./feats.ark
25
26
cmvn=./cmvn.ark
26
27
27
28
# 3. run feat
28
- linear_spectrogram_main --wav_rspecifier=scp:$model_dir /wav.scp --feature_wspecifier=ark:$feat_wspecifier --cmvn_write_path=$cmvn
29
+ linear_spectrogram_main \
30
+ --wav_rspecifier=scp:$model_dir /wav.scp \
31
+ --feature_wspecifier=ark,t:$feat_wspecifier \
32
+ --cmvn_write_path=$cmvn
29
33
30
34
# 4. run decoder
31
- offline_decoder_main --feature_respecifier=ark:$feat_wspecifier --model_path=$model_dir /avg_1.jit.pdmodel --param_path=$model_dir /avg_1.jit.pdparams --dict_file=$model_dir /vocab.txt --lm_path=$model_dir /avg_1.jit.klm
32
-
35
+ offline_decoder_main \
36
+ --feature_respecifier=ark:$feat_wspecifier \
37
+ --model_path=$model_dir /avg_1.jit.pdmodel \
38
+ --param_path=$model_dir /avg_1.jit.pdparams \
39
+ --dict_file=$model_dir /vocab.txt \
40
+ --lm_path=$model_dir /avg_1.jit.klm
Original file line number Diff line number Diff line change 5
5
set +x
6
6
set -e
7
7
8
- if [ ! -d ../../tools/valgrind/install ]; then
8
+ . ./path.sh
9
+
10
+ if [ ! -d ${SPEECHX_TOOLS} /valgrind/install ]; then
9
11
echo " please install valgrind in the speechx tools dir.\n"
10
12
exit 1
11
13
fi
12
14
13
- . ../path.sh
14
-
15
15
model_dir=../paddle_asr_model
16
16
feat_wspecifier=./feats.ark
17
17
cmvn=./cmvn.ark
18
18
19
- valgrind --tool=memcheck --track-origins=yes --leak-check=full --show-leak-kinds=all offline_decoder_main --feature_respecifier=ark:$feat_wspecifier --model_path=$model_dir /avg_1.jit.pdmodel --param_path=$model_dir /avg_1.jit.pdparams --dict_file=$model_dir /vocab.txt --lm_path=$model_dir /avg_1.jit.klm
19
+ valgrind --tool=memcheck --track-origins=yes --leak-check=full --show-leak-kinds=all \
20
+ offline_decoder_main \
21
+ --feature_respecifier=ark:$feat_wspecifier \
22
+ --model_path=$model_dir /avg_1.jit.pdmodel \
23
+ --param_path=$model_dir /avg_1.jit.pdparams \
24
+ --dict_file=$model_dir /vocab.txt \
25
+ --lm_path=$model_dir /avg_1.jit.klm
20
26
Original file line number Diff line number Diff line change
1
+ # This contains the locations of binarys build required for running the examples.
2
+
3
+ SPEECHX_ROOT=$PWD /../..
4
+ SPEECHX_EXAMPLES=$SPEECHX_ROOT /build/examples
5
+
6
+ SPEECHX_TOOLS=$SPEECHX_ROOT /tools
7
+ TOOLS_BIN=$SPEECHX_TOOLS /valgrind/install/bin
8
+
9
+ [ -d $SPEECHX_EXAMPLES ] || { echo " Error: 'build/examples' directory not found. please ensure that the project build successfully" ; }
10
+
11
+ export LC_AL=C
12
+
13
+ SPEECHX_BIN=$SPEECHX_EXAMPLES /feat
14
+ export PATH=$PATH :$SPEECHX_BIN :$TOOLS_BIN
Original file line number Diff line number Diff line change 2
2
set +x
3
3
set -e
4
4
5
+ . ./path.sh
6
+
5
7
# 1. compile
6
- if [ ! -d ../../build/examples ]; then
7
- cd ../..
8
+ if [ ! -d ${SPEECHX_EXAMPLES} ]; then
9
+ pushd ${SPEECHX_ROOT}
8
10
bash build.sh
9
- cd -
11
+ popd
10
12
fi
11
13
12
- . ../path.sh
13
-
14
14
# 2. download model
15
15
if [ ! -d ../paddle_asr_model ]; then
16
16
wget https://paddlespeech.bj.bcebos.com/s2t/paddle_asr_online/paddle_asr_model.tar.gz
@@ -25,4 +25,7 @@ feat_wspecifier=./feats.ark
25
25
cmvn=./cmvn.ark
26
26
27
27
# 3. run feat
28
- linear_spectrogram_main --wav_rspecifier=scp:$model_dir /wav.scp --feature_wspecifier=ark,t:$feat_wspecifier --cmvn_write_path=$cmvn
28
+ linear_spectrogram_main \
29
+ --wav_rspecifier=scp:$model_dir /wav.scp \
30
+ --feature_wspecifier=ark,t:$feat_wspecifier \
31
+ --cmvn_write_path=$cmvn
Original file line number Diff line number Diff line change 5
5
set +x
6
6
set -e
7
7
8
- if [ ! -d ../../tools/valgrind/install ]; then
8
+ . ./path.sh
9
+
10
+ if [ ! -d ${SPEECHX_TOOLS} /valgrind/install ]; then
9
11
echo " please install valgrind in the speechx tools dir.\n"
10
12
exit 1
11
13
fi
12
14
13
- . ../path.sh
14
-
15
15
model_dir=../paddle_asr_model
16
16
feat_wspecifier=./feats.ark
17
17
cmvn=./cmvn.ark
18
18
19
- valgrind --tool=memcheck --track-origins=yes --leak-check=full --show-leak-kinds=all linear_spectrogram_main --wav_rspecifier=scp:$model_dir /wav.scp --feature_wspecifier=ark,t:$feat_wspecifier --cmvn_write_path=$cmvn
19
+ valgrind --tool=memcheck --track-origins=yes --leak-check=full --show-leak-kinds=all \
20
+ linear_spectrogram_main \
21
+ --wav_rspecifier=scp:$model_dir /wav.scp \
22
+ --feature_wspecifier=ark,t:$feat_wspecifier \
23
+ --cmvn_write_path=$cmvn
20
24
Original file line number Diff line number Diff line change
1
+ # This contains the locations of binarys build required for running the examples.
2
+
3
+ SPEECHX_ROOT=$PWD /../..
4
+ SPEECHX_EXAMPLES=$SPEECHX_ROOT /build/examples
5
+
6
+ SPEECHX_TOOLS=$SPEECHX_ROOT /tools
7
+ TOOLS_BIN=$SPEECHX_TOOLS /valgrind/install/bin
8
+
9
+ [ -d $SPEECHX_EXAMPLES ] || { echo " Error: 'build/examples' directory not found. please ensure that the project build successfully" ; }
10
+
11
+ export LC_AL=C
12
+
13
+ SPEECHX_BIN=$SPEECHX_EXAMPLES /nnet
14
+ export PATH=$PATH :$SPEECHX_BIN :$TOOLS_BIN
You can’t perform that action at this time.
0 commit comments