Spaces:
Running
on
L4
Running
on
L4
Update app.py
Browse files
app.py
CHANGED
@@ -14,9 +14,8 @@ def inference(audio):
|
|
14 |
mel = whisper.log_mel_spectrogram(audio).to(model.device)
|
15 |
|
16 |
_, probs = model.detect_language(mel)
|
17 |
-
print(f"Detected language: {max(probs, key=probs.get)}")
|
18 |
|
19 |
-
options = whisper.DecodingOptions()
|
20 |
result = whisper.decode(model, mel, options)
|
21 |
|
22 |
print(result.text)
|
|
|
14 |
mel = whisper.log_mel_spectrogram(audio).to(model.device)
|
15 |
|
16 |
_, probs = model.detect_language(mel)
|
|
|
17 |
|
18 |
+
options = whisper.DecodingOptions(fp16 = False)
|
19 |
result = whisper.decode(model, mel, options)
|
20 |
|
21 |
print(result.text)
|