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
8c4603c
master
1#pragma warning disableCS0649 // Field is never assigned to 2 3// Missing XML comment for publicly visible type or member 4// TODO: remove this line and document them. 5#pragma warning disableCS1591 6 7using System . Runtime . InteropServices ; 8 9namespace Whisper . Internals 10{ 11/// <summary>This callback is called on each new segment</summary> 12[ UnmanagedFunctionPointer ( CallingConvention . Cdecl )] 13delegate int pfnNewSegment ( IntPtr ctx , int countNew , IntPtr userData ); 14 15/// <summary>The callback is called before every encoder run. If it returns S_FALSE, the processing is aborted.</summary> 16[ UnmanagedFunctionPointer ( CallingConvention . Cdecl )] 17delegate int pfnEncoderBegin ( IntPtr ctx , IntPtr userData ); 18 19/// <summary>Transcribe parameters</summary> 20public struct sFullParams 21{ 22internal Parameters publicParams ; 23// The rest of these parameters are not exposed to the user-friendly public API of this DLL 24 25internal IntPtr prompt_tokens ; 26internal int prompt_n_tokens ; 27 28/// <summary>This callback is called on each new segment</summary> 29[ MarshalAs ( UnmanagedType . FunctionPtr )] 30internal pfnNewSegment ? newSegmentCallback ; 31/// <summary>Parameter for the above, not needed in C#</summary> 32internal IntPtr newSegmentCallbackData ; 33 34/// <summary>The callback is called before every encoder run. If it returns false, the processing is aborted</summary> 35[ MarshalAs ( UnmanagedType . FunctionPtr )] 36internal pfnEncoderBegin ? encoderBeginCallback ; 37/// <summary>Parameter for the above, not needed in C#</summary> 38internal IntPtr encoderBeginCallbackData ; 39} 40}