boi-doingthings commited on
Commit
46b0abc
·
verified ·
1 Parent(s): 3c5bab1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -38,8 +38,7 @@ def transcribe(audio):
38
  sr, y = audio
39
  y = y.astype(np.float32)
40
  y /= np.max(np.abs(y))
41
- # model = whisper.load_model("base") # or "small", "medium", "large", depending on your requirement
42
-
43
  temp_filename = "temp_audio.wav"
44
  write(temp_filename, sr, (y * 32767).astype(np.int16))
45
  result = model.transcribe(temp_filename)
 
38
  sr, y = audio
39
  y = y.astype(np.float32)
40
  y /= np.max(np.abs(y))
41
+ model = whisper.load_model("base") # or "small", "medium", "large", depending on your requirement
 
42
  temp_filename = "temp_audio.wav"
43
  write(temp_filename, sr, (y * 32767).astype(np.int16))
44
  result = model.transcribe(temp_filename)