tensorops commited on
Commit
42df8c8
1 Parent(s): 5024005

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -32,7 +32,7 @@ def transcribe(microphone, file_upload):
32
 
33
  file = microphone if microphone is not None else file_upload
34
 
35
- text = pipe(file, return_timestamps=True, generate_kwargs={"language":"<|th|>", "task":"transcribe"}, batch_size=16)["text"]
36
 
37
  return warn_output + text
38
 
@@ -52,7 +52,7 @@ def yt_transcribe(yt_url):
52
  stream = yt.streams.filter(only_audio=True)[0]
53
  stream.download(filename="audio.mp3")
54
 
55
- text = pipe("audio.mp3", return_timestamps=True, generate_kwargs={"language":"<|th|>", "task":"transcribe"}, batch_size=16)["text"]
56
 
57
  return html_embed_str, text
58
 
 
32
 
33
  file = microphone if microphone is not None else file_upload
34
 
35
+ text = pipe(file, generate_kwargs={"language":"<|th|>", "task":"transcribe"}, batch_size=16)["text"]
36
 
37
  return warn_output + text
38
 
 
52
  stream = yt.streams.filter(only_audio=True)[0]
53
  stream.download(filename="audio.mp3")
54
 
55
+ text = pipe("audio.mp3", generate_kwargs={"language":"<|th|>", "task":"transcribe"}, batch_size=16)["text"]
56
 
57
  return html_embed_str, text
58