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
1static class ShaderNames 2{ 3public static void write ( string path , IEnumerable < string > names ) 4{ 5string [] arr = names . ToArray (); 6using var stream = File . CreateText ( path ); 7stream . WriteLine ( @"// This source file is generated by a tool 8#include ""stdafx.h"" 9#include ""shaderNames.h"" 10" ); 11 12stream . WriteLine ( "static const std::array<const char*, {0}> s_shaderNames = " , arr . Length ); 13stream . WriteLine ( "{" ); 14foreach ( string name in arr ) 15stream . WriteLine ( @" ""{0}""," , name ); 16 17stream . Write ( @"}; 18 19const char* DirectCompute::computeShaderName( eComputeShader cs ) 20{ 21const uint16_t i = (uint16_t)cs; 22if( i < s_shaderNames.size() ) 23return s_shaderNames[ i ]; 24return nullptr; 25}" ); 26} 27}