jlondonobo commited on
Commit
7a2f4f5
1 Parent(s): 75d8ce0

🐛 fix transcribe argument

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,7 +29,7 @@ def transcribe(microphone, file_upload):
29
 
30
  file = microphone if microphone is not None else file_upload
31
 
32
- text = model.transcribe(file)["text"]
33
 
34
  return warn_output + text
35
 
@@ -49,7 +49,7 @@ def yt_transcribe(yt_url):
49
  stream = yt.streams.filter(only_audio=True)[0]
50
  stream.download(filename="audio.mp3")
51
 
52
- text = model.transcribe("audio.mp3", decode_options={"language": lang})["text"]
53
 
54
  return html_embed_str, text
55
 
 
29
 
30
  file = microphone if microphone is not None else file_upload
31
 
32
+ text = model.transcribe(file, language=lang)["text"]
33
 
34
  return warn_output + text
35
 
 
49
  stream = yt.streams.filter(only_audio=True)[0]
50
  stream.download(filename="audio.mp3")
51
 
52
+ text = model.transcribe("audio.mp3", language=lang)["text"]
53
 
54
  return html_embed_str, text
55