This repository has been archived on 2025-08-26. You can view files and clone it, but cannot push or open issues or pull requests.
Files
enginex_bi_series-sherpa-onnx/scripts/dotnet/OfflineRecognizerConfig.cs
2025-04-29 21:36:38 +08:00

50 lines
1.2 KiB
C#

/// Copyright (c) 2024.5 by 东风破
using System.Runtime.InteropServices;
namespace SherpaOnnx
{
[StructLayout(LayoutKind.Sequential)]
public struct OfflineRecognizerConfig
{
public OfflineRecognizerConfig()
{
FeatConfig = new FeatureConfig();
ModelConfig = new OfflineModelConfig();
LmConfig = new OfflineLMConfig();
DecodingMethod = "greedy_search";
MaxActivePaths = 4;
HotwordsFile = "";
HotwordsScore = 1.5F;
RuleFsts = "";
RuleFars = "";
BlankPenalty = 0.0F;
Hr = new HomophoneReplacerConfig();
}
public FeatureConfig FeatConfig;
public OfflineModelConfig ModelConfig;
public OfflineLMConfig LmConfig;
[MarshalAs(UnmanagedType.LPStr)]
public string DecodingMethod;
public int MaxActivePaths;
[MarshalAs(UnmanagedType.LPStr)]
public string HotwordsFile;
public float HotwordsScore;
[MarshalAs(UnmanagedType.LPStr)]
public string RuleFsts;
[MarshalAs(UnmanagedType.LPStr)]
public string RuleFars;
public float BlankPenalty;
public HomophoneReplacerConfig Hr;
}
}