Grosy commited on
Commit
c1a123f
·
verified ·
1 Parent(s): 9e42fc0
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -68,7 +68,6 @@ pipe = pipeline(
68
  task="automatic-speech-recognition",
69
  model=model_name,
70
  chunk_length_s=10,
71
- return_timestamps='word',
72
  device="cpu",
73
  )
74
 
@@ -76,7 +75,7 @@ def transcribe(inputs):
76
  if inputs is None:
77
  raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
78
 
79
- text = pipe(inputs, batch_size=1, return_timestamps=True)["text"]
80
  return text
81
 
82
  inputs = gr.Audio(label="Input Audio", sources="microphone", type="filepath")
 
68
  task="automatic-speech-recognition",
69
  model=model_name,
70
  chunk_length_s=10,
 
71
  device="cpu",
72
  )
73
 
 
75
  if inputs is None:
76
  raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
77
 
78
+ text = pipe(inputs, batch_size=1, return_timestamps='word')["text"]
79
  return text
80
 
81
  inputs = gr.Audio(label="Input Audio", sources="microphone", type="filepath")