From 580b11b57ac4b62f7e2acda73813a4e10e8e4cd3 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期二, 10 十月 2023 17:17:29 +0800
Subject: [PATCH] v0.8.0

---
 funasr/runtime/onnxruntime/src/ct-transformer.h |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/funasr/runtime/onnxruntime/src/ct-transformer.h b/funasr/runtime/onnxruntime/src/ct-transformer.h
index 77972c7..b33dcf5 100644
--- a/funasr/runtime/onnxruntime/src/ct-transformer.h
+++ b/funasr/runtime/onnxruntime/src/ct-transformer.h
@@ -1,6 +1,12 @@
+/**
+ * Copyright FunASR (https://github.com/alibaba-damo-academy/FunASR). All Rights Reserved.
+ * MIT License  (https://opensource.org/licenses/MIT)
+*/
+
 #pragma once 
 
-class CTTransformer {
+namespace funasr {
+class CTTransformer : public PuncModel {
 /**
  * Author: Speech Lab of DAMO Academy, Alibaba Group
  * CT-Transformer: Controllable time-delay transformer for real-time punctuation prediction and disfluency detection
@@ -19,8 +25,10 @@
     Ort::SessionOptions session_options;
 public:
 
-	CTTransformer(const char* sz_model_dir, int thread_num);
+	CTTransformer();
+	void InitPunc(const std::string &punc_model, const std::string &punc_config, int thread_num);
 	~CTTransformer();
-	vector<int>  Infer(vector<int64_t> input_data);
-	string AddPunc(const char* sz_input);
+	vector<int>  Infer(vector<int32_t> input_data);
+	string AddPunc(const char* sz_input, std::string language="zh-cn");
 };
+} // namespace funasr
\ No newline at end of file

--
Gitblit v1.9.1