From 8c4603c73675958efc960fbd4bb599a2909d106a Mon Sep 17 00:00:00 2001 From: Konstantin Date: Mon, 16 Jan 2023 14:52:43 +0100 Subject: Source codes --- WhisperNet/API/iModel.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 WhisperNet/API/iModel.cs (limited to 'WhisperNet/API/iModel.cs') diff --git a/WhisperNet/API/iModel.cs b/WhisperNet/API/iModel.cs new file mode 100644 index 0000000..8ec6d17 --- /dev/null +++ b/WhisperNet/API/iModel.cs @@ -0,0 +1,27 @@ +using ComLight; +using System.ComponentModel; + +namespace Whisper +{ + /// A model in VRAM, loaded from GGML file. + /// This objetc doesn't keep any mutable state, and can be safely used from multiple threads concurrently + [ComInterface( "abefb4c9-e8d8-46a3-8747-5afbadef1adb", eMarshalDirection.ToManaged ), CustomConventions( typeof( Internal.NativeLogger ) )] + public interface iModel: IDisposable + { + /// Create a context to transcribe audio with this model + /// Don't call this method, use instead. + [RetValIndex, EditorBrowsable( EditorBrowsableState.Never )] + Internal.iContext createContextInternal(); + + /// True if this model is multi-lingual + bool isMultilingual(); + + /// Retrieve integer IDs of the special tokens defined by the model + [RetValIndex] + SpecialTokens getSpecialTokens(); + + /// Try to resolve integer token ID into string. + /// Don't call this method, use instead. + IntPtr stringFromTokenInternal( int id ); + } +} \ No newline at end of file -- cgit v1.2.3