BassWow commited on
Commit
984a28c
1 Parent(s): e9204f1
Files changed (1) hide show
  1. app.py +1 -1
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"Detected language: {Language.make(language=result['language']).display_name()}\n\n You said: {result.text}"
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(