雾聪
2023-12-13 51f7b76660fdb319c609138d4f922f3bdbc397f7
runtime/onnxruntime/bin/funasr-onnx-online-vad.cpp
@@ -141,10 +141,9 @@
        auto& wav_file = wav_list[i];
        auto& wav_id = wav_ids[i];
        int32_t sampling_rate_ = -1;
        int32_t sampling_rate_ = audio_fs.getValue();
        funasr::Audio audio(1);
      if(is_target_file(wav_file.c_str(), "wav")){
         int32_t sampling_rate_ = -1;
         if(!audio.LoadWav2Char(wav_file.c_str(), &sampling_rate_)){
            LOG(ERROR)<<"Failed to load "<< wav_file;
                exit(-1);
@@ -172,7 +171,7 @@
                    is_final = false;
            }
            gettimeofday(&start, NULL);
            FUNASR_RESULT result = FsmnVadInferBuffer(online_hanlde, speech_buff+sample_offset, step, NULL, is_final, audio_fs.getValue());
            FUNASR_RESULT result = FsmnVadInferBuffer(online_hanlde, speech_buff+sample_offset, step, NULL, is_final, sampling_rate_);
            gettimeofday(&end, NULL);
            seconds = (end.tv_sec - start.tv_sec);
            taking_micros += ((seconds * 1000000) + end.tv_usec) - (start.tv_usec);