Add Pascal/Go/C#/Dart API for NeMo Canary ASR models (#2367)
Add support for the new NeMo Canary ASR model across multiple language bindings by introducing a Canary model configuration and setter method on the offline recognizer. - Define Canary model config in Pascal, Go, C#, Dart and update converter functions - Add SetConfig API for offline recognizer (Pascal, Go, C#, Dart) - Extend CI/workflows and example scripts to test non-streaming Canary decoding
This commit is contained in:
32
scripts/dotnet/OfflineCanaryModelConfig.cs
Normal file
32
scripts/dotnet/OfflineCanaryModelConfig.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
/// Copyright (c) 2024.5 by 东风破
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SherpaOnnx
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct OfflineCanaryModelConfig
|
||||
{
|
||||
public OfflineCanaryModelConfig()
|
||||
{
|
||||
Encoder = "";
|
||||
Decoder = "";
|
||||
SrcLang = "en";
|
||||
TgtLang = "en";
|
||||
UsePnc = 1;
|
||||
}
|
||||
[MarshalAs(UnmanagedType.LPStr)]
|
||||
public string Encoder;
|
||||
|
||||
[MarshalAs(UnmanagedType.LPStr)]
|
||||
public string Decoder;
|
||||
|
||||
[MarshalAs(UnmanagedType.LPStr)]
|
||||
public string SrcLang;
|
||||
|
||||
[MarshalAs(UnmanagedType.LPStr)]
|
||||
public string TgtLang;
|
||||
|
||||
public int UsePnc;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user