Fix pred_avg_pitch_emb

This commit is contained in:
WeberJulian 2022-06-28 14:37:54 +02:00
parent 0a54d30023
commit 602ca85c74
1 changed files with 2 additions and 1 deletions

View File

@ -1727,7 +1727,8 @@ class Vits(BaseTTS):
attn_mask = x_mask * y_mask.transpose(1, 2) # [B, 1, T_enc] * [B, T_dec, 1]
attn = generate_path(w_ceil.squeeze(1), attn_mask.squeeze(1).transpose(1, 2))
pred_avg_pitch_emb = None
if self.args.use_pitch:
_, _, pred_avg_pitch_emb = self.forward_pitch_predictor(x, x_lengths, g_pp=g, pitch_transform=pitch_transform)
x = x + pred_avg_pitch_emb