Skip to content

Commit

Permalink
fix(train): fix y_mel length (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
34j committed Apr 16, 2023
1 parent f7f3c9b commit 2d71992
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/so_vits_svc_fork/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ def training_step(self, batch: dict[str, torch.Tensor], batch_idx: int) -> None:
self.hparams.train.segment_size // self.hparams.data.hop_length,
)
y_hat_mel = mel_spectrogram_torch(y_hat.squeeze(1), self.hparams)
y_mel = y_mel[..., : y_hat_mel.shape[-1]]
y = commons.slice_segments(
y,
ids_slice * self.hparams.data.hop_length,
Expand Down

0 comments on commit 2d71992

Please sign in to comment.