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

KonstantinDLL API for diarize featuree1e3ac0

master
1.7 KiB41 linesraw
1using ComLight;
2using System.Runtime.InteropServices;
3using Whisper.Internals;
4
5namespace Whisper.Internal
6{
7    /// <summary>Stateful context, contains methods to transcribe audio</summary>
8    [ComInterface( "b9956374-3b18-4943-90f2-2ab18a404537", eMarshalDirection.ToManaged ), CustomConventions( typeof( NativeLogger ) )]
9	public interface iContext: IDisposable
10	{
11		/// <summary>Run the entire model: PCM -> log mel spectrogram -> encoder -> decoder -> text</summary>
12		void runFull( [In] ref sFullParams @params, iAudioBuffer buffer );
13
14		/// <summary>Run the entire model, streaming audio from the provided reader object</summary>
15		void runStreamed( [In] ref sFullParams @params, [In] ref sProgressSink progressSink, iAudioReader reader );
16
17		/// <summary>Continuously process audio from microphone or a similar capture device</summary>
18		void runCapture( [In] ref sFullParams @params, [In] ref sCaptureCallbacks callbacks, iAudioCapture reader );
19
20		/// <summary>Get text results out of the context</summary>
21		[RetValIndex( 1 )]
22		iTranscribeResult getResults( eResultFlags flags );
23
24		/// <summary>Try to detect speaker by comparing channels of the stereo PCM data</summary>
25		[RetValIndex( 1 )]
26		eSpeakerChannel detectSpeaker( [In] ref sTimeInterval interval );
27
28		/// <summary>Get the model which was used to create this context</summary>
29		[RetValIndex]
30		iModel getModel();
31
32		/// <summary>Full the default parameters of the model, for the specified sampling strategy</summary>
33		[RetValIndex( 1 )]
34		sFullParams fullDefaultParams( eSamplingStrategy strategy );
35
36		/// <summary>Print timing data</summary>
37		void timingsPrint();
38		/// <summary>Reset timing data</summary>
39		void timingsReset();
40	}
41}