parent
a11dc53c1b
commit
8d19c056d7
@ -0,0 +1 @@
|
||||
run setup_docker.sh first and then run websocket_server.sh
|
@ -0,0 +1,2 @@
|
||||
export LD_LIBRARY_PATH=$PWD/resource/lib
|
||||
export PATH=$PATH:$PWD/resource/bin
|
@ -0,0 +1 @@
|
||||
sudo nvidia-docker run --privileged --net=host --ipc=host -it --rm -v $PWD:/paddle --name=paddle_demo_docker registry.baidubce.com/paddlepaddle/paddle:2.2.2 /bin/bash
|
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set +x
|
||||
set -e
|
||||
|
||||
. path.sh
|
||||
# input
|
||||
data=$PWD/data
|
||||
|
||||
# output
|
||||
wav_scp=wav.scp
|
||||
|
||||
export GLOG_logtostderr=1
|
||||
|
||||
# websocket client
|
||||
websocket_client_main \
|
||||
--wav_rspecifier=scp:$data/$wav_scp \
|
||||
--streaming_chunk=0.36 \
|
||||
--port=8881
|
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
set +x
|
||||
set -e
|
||||
|
||||
export GLOG_logtostderr=1
|
||||
|
||||
. path.sh
|
||||
#test websocket server
|
||||
|
||||
model_dir=./resource/model
|
||||
graph_dir=./resource/graph
|
||||
cmvn=./data/cmvn.ark
|
||||
|
||||
|
||||
#paddle_asr_online/resource.tar.gz
|
||||
if [ ! -f $cmvn ]; then
|
||||
wget -c https://paddlespeech.bj.bcebos.com/s2t/paddle_asr_online/resource.tar.gz
|
||||
tar xzfv resource.tar.gz
|
||||
ln -s ./resource/data .
|
||||
fi
|
||||
|
||||
websocket_server_main \
|
||||
--cmvn_file=$cmvn \
|
||||
--streaming_chunk=0.1 \
|
||||
--use_fbank=true \
|
||||
--model_path=$model_dir/avg_10.jit.pdmodel \
|
||||
--param_path=$model_dir/avg_10.jit.pdiparams \
|
||||
--model_cache_shapes="5-1-2048,5-1-2048" \
|
||||
--model_output_names=softmax_0.tmp_0,tmp_5,concat_0.tmp_0,concat_1.tmp_0 \
|
||||
--word_symbol_table=$graph_dir/words.txt \
|
||||
--graph_path=$graph_dir/TLG.fst --max_active=7500 \
|
||||
--port=8881 \
|
||||
--acoustic_scale=12
|
Loading…
Reference in new issue