diff --git a/examples/bench.wasm/emscripten.cpp b/examples/bench.wasm/emscripten.cpp index cc761485..083397db 100644 --- a/examples/bench.wasm/emscripten.cpp +++ b/examples/bench.wasm/emscripten.cpp @@ -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; } diff --git a/examples/bench/bench.cpp b/examples/bench/bench.cpp index a16c0f7f..db1c4e80 100644 --- a/examples/bench/bench.cpp +++ b/examples/bench/bench.cpp @@ -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; }