Skip to content

Commit 7d94905

Browse files
committed
fix
1 parent da16e54 commit 7d94905

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

i18n/中文/st.py

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
st.set_page_config(page_title="VideoLingo", page_icon="docs/logo.svg")
1212

13+
SUB_VIDEO = "output/output_sub.mp4"
14+
DUB_VIDEO = "output/output_dub.mp4"
15+
1316
def text_processing_section():
1417
st.header("翻译和生成字幕")
1518
with st.container(border=True):
@@ -25,16 +28,16 @@ def text_processing_section():
2528
6. 将字幕合并到视频中
2629
""", unsafe_allow_html=True)
2730

28-
if not os.path.exists("output/output_video_with_subs.mp4"):
31+
if not os.path.exists(SUB_VIDEO):
2932
if st.button("开始处理字幕", key="text_processing_button"):
3033
process_text()
3134
st.rerun()
3235
else:
3336
if load_key("resolution") != "0x0":
34-
st.video("output/output_video_with_subs.mp4")
37+
st.video(SUB_VIDEO)
3538
download_subtitle_zip_button(text="下载所有字幕")
3639

37-
if st.button("归档到'history'", key="cleanup_in_text_processing"):
40+
if st.button("归档到'历史记录'", key="cleanup_in_text_processing"):
3841
cleanup()
3942
st.rerun()
4043
return True
@@ -60,24 +63,25 @@ def process_text():
6063
st.balloons()
6164

6265
def audio_processing_section():
63-
st.header("配音(测试版)")
66+
st.header("配音")
6467
with st.container(border=True):
6568
st.markdown("""
6669
<p style='font-size: 20px;'>
6770
此阶段包含以下步骤:
6871
<p style='font-size: 20px;'>
69-
1. 生成音频任务<br>
70-
2. 生成音频<br>
71-
3. 将音频合并到视频中
72+
1. 生成音频任务和分段<br>
73+
2. 提取参考音频<br>
74+
3. 生成和合并音频文件<br>
75+
4. 将最终音频合并到视频中
7276
""", unsafe_allow_html=True)
73-
if not os.path.exists("output/output_video_with_audio.mp4"):
77+
if not os.path.exists(DUB_VIDEO):
7478
if st.button("开始处理音频", key="audio_processing_button"):
7579
process_audio()
7680
st.rerun()
7781
else:
7882
st.success("音频处理完成!你可以在 `output` 文件夹中查看音频文件。")
7983
if load_key("resolution") != "0x0":
80-
st.video("output/output_video_with_audio.mp4")
84+
st.video(DUB_VIDEO)
8185
if st.button("删除配音文件", key="delete_dubbing_files"):
8286
delete_dubbing_files()
8387
st.rerun()
@@ -88,12 +92,15 @@ def audio_processing_section():
8892
def process_audio():
8993
with st.spinner("生成音频任务中"):
9094
step8_1_gen_audio_task.gen_audio_task_main()
95+
step8_2_gen_dub_chunks.gen_dub_chunks()
9196
with st.spinner("提取参考音频中"):
9297
step9_extract_refer_audio.extract_refer_audio_main()
93-
with st.spinner("生成音频中"):
94-
step10_gen_audio.process_sovits_tasks()
95-
with st.spinner("将音频合并到视频中"):
96-
step11_merge_audio_to_vid.merge_main()
98+
with st.spinner("生成所有音频中"):
99+
step10_gen_audio.gen_audio()
100+
with st.spinner("合并完整音频中"):
101+
step11_merge_full_audio.merge_full_audio()
102+
with st.spinner("将配音合并到视频中"):
103+
step12_merge_dub_to_vid.merge_video_audio()
97104

98105
st.success("音频处理完成!🎇")
99106
st.balloons()

st.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def process_audio():
100100
with st.spinner("Merge full audio"):
101101
step11_merge_full_audio.merge_full_audio()
102102
with st.spinner("Merge dubbing to the video"):
103-
step12_merge_dub_to_vid.merge_dub_to_vid()
103+
step12_merge_dub_to_vid.merge_video_audio()
104104

105105
st.success("Audio processing complete! 🎇")
106106
st.balloons()

0 commit comments

Comments
 (0)