Skip to content

Commit

Permalink
line up conditioning better with the paper
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Jul 27, 2024
1 parent 0c6f5f9 commit 779aef2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions e2_tts_pytorch/e2_tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def forward(
text = list_str_to_tensor(text).to(device)
assert text.shape[0] == batch

x = self.embed_text(x, text)
x = self.embed_text(x, x, text)

# handle lengths (duration)

Expand Down Expand Up @@ -623,7 +623,7 @@ def sample(
duration = torch.full((batch,), duration, device = device, dtype = torch.long)

elif exists(self.duration_predictor):
duration = self.duration_predictor(cond, lens = lens).long()
duration = self.duration_predictor(cond, text = text, lens = lens).long()

duration = torch.maximum(lens + 1, duration) # just add one token so something is generated
duration = duration.clamp(max = max_duration)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "e2-tts-pytorch"
version = "0.1.10"
version = "0.2.0"
description = "E2-TTS in Pytorch"
authors = [
{ name = "Phil Wang", email = "[email protected]" }
Expand Down

0 comments on commit 779aef2

Please sign in to comment.