bench : fix n_mels

This commit is contained in:
Georgi Gerganov 2023-11-07 13:45:56 +02:00
parent 8fb0a1cd1c
commit a0c0d08d0f
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735
2 changed files with 4 additions and 4 deletions

View File

@ -23,9 +23,9 @@ void bench_main(size_t index) {
fprintf(stderr, "%s: running benchmark with %d threads - please wait...\n", __func__, n_threads);
const int n_mel = 80;
const int n_mels = whisper_model_n_mels(ctx);
if (int ret = whisper_set_mel(ctx, nullptr, 0, n_mel)) {
if (int ret = whisper_set_mel(ctx, nullptr, 0, n_mels)) {
fprintf(stderr, "error: failed to set mel: %d\n", ret);
return;
}

View File

@ -73,9 +73,9 @@ int whisper_bench_full(const whisper_params & params) {
return 2;
}
const int n_mel = 80;
const int n_mels = whisper_model_n_mels(ctx);
if (int ret = whisper_set_mel(ctx, nullptr, 0, n_mel)) {
if (int ret = whisper_set_mel(ctx, nullptr, 0, n_mels)) {
fprintf(stderr, "error: failed to set mel: %d\n", ret);
return 3;
}