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

KonstantinSource codes8c4603c

master
993 B22 linesraw
1#pragma warning disable CS0649 // Field is never assigned to
2using System.Runtime.InteropServices;
3
4namespace Whisper.Internal
5{
6	/// <summary>Identifiers for an audio capture device</summary>
7	public struct sCaptureDevice
8	{
9		readonly IntPtr m_displayName;
10		/// <summary>The display name is suitable for showing to the user, but might not be unique.</summary>
11		public string? displayName => Marshal.PtrToStringUni( m_displayName );
12
13		readonly IntPtr m_endpoint;
14		/// <summary>Endpoint ID for an audio capture device.<br/>
15		/// It uniquely identifies the device on the system, but is not a readable string.</summary>
16		public string? endpoint => Marshal.PtrToStringUni( m_endpoint );
17	}
18
19	/// <summary>Function pointer to consume a list of audio capture device IDs</summary>
20	[UnmanagedFunctionPointer( CallingConvention.StdCall )]
21	public delegate int pfnFoundCaptureDevices( int len, [In, MarshalAs( UnmanagedType.LPArray, SizeParamIndex = 0 )] sCaptureDevice[]? arr, IntPtr pv );
22}