Add C API for streaming HLG decoding (#734)
This commit is contained in:
@@ -116,6 +116,21 @@ namespace SherpaOnnx
|
||||
public int FeatureDim;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct OnlineCtcFstDecoderConfig
|
||||
{
|
||||
public OnlineCtcFstDecoderConfig()
|
||||
{
|
||||
Graph = "";
|
||||
MaxActive = 3000;
|
||||
}
|
||||
|
||||
[MarshalAs(UnmanagedType.LPStr)]
|
||||
public string Graph;
|
||||
|
||||
public int MaxActive;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct OnlineRecognizerConfig
|
||||
{
|
||||
@@ -131,6 +146,7 @@ namespace SherpaOnnx
|
||||
Rule3MinUtteranceLength = 20.0F;
|
||||
HotwordsFile = "";
|
||||
HotwordsScore = 1.5F;
|
||||
CtcFstDecoderConfig = new OnlineCtcFstDecoderConfig();
|
||||
}
|
||||
public FeatureConfig FeatConfig;
|
||||
public OnlineModelConfig ModelConfig;
|
||||
@@ -167,6 +183,8 @@ namespace SherpaOnnx
|
||||
|
||||
/// Bonus score for each token in hotwords.
|
||||
public float HotwordsScore;
|
||||
|
||||
public OnlineCtcFstDecoderConfig CtcFstDecoderConfig;
|
||||
}
|
||||
|
||||
public class OnlineRecognizerResult
|
||||
|
||||
Reference in New Issue
Block a user