Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -53,6 +53,7 @@ hubert = torch.hub.load("bshall/hubert:main", "hubert_soft")
|
|
| 53 |
_ = utils.load_checkpoint("G_18000.pth", net_g_ms, None)
|
| 54 |
|
| 55 |
def vc_fn(input_audio,vc_transform):
|
|
|
|
| 56 |
if input_audio is None:
|
| 57 |
return "You need to upload an audio", None
|
| 58 |
sampling_rate, audio = input_audio
|
|
@@ -77,7 +78,7 @@ def vc_fn(input_audio,vc_transform):
|
|
| 77 |
print(sampling_rate)
|
| 78 |
f0 = resize2d(f0, len(soft[:, 0])) * vc_transform
|
| 79 |
soft[:, 0] = f0 / 10
|
| 80 |
-
sid = torch.LongTensor([
|
| 81 |
stn_tst = torch.FloatTensor(soft)
|
| 82 |
with torch.no_grad():
|
| 83 |
x_tst = stn_tst.unsqueeze(0)
|
|
|
|
| 53 |
_ = utils.load_checkpoint("G_18000.pth", net_g_ms, None)
|
| 54 |
|
| 55 |
def vc_fn(input_audio,vc_transform):
|
| 56 |
+
vcid=0
|
| 57 |
if input_audio is None:
|
| 58 |
return "You need to upload an audio", None
|
| 59 |
sampling_rate, audio = input_audio
|
|
|
|
| 78 |
print(sampling_rate)
|
| 79 |
f0 = resize2d(f0, len(soft[:, 0])) * vc_transform
|
| 80 |
soft[:, 0] = f0 / 10
|
| 81 |
+
sid = torch.LongTensor([vcid])
|
| 82 |
stn_tst = torch.FloatTensor(soft)
|
| 83 |
with torch.no_grad():
|
| 84 |
x_tst = stn_tst.unsqueeze(0)
|