fffiloni commited on
Commit
01f0cbf
1 Parent(s): 9fd51b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -20,11 +20,12 @@ def get_transcribe(audio):
20
 
21
  mel = whisper.log_mel_spectrogram(audio).to(whisper_model.device)
22
 
23
- _, probs = whisper_model.detect_language(mel)
24
 
25
- options = whisper.DecodingOptions(fp16 = False)
26
  result = whisper.decode(whisper_model, mel, options)
27
 
 
28
  print(result.text)
29
  return result.text
30
 
 
20
 
21
  mel = whisper.log_mel_spectrogram(audio).to(whisper_model.device)
22
 
23
+ #_, probs = whisper_model.detect_language(mel)
24
 
25
+ options = whisper.DecodingOptions(language="en", fp16 = False)
26
  result = whisper.decode(whisper_model, mel, options)
27
 
28
+ print(result)
29
  print(result.text)
30
  return result.text
31