Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -50,7 +50,7 @@ async def process_audio(file: UploadFile = File(...)):
|
|
| 50 |
# Load audio file using torchaudio
|
| 51 |
waveform, sample_rate = torchaudio.load(file_location)
|
| 52 |
|
| 53 |
-
# Ensure the waveform is a
|
| 54 |
waveform = waveform[0] if waveform.size(0) > 1 else waveform
|
| 55 |
|
| 56 |
# ASR
|
|
|
|
| 50 |
# Load audio file using torchaudio
|
| 51 |
waveform, sample_rate = torchaudio.load(file_location)
|
| 52 |
|
| 53 |
+
# Ensure the waveform is a single-channel array
|
| 54 |
waveform = waveform[0] if waveform.size(0) > 1 else waveform
|
| 55 |
|
| 56 |
# ASR
|