Skip to content

Commit a122403

Browse files
ulatekhggerganov
andauthored
Apply suggestions from code review
Co-authored-by: Georgi Gerganov <[email protected]>
1 parent 6d57fac commit a122403

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

whisper.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1384,9 +1384,10 @@ static bool whisper_model_load(struct whisper_model_loader * loader, whisper_con
13841384
}
13851385

13861386
// If requested, output all text as lowercase.
1387-
if (wctx.params.fold_lowercase)
1387+
if (wctx.params.fold_lowercase) {
13881388
std::transform(word.begin(), word.end(), word.begin(),
13891389
[](unsigned char c) { return std::tolower(c); });
1390+
}
13901391

13911392
vocab.token_to_id[word] = i;
13921393
vocab.id_to_token[i] = word;

whisper.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ extern "C" {
116116
int gpu_device; // CUDA device
117117

118118
// Fold language tokens to lowercase
119-
bool fold_lowercase;
119+
bool vocab_lc;
120120

121121
// [EXPERIMENTAL] Token-level timestamps with DTW
122122
bool dtw_token_timestamps;

0 commit comments

Comments
 (0)