mirror of https://github.com/coqui-ai/TTS.git
Fix Glow-TTS multi-speaker inference
This commit is contained in:
parent
06cad27e31
commit
ba6e56e01c
|
@ -170,6 +170,8 @@ class GlowTTS(BaseTTS):
|
|||
if g is not None:
|
||||
if hasattr(self, "emb_g"):
|
||||
# use speaker embedding layer
|
||||
if not g.size(): # if is a scalar
|
||||
g = g.unsqueeze(0) # unsqueeze
|
||||
g = F.normalize(self.emb_g(g)).unsqueeze(-1) # [b, h, 1]
|
||||
else:
|
||||
# use d-vector
|
||||
|
|
Loading…
Reference in New Issue