camparchimedes commited on
Commit
7ee498a
·
verified ·
1 Parent(s): 2fb8a5f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -76,9 +76,8 @@ pipe = pipeline("automatic-speech-recognition", model="NbAiLab/nb-whisper-large"
76
 
77
  @spaces.GPU()
78
  def transcribe_audio(audio_file, batch_size=16):
79
- if audio_file.endswith(".m4a"):
80
- audio_file = convert_to_wav(audio_file)
81
-
82
  with tempfile.NamedTemporaryFile(suffix=".wav") as temp_audio_file:
83
  # --copy contents of uploaded audio file to temporary file
84
  temp_audio_file.write(open(audio_file, "rb").read())
 
76
 
77
  @spaces.GPU()
78
  def transcribe_audio(audio_file, batch_size=16):
79
+ audio_file = convert_to_wav(audio_file)
80
+
 
81
  with tempfile.NamedTemporaryFile(suffix=".wav") as temp_audio_file:
82
  # --copy contents of uploaded audio file to temporary file
83
  temp_audio_file.write(open(audio_file, "rb").read())