Spaces:
Running
Running
kevinwang676
commited on
Commit
•
c0bdc2a
1
Parent(s):
a8d3978
Update GPT_SoVITS/app_vc.py
Browse files- GPT_SoVITS/app_vc.py +4 -1
GPT_SoVITS/app_vc.py
CHANGED
@@ -434,7 +434,10 @@ def vc_main(wav_path, text, language, prompt_wav, noise_scale=0.5):
|
|
434 |
|
435 |
spec = get_spepc(hps, prompt_wav)
|
436 |
codes = get_code_from_wav(wav_path)[None, None] # 必须是 3D, [n_q, B, T]
|
437 |
-
|
|
|
|
|
|
|
438 |
quantized = vq_model.quantizer.decode(codes) # [B, D, T]
|
439 |
if hps.model.semantic_frame_rate == "25hz":
|
440 |
quantized = F.interpolate(
|
|
|
434 |
|
435 |
spec = get_spepc(hps, prompt_wav)
|
436 |
codes = get_code_from_wav(wav_path)[None, None] # 必须是 3D, [n_q, B, T]
|
437 |
+
if hps.model.version == "v1":
|
438 |
+
ge = vq_model.ref_enc(spec) # [B, D, T/1]
|
439 |
+
else:
|
440 |
+
ge = vq_model.ref_enc(spec[:,:704])
|
441 |
quantized = vq_model.quantizer.decode(codes) # [B, D, T]
|
442 |
if hps.model.semantic_frame_rate == "25hz":
|
443 |
quantized = F.interpolate(
|