| | |
| | | /** |
| | | * 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 |
| | |
| | | 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); |
| | | vector<int> Infer(vector<int32_t> input_data); |
| | | string AddPunc(const char* sz_input); |
| | | }; |
| | | } // namespace funasr |