diff --git a/examples/command/command.cpp b/examples/command/command.cpp index a9eb7a34c62..0e90e6eea48 100644 --- a/examples/command/command.cpp +++ b/examples/command/command.cpp @@ -693,7 +693,7 @@ int main(int argc, char ** argv) { struct whisper_context_params cparams = whisper_context_default_params(); cparams.use_gpu = params.use_gpu; - cparams.fold_lowercase = params.model_fold_lc; + cparams.vocab_lc = params.model_fold_lc; struct whisper_context * ctx = whisper_init_from_file_with_params(params.model.c_str(), cparams); diff --git a/examples/main/main.cpp b/examples/main/main.cpp index 1170254bdee..48cf15cd86a 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -896,7 +896,7 @@ int main(int argc, char ** argv) { struct whisper_context_params cparams = whisper_context_default_params(); cparams.use_gpu = params.use_gpu; - cparams.fold_lowercase = params.model_fold_lc; + cparams.vocab_lc = params.model_fold_lc; if (!params.dtw.empty()) { cparams.dtw_token_timestamps = true; diff --git a/whisper.cpp b/whisper.cpp index 8b111274c55..644452d7e16 100644 --- a/whisper.cpp +++ b/whisper.cpp @@ -1384,9 +1384,10 @@ static bool whisper_model_load(struct whisper_model_loader * loader, whisper_con } // If requested, output all text as lowercase. - if (wctx.params.fold_lowercase) + if (wctx.params.vocab_lc) { std::transform(word.begin(), word.end(), word.begin(), [](unsigned char c) { return std::tolower(c); }); + } vocab.token_to_id[word] = i; vocab.id_to_token[i] = word; diff --git a/whisper.h b/whisper.h index 31a7f90cd8e..92b3677e6c3 100644 --- a/whisper.h +++ b/whisper.h @@ -116,7 +116,7 @@ extern "C" { int gpu_device; // CUDA device // Fold language tokens to lowercase - bool fold_lowercase; + bool vocab_lc; // [EXPERIMENTAL] Token-level timestamps with DTW bool dtw_token_timestamps;