Add C# API for Dolphin CTC models (#2089)

This commit is contained in:
Fangjun Kuang
2025-04-02 23:36:22 +08:00
committed by GitHub
parent 18a6ed5ddc
commit 2dc0f91904
10 changed files with 52 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
/// Copyright (c) 2025 Xiaomi Corporation (authors: Fangjun Kuang)
using System.Runtime.InteropServices;
namespace SherpaOnnx
{
[StructLayout(LayoutKind.Sequential)]
public struct OfflineDolphinModelConfig
{
public OfflineDolphinModelConfig()
{
Model = "";
}
[MarshalAs(UnmanagedType.LPStr)]
public string Model;
}
}

View File

@@ -26,6 +26,7 @@ namespace SherpaOnnx
SenseVoice = new OfflineSenseVoiceModelConfig();
Moonshine = new OfflineMoonshineModelConfig();
FireRedAsr = new OfflineFireRedAsrModelConfig();
Dolphin = new OfflineDolphinModelConfig();
}
public OfflineTransducerModelConfig Transducer;
public OfflineParaformerModelConfig Paraformer;
@@ -58,5 +59,6 @@ namespace SherpaOnnx
public OfflineSenseVoiceModelConfig SenseVoice;
public OfflineMoonshineModelConfig Moonshine;
public OfflineFireRedAsrModelConfig FireRedAsr;
public OfflineDolphinModelConfig Dolphin;
}
}