SWivid commited on
Commit
de2acdf
·
1 Parent(s): f07635d

fix speech_edit.py

Browse files
Files changed (1) hide show
  1. src/f5_tts/infer/speech_edit.py +1 -1
src/f5_tts/infer/speech_edit.py CHANGED
@@ -154,7 +154,7 @@ for part in parts_to_edit:
154
  dim=-1,
155
  )
156
  offset = end * target_sample_rate
157
- # audio = torch.cat((audio_, audio[:, round(offset):]), dim = -1)
158
  edit_mask = F.pad(edit_mask, (0, audio.shape[-1] // hop_length - edit_mask.shape[-1] + 1), value=True)
159
  audio = audio.to(device)
160
  edit_mask = edit_mask.to(device)
 
154
  dim=-1,
155
  )
156
  offset = end * target_sample_rate
157
+ audio = torch.cat((audio_, audio[:, round(offset) :]), dim=-1)
158
  edit_mask = F.pad(edit_mask, (0, audio.shape[-1] // hop_length - edit_mask.shape[-1] + 1), value=True)
159
  audio = audio.to(device)
160
  edit_mask = edit_mask.to(device)