diff options
| author | Konstantin <const@const.me> | 2023-01-16 14:52:43 +0100 |
|---|---|---|
| committer | Konstantin <const@const.me> | 2023-01-16 14:52:43 +0100 |
| commit | 8c4603c73675958efc960fbd4bb599a2909d106a (patch) | |
| tree | 714dc6fc9a1672d5fd7f89676b97e10959662abc /WhisperNet/API/iModel.cs | |
| parent | 990a8d0dbaefc996244097397259e92758b15cce (diff) | |
Source codes
Diffstat (limited to 'WhisperNet/API/iModel.cs')
| -rw-r--r-- | WhisperNet/API/iModel.cs | 27 |
1 files changed, 27 insertions, 0 deletions
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 +{ + /// <summary>A model in VRAM, loaded from GGML file.</summary> + /// <remarks>This objetc doesn't keep any mutable state, and can be safely used from multiple threads concurrently</remarks> + [ComInterface( "abefb4c9-e8d8-46a3-8747-5afbadef1adb", eMarshalDirection.ToManaged ), CustomConventions( typeof( Internal.NativeLogger ) )] + public interface iModel: IDisposable + { + /// <summary>Create a context to transcribe audio with this model</summary> + /// <remarks>Don't call this method, use <see cref="ExtensionMethods.createContext(iModel)" /> instead.</remarks> + [RetValIndex, EditorBrowsable( EditorBrowsableState.Never )] + Internal.iContext createContextInternal(); + + /// <summary>True if this model is multi-lingual</summary> + bool isMultilingual(); + + /// <summary>Retrieve integer IDs of the special tokens defined by the model</summary> + [RetValIndex] + SpecialTokens getSpecialTokens(); + + /// <summary>Try to resolve integer token ID into string.</summary> + /// <remarks>Don't call this method, use <see cref="ExtensionMethods.stringFromToken(iModel, int)" /> instead.</remarks> + IntPtr stringFromTokenInternal( int id ); + } +}
\ No newline at end of file |
