mirror of
https://github.com/wassname/TTS.git
synced 2026-09-09 11:16:00 +08:00
integrade concatinative speker embedding to tacotron
This commit is contained in:
+30
-1
@@ -54,7 +54,8 @@ class DecoderTests(unittest.TestCase):
|
||||
trans_agent=True,
|
||||
forward_attn_mask=True,
|
||||
location_attn=True,
|
||||
separate_stopnet=True)
|
||||
separate_stopnet=True,
|
||||
speaker_embedding_dim=0)
|
||||
dummy_input = T.rand(4, 8, 256)
|
||||
dummy_memory = T.rand(4, 2, 80)
|
||||
|
||||
@@ -66,6 +67,34 @@ class DecoderTests(unittest.TestCase):
|
||||
assert output.shape[2] == 80 * 2, "size not {}".format(output.shape[2])
|
||||
assert stop_tokens.shape[0] == 4
|
||||
|
||||
def test_in_out_multispeaker(self):
|
||||
layer = Decoder(
|
||||
in_features=256,
|
||||
memory_dim=80,
|
||||
r=2,
|
||||
memory_size=4,
|
||||
attn_windowing=False,
|
||||
attn_norm="sigmoid",
|
||||
prenet_type='original',
|
||||
prenet_dropout=True,
|
||||
forward_attn=True,
|
||||
trans_agent=True,
|
||||
forward_attn_mask=True,
|
||||
location_attn=True,
|
||||
separate_stopnet=True,
|
||||
speaker_embedding_dim=80)
|
||||
dummy_input = T.rand(4, 8, 256)
|
||||
dummy_memory = T.rand(4, 2, 80)
|
||||
dummy_embed = T.rand(4, 80)
|
||||
|
||||
output, alignment, stop_tokens = layer(
|
||||
dummy_input, dummy_memory, mask=None, speaker_embeddings=dummy_embed)
|
||||
|
||||
assert output.shape[0] == 4
|
||||
assert output.shape[1] == 1, "size not {}".format(output.shape[1])
|
||||
assert output.shape[2] == 80 * 2, "size not {}".format(output.shape[2])
|
||||
assert stop_tokens.shape[0] == 4
|
||||
|
||||
|
||||
class EncoderTests(unittest.TestCase):
|
||||
def test_in_out(self):
|
||||
|
||||
Reference in New Issue
Block a user