Commit 2f2841b
whisper : add single-timestamp logic (#2629)
* Fix hallucinations during silence
When the predicted tokens end with a single timestamp the the entire 30 segment should be considered as done, to avoid hallucinations for the remaining part of segment.
This behaviour is on par with openai's whisper. Refer to logic related to `single_timestamp_ending` in https://github.com/openai/whisper/blob/main/whisper/transcribe.py
* Accept review comments related to formatting.
Co-authored-by: Georgi Gerganov <[email protected]>
---------
Co-authored-by: Georgi Gerganov <[email protected]>1 parent 09a1b61 commit 2f2841b
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6060 | 6060 | | |
6061 | 6061 | | |
6062 | 6062 | | |
6063 | | - | |
| 6063 | + | |
6064 | 6064 | | |
6065 | 6065 | | |
6066 | 6066 | | |
| |||
6201 | 6201 | | |
6202 | 6202 | | |
6203 | 6203 | | |
| 6204 | + | |
| 6205 | + | |
| 6206 | + | |
| 6207 | + | |
| 6208 | + | |
| 6209 | + | |
| 6210 | + | |
| 6211 | + | |
| 6212 | + | |
6204 | 6213 | | |
6205 | 6214 | | |
6206 | 6215 | | |
| |||
0 commit comments