mirror of
https://github.com/modelscope/FunASR.git
synced 2026-10-12 02:19:18 +00:00
fix: initialize ggml timer in funasr nano cli (#3210)
Initialize the ggml timer before the first ggml_time_us() call so Windows builds do not divide by an uninitialized timer frequency.
This commit is contained in:
@@ -184,6 +184,7 @@ int main(int argc,char**argv){
|
||||
|
||||
std::vector<float> wav;
|
||||
if(!funasr_load_audio_16k_mono(wav_path.c_str(),wav)){fprintf(stderr,"failed to read audio\n");return 1;}
|
||||
ggml_time_init(); // Required before ggml_time_us() on Windows.
|
||||
int64_t t0=ggml_time_us();
|
||||
|
||||
enc_model em; if(!load_enc(enc_path.c_str(),em))return 1;
|
||||
|
||||
Reference in New Issue
Block a user