Spaces:
Running
on
Zero
Running
on
Zero
Update webui.py
Browse files
webui.py
CHANGED
@@ -47,7 +47,7 @@ def preprocess_audio(audio_path, sr=24000):
|
|
47 |
# if audio has two channels, take the first one
|
48 |
if len(audio.shape) > 1:
|
49 |
audio = audio[0]
|
50 |
-
audio = audio[:sr *
|
51 |
return torch.tensor(audio).unsqueeze(0).float().to(device)
|
52 |
|
53 |
|
|
|
47 |
# if audio has two channels, take the first one
|
48 |
if len(audio.shape) > 1:
|
49 |
audio = audio[0]
|
50 |
+
audio = audio[:sr * 180] # crop only the first 180 seconds
|
51 |
return torch.tensor(audio).unsqueeze(0).float().to(device)
|
52 |
|
53 |
|