mirror of
https://github.com/shivammehta25/Matcha-TTS.git
synced 2026-02-05 02:09:21 +08:00
Adding saving phones while getting durations from matcha
This commit is contained in:
@@ -126,7 +126,7 @@ class FlowMatchingDurationPrediction(nn.Module):
|
||||
self.n_steps = params.n_steps
|
||||
|
||||
@torch.inference_mode()
|
||||
def forward(self, enc_outputs, mask, n_timesteps=None, temperature=1):
|
||||
def forward(self, enc_outputs, mask, n_timesteps=500, temperature=1):
|
||||
"""Forward diffusion
|
||||
|
||||
Args:
|
||||
|
||||
@@ -121,7 +121,7 @@ class MatchaTTS(BaseLightningClass): # 🍵
|
||||
logw = self.dp(enc_output, x_mask)
|
||||
|
||||
w = torch.exp(logw) * x_mask
|
||||
w_ceil = torch.round(w) * length_scale
|
||||
w_ceil = torch.ceil(w) * length_scale
|
||||
# print(w_ceil)
|
||||
y_lengths = torch.clamp_min(torch.sum(w_ceil, [1, 2]), 1).long()
|
||||
y_max_length = y_lengths.max()
|
||||
|
||||
Reference in New Issue
Block a user