mirror of
https://github.com/neonbjb/tortoise-tts.git
synced 2026-04-05 06:25:39 +00:00
Fixed redact index error bug https://github.com/neonbjb/tortoise-tts/issues/362
This commit is contained in:
parent
d22ba29eca
commit
d35e33dfd6
1 changed files with 1 additions and 1 deletions
|
|
@ -135,7 +135,7 @@ class Wav2VecAlignment:
|
|||
non_redacted_intervals = []
|
||||
last_point = 0
|
||||
for i in range(len(fully_split)):
|
||||
if i % 2 == 0:
|
||||
if i % 2 == 0 and fully_split[i] != "": # Check for empty string fixes index error
|
||||
end_interval = max(0, last_point + len(fully_split[i]) - 1)
|
||||
non_redacted_intervals.append((last_point, end_interval))
|
||||
last_point += len(fully_split[i])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue