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

KonstantinCommentsd9c14a5

master
967 B24 linesraw
1using System.Runtime.InteropServices;
2
3namespace Whisper.Internal
4{
5	/// <summary>Unmanaged code calls this to check for cancellation</summary>
6	/// <remarks>Return 0 to proceed, or 1 to stop the process and return from Context.runCapture method</remarks>
7	[UnmanagedFunctionPointer( CallingConvention.StdCall )]
8	public delegate int pfnShouldCancel( IntPtr pv );
9
10	/// <summary>Unmanaged code calls this to notify about the status</summary>
11	[UnmanagedFunctionPointer( CallingConvention.StdCall )]
12	public delegate int pfnCaptureStatus( IntPtr pv, eCaptureStatus status );
13
14	/// <summary>Capture callbacks for unmanaged code</summary>
15	public struct sCaptureCallbacks
16	{
17		/// <summary>Cancellation function pointer</summary>
18		public pfnShouldCancel shouldCancel;
19		/// <summary>Capture status function pointer</summary>
20		public pfnCaptureStatus captureStatus;
21		/// <summary>Context pointer, only needed for C++ compatibility</summary>
22		public IntPtr pv;
23	}
24}