GreenRaptor commited on
Commit
39f3912
·
1 Parent(s): 7e7e494

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,14 +4,14 @@ import whisper
4
  import gradio as gr
5
  from transformers import pipeline
6
 
7
- transcription_model = whisper.load_model("small")
8
 
9
  def transcribe(audio):
10
 
11
  # time.sleep(3)
12
  # load audio and pad/trim it to fit 30 seconds
13
  audio = whisper.load_audio(audio)
14
- audio = whisper.pad_or_trim(audio)
15
 
16
  # make log-Mel spectrogram and move to the same device as the transcription_model
17
  mel = whisper.log_mel_spectrogram(audio).to(transcription_model.device)
 
4
  import gradio as gr
5
  from transformers import pipeline
6
 
7
+ transcription_model = whisper.load_model("tiny.en")
8
 
9
  def transcribe(audio):
10
 
11
  # time.sleep(3)
12
  # load audio and pad/trim it to fit 30 seconds
13
  audio = whisper.load_audio(audio)
14
+ # audio = whisper.pad_or_trim(audio)
15
 
16
  # make log-Mel spectrogram and move to the same device as the transcription_model
17
  mel = whisper.log_mel_spectrogram(audio).to(transcription_model.device)