JLW commited on
Commit
5b59811
·
1 Parent(s): 7f1048b

Enable Whisper

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -69,8 +69,8 @@ def transcribe(aud_inp):
69
  aud = whisper.load_audio(aud_inp)
70
  aud = whisper.pad_or_trim(aud)
71
  mel = whisper.log_mel_spectrogram(aud).to(WHISPER_MODEL.device)
72
- _, probs = WHISPER_MODEL.detect_language(mel)
73
- options = whisper.DecodingOptions()
74
  result = whisper.decode(WHISPER_MODEL, mel, options)
75
  print("result.text", result.text)
76
  result_text = ""
 
69
  aud = whisper.load_audio(aud_inp)
70
  aud = whisper.pad_or_trim(aud)
71
  mel = whisper.log_mel_spectrogram(aud).to(WHISPER_MODEL.device)
72
+ # _, probs = WHISPER_MODEL.detect_language(mel)
73
+ options = whisper.DecodingOptions(language="ja")
74
  result = whisper.decode(WHISPER_MODEL, mel, options)
75
  print("result.text", result.text)
76
  result_text = ""