Skip to content

Commit 309c31c

Browse files
authored
fix(openvoice): correctly set utterance length (#260)
1 parent 23b7cac commit 309c31c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TTS/vc/models/openvoice.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def eval_step(self) -> None: ...
226226
def _set_x_lengths(x: torch.Tensor, aux_input: Mapping[str, Optional[torch.Tensor]]) -> torch.Tensor:
227227
if "x_lengths" in aux_input and aux_input["x_lengths"] is not None:
228228
return aux_input["x_lengths"]
229-
return torch.tensor(x.shape[1:2]).to(x.device)
229+
return torch.tensor(x.shape[-1:]).to(x.device)
230230

231231
@torch.inference_mode()
232232
def inference(

0 commit comments

Comments
 (0)