fix: i18n导致无法启动 & 增加 --noautoopen 参数 (#39)

* optimize: 精简未用到的配置项并在特征提取初步引入mps

* add cmd argument: --noautoopen

* fix: i18n

* fix

* fix

* add genlocale workflow

* add unitest

* fix

* fix

* fix
This commit is contained in:
源文雨
2023-04-12 16:53:50 +08:00
committed by GitHub
parent 19a83b7664
commit 33e1a0f1d2
11 changed files with 262 additions and 159 deletions

28
gui.py
View File

@@ -161,30 +161,30 @@ class GUI:
input_devices,output_devices,_, _=self.get_devices()
layout=[
[
sg.Frame(title=i18n('加载模型/Load Model'),layout=[
[sg.Input(default_text='TEMP\\atri.pth',key='pth_path'),sg.FileBrowse(i18n('选择.pth文件/.pth File'))],
[sg.Input(default_text='TEMP\\added_IVF512_Flat_atri_baseline_src_feat.index',key='index_path'),sg.FileBrowse(i18n('选择.index文件/.index File'))],
[sg.Input(default_text='TEMP\\big_src_feature_atri.npy',key='npy_path'),sg.FileBrowse(i18n('选择.npy文件/.npy File'))]
sg.Frame(title=i18n('加载模型'),layout=[
[sg.Input(default_text='TEMP\\atri.pth',key='pth_path'),sg.FileBrowse(i18n('选择.pth文件'))],
[sg.Input(default_text='TEMP\\added_IVF512_Flat_atri_baseline_src_feat.index',key='index_path'),sg.FileBrowse(i18n('选择.index文件'))],
[sg.Input(default_text='TEMP\\big_src_feature_atri.npy',key='npy_path'),sg.FileBrowse(i18n('选择.npy文件'))]
])
],
[
sg.Frame(layout=[
[sg.Text(i18n("输入设备/Input Device")),sg.Combo(input_devices,key='sg_input_device',default_value=input_devices[sd.default.device[0]])],
[sg.Text(i18n("输出设备/Output Device")),sg.Combo(output_devices,key='sg_output_device',default_value=output_devices[sd.default.device[1]])]
],title=i18n("音频设备(请使用同种类驱动)/Audio Devices"))
[sg.Text(i18n("输入设备")),sg.Combo(input_devices,key='sg_input_device',default_value=input_devices[sd.default.device[0]])],
[sg.Text(i18n("输出设备")),sg.Combo(output_devices,key='sg_output_device',default_value=output_devices[sd.default.device[1]])]
],title=i18n("音频设备(请使用同种类驱动)"))
],
[
sg.Frame(layout=[
[sg.Text(i18n("响应阈值/Silence Threhold")),sg.Slider(range=(-60,0),key='threhold',resolution=1,orientation='h',default_value=-30)],
[sg.Text(i18n("音调设置/Pitch Offset")),sg.Slider(range=(-24,24),key='pitch',resolution=1,orientation='h',default_value=12)]
[sg.Text(i18n("响应阈值")),sg.Slider(range=(-60,0),key='threhold',resolution=1,orientation='h',default_value=-30)],
[sg.Text(i18n("音调设置")),sg.Slider(range=(-24,24),key='pitch',resolution=1,orientation='h',default_value=12)]
],title=i18n("常规设置/Common")),
],title=i18n("常规设置")),
sg.Frame(layout=[
[sg.Text(i18n("采样长度/Sample Length")),sg.Slider(range=(0.1,3.0),key='block_time',resolution=0.1,orientation='h',default_value=1.0)],
[sg.Text(i18n("淡入淡出长度/Crossfade Length")),sg.Slider(range=(0.01,0.15),key='crossfade_length',resolution=0.01,orientation='h',default_value=0.08)],
[sg.Text(i18n("额外推理时长/Extra Length")),sg.Slider(range=(0.05,3.00),key='extra_time',resolution=0.01,orientation='h',default_value=0.05)],
[sg.Text(i18n("采样长度")),sg.Slider(range=(0.1,3.0),key='block_time',resolution=0.1,orientation='h',default_value=1.0)],
[sg.Text(i18n("淡入淡出长度")),sg.Slider(range=(0.01,0.15),key='crossfade_length',resolution=0.01,orientation='h',default_value=0.08)],
[sg.Text(i18n("额外推理时长")),sg.Slider(range=(0.05,3.00),key='extra_time',resolution=0.01,orientation='h',default_value=0.05)],
[sg.Checkbox(i18n('输出降噪/Output Noisereduce'),key='noise_reduce')]
],title=i18n("性能设置/Performance"))
],title=i18n("性能设置"))
],
[sg.Button(i18n("开始音频转换"),key='start_vc'),sg.Button(i18n("停止音频转换"),key='stop_vc')]
]