whisper.cpp icon indicating copy to clipboard operation
whisper.cpp copied to clipboard

[patch] small change: use WHISPER_SAMPLE_RATE instead of hard-coded value in error message

Open abelbabel opened this issue 2 years ago • 0 comments

Hi,

a small/quick change:

--- main.cpp_ori        2023-01-04 10:58:52.669456000 +0100
+++ main.cpp    2023-01-04 11:21:27.479196000 +0100
@@ -557,7 +557,7 @@
             }
 
             if (wav.sampleRate != WHISPER_SAMPLE_RATE) {
-                fprintf(stderr, "%s: WAV file '%s' must be 16 kHz\n", argv[0], fname_inp.c_str());
+                fprintf(stderr, "%s: WAV file '%s' must be %i kHz\n", argv[0], fname_inp.c_str(), WHISPER_SAMPLE_RATE/1000);
                 return 8;
             }

Regards abelbabel

abelbabel avatar Jan 04 '23 10:01 abelbabel