Skip to content

Commit

Permalink
fix(openvoice): correctly set utterance length (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
eginhard authored Jan 15, 2025
1 parent 23b7cac commit 309c31c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TTS/vc/models/openvoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 309c31c

Please sign in to comment.