mirror of
https://github.com/shivammehta25/Matcha-TTS.git
synced 2026-02-05 02:09:21 +08:00
Fixing batched synthesis for multispeaker model
This commit is contained in:
@@ -326,12 +326,13 @@ def batched_synthesis(args, device, model, vocoder, denoiser, texts, spk):
|
|||||||
for i, batch in enumerate(dataloader):
|
for i, batch in enumerate(dataloader):
|
||||||
i = i + 1
|
i = i + 1
|
||||||
start_t = dt.datetime.now()
|
start_t = dt.datetime.now()
|
||||||
|
b = batch["x"].shape[0]
|
||||||
output = model.synthesise(
|
output = model.synthesise(
|
||||||
batch["x"].to(device),
|
batch["x"].to(device),
|
||||||
batch["x_lengths"].to(device),
|
batch["x_lengths"].to(device),
|
||||||
n_timesteps=args.steps,
|
n_timesteps=args.steps,
|
||||||
temperature=args.temperature,
|
temperature=args.temperature,
|
||||||
spks=spk,
|
spks=spk.expand(b) if spk is not None else spk,
|
||||||
length_scale=args.speaking_rate,
|
length_scale=args.speaking_rate,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user