Merge pull request #107 from JCGoran/fix/python3.7_compatibility

Added Python 3.7 compatibility
This commit is contained in:
m-bain
2023-03-02 15:31:36 +00:00
committed by GitHub

View File

@ -243,9 +243,8 @@ def align(
if "seg-text" not in segment:
segment["seg-text"] = [transcription]
v = 0
seg_lens = [0] + [len(x) for x in segment["seg-text"]]
seg_lens_cumsum = [v := v + n for n in seg_lens]
seg_lens_cumsum = list(np.cumsum(seg_lens))
sub_seg_idx = 0
wdx = 0