Pass speaker id during verification

This commit is contained in:
Michael Hansen
2023-01-05 17:23:02 -05:00
parent c38020cb14
commit 06a154a4ed
3 changed files with 24 additions and 6 deletions

View File

@@ -686,6 +686,7 @@ class SynthesizerTrn(nn.Module):
):
x, m_p, logs_p, x_mask = self.enc_p(x, x_lengths)
if self.n_speakers > 1:
assert sid is not None, "Missing speaker id"
g = self.emb_g(sid).unsqueeze(-1) # [b, h, 1]
else:
g = None