From 948b68774cebf2b9a2994b7b9b8102f9637a98f3 Mon Sep 17 00:00:00 2001
From: Shi Xian <40013335+R1ckShi@users.noreply.github.com>
Date: 星期二, 16 一月 2024 11:03:55 +0800
Subject: [PATCH] Merge pull request #1249 from alibaba-damo-academy/main

---
 runtime/onnxruntime/bin/funasr-onnx-online-rtf.cpp |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/runtime/onnxruntime/bin/funasr-onnx-online-rtf.cpp b/runtime/onnxruntime/bin/funasr-onnx-online-rtf.cpp
index 57a4cce..4830a3d 100644
--- a/runtime/onnxruntime/bin/funasr-onnx-online-rtf.cpp
+++ b/runtime/onnxruntime/bin/funasr-onnx-online-rtf.cpp
@@ -84,7 +84,7 @@
                 } else {
                     is_final = false;
             }
-            FUNASR_RESULT result = FunASRInferBuffer(online_handle, speech_buff+sample_offset, step, RASR_NONE, NULL, is_final, sampling_rate_);
+            FUNASR_RESULT result = FunASRInferBuffer(online_handle, speech_buff+sample_offset, step, RASR_NONE, nullptr, is_final, sampling_rate_);
             if (result)
             {
                 FunASRFreeResult(result);
@@ -130,9 +130,9 @@
                 } else {
                     is_final = false;
             }
-            gettimeofday(&start, NULL);
-            FUNASR_RESULT result = FunASRInferBuffer(online_handle, speech_buff+sample_offset, step, RASR_NONE, NULL, is_final, sampling_rate_);
-            gettimeofday(&end, NULL);
+            gettimeofday(&start, nullptr);
+            FUNASR_RESULT result = FunASRInferBuffer(online_handle, speech_buff+sample_offset, step, RASR_NONE, nullptr, is_final, sampling_rate_);
+            gettimeofday(&end, nullptr);
             seconds = (end.tv_sec - start.tv_sec);
             long taking_micros = ((seconds * 1000000) + end.tv_usec) - (start.tv_usec);
             n_total_time += taking_micros;
@@ -210,7 +210,7 @@
     GetValue(wav_path, WAV_PATH, model_path);
 
     struct timeval start, end;
-    gettimeofday(&start, NULL);
+    gettimeofday(&start, nullptr);
     FUNASR_HANDLE asr_handle=FunASRInit(model_path, 1, ASR_ONLINE);
 
     if (!asr_handle)
@@ -219,7 +219,7 @@
         exit(-1);
     }
 
-    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";

--
Gitblit v1.9.1