Spaces:
Running
Running
Update app.py
Browse files
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,
|
281 |
-
inputs = {"array": inputs, "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 |
|