Plachta commited on
Commit
91da599
β€’
1 Parent(s): 011a67a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -136,8 +136,8 @@ def voice_conversion(source, target, diffusion_steps, length_adjust, inference_c
136
  ref_audio = librosa.load(target, sr=sr)[0]
137
 
138
  # Process audio
139
- source_audio = torch.tensor(source_audio[:sr * 30]).unsqueeze(0).float().to(device)
140
- ref_audio = torch.tensor(ref_audio[:sr * 30]).unsqueeze(0).float().to(device)
141
 
142
  # Resample
143
  source_waves_16k = torchaudio.functional.resample(source_audio, sr, 16000)
 
136
  ref_audio = librosa.load(target, sr=sr)[0]
137
 
138
  # Process audio
139
+ source_audio = torch.tensor(source_audio).unsqueeze(0).float().to(device)
140
+ ref_audio = torch.tensor(ref_audio[:sr * 25]).unsqueeze(0).float().to(device)
141
 
142
  # Resample
143
  source_waves_16k = torchaudio.functional.resample(source_audio, sr, 16000)