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:
@@ -14,6 +14,11 @@ namespace SherpaOnnx
|
||||
_handle = new HandleRef(this, h);
|
||||
}
|
||||
|
||||
public void SetConfig(OfflineRecognizerConfig config)
|
||||
{
|
||||
SherpaOnnxOfflineRecognizerSetConfig(_handle.Handle, ref config);
|
||||
}
|
||||
|
||||
public OfflineStream CreateStream()
|
||||
{
|
||||
IntPtr p = SherpaOnnxCreateOfflineStream(_handle.Handle);
|
||||
@@ -65,6 +70,9 @@ namespace SherpaOnnx
|
||||
[DllImport(Dll.Filename)]
|
||||
private static extern IntPtr SherpaOnnxCreateOfflineRecognizer(ref OfflineRecognizerConfig config);
|
||||
|
||||
[DllImport(Dll.Filename)]
|
||||
private static extern void SherpaOnnxOfflineRecognizerSetConfig(IntPtr handle, ref OfflineRecognizerConfig config);
|
||||
|
||||
[DllImport(Dll.Filename)]
|
||||
private static extern void SherpaOnnxDestroyOfflineRecognizer(IntPtr handle);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user