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-mr_series-sherpa-onnx/scripts/dotnet/OfflineRecognizerConfig.cs
东风破 00de2bd00b Refactor .Net example project (#1049)
Co-authored-by: 东风破 <birdfishs@163.com>
2024-06-24 10:10:13 +08:00

46 lines
1.1 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 = "";
}
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;
}
}