Plachta commited on
Commit
b4a870d
1 Parent(s): d8f5761

update decoding strategy

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -125,7 +125,7 @@ def transcribe_one(model, audio_path):
125
  print(f"Detected language: {max(probs, key=probs.get)}")
126
  lang = max(probs, key=probs.get)
127
  # decode the audio
128
- options = whisper.DecodingOptions(beam_size=5, fp16=False if device == torch.device("cpu") else True)
129
  result = whisper.decode(model, mel, options)
130
 
131
  # print the recognized text
 
125
  print(f"Detected language: {max(probs, key=probs.get)}")
126
  lang = max(probs, key=probs.get)
127
  # decode the audio
128
+ options = whisper.DecodingOptions(temperature=1.0, best_of=5, fp16=False if device == torch.device("cpu") else True, sample_len=100)
129
  result = whisper.decode(model, mel, options)
130
 
131
  # print the recognized text