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
11c399b
master
1#include "stdafx.h" 2#include "modelFactory.h" 3#include "API/iContext.cl.h" 4 5HRESULT COMLIGHTCALL Whisper ::loadModel (const wchar_t * path ,eModelImplementation impl ,uint32_t flags ,const sLoadModelCallbacks * callbacks ,iModel ** pp ) 6{ 7switch (impl ) 8 { 9case eModelImplementation::GPU : 10return loadGpuModel (path , false,flags ,callbacks ,pp ); 11case eModelImplementation::Hybrid : 12return loadGpuModel (path , true,flags ,callbacks ,pp ); 13case eModelImplementation::Reference : 14if (0 != flags ) 15logWarning (u8"The reference model doesn’t currently use any flags, argument ignored" ); 16return loadReferenceCpuModel (path ,pp ); 17 } 18 19logError (u8"Unknown model implementation 0x%X" , (int )impl ); 20return E_INVALIDARG ; 21}