Update app.py
Browse files
app.py
CHANGED
@@ -162,7 +162,7 @@ def infer(text_raw, character, language, duration, noise_scale, noise_scale_w, i
|
|
162 |
duration_info_str += ", "
|
163 |
audio = net_g.infer(x_tst, x_tst_lengths, sid=sid, noise_scale=noise_scale, noise_scale_w=noise_scale_w, length_scale=duration)[0][0,0].data.float().numpy()
|
164 |
currentDateAndTime = datetime.now()
|
165 |
-
print(f"
|
166 |
if language != '日本語':
|
167 |
print(f"translate from {language}: {text_raw}")
|
168 |
show_memory_info(str(currentDateAndTime) + " infer调用后")
|
@@ -189,10 +189,9 @@ def infer_from_phoneme_dur(duration_info_str, character, duration, noise_scale,
|
|
189 |
x_tst = stn_tst.unsqueeze(0)
|
190 |
x_tst_lengths = torch.LongTensor([stn_tst.size(0)])
|
191 |
sid = torch.LongTensor([char_id])
|
192 |
-
print(len(recons_durs))
|
193 |
-
print(x_tst.shape[1])
|
194 |
audio = net_g.infer_with_duration(x_tst, x_tst_lengths, w_ceil=recons_durs, sid=sid, noise_scale=noise_scale, noise_scale_w=noise_scale_w,
|
195 |
length_scale=duration)[0][0, 0].data.cpu().float().numpy()
|
|
|
196 |
return (recons_phonemes, (22050, audio))
|
197 |
|
198 |
download_audio_js = """
|
|
|
162 |
duration_info_str += ", "
|
163 |
audio = net_g.infer(x_tst, x_tst_lengths, sid=sid, noise_scale=noise_scale, noise_scale_w=noise_scale_w, length_scale=duration)[0][0,0].data.float().numpy()
|
164 |
currentDateAndTime = datetime.now()
|
165 |
+
print(f"\nCharacter {character} inference successful: {text}")
|
166 |
if language != '日本語':
|
167 |
print(f"translate from {language}: {text_raw}")
|
168 |
show_memory_info(str(currentDateAndTime) + " infer调用后")
|
|
|
189 |
x_tst = stn_tst.unsqueeze(0)
|
190 |
x_tst_lengths = torch.LongTensor([stn_tst.size(0)])
|
191 |
sid = torch.LongTensor([char_id])
|
|
|
|
|
192 |
audio = net_g.infer_with_duration(x_tst, x_tst_lengths, w_ceil=recons_durs, sid=sid, noise_scale=noise_scale, noise_scale_w=noise_scale_w,
|
193 |
length_scale=duration)[0][0, 0].data.cpu().float().numpy()
|
194 |
+
print(f"\nCharacter {character} inference successful: {recons_phonemes}, from {duration_info_str}")
|
195 |
return (recons_phonemes, (22050, audio))
|
196 |
|
197 |
download_audio_js = """
|