From 55708e7cebaedefc5f69d61f157993da41848b8f Mon Sep 17 00:00:00 2001
From: lyblsgo <lyblsgo@163.com>
Date: 星期日, 23 四月 2023 19:06:25 +0800
Subject: [PATCH] add offline punc for onnxruntime

---
 funasr/runtime/onnxruntime/include/ComDefine.h |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/funasr/runtime/onnxruntime/include/ComDefine.h b/funasr/runtime/onnxruntime/include/ComDefine.h
index 6929e49..72a843d 100644
--- a/funasr/runtime/onnxruntime/include/ComDefine.h
+++ b/funasr/runtime/onnxruntime/include/ComDefine.h
@@ -12,6 +12,7 @@
 #define MODEL_SAMPLE_RATE 16000
 #endif
 
+// vad
 #ifndef VAD_SILENCE_DYRATION
 #define VAD_SILENCE_DYRATION 15000
 #endif
@@ -24,5 +25,25 @@
 #define VAD_SPEECH_NOISE_THRES 0.9
 #endif
 
+// punc
+#define PUNC_MODEL_FILE  "punc_model.onnx"
+#define PUNC_YAML_FILE "punc.yaml"
+
+#define UNK_CHAR "<unk>"
+
+#define  INPUT_NUM  2
+#define  INPUT_NAME1 "input"
+#define  INPUT_NAME2 "text_lengths"
+#define  OUTPUT_NAME "logits"
+#define  TOKEN_LEN     20
+
+#define  CANDIDATE_NUM   6
+#define UNKNOW_INDEX 0
+#define NOTPUNC_INDEX 1
+#define COMMA_INDEX 2
+#define PERIOD_INDEX 3
+#define QUESTION_INDEX 4
+#define DUN_INDEX 5
+#define  CACHE_POP_TRIGGER_LIMIT   200
 
 #endif

--
Gitblit v1.9.1