Spaces:
Runtime error
Runtime error
app.py
CHANGED
@@ -7,7 +7,7 @@ from langcodes import *
|
|
7 |
def speech_to_text(tmp_filename, model_size):
|
8 |
model = whisper.load_model(model_size)
|
9 |
result = model.transcribe(tmp_filename)
|
10 |
-
return f
|
11 |
|
12 |
|
13 |
gr.Interface(
|
|
|
7 |
def speech_to_text(tmp_filename, model_size):
|
8 |
model = whisper.load_model(model_size)
|
9 |
result = model.transcribe(tmp_filename)
|
10 |
+
return f'Detected language: {Language.make(language=result["language"]).display_name()}\n\n You said: {result["text"]}'
|
11 |
|
12 |
|
13 |
gr.Interface(
|