2024-05-30 11:00:24 +08:00
|
|
|
/// Copyright (c) 2024.5 by 东风破
|
|
|
|
|
|
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
|
|
|
|
namespace SherpaOnnx
|
|
|
|
|
{
|
2024-06-24 10:10:13 +08:00
|
|
|
|
2024-05-30 11:00:24 +08:00
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
|
|
|
public struct OfflineModelConfig
|
|
|
|
|
{
|
|
|
|
|
public OfflineModelConfig()
|
|
|
|
|
{
|
|
|
|
|
Transducer = new OfflineTransducerModelConfig();
|
|
|
|
|
Paraformer = new OfflineParaformerModelConfig();
|
|
|
|
|
NeMoCtc = new OfflineNemoEncDecCtcModelConfig();
|
|
|
|
|
Whisper = new OfflineWhisperModelConfig();
|
|
|
|
|
Tdnn = new OfflineTdnnModelConfig();
|
|
|
|
|
Tokens = "";
|
|
|
|
|
NumThreads = 1;
|
|
|
|
|
Debug = 0;
|
|
|
|
|
Provider = "cpu";
|
|
|
|
|
ModelType = "";
|
2024-06-04 17:05:49 +08:00
|
|
|
ModelingUnit = "cjkchar";
|
|
|
|
|
BpeVocab = "";
|
2024-06-05 00:26:40 +08:00
|
|
|
TeleSpeechCtc = "";
|
2024-07-20 17:09:23 +08:00
|
|
|
SenseVoice = new OfflineSenseVoiceModelConfig();
|
2024-10-27 13:14:25 +08:00
|
|
|
Moonshine = new OfflineMoonshineModelConfig();
|
2025-02-17 13:32:41 +08:00
|
|
|
FireRedAsr = new OfflineFireRedAsrModelConfig();
|
2025-04-02 23:36:22 +08:00
|
|
|
Dolphin = new OfflineDolphinModelConfig();
|
2024-05-30 11:00:24 +08:00
|
|
|
}
|
|
|
|
|
public OfflineTransducerModelConfig Transducer;
|
|
|
|
|
public OfflineParaformerModelConfig Paraformer;
|
|
|
|
|
public OfflineNemoEncDecCtcModelConfig NeMoCtc;
|
|
|
|
|
public OfflineWhisperModelConfig Whisper;
|
|
|
|
|
public OfflineTdnnModelConfig Tdnn;
|
|
|
|
|
|
|
|
|
|
[MarshalAs(UnmanagedType.LPStr)]
|
|
|
|
|
public string Tokens;
|
|
|
|
|
|
|
|
|
|
public int NumThreads;
|
|
|
|
|
|
|
|
|
|
public int Debug;
|
|
|
|
|
|
|
|
|
|
[MarshalAs(UnmanagedType.LPStr)]
|
|
|
|
|
public string Provider;
|
|
|
|
|
|
|
|
|
|
[MarshalAs(UnmanagedType.LPStr)]
|
|
|
|
|
public string ModelType;
|
2024-06-04 17:05:49 +08:00
|
|
|
|
|
|
|
|
[MarshalAs(UnmanagedType.LPStr)]
|
|
|
|
|
public string ModelingUnit;
|
|
|
|
|
|
|
|
|
|
[MarshalAs(UnmanagedType.LPStr)]
|
|
|
|
|
public string BpeVocab;
|
2024-06-05 00:26:40 +08:00
|
|
|
|
|
|
|
|
[MarshalAs(UnmanagedType.LPStr)]
|
|
|
|
|
public string TeleSpeechCtc;
|
2024-06-24 10:10:13 +08:00
|
|
|
|
2024-07-20 17:09:23 +08:00
|
|
|
public OfflineSenseVoiceModelConfig SenseVoice;
|
2024-10-27 13:14:25 +08:00
|
|
|
public OfflineMoonshineModelConfig Moonshine;
|
2025-02-17 13:32:41 +08:00
|
|
|
public OfflineFireRedAsrModelConfig FireRedAsr;
|
2025-04-02 23:36:22 +08:00
|
|
|
public OfflineDolphinModelConfig Dolphin;
|
2024-07-20 17:09:23 +08:00
|
|
|
}
|
|
|
|
|
}
|