razhan commited on
Commit
50cca99
·
verified ·
1 Parent(s): 3a88da4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -277,8 +277,8 @@ def yt_transcribe(yt_url, task="transcribe", progress=gr.Progress(), max_filesiz
277
  with open("audio.mp3", "rb") as f:
278
  inputs = f.read()
279
 
280
- inputs = ffmpeg_read(inputs, processor.feature_extractor.sampling_rate)
281
- inputs = {"array": inputs, "sampling_rate": processor.feature_extractor.sampling_rate}
282
  text = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task}, return_timestamps=True)["text"]
283
  return html_embed_str, text
284
 
 
277
  with open("audio.mp3", "rb") as f:
278
  inputs = f.read()
279
 
280
+ inputs = ffmpeg_read(inputs, pipe.feature_extractor.sampling_rate)
281
+ inputs = {"array": inputs, "sampling_rate": pipe.feature_extractor.sampling_rate}
282
  text = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task}, return_timestamps=True)["text"]
283
  return html_embed_str, text
284