Spaces:
Sleeping
Sleeping
whisper : remove redundant assignments (#3178)
Browse filesThis commit removes some redundant assignments in the function
`whisper_exp_compute_token_level_timestamps`.
The motivations for this is that tokens[j] and token are references to
the same object and this can be a little confusing when reading the
code.
- src/whisper.cpp +0 -6
src/whisper.cpp
CHANGED
|
@@ -8397,12 +8397,6 @@ static void whisper_exp_compute_token_level_timestamps(
|
|
| 8397 |
|
| 8398 |
const int64_t tt = t_beg + 2*(token.tid - whisper_token_beg(&ctx));
|
| 8399 |
|
| 8400 |
-
tokens[j].id = token.id;
|
| 8401 |
-
tokens[j].tid = token.tid;
|
| 8402 |
-
tokens[j].p = token.p;
|
| 8403 |
-
tokens[j].pt = token.pt;
|
| 8404 |
-
tokens[j].ptsum = token.ptsum;
|
| 8405 |
-
|
| 8406 |
tokens[j].vlen = voice_length(whisper_token_to_str(&ctx, token.id));
|
| 8407 |
|
| 8408 |
if (token.pt > thold_pt && token.ptsum > thold_ptsum && token.tid > tid_last && tt <= t1) {
|
|
|
|
| 8397 |
|
| 8398 |
const int64_t tt = t_beg + 2*(token.tid - whisper_token_beg(&ctx));
|
| 8399 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8400 |
tokens[j].vlen = voice_length(whisper_token_to_str(&ctx, token.id));
|
| 8401 |
|
| 8402 |
if (token.pt > thold_pt && token.ptsum > thold_ptsum && token.tid > tid_last && tt <= t1) {
|