Spaces:
Running
Running
Update app.py
Browse files
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
|
140 |
-
ref_audio = torch.tensor(ref_audio[:sr *
|
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)
|