chuuhtetnaing commited on
Commit
056aa1d
1 Parent(s): 36cdc8b

change the model name, added language and remove translate task

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,7 +29,7 @@ def transcribe(inputs, task):
29
  if inputs is None:
30
  raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
31
 
32
- text = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task}, return_timestamps=True)["text"]
33
  return text
34
 
35
 
@@ -85,7 +85,7 @@ def yt_transcribe(yt_url, task, max_filesize=75.0):
85
  inputs = ffmpeg_read(inputs, pipe.feature_extractor.sampling_rate)
86
  inputs = {"array": inputs, "sampling_rate": pipe.feature_extractor.sampling_rate}
87
 
88
- text = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task}, return_timestamps=True)["text"]
89
 
90
  return html_embed_str, text
91
 
 
29
  if inputs is None:
30
  raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
31
 
32
+ text = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"language": "myanmar", "task": task}, return_timestamps=True)["text"]
33
  return text
34
 
35
 
 
85
  inputs = ffmpeg_read(inputs, pipe.feature_extractor.sampling_rate)
86
  inputs = {"array": inputs, "sampling_rate": pipe.feature_extractor.sampling_rate}
87
 
88
+ text = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"language": "myanmar", "task": task}, return_timestamps=True)["text"]
89
 
90
  return html_embed_str, text
91