tensorops commited on
Commit
5a7ef87
1 Parent(s): 4344381

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, generation_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", generation_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, return_timestamps=True, 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", return_timestamps=True, generate_kwargs={"language":"<|th|>", "task":"transcribe"}, batch_size=16)["text"]
56
 
57
  return html_embed_str, text
58