ggerganov commited on
Commit
40b898f
·
1 Parent(s): 19b5bd5

whisper : fix bug in token sampling logic

Browse files
Files changed (1) hide show
  1. whisper.cpp +1 -1
whisper.cpp CHANGED
@@ -2470,7 +2470,7 @@ int whisper_full(
2470
  result_all.push_back({ t0, t1, text });
2471
  }
2472
  text = "";
2473
- while (result_cur[i].id > whisper_token_beg(ctx) && i < (int) result_cur.size()) {
2474
  i++;
2475
  }
2476
  i--;
 
2470
  result_all.push_back({ t0, t1, text });
2471
  }
2472
  text = "";
2473
+ while (i < (int) result_cur.size() && result_cur[i].id > whisper_token_beg(ctx)) {
2474
  i++;
2475
  }
2476
  i--;