Spaces:
Build error
Build error
init
Browse files- infer/__init__.py +4 -3
infer/__init__.py
CHANGED
|
@@ -96,9 +96,10 @@ def infer_ds(model, hps, ds, speaker, trans):
|
|
| 96 |
manual_f0 = torch.FloatTensor(f0).unsqueeze(0)
|
| 97 |
manual_dur = torch.LongTensor(durations).unsqueeze(0)
|
| 98 |
t1 = time.time()
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
|
|
|
| 102 |
seg_audio = infer_res[0][0, 0].data.float().numpy()
|
| 103 |
try:
|
| 104 |
offset_ = inp['offset']
|
|
|
|
| 96 |
manual_f0 = torch.FloatTensor(f0).unsqueeze(0)
|
| 97 |
manual_dur = torch.LongTensor(durations).unsqueeze(0)
|
| 98 |
t1 = time.time()
|
| 99 |
+
with torch.no_grad():
|
| 100 |
+
infer_res = model.infer(x_tst, x_tst_lengths, None, None,
|
| 101 |
+
None, gtdur=manual_dur, spk_id=spk,
|
| 102 |
+
F0=manual_f0 * 2 ** (trans / 12))
|
| 103 |
seg_audio = infer_res[0][0, 0].data.float().numpy()
|
| 104 |
try:
|
| 105 |
offset_ = inp['offset']
|