Spaces:
Running
on
Zero
Running
on
Zero
temporary solution for unexoected pitch shift
Browse files
app.py
CHANGED
@@ -216,8 +216,8 @@ def voice_conversion(source, target, diffusion_steps, length_adjust, inference_c
|
|
216 |
style2 = campplus_model(feat2.unsqueeze(0))
|
217 |
|
218 |
if f0_condition:
|
219 |
-
waves_16k = torchaudio.functional.resample(waves_24k,
|
220 |
-
converted_waves_16k = torchaudio.functional.resample(converted_waves_24k,
|
221 |
F0_ori = rmvpe.infer_from_audio(waves_16k[0], thred=0.03)
|
222 |
F0_alt = rmvpe.infer_from_audio(converted_waves_16k[0], thred=0.03)
|
223 |
|
|
|
216 |
style2 = campplus_model(feat2.unsqueeze(0))
|
217 |
|
218 |
if f0_condition:
|
219 |
+
waves_16k = torchaudio.functional.resample(waves_24k, sr, 16000)
|
220 |
+
converted_waves_16k = torchaudio.functional.resample(converted_waves_24k, sr, 16000)
|
221 |
F0_ori = rmvpe.infer_from_audio(waves_16k[0], thred=0.03)
|
222 |
F0_alt = rmvpe.infer_from_audio(converted_waves_16k[0], thred=0.03)
|
223 |
|