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
012be51
master
1#include <stdint.h> 2#include <vector> 3#include <cstdarg> 4#include "Logger.h" 5 6namespace 7{ 8void logMessage (const char * lvl ,const char8_t * pszFormat , std::va_list va ) 9 { 10fprintf (stderr ,"%s: " ,lvl ); 11vfprintf (stderr , (const char * )pszFormat ,va ); 12fprintf (stderr ,"\n" ); 13 } 14} 15 16#define LOG_MESSAGE_IMPL (lvl ) \ 17 std::va_list args; \ 18 va_start( args, pszFormat ); \ 19 logMessage( lvl, pszFormat, args ); \ 20 va_end( args ); 21 22void logError (const char8_t * pszFormat , ... ) 23{ 24LOG_MESSAGE_IMPL ("Error" ); 25} 26 27void logWarning (const char8_t * pszFormat , ... ) 28{ 29LOG_MESSAGE_IMPL ("Warning" ); 30} 31 32void logInfo (const char8_t * pszFormat , ... ) 33{ 34LOG_MESSAGE_IMPL ("Info" ); 35} 36 37void logDebug (const char8_t * pszFormat , ... ) 38{ 39LOG_MESSAGE_IMPL ("Debug" ); 40}