Spaces:
Runtime error
Runtime error
David Li commited on
Commit ·
ebe7599
1
Parent(s): 2079594
fix: try again
Browse files
app.py
CHANGED
|
@@ -134,15 +134,15 @@ def get_text_from_mp3_whisper(inputType:str, mp3_file: str, url_path: str, taskN
|
|
| 134 |
with open("transcript.srt", "w") as f:
|
| 135 |
f.write(words)
|
| 136 |
print("done transcribing")
|
| 137 |
-
input_file = filename or mp3_file
|
| 138 |
|
| 139 |
-
result = run("ffmpeg -i temp.mp4 -vf subtitles=transcript.srt subtitled.mp4", stdout=PIPE, stderr=PIPE, universal_newlines=True)
|
| 140 |
-
|
|
|
|
| 141 |
|
| 142 |
# for spacy use advanced logic to extract and append to html_text using tables?
|
| 143 |
print(words)
|
| 144 |
# get output_video as mp4
|
| 145 |
-
return result.get("segments"), words, "
|
| 146 |
|
| 147 |
gr.Interface(
|
| 148 |
title = 'Download Video From url and extract text from audio',
|
|
|
|
| 134 |
with open("transcript.srt", "w") as f:
|
| 135 |
f.write(words)
|
| 136 |
print("done transcribing")
|
|
|
|
| 137 |
|
| 138 |
+
# result = run("ffmpeg -i temp.mp4 -vf subtitles=transcript.srt subtitled.mp4", stdout=PIPE, stderr=PIPE, universal_newlines=True)
|
| 139 |
+
# return temp.mp4
|
| 140 |
+
# print(result.returncode, result.stdout, result.stderr)
|
| 141 |
|
| 142 |
# for spacy use advanced logic to extract and append to html_text using tables?
|
| 143 |
print(words)
|
| 144 |
# get output_video as mp4
|
| 145 |
+
return result.get("segments"), words , "temp.mp4"
|
| 146 |
|
| 147 |
gr.Interface(
|
| 148 |
title = 'Download Video From url and extract text from audio',
|