Skip to content

Commit

Permalink
Merge pull request #38 from helinyu/main
Browse files Browse the repository at this point in the history
单词写作啦,导致引入错误
  • Loading branch information
Huanshere authored Sep 4, 2024
2 parents c32e518 + 278214c commit 0bb99df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
MAX_TARGET_LANGUAGE_LENGTH = 30

# SoVITS角色配置
DUBBNING_CHARACTER = 'Huanyu'
DUBBING_CHARACTER = 'Huanyu'

# 视频分辨率
RESOLUTIOM = '854x480'
Expand Down
4 changes: 2 additions & 2 deletions core/step10_generate_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ def process_sovits_tasks():
print(f"文件 {output_file} 已存在,跳过处理")
continue

from config import step9_trim_model, DUBBNING_CHARACTER
from config import step9_trim_model, DUBBING_CHARACTER
for attempt in range(3): # 尝试三次
try:
generate_audio(text, DUBBNING_CHARACTER, duration, output_file, number)
generate_audio(text, DUBBING_CHARACTER, duration, output_file, number)
break # 如果生成音频成功,跳出循环
except Exception as e:
if attempt < 2: # 第一次和第二次尝试
Expand Down
6 changes: 3 additions & 3 deletions st_components/sidebar_setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ def page_setting():
changes["RESOLUTIOM"] = resolution

st.header("SoVITS 角色配置")
dubbing_character = st.text_input("配音角色:", value=config.DUBBNING_CHARACTER)
if dubbing_character != config.DUBBNING_CHARACTER:
changes["DUBBNING_CHARACTER"] = dubbing_character
dubbing_character = st.text_input("配音角色:", value=config.DUBBING_CHARACTER)
if dubbing_character != config.DUBBING_CHARACTER:
changes["DUBBING_CHARACTER"] = dubbing_character

if changes:
st.toast("记得点击下方的'保存设置'按钮", icon="🔔")
Expand Down

0 comments on commit 0bb99df

Please sign in to comment.