From 6427c834dfd97b1f05c6659cdc7ccf010bf82fe1 Mon Sep 17 00:00:00 2001
From: 嘉渊 <wangjiaming.wjm@alibaba-inc.com>
Date: 星期一, 24 四月 2023 19:50:07 +0800
Subject: [PATCH] update

---
 funasr/runtime/python/utils/test_rtf.sh |   61 ++++++++----------------------
 1 files changed, 17 insertions(+), 44 deletions(-)

diff --git a/funasr/runtime/python/utils/test_rtf.sh b/funasr/runtime/python/utils/test_rtf.sh
index 7399c88..dcce6c4 100644
--- a/funasr/runtime/python/utils/test_rtf.sh
+++ b/funasr/runtime/python/utils/test_rtf.sh
@@ -1,61 +1,32 @@
 
-nj=64
+nj=32
 stage=0
-scp=/nfs/haoneng.lhn/funasr_data/aishell-1/data/test/wav.scp
-logs_outputs_dir=/nfs/zhifu.gzf/data_debug/test/${tag}/split$nj
-split_scps_tool=../../../egs/aishell/transformer/utils/split_scp.pl
-rtf_tool=test_rtf.py
 
-##:<<!
-#backend=libtorch
-#model_dir="/nfs/zhifu.gzf/export/damo/amp_int8/libtorch"
-#tag=${backend}_fp32
-#quantize='False'
-#!
-#
-#:<<!
-#backend=libtorch
-#model_dir="/nfs/zhifu.gzf/export/damo/amp_int8/libtorch_fb20"
-#tag=${backend}_amp_fb20
-#quantize='True'
-#!
-#
-#:<<!
-#backend=onnxruntime
-#model_dir="/nfs/zhifu.gzf/export/damo/amp_int8/onnx"
-#tag=${backend}_fp32
-#quantize='False'
-#!
-#
-#:<<!
-#backend=onnxruntime
-#model_dir="/nfs/zhifu.gzf/export/damo/amp_int8/onnx_dynamic"
-#tag=${backend}_fp32
-#quantize='True'
-#!
+scp="/nfs/haoneng.lhn/funasr_data/aishell-1/data/test/wav.scp"
+export_root="/nfs/zhifu.gzf/export"
+split_scps_tool=split_scp.pl
+rtf_tool=test_rtf.py
 
 #:<<!
 model_name="damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch"
-export_root="/nfs/zhifu.gzf/export"
-backend=onnx
-quantize='True'
-tag=${model_name}/${backend}_${quantize}
+backend="onnx" # "torch"
+quantize='true' # 'False'
+tag=${model_name}/${backend}_quantize_${quantize}
 !
 
-
+logs_outputs_dir=${export_root}/logs/${tag}/split$nj
 mkdir -p ${logs_outputs_dir}
 echo ${logs_outputs_dir}
 
 
-if [ $stage == 0 ];then
+if [ ${stage} -le 0 ];then
 
-  if [ $quantize == 'True' ];then
-    python -m funasr.export.export_model --model-name ${model_name} --export-dir ${export_root} --type ${backend} --quantize --audio_in ${scp}
-  else
-    python -m funasr.export.export_model --model-name ${model_name} --export-dir ${export_root} --type ${backend}
-  fi
+    python -m funasr.export.export_model --model-name ${model_name} --export-dir ${export_root} --type ${backend} --quantize ${quantize} --audio_in ${scp}
 
 fi
+
+
+if [ ${stage} -le 1 ];then
 
 model_dir=${export_root}/${model_name}
 split_scps=""
@@ -95,4 +66,6 @@
 
 echo "total_time_comput_ms: $total_time_comput"
 echo "total_time_wav: $total_time_wav"
-echo "total_rtf: $rtf, speech: $speed"
\ No newline at end of file
+echo "total_rtf: $rtf, speech: $speed"
+
+fi
\ No newline at end of file

--
Gitblit v1.9.1