KeywordSpotterConfig.cs
1019 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/// Copyright (c) 2024 Xiaomi Corporation
using System.Runtime.InteropServices;
namespace SherpaOnnx
{
[StructLayout(LayoutKind.Sequential)]
public struct KeywordSpotterConfig
{
public KeywordSpotterConfig()
{
FeatConfig = new FeatureConfig();
ModelConfig = new OnlineModelConfig();
MaxActivePaths = 4;
NumTrailingBlanks = 1;
KeywordsScore = 1.0F;
KeywordsThreshold = 0.25F;
KeywordsFile = "";
KeywordsBuf= "";
KeywordsBufSize= 0;
}
public FeatureConfig FeatConfig;
public OnlineModelConfig ModelConfig;
public int MaxActivePaths;
public int NumTrailingBlanks;
public float KeywordsScore;
public float KeywordsThreshold;
[MarshalAs(UnmanagedType.LPStr)]
public string KeywordsFile;
[MarshalAs(UnmanagedType.LPStr)]
public string KeywordsBuf;
public int KeywordsBufSize;
}
}