Update app.py
Browse files
app.py
CHANGED
@@ -20,8 +20,8 @@ def transcribe(file):
|
|
20 |
audio = audio.set_frame_rate(16000)
|
21 |
if audio.channels != 1:
|
22 |
audio = audio.set_channels(1)
|
23 |
-
|
24 |
-
audio.export(
|
25 |
except Exception as e:
|
26 |
print(e)
|
27 |
transcription= asr_model.transcribe([new_file_name])
|
|
|
20 |
audio = audio.set_frame_rate(16000)
|
21 |
if audio.channels != 1:
|
22 |
audio = audio.set_channels(1)
|
23 |
+
file = file.split(".")[0]+".wav"
|
24 |
+
audio.export(file,format="wav")
|
25 |
except Exception as e:
|
26 |
print(e)
|
27 |
transcription= asr_model.transcribe([new_file_name])
|