From d80ac2fd2df4e7fb8a28acfa512bb11472b5cc99 Mon Sep 17 00:00:00 2001
From: liugz18 <57401541+liugz18@users.noreply.github.com>
Date: 星期四, 18 七月 2024 21:34:55 +0800
Subject: [PATCH] Rename 'res' in line 514 to avoid with naming conflict with line 365

---
 runtime/csharp/AliFsmnVad/AliFsmnVadSharp/AliFsmnVad.cs |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/runtime/csharp/AliFsmnVad/AliFsmnVadSharp/AliFsmnVad.cs b/runtime/csharp/AliFsmnVad/AliFsmnVadSharp/AliFsmnVad.cs
index 672eac2..aad8bf5 100644
--- a/runtime/csharp/AliFsmnVad/AliFsmnVadSharp/AliFsmnVad.cs
+++ b/runtime/csharp/AliFsmnVad/AliFsmnVadSharp/AliFsmnVad.cs
@@ -4,6 +4,8 @@
 using Microsoft.ML.OnnxRuntime;
 using Microsoft.ML.OnnxRuntime.Tensors;
 
+// 妯″瀷鏂囦欢涓嬭浇鍦板潃锛歨ttps://modelscope.cn/models/iic/speech_fsmn_vad_zh-cn-16k-common-onnx/
+
 namespace AliFsmnVadSharp
 {
     public class AliFsmnVad : IDisposable
@@ -28,9 +30,9 @@
             VadYamlEntity vadYamlEntity = YamlHelper.ReadYaml<VadYamlEntity>(configFilePath);
             _wavFrontend = new WavFrontend(mvnFilePath, vadYamlEntity.frontend_conf);
             _frontend = vadYamlEntity.frontend;
-            _vad_post_conf = vadYamlEntity.vad_post_conf;
+            _vad_post_conf = vadYamlEntity.model_conf;
             _batchSize = batchSize;
-            _max_end_sil = _max_end_sil != int.MinValue ? _max_end_sil : vadYamlEntity.vad_post_conf.max_end_silence_time;
+            _max_end_sil = _max_end_sil != int.MinValue ? _max_end_sil : vadYamlEntity.model_conf.max_end_silence_time;
             _encoderConfEntity = vadYamlEntity.encoder_conf;
 
             ILoggerFactory loggerFactory = new LoggerFactory();

--
Gitblit v1.9.1