yum-archive/TaSTT-Whisper

High-performance GPGPU inference of OpenAI's Whisper automatic speech recognition (ASR) model

git clone https://git.yummers.dev/yum-archive/TaSTT-Whisper

KonstantinMinor, .NET wrapper85cf109

master
1.2 KiB28 linesraw
1using ComLight;
2using System.ComponentModel;
3
4namespace Whisper
5{
6	/// <summary>A model in VRAM, loaded from GGML file.</summary>
7	/// <remarks>This object doesn't keep any mutable state, and can be safely used from multiple threads concurrently</remarks>
8	[ComInterface( "abefb4c9-e8d8-46a3-8747-5afbadef1adb", eMarshalDirection.ToManaged ), CustomConventions( typeof( Internal.NativeLogger ) )]
9	public interface iModel: IDisposable
10	{
11		/// <summary>Create a context to transcribe audio with this model</summary>
12		/// <remarks>Don't call this method, use <see cref="ExtensionMethods.createContext(iModel)" /> instead.</remarks>
13		[RetValIndex, EditorBrowsable( EditorBrowsableState.Never )]
14		Internal.iContext createContextInternal();
15
16		/// <summary>True if this model is multi-lingual</summary>
17		bool isMultilingual();
18
19		/// <summary>Retrieve integer IDs of the special tokens defined by the model</summary>
20		[RetValIndex]
21		SpecialTokens getSpecialTokens();
22
23		/// <summary>Try to resolve integer token ID into string.</summary>
24		/// <remarks>Don't call this method, use <see cref="ExtensionMethods.stringFromToken(iModel, int)" /> instead.</remarks>
25		[EditorBrowsable( EditorBrowsableState.Never )]
26		IntPtr stringFromTokenInternal( int id );
27	}
28}