雾聪
2023-08-17 fbd9fbbde066a483fb903fe9c6c76fb95bc6fc2b
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_;