From 2e41e8db8e9c5179a19bbcd6f0514c27d5a270ea Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期一, 15 一月 2024 16:36:18 +0800
Subject: [PATCH] replace NULL for onnxruntime/bin

---
 runtime/onnxruntime/bin/funasr-onnx-2pass.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/runtime/onnxruntime/bin/funasr-onnx-2pass.cpp b/runtime/onnxruntime/bin/funasr-onnx-2pass.cpp
index abcc4b2..6941151 100644
--- a/runtime/onnxruntime/bin/funasr-onnx-2pass.cpp
+++ b/runtime/onnxruntime/bin/funasr-onnx-2pass.cpp
@@ -97,7 +97,7 @@
     GetValue(asr_mode, ASR_MODE, model_path);
 
     struct timeval start, end;
-    gettimeofday(&start, NULL);
+    gettimeofday(&start, nullptr);
     int thread_num = onnx_thread.getValue();
     int asr_mode_ = -1;
     if(model_path[ASR_MODE] == "offline"){
@@ -128,7 +128,7 @@
     // init wfst decoder
     FUNASR_DEC_HANDLE decoder_handle = FunASRWfstDecoderInit(tpass_handle, ASR_TWO_PASS, glob_beam, lat_beam, am_sc);
 
-    gettimeofday(&end, NULL);
+    gettimeofday(&end, nullptr);
     long seconds = (end.tv_sec - start.tv_sec);
     long modle_init_micros = ((seconds * 1000000) + end.tv_usec) - (start.tv_usec);
     LOG(INFO) << "Model initialization takes " << (double)modle_init_micros / 1000000 << " s";
@@ -214,11 +214,11 @@
                 } else {
                     is_final = false;
             }
-            gettimeofday(&start, NULL);
+            gettimeofday(&start, nullptr);
             FUNASR_RESULT result = FunTpassInferBuffer(tpass_handle, tpass_online_handle, 
                 speech_buff+sample_offset, step, punc_cache, is_final, sampling_rate_, "pcm", 
                 (ASR_TYPE)asr_mode_, hotwords_embedding, true, decoder_handle);
-            gettimeofday(&end, NULL);
+            gettimeofday(&end, nullptr);
             seconds = (end.tv_sec - start.tv_sec);
             taking_micros += ((seconds * 1000000) + end.tv_usec) - (start.tv_usec);
 

--
Gitblit v1.9.1