From b43b36e0069ff86244afaafdb9cba207521d8572 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sat, 8 Oct 2022 11:34:20 +0300 Subject: [PATCH] Update tests --- tests/CMakeLists.txt | 12 ++++++------ whisper.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index bf4ea35..69b73ff 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,7 +1,7 @@ set(TEST_TARGET test-main-tiny) add_test(NAME ${TEST_TARGET} COMMAND $ - -m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-tiny.bin + -m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-tiny.bin -l fr -f ${PROJECT_SOURCE_DIR}/samples/jfk.wav) set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "tiny;gh") @@ -15,21 +15,21 @@ set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "tiny;en;gh") set(TEST_TARGET test-main-base) add_test(NAME ${TEST_TARGET} COMMAND $ - -m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-base.bin + -m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-base.bin -l fr -f ${PROJECT_SOURCE_DIR}/samples/jfk.wav) -set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "base;gh") +set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "base") set(TEST_TARGET test-main-base.en) add_test(NAME ${TEST_TARGET} COMMAND $ -m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-base.en.bin -f ${PROJECT_SOURCE_DIR}/samples/jfk.wav) -set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "base;en;gh") +set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "base;en") set(TEST_TARGET test-main-small) add_test(NAME ${TEST_TARGET} COMMAND $ - -m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-small.bin + -m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-small.bin -l fr -f ${PROJECT_SOURCE_DIR}/samples/jfk.wav) set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "small") @@ -43,7 +43,7 @@ set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "small;en") set(TEST_TARGET test-main-medium) add_test(NAME ${TEST_TARGET} COMMAND $ - -m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-medium.bin + -m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-medium.bin -l fr -f ${PROJECT_SOURCE_DIR}/samples/jfk.wav) set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "medium") diff --git a/whisper.cpp b/whisper.cpp index cdf76be..af89815 100644 --- a/whisper.cpp +++ b/whisper.cpp @@ -1012,7 +1012,7 @@ bool whisper_model_load(const std::string & fname, whisper_context & wctx) { if (n_loaded == 0) { printf("%s: WARN no tensors loaded from model file - assuming empty model for testing\n", __func__); - } else if (n_loaded != model.tensors.size()) { + } else if (n_loaded != (int) model.tensors.size()) { fprintf(stderr, "%s: ERROR not all tensors loaded from model file - expected %zu, got %d\n", __func__, model.tensors.size(), n_loaded); return false; }