DeeeeeeM
commited on
Commit
·
e52ccdb
1
Parent(s):
1e10fa7
Minor changes
Browse files- app.py +21 -10
- requirements-gpu.txt +2 -2
app.py
CHANGED
|
@@ -19,8 +19,7 @@ def process_media(
|
|
| 19 |
model_size, source_lang, upload, model_type,
|
| 20 |
max_chars, max_words, extend_in, extend_out, collapse_gaps,
|
| 21 |
max_lines_per_segment, line_penalty, longest_line_char_penalty,
|
| 22 |
-
initial_prompt=None,
|
| 23 |
-
*args
|
| 24 |
):
|
| 25 |
if not initial_prompt:
|
| 26 |
initial_prompt = None
|
|
@@ -40,8 +39,10 @@ def process_media(
|
|
| 40 |
language=source_lang,
|
| 41 |
vad=True,
|
| 42 |
regroup=False,
|
| 43 |
-
no_speech_threshold=0.9,
|
| 44 |
-
|
|
|
|
|
|
|
| 45 |
)
|
| 46 |
else:
|
| 47 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
@@ -53,10 +54,8 @@ def process_media(
|
|
| 53 |
regroup=False,
|
| 54 |
no_speech_threshold=0.9,
|
| 55 |
denoiser="demucs",
|
| 56 |
-
initial_prompt=initial_prompt
|
| 57 |
)
|
| 58 |
-
#, batch_size=16, denoiser="demucs"
|
| 59 |
-
#result.save_as_json(word_transcription_path)
|
| 60 |
|
| 61 |
# ADVANCED SETTINGS #
|
| 62 |
if max_chars or max_words:
|
|
@@ -398,6 +397,8 @@ with gr.Blocks() as interface:
|
|
| 398 |
- Improved transcription (GPT-4) (In progress)
|
| 399 |
- Text to Speech (In progress)
|
| 400 |
|
|
|
|
|
|
|
| 401 |
<i><b>NOTE: This app is currently in the process of applying other AI-solutions for other use cases.</b></i>
|
| 402 |
"""
|
| 403 |
)
|
|
@@ -437,6 +438,7 @@ with gr.Blocks() as interface:
|
|
| 437 |
model_size = gr.Dropdown(
|
| 438 |
choices=[
|
| 439 |
"deepdml/faster-whisper-large-v3-turbo-ct2",
|
|
|
|
| 440 |
"large-v3",
|
| 441 |
"large-v2",
|
| 442 |
"large",
|
|
@@ -446,7 +448,7 @@ with gr.Blocks() as interface:
|
|
| 446 |
"tiny"
|
| 447 |
],
|
| 448 |
label="Model Size",
|
| 449 |
-
value="
|
| 450 |
interactive=True
|
| 451 |
)
|
| 452 |
initial_prompt = gr.Textbox(
|
|
@@ -559,7 +561,9 @@ with gr.Blocks() as interface:
|
|
| 559 |
)
|
| 560 |
|
| 561 |
with gr.TabItem(".srt Downloader"):
|
| 562 |
-
gr.Markdown("### Download English subtitles (.srt) from a YouTube video
|
|
|
|
|
|
|
| 563 |
srt_url = gr.Textbox(label="YouTube Video URL", placeholder="Paste video URL here")
|
| 564 |
srt_btn = gr.Button("Process")
|
| 565 |
srt_file = gr.File(label="Download SRT")
|
|
@@ -582,7 +586,14 @@ with gr.Blocks() as interface:
|
|
| 582 |
)
|
| 583 |
|
| 584 |
with gr.TabItem("Playlist Tag Checker"):
|
| 585 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 586 |
playlist_url_tags = gr.Textbox(label="YouTube Playlist URL", placeholder="Paste playlist URL here")
|
| 587 |
tag_input_playlist = gr.Textbox(label="Tag to Check", placeholder="Type the tag (e.g. series:my father's wife)")
|
| 588 |
tag_btn_playlist = gr.Button("Process")
|
|
|
|
| 19 |
model_size, source_lang, upload, model_type,
|
| 20 |
max_chars, max_words, extend_in, extend_out, collapse_gaps,
|
| 21 |
max_lines_per_segment, line_penalty, longest_line_char_penalty,
|
| 22 |
+
initial_prompt=None, *args
|
|
|
|
| 23 |
):
|
| 24 |
if not initial_prompt:
|
| 25 |
initial_prompt = None
|
|
|
|
| 39 |
language=source_lang,
|
| 40 |
vad=True,
|
| 41 |
regroup=False,
|
| 42 |
+
#no_speech_threshold=0.9,
|
| 43 |
+
#denoiser="demucs",
|
| 44 |
+
#batch_size=16,
|
| 45 |
+
initial_prompt=initial_prompt
|
| 46 |
)
|
| 47 |
else:
|
| 48 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
|
| 54 |
regroup=False,
|
| 55 |
no_speech_threshold=0.9,
|
| 56 |
denoiser="demucs",
|
| 57 |
+
initial_prompt=initial_prompt
|
| 58 |
)
|
|
|
|
|
|
|
| 59 |
|
| 60 |
# ADVANCED SETTINGS #
|
| 61 |
if max_chars or max_words:
|
|
|
|
| 397 |
- Improved transcription (GPT-4) (In progress)
|
| 398 |
- Text to Speech (In progress)
|
| 399 |
|
| 400 |
+
UPDATE: The app now includes Youtube metadata extraction features: (title / URL / ID, subtitles, tag checking)
|
| 401 |
+
|
| 402 |
<i><b>NOTE: This app is currently in the process of applying other AI-solutions for other use cases.</b></i>
|
| 403 |
"""
|
| 404 |
)
|
|
|
|
| 438 |
model_size = gr.Dropdown(
|
| 439 |
choices=[
|
| 440 |
"deepdml/faster-whisper-large-v3-turbo-ct2",
|
| 441 |
+
"large-v3-turbo",
|
| 442 |
"large-v3",
|
| 443 |
"large-v2",
|
| 444 |
"large",
|
|
|
|
| 448 |
"tiny"
|
| 449 |
],
|
| 450 |
label="Model Size",
|
| 451 |
+
value="large-v2",
|
| 452 |
interactive=True
|
| 453 |
)
|
| 454 |
initial_prompt = gr.Textbox(
|
|
|
|
| 561 |
)
|
| 562 |
|
| 563 |
with gr.TabItem(".srt Downloader"):
|
| 564 |
+
gr.Markdown("### Download English subtitles (.srt) from a YouTube video.###")
|
| 565 |
+
|
| 566 |
+
|
| 567 |
srt_url = gr.Textbox(label="YouTube Video URL", placeholder="Paste video URL here")
|
| 568 |
srt_btn = gr.Button("Process")
|
| 569 |
srt_file = gr.File(label="Download SRT")
|
|
|
|
| 586 |
)
|
| 587 |
|
| 588 |
with gr.TabItem("Playlist Tag Checker"):
|
| 589 |
+
|
| 590 |
+
gr.Markdown(
|
| 591 |
+
"""
|
| 592 |
+
Check if a specific tag exists in all videos of a YouTube playlist.
|
| 593 |
+
|
| 594 |
+
<b><i>Note: The process may take longer due to the number of videos being checked.</i></b>
|
| 595 |
+
"""
|
| 596 |
+
)
|
| 597 |
playlist_url_tags = gr.Textbox(label="YouTube Playlist URL", placeholder="Paste playlist URL here")
|
| 598 |
tag_input_playlist = gr.Textbox(label="Tag to Check", placeholder="Type the tag (e.g. series:my father's wife)")
|
| 599 |
tag_btn_playlist = gr.Button("Process")
|
requirements-gpu.txt
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
gradio
|
| 2 |
stable-ts
|
| 3 |
stable-ts[fw]
|
|
|
|
| 4 |
torch==2.6.0+cu124
|
| 5 |
-
numpy
|
| 6 |
sympy==1.13.1
|
| 7 |
-
demucs
|
| 8 |
chardet
|
| 9 |
yt-dlp
|
|
|
|
| 1 |
gradio
|
| 2 |
stable-ts
|
| 3 |
stable-ts[fw]
|
| 4 |
+
demucs
|
| 5 |
torch==2.6.0+cu124
|
| 6 |
+
numpy>=1.24,<2.3
|
| 7 |
sympy==1.13.1
|
|
|
|
| 8 |
chardet
|
| 9 |
yt-dlp
|