Update app.py
Browse files
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 |
|