From 965797ecf087dd71ff6fb3b2bb3c18fdede07db0 Mon Sep 17 00:00:00 2001
From: zhuzizyf <42790740+zhuzizyf@users.noreply.github.com>
Date: 星期六, 22 四月 2023 14:22:17 +0800
Subject: [PATCH] Create OnlineFeature.h
---
funasr/runtime/onnxruntime/src/FsmnVad.cc | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/funasr/runtime/onnxruntime/src/FsmnVad.cc b/funasr/runtime/onnxruntime/src/FsmnVad.cc
index 69c69ca..f75ead7 100644
--- a/funasr/runtime/onnxruntime/src/FsmnVad.cc
+++ b/funasr/runtime/onnxruntime/src/FsmnVad.cc
@@ -1,6 +1,5 @@
-//
-// Created by root on 4/9/23.
-//
+// Collaborators: zhuzizyf(China Telecom Shanghai)
+
#include <fstream>
#include "FsmnVad.h"
#include "precomp.h"
@@ -9,8 +8,6 @@
void FsmnVad::init_vad(const std::string &vad_model, const std::string &vad_cmvn, int vad_sample_rate, int vad_silence_duration, int vad_max_len,
float vad_speech_noise_thres) {
-
-
session_options_.SetIntraOpNumThreads(1);
session_options_.SetGraphOptimizationLevel(ORT_ENABLE_ALL);
session_options_.DisableCpuMemArena();
@@ -33,7 +30,6 @@
}
-
void FsmnVad::read_model(const std::string &vad_model) {
try {
vad_session_ = std::make_shared<Ort::Session>(
@@ -45,8 +41,6 @@
//LOG(INFO) << "vad onnx:";
GetInputOutputInfo(vad_session_, &vad_in_names_, &vad_out_names_);
}
-
-
void FsmnVad::GetInputOutputInfo(
const std::shared_ptr<Ort::Session> &session,
@@ -252,7 +246,7 @@
E2EVadModel vad_scorer = E2EVadModel();
std::vector<std::vector<int>> vad_segments;
- vad_segments = vad_scorer(vad_probs, waves, true, vad_silence_duration_, vad_max_len_,
+ vad_segments = vad_scorer(vad_probs, waves, true, false, vad_silence_duration_, vad_max_len_,
vad_speech_noise_thres_, vad_sample_rate_);
return vad_segments;
--
Gitblit v1.9.1