Spaces:
Runtime error
Runtime error
Commit
·
47e2f39
1
Parent(s):
1e952ec
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,14 +30,6 @@ def get_wavlm():
|
|
| 30 |
|
| 31 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 32 |
|
| 33 |
-
print("Loading FreeVC...")
|
| 34 |
-
hps = utils.get_hparams_from_file("configs/freevc.json")
|
| 35 |
-
freevc = SynthesizerTrn(
|
| 36 |
-
hps.data.filter_length // 2 + 1,
|
| 37 |
-
hps.train.segment_size // hps.data.hop_length,
|
| 38 |
-
**hps.model).to(device)
|
| 39 |
-
_ = freevc.eval()
|
| 40 |
-
_ = utils.load_checkpoint("checkpoints/freevc.pth", freevc, None)
|
| 41 |
smodel = SpeakerEncoder('speaker_encoder/ckpt/pretrained_bak_5805000.pt')
|
| 42 |
|
| 43 |
print("Loading FreeVC(24k)...")
|
|
@@ -49,15 +41,6 @@ freevc_24 = SynthesizerTrn(
|
|
| 49 |
_ = freevc_24.eval()
|
| 50 |
_ = utils.load_checkpoint("checkpoints/freevc-24.pth", freevc_24, None)
|
| 51 |
|
| 52 |
-
print("Loading FreeVC-s...")
|
| 53 |
-
hps = utils.get_hparams_from_file("configs/freevc-s.json")
|
| 54 |
-
freevc_s = SynthesizerTrn(
|
| 55 |
-
hps.data.filter_length // 2 + 1,
|
| 56 |
-
hps.train.segment_size // hps.data.hop_length,
|
| 57 |
-
**hps.model).to(device)
|
| 58 |
-
_ = freevc_s.eval()
|
| 59 |
-
_ = utils.load_checkpoint("checkpoints/freevc-s.pth", freevc_s, None)
|
| 60 |
-
|
| 61 |
print("Loading WavLM for content...")
|
| 62 |
cmodel = WavLMModel.from_pretrained("microsoft/wavlm-large").to(device)
|
| 63 |
|
|
|
|
| 30 |
|
| 31 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
smodel = SpeakerEncoder('speaker_encoder/ckpt/pretrained_bak_5805000.pt')
|
| 34 |
|
| 35 |
print("Loading FreeVC(24k)...")
|
|
|
|
| 41 |
_ = freevc_24.eval()
|
| 42 |
_ = utils.load_checkpoint("checkpoints/freevc-24.pth", freevc_24, None)
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
print("Loading WavLM for content...")
|
| 45 |
cmodel = WavLMModel.from_pretrained("microsoft/wavlm-large").to(device)
|
| 46 |
|