Plachta commited on
Commit
c7222eb
β€’
1 Parent(s): 169607b

temporary solution for unexoected pitch shift

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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, 24000, 16000)
220
- converted_waves_16k = torchaudio.functional.resample(converted_waves_24k, 24000, 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
 
 
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