From 32b6e9b5920abacfdba0cea9c8792ffaead1b788 Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期一, 15 一月 2024 15:47:37 +0800
Subject: [PATCH] rm speech_buf for FfmpegLoad
---
runtime/onnxruntime/bin/funasr-onnx-offline-rtf.cpp | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/runtime/onnxruntime/bin/funasr-onnx-offline-rtf.cpp b/runtime/onnxruntime/bin/funasr-onnx-offline-rtf.cpp
index 39928b4..0f550fc 100644
--- a/runtime/onnxruntime/bin/funasr-onnx-offline-rtf.cpp
+++ b/runtime/onnxruntime/bin/funasr-onnx-offline-rtf.cpp
@@ -54,7 +54,6 @@
// warm up
for (size_t i = 0; i < 1; i++)
{
- FunOfflineReset(asr_handle, decoder_handle);
FUNASR_RESULT result=FunOfflineInfer(asr_handle, wav_list[0].c_str(), RASR_NONE, NULL, hotwords_embedding, audio_fs, true, decoder_handle);
if(result){
FunASRFreeResult(result);
@@ -82,6 +81,10 @@
string stamp = FunASRGetStamp(result);
if(stamp !=""){
LOG(INFO) << "Thread: " << this_thread::get_id() << "," << wav_ids[i] << " : " << stamp;
+ }
+ string stamp_sents = FunASRGetStampSents(result);
+ if(stamp_sents !=""){
+ LOG(INFO)<< wav_ids[i] <<" : "<<stamp_sents;
}
float snippet_time = FunASRGetRetSnippetTime(result);
n_total_length += snippet_time;
@@ -112,10 +115,8 @@
void GetValue(TCLAP::ValueArg<std::string>& value_arg, string key, std::map<std::string, std::string>& model_path)
{
- if (value_arg.isSet()){
- model_path.insert({key, value_arg.getValue()});
- LOG(INFO)<< key << " : " << value_arg.getValue();
- }
+ model_path.insert({key, value_arg.getValue()});
+ LOG(INFO)<< key << " : " << value_arg.getValue();
}
int main(int argc, char *argv[])
--
Gitblit v1.9.1