Open thanhnew2001 opened 8 months ago
The speech does not include period or comma
txt = f""" hello. how are you? """ print(f"Text: {txt}")
txt = preprocess_text(txt, text_mapper, hps, lang=LANG) stn_tst = text_mapper.get_text(txt, hps)
with torch.no_grad(): x_tst = stn_tst.unsqueeze(0).to(device) x_tst_lengths = torch.LongTensor([stn_tst.size(0)]).to(device)
start_time = time.time() hyp = net_g.infer( x_tst, x_tst_lengths, noise_scale=0.667, noise_scale_w=0.9, length_scale=1.0 )[0][0, 0].cpu().float().numpy() end_time = time.time() inference_time = end_time - start_time
print(f"Generated audio (Inference Time: {inference_time:.2f} seconds)") Audio(hyp, rate=hps.data.sampling_rate)
pip
🐛 Bug
The speech does not include period or comma
To Reproduce
txt = f""" hello. how are you? """ print(f"Text: {txt}")
txt = preprocess_text(txt, text_mapper, hps, lang=LANG) stn_tst = text_mapper.get_text(txt, hps)
with torch.no_grad(): x_tst = stn_tst.unsqueeze(0).to(device) x_tst_lengths = torch.LongTensor([stn_tst.size(0)]).to(device)
print(f"Generated audio (Inference Time: {inference_time:.2f} seconds)") Audio(hyp, rate=hps.data.sampling_rate)
Code sample
Expected behavior
Environment
pip
, source):Additional context