Add C# API for Moonshine models. (#1483)
* Also, return timestamps for non-streaming ASR.
This commit is contained in:
29
scripts/dotnet/OfflineMoonshineModelConfig.cs
Normal file
29
scripts/dotnet/OfflineMoonshineModelConfig.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
/// Copyright (c) 2024 Xiaomi Corporation (authors: Fangjun Kuang)
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SherpaOnnx
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct OfflineMoonshineModelConfig
|
||||
{
|
||||
public OfflineMoonshineModelConfig()
|
||||
{
|
||||
Preprocessor = "";
|
||||
Encoder = "";
|
||||
UncachedDecoder = "";
|
||||
CachedDecoder = "";
|
||||
}
|
||||
[MarshalAs(UnmanagedType.LPStr)]
|
||||
public string Preprocessor;
|
||||
|
||||
[MarshalAs(UnmanagedType.LPStr)]
|
||||
public string Encoder;
|
||||
|
||||
[MarshalAs(UnmanagedType.LPStr)]
|
||||
public string UncachedDecoder;
|
||||
|
||||
[MarshalAs(UnmanagedType.LPStr)]
|
||||
public string CachedDecoder;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user