Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.
Python asraudiochineseemotion-recognitionfunasrmcp-servermultilingual-asropenai-compatible-apiparaformerpunctuationpytorchreal-time-asrspeaker-diarizationspeech-recognitionspeech-to-textstreaming-asrtranscriptionvllmvoice-activity-detectionwhisper-alternative
add functions
lyblsgo659e18be114a
diff --git a/funasr/runtime/onnxruntime/src/util.cpp b/funasr/runtime/onnxruntime/src/util.cppindex d29c5c0f9..755913ce6 100644--- a/funasr/runtime/onnxruntime/src/util.cpp+++ b/funasr/runtime/onnxruntime/src/util.cpp@@ -180,4 +180,13 @@ void Glu(Tensor<float> *din, Tensor<float> *dout)}}+bool is_target_file(const std::string& filename, const std::string target) {+ std::size_t pos = filename.find_last_of(".");+ if (pos == std::string::npos) {+ return false;+ }+ std::string extension = filename.substr(pos + 1);+ return (extension == target);+}+} // namespace funasr\ No newline at end of filediff --git a/funasr/runtime/onnxruntime/src/util.h b/funasr/runtime/onnxruntime/src/util.hindex 95ef4586a..8823a32ee 100644--- a/funasr/runtime/onnxruntime/src/util.h+++ b/funasr/runtime/onnxruntime/src/util.h@@ -25,6 +25,7 @@ extern void FindMax(float *din, int len, float &max_val, int &max_idx);extern void Glu(Tensor<float> *din, Tensor<float> *dout);string PathAppend(const string &p1, const string &p2);+bool is_target_file(const std::string& filename, const std::string target);} // namespace funasr#endif