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
8c4603c
master
1#include "stdafx.h" 2 3BOOL __stdcallDllMain (HINSTANCE hinstDLL ,DWORD fdwReason ,LPVOID lpvReserved ) 4{ 5// Perform actions based on the reason for calling. 6switch (fdwReason ) 7 { 8case DLL_PROCESS_ATTACH : 9// Initialize once for each new process. Return FALSE to fail DLL load. 10DisableThreadLibraryCalls ( (HMODULE )hinstDLL ); 11break ; 12case DLL_THREAD_ATTACH : 13// Do thread-specific initialization. 14break ; 15case DLL_THREAD_DETACH : 16// Do thread-specific cleanup. 17break ; 18case DLL_PROCESS_DETACH : 19if (lpvReserved != nullptr ) 20 { 21break ;// do not do cleanup if process termination scenario 22 } 23// Perform any necessary cleanup 24break ; 25 } 26return TRUE;// Successful DLL_PROCESS_ATTACH. 27}