From 309c31c7c4e5c0da66fd04993ad0aa14a6e2c5fc Mon Sep 17 00:00:00 2001 From: Enno Hermann Date: Wed, 15 Jan 2025 16:19:34 +0100 Subject: [PATCH] fix(openvoice): correctly set utterance length (#260) --- TTS/vc/models/openvoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(