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
3f3a9a1
master
1#pragma once 2#include <whisperWindows.h> 3#include <cstdarg> 4 5void logMessage (Whisper ::eLogLevel lvl ,const char8_t * pszFormat ,va_list args ); 6 7#define LOG_MESSAGE_IMPL (lvl ) \ 8 std::va_list args; \ 9 va_start( args, pszFormat ); \ 10 logMessage( lvl, pszFormat, args ); \ 11 va_end( args ) 12 13inline void logError (const char8_t * pszFormat , ... ) 14{ 15LOG_MESSAGE_IMPL (Whisper ::eLogLevel ::Error ); 16} 17inline void logWarning (const char8_t * pszFormat , ... ) 18{ 19LOG_MESSAGE_IMPL (Whisper ::eLogLevel ::Warning ); 20} 21inline void logInfo (const char8_t * pszFormat , ... ) 22{ 23LOG_MESSAGE_IMPL (Whisper ::eLogLevel ::Info ); 24} 25inline void logDebug (const char8_t * pszFormat , ... ) 26{ 27LOG_MESSAGE_IMPL (Whisper ::eLogLevel ::Debug ); 28} 29 30#undef LOG_MESSAGE_IMPL 31 32HRESULT logNewSegments (const Whisper ::iTranscribeResult * results ,size_t newSegments ,bool printSpecial = false ); 33 34void clearLastError (); 35bool getLastError (CString & rdi ); 36 37void printTime (CStringA & rdi ,Whisper ::sTimeSpan time ,bool comma = false );