From 3df109adfccedeb134dea4ba2ea9a2da89872048 Mon Sep 17 00:00:00 2001
From: Isuxiz Slidder <48672727+Isuxiz@users.noreply.github.com>
Date: 星期一, 31 三月 2025 17:51:52 +0800
Subject: [PATCH] Update model.py to fix "IndexError: index 1 is out of bounds for dimension 1 with size 0" (#2454)

---
 runtime/csharp/AliParaformerAsr/AliParaformerAsr/Model/ModelConfEntity.cs |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/runtime/csharp/AliParaformerAsr/AliParaformerAsr/Model/ModelConfEntity.cs b/runtime/csharp/AliParaformerAsr/AliParaformerAsr/Model/ModelConfEntity.cs
index 15af179..844f02e 100644
--- a/runtime/csharp/AliParaformerAsr/AliParaformerAsr/Model/ModelConfEntity.cs
+++ b/runtime/csharp/AliParaformerAsr/AliParaformerAsr/Model/ModelConfEntity.cs
@@ -1,11 +1,5 @@
 锘�// See https://github.com/manyeyes for more information
 // Copyright (c)  2023 by manyeyes
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
 namespace AliParaformerAsr.Model
 {
     public class ModelConfEntity
@@ -16,6 +10,9 @@
         private float _predictor_weight = 1.0F;
         private int _predictor_bias = 1;
         private float _sampling_ratio = 0.75F;
+        private int _sos = 1;
+        private int _eos = 2;
+        private int _ignore_id = -1;
 
         public float ctc_weight { get => _ctc_weight; set => _ctc_weight = value; }
         public float lsm_weight { get => _lsm_weight; set => _lsm_weight = value; }
@@ -23,5 +20,8 @@
         public float predictor_weight { get => _predictor_weight; set => _predictor_weight = value; }
         public int predictor_bias { get => _predictor_bias; set => _predictor_bias = value; }
         public float sampling_ratio { get => _sampling_ratio; set => _sampling_ratio = value; }
+        public int sos { get => _sos; set => _sos = value; }
+        public int eos { get => _eos; set => _eos = value; }
+        public int ignore_id { get => _ignore_id; set => _ignore_id = value; }
     }
 }

--
Gitblit v1.9.1