diff --git a/TTS/vc/models/openvoice.py b/TTS/vc/models/openvoice.py index 3f193b6b69..943d3de4f9 100644 --- a/TTS/vc/models/openvoice.py +++ b/TTS/vc/models/openvoice.py @@ -226,7 +226,7 @@ def eval_step(self) -> None: ... def _set_x_lengths(x: torch.Tensor, aux_input: Mapping[str, Optional[torch.Tensor]]) -> torch.Tensor: if "x_lengths" in aux_input and aux_input["x_lengths"] is not None: return aux_input["x_lengths"] - return torch.tensor(x.shape[1:2]).to(x.device) + return torch.tensor(x.shape[-1:]).to(x.device) @torch.inference_mode() def inference(