Spaces:
Runtime error
Runtime error
NTT123
commited on
Commit
·
da16845
1
Parent(s):
0f2e987
less padding, new padding mode.
Browse files- inference.py +2 -6
inference.py
CHANGED
@@ -65,12 +65,8 @@ def mel_to_wav(net, netcpp, mel, config):
|
|
65 |
"""convert mel to wav"""
|
66 |
if len(mel.shape) == 2:
|
67 |
mel = mel[None]
|
68 |
-
pad = config["num_pad_frames"] // 2 +
|
69 |
-
mel = np.pad(
|
70 |
-
mel,
|
71 |
-
[(0, 0), (pad, pad), (0, 0)],
|
72 |
-
constant_values=np.log(config["mel_min"]),
|
73 |
-
)
|
74 |
ft = wavegru_inference(net, mel)
|
75 |
ft = jax.device_get(ft[0])
|
76 |
wav = netcpp.inference(ft, 1.0)
|
|
|
65 |
"""convert mel to wav"""
|
66 |
if len(mel.shape) == 2:
|
67 |
mel = mel[None]
|
68 |
+
pad = config["num_pad_frames"] // 2 + 2
|
69 |
+
mel = np.pad(mel, [(0, 0), (pad, pad), (0, 0)], mode="edge")
|
|
|
|
|
|
|
|
|
70 |
ft = wavegru_inference(net, mel)
|
71 |
ft = jax.device_get(ft[0])
|
72 |
wav = netcpp.inference(ft, 1.0)
|