mirror of
https://github.com/openai/whisper.git
synced 2025-11-24 06:26:03 +00:00
remove log
This commit is contained in:
parent
9cf2f995bd
commit
5ed89d0ca2
@ -606,13 +606,11 @@ class DecodingTask:
|
||||
else prompt
|
||||
)
|
||||
if (hotwords := self.options.hotwords) and not self.options.prefix:
|
||||
print(f"hotwords: {hotwords}")
|
||||
hotwords_tokens = self.tokenizer.encode(" " + hotwords.strip())
|
||||
if len(hotwords_tokens) >= self.n_ctx // 2:
|
||||
hotwords_tokens = hotwords_tokens[: self.n_ctx // 2 - 1]
|
||||
tokens = (
|
||||
[self.tokenizer.sot_prev]
|
||||
+ prompt_tokens[-(self.n_ctx // 2 - 1) :]
|
||||
+ (hotwords_tokens if self.options.hotwords is not None else [])
|
||||
+ (prompt_tokens[-(self.n_ctx // 2 - 1) :] if self.options.prompt is not None else [])
|
||||
+ tokens
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user