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 g is not None:
|
||||||
if hasattr(self, "emb_g"):
|
if hasattr(self, "emb_g"):
|
||||||
# use speaker embedding layer
|
# 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]
|
g = F.normalize(self.emb_g(g)).unsqueeze(-1) # [b, h, 1]
|
||||||
else:
|
else:
|
||||||
# use d-vector
|
# use d-vector
|
||||||
|
|
Loading…
Reference in New Issue