fix
Browse files
app.py
CHANGED
@@ -124,7 +124,7 @@ def transcribe_one(model, audio_path):
|
|
124 |
print(f"Detected language: {max(probs, key=probs.get)}")
|
125 |
lang = max(probs, key=probs.get)
|
126 |
# decode the audio
|
127 |
-
options = whisper.DecodingOptions(beam_size=5)
|
128 |
result = whisper.decode(model, mel, options)
|
129 |
|
130 |
# print the recognized text
|
|
|
124 |
print(f"Detected language: {max(probs, key=probs.get)}")
|
125 |
lang = max(probs, key=probs.get)
|
126 |
# decode the audio
|
127 |
+
options = whisper.DecodingOptions(beam_size=5, fp16=False if device == "cpu" else True)
|
128 |
result = whisper.decode(model, mel, options)
|
129 |
|
130 |
# print the recognized text
|