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
946 B35 linesraw
1#pragma once
2#include <stdint.h>
3
4namespace Whisper
5{
6	// Log level for messages
7	enum struct eLogLevel : uint8_t
8	{
9		Error = 0,
10		Warning = 1,
11		Info = 2,
12		Debug = 3
13	};
14	enum struct eLoggerFlags : uint8_t
15	{
16		UseStandardError = 1,
17		SkipFormatMessage = 2,
18	};
19
20	// C function pointer to receive log messages from the library. The messages are encoded in UTF-8.
21	using pfnLoggerSink = void( __stdcall* )( void* context, eLogLevel lvl, const char* message );
22
23	// A sink to receive log messages produced by MeshRepair.dll
24	struct sLoggerSetup
25	{
26		// C function pointer to receive log messages from the library
27		pfnLoggerSink sink = nullptr;
28		// Optional context parameter for the sink function; when consuming from C# you don't need that, pass IntPtr.Zero, delegates can capture things.
29		void* context = nullptr;
30		// Maximum log level to produce
31		eLogLevel level;
32		// Flags about the logger
33		eLoggerFlags flags = (eLoggerFlags)0;
34	};
35}