From fbd9fbbde066a483fb903fe9c6c76fb95bc6fc2b Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期四, 17 八月 2023 17:13:37 +0800
Subject: [PATCH] update timestamp

---
 funasr/runtime/onnxruntime/src/paraformer.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/funasr/runtime/onnxruntime/src/paraformer.h b/funasr/runtime/onnxruntime/src/paraformer.h
index 16460bf..0dd55b5 100644
--- a/funasr/runtime/onnxruntime/src/paraformer.h
+++ b/funasr/runtime/onnxruntime/src/paraformer.h
@@ -35,7 +35,10 @@
         void Reset();
         vector<float> FbankKaldi(float sample_rate, const float* waves, int len);
         string Forward(float* din, int len, bool input_finished=true);
-        string GreedySearch( float* in, int n_len, int64_t token_nums);
+        string GreedySearch( float* in, int n_len, int64_t token_nums, bool is_stamp=false, std::vector<float> us_alphas={0}, std::vector<float> us_cif_peak={0});
+        void TimestampOnnx(std::vector<float> &us_alphas, vector<float> us_cif_peak, vector<string>& char_list, std::string &res_str, 
+                           vector<vector<float>> &timestamp_list, float begin_time = 0.0, float total_offset = -1.5);
+        string PostProcess(std::vector<string> &raw_char, std::vector<std::vector<float>> &timestamp_list);
         string Rescoring();
 
         knf::FbankOptions fbank_opts_;

--
Gitblit v1.9.1