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
1.5 KiB39 linesraw
1#pragma once
2#include <stdint.h>
3#include "MfStructs.h"
4struct IMFSourceReader;
5
6namespace Whisper
7{
8	__interface __declspec( novtable, uuid( "013583aa-c9eb-42bc-83db-633c2c317051" ) ) iAudioBuffer : public IUnknown
9	{
10		uint32_t __stdcall countSamples() const;
11		const float* __stdcall getPcmMono() const;
12		const float* __stdcall getPcmStereo() const;
13		HRESULT __stdcall getTime( int64_t& rdi ) const;
14	};
15
16	__interface __declspec( novtable, uuid( "35b988da-04a6-476a-a193-d8891d5dc390" ) ) iAudioReader : public IUnknown
17	{
18		HRESULT __stdcall getDuration( int64_t& rdi ) const;
19		HRESULT __stdcall getReader( IMFSourceReader** pp ) const;
20		HRESULT __stdcall requestedStereo() const;
21	};
22
23	__interface __declspec( novtable, uuid( "747752c2-d9fd-40df-8847-583c781bf013" ) ) iAudioCapture : public IUnknown
24	{
25		HRESULT __stdcall getReader( IMFSourceReader** pp ) const;
26		const sCaptureParams& __stdcall getParams() const;
27	};
28
29	__interface __declspec( novtable, uuid( "fb9763a5-d77d-4b6e-aff8-f494813cebd8" ) ) iMediaFoundation : public IUnknown
30	{
31		HRESULT __stdcall loadAudioFile( LPCTSTR path, bool stereo, iAudioBuffer** pp ) const;
32		HRESULT __stdcall openAudioFile( LPCTSTR path, bool stereo, iAudioReader** pp );
33
34		HRESULT __stdcall listCaptureDevices( pfnFoundCaptureDevices pfn, void* pv );
35		HRESULT __stdcall openCaptureDevice( LPCTSTR endpoint, const sCaptureParams& captureParams, iAudioCapture** pp );
36	};
37
38	HRESULT __stdcall initMediaFoundation( iMediaFoundation** pp );
39}