mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-05 09:10:25 +08:00
chore(i18n): use english as the base language for i18n (#22)
* chore(i18n): use english as the base language for i18n rewrite all of the locale files to use english as base for translation * fix(i18n): update rest of the scripts that rely on the chinese-base i18n translation * chore(i18n): change some of the base strings to be more correct * chore(i18n): sync locale on dev * chore(format): run black on dev --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
84
gui.py
84
gui.py
@@ -241,7 +241,7 @@ if __name__ == "__main__":
|
||||
layout = [
|
||||
[
|
||||
sg.Frame(
|
||||
title=i18n("加载模型"),
|
||||
title=i18n("Load model"),
|
||||
layout=[
|
||||
[
|
||||
sg.Input(
|
||||
@@ -249,7 +249,7 @@ if __name__ == "__main__":
|
||||
key="pth_path",
|
||||
),
|
||||
sg.FileBrowse(
|
||||
i18n("选择.pth文件"),
|
||||
i18n("Select the .pth file"),
|
||||
initial_folder=os.path.join(
|
||||
os.getcwd(), "assets/weights"
|
||||
),
|
||||
@@ -262,7 +262,7 @@ if __name__ == "__main__":
|
||||
key="index_path",
|
||||
),
|
||||
sg.FileBrowse(
|
||||
i18n("选择.index文件"),
|
||||
i18n("Select the .index file"),
|
||||
initial_folder=os.path.join(os.getcwd(), "logs"),
|
||||
file_types=[("Index File", "*.index")],
|
||||
),
|
||||
@@ -274,7 +274,7 @@ if __name__ == "__main__":
|
||||
sg.Frame(
|
||||
layout=[
|
||||
[
|
||||
sg.Text(i18n("设备类型")),
|
||||
sg.Text(i18n("Device type")),
|
||||
sg.Combo(
|
||||
self.hostapis,
|
||||
key="sg_hostapi",
|
||||
@@ -283,14 +283,14 @@ if __name__ == "__main__":
|
||||
size=(20, 1),
|
||||
),
|
||||
sg.Checkbox(
|
||||
i18n("独占 WASAPI 设备"),
|
||||
i18n("Takeover WASAPI device"),
|
||||
key="sg_wasapi_exclusive",
|
||||
default=data.get("sg_wasapi_exclusive", False),
|
||||
enable_events=True,
|
||||
),
|
||||
],
|
||||
[
|
||||
sg.Text(i18n("输入设备")),
|
||||
sg.Text(i18n("Input device")),
|
||||
sg.Combo(
|
||||
self.input_devices,
|
||||
key="sg_input_device",
|
||||
@@ -300,7 +300,7 @@ if __name__ == "__main__":
|
||||
),
|
||||
],
|
||||
[
|
||||
sg.Text(i18n("输出设备")),
|
||||
sg.Text(i18n("Output device")),
|
||||
sg.Combo(
|
||||
self.output_devices,
|
||||
key="sg_output_device",
|
||||
@@ -310,33 +310,35 @@ if __name__ == "__main__":
|
||||
),
|
||||
],
|
||||
[
|
||||
sg.Button(i18n("重载设备列表"), key="reload_devices"),
|
||||
sg.Button(
|
||||
i18n("Reload device list"), key="reload_devices"
|
||||
),
|
||||
sg.Radio(
|
||||
i18n("使用模型采样率"),
|
||||
i18n("Choose sample rate of the model"),
|
||||
"sr_type",
|
||||
key="sr_model",
|
||||
default=data.get("sr_model", True),
|
||||
enable_events=True,
|
||||
),
|
||||
sg.Radio(
|
||||
i18n("使用设备采样率"),
|
||||
i18n("Choose sample rate of the device"),
|
||||
"sr_type",
|
||||
key="sr_device",
|
||||
default=data.get("sr_device", False),
|
||||
enable_events=True,
|
||||
),
|
||||
sg.Text(i18n("采样率")),
|
||||
sg.Text(i18n("Sampling rate")),
|
||||
sg.Text("", key="sr_stream"),
|
||||
],
|
||||
],
|
||||
title=i18n("音频设备"),
|
||||
title=i18n("Audio device"),
|
||||
)
|
||||
],
|
||||
[
|
||||
sg.Frame(
|
||||
layout=[
|
||||
[
|
||||
sg.Text(i18n("响应阈值")),
|
||||
sg.Text(i18n("Response threshold")),
|
||||
sg.Slider(
|
||||
range=(-60, 0),
|
||||
key="threhold",
|
||||
@@ -347,7 +349,7 @@ if __name__ == "__main__":
|
||||
),
|
||||
],
|
||||
[
|
||||
sg.Text(i18n("音调设置")),
|
||||
sg.Text(i18n("Pitch settings")),
|
||||
sg.Slider(
|
||||
range=(-24, 24),
|
||||
key="pitch",
|
||||
@@ -358,7 +360,7 @@ if __name__ == "__main__":
|
||||
),
|
||||
],
|
||||
[
|
||||
sg.Text(i18n("共振偏移")),
|
||||
sg.Text(i18n("Formant offset")),
|
||||
sg.Slider(
|
||||
range=(-5, 5),
|
||||
key="formant",
|
||||
@@ -369,7 +371,11 @@ if __name__ == "__main__":
|
||||
),
|
||||
],
|
||||
[
|
||||
sg.Text(i18n("检索特征占比")),
|
||||
sg.Text(
|
||||
i18n(
|
||||
"Search feature ratio (controls accent strength, too high has artifacting)"
|
||||
)
|
||||
),
|
||||
sg.Slider(
|
||||
range=(0.0, 1.0),
|
||||
key="index_rate",
|
||||
@@ -380,7 +386,7 @@ if __name__ == "__main__":
|
||||
),
|
||||
],
|
||||
[
|
||||
sg.Text(i18n("响度因子")),
|
||||
sg.Text(i18n("Loudness factor")),
|
||||
sg.Slider(
|
||||
range=(0.0, 1.0),
|
||||
key="rms_mix_rate",
|
||||
@@ -391,7 +397,7 @@ if __name__ == "__main__":
|
||||
),
|
||||
],
|
||||
[
|
||||
sg.Text(i18n("音高算法")),
|
||||
sg.Text(i18n("Pitch detection algorithm")),
|
||||
sg.Radio(
|
||||
"pm",
|
||||
"f0method",
|
||||
@@ -429,12 +435,12 @@ if __name__ == "__main__":
|
||||
),
|
||||
],
|
||||
],
|
||||
title=i18n("常规设置"),
|
||||
title=i18n("General settings"),
|
||||
),
|
||||
sg.Frame(
|
||||
layout=[
|
||||
[
|
||||
sg.Text(i18n("采样长度")),
|
||||
sg.Text(i18n("Sample length")),
|
||||
sg.Slider(
|
||||
range=(0.02, 1.5),
|
||||
key="block_time",
|
||||
@@ -456,7 +462,11 @@ if __name__ == "__main__":
|
||||
# ),
|
||||
# ],
|
||||
[
|
||||
sg.Text(i18n("harvest进程数")),
|
||||
sg.Text(
|
||||
i18n(
|
||||
"Number of CPU processes used for harvest pitch algorithm"
|
||||
)
|
||||
),
|
||||
sg.Slider(
|
||||
range=(1, n_cpu),
|
||||
key="n_cpu",
|
||||
@@ -469,7 +479,7 @@ if __name__ == "__main__":
|
||||
),
|
||||
],
|
||||
[
|
||||
sg.Text(i18n("淡入淡出长度")),
|
||||
sg.Text(i18n("Fade length")),
|
||||
sg.Slider(
|
||||
range=(0.01, 0.15),
|
||||
key="crossfade_length",
|
||||
@@ -480,7 +490,7 @@ if __name__ == "__main__":
|
||||
),
|
||||
],
|
||||
[
|
||||
sg.Text(i18n("额外推理时长")),
|
||||
sg.Text(i18n("Extra inference time")),
|
||||
sg.Slider(
|
||||
range=(0.05, 5.00),
|
||||
key="extra_time",
|
||||
@@ -492,17 +502,17 @@ if __name__ == "__main__":
|
||||
],
|
||||
[
|
||||
sg.Checkbox(
|
||||
i18n("输入降噪"),
|
||||
i18n("Input noise reduction"),
|
||||
key="I_noise_reduce",
|
||||
enable_events=True,
|
||||
),
|
||||
sg.Checkbox(
|
||||
i18n("输出降噪"),
|
||||
i18n("Output noise reduction"),
|
||||
key="O_noise_reduce",
|
||||
enable_events=True,
|
||||
),
|
||||
sg.Checkbox(
|
||||
i18n("启用相位声码器"),
|
||||
i18n("Enable phase vocoder"),
|
||||
key="use_pv",
|
||||
default=data.get("use_pv", False),
|
||||
enable_events=True,
|
||||
@@ -516,29 +526,29 @@ if __name__ == "__main__":
|
||||
],
|
||||
# [sg.Text("注:首次使用JIT加速时,会出现卡顿,\n 并伴随一些噪音,但这是正常现象!")],
|
||||
],
|
||||
title=i18n("性能设置"),
|
||||
title=i18n("Performance settings"),
|
||||
),
|
||||
],
|
||||
[
|
||||
sg.Button(i18n("开始音频转换"), key="start_vc"),
|
||||
sg.Button(i18n("停止音频转换"), key="stop_vc"),
|
||||
sg.Button(i18n("Start audio conversion"), key="start_vc"),
|
||||
sg.Button(i18n("Stop audio conversion"), key="stop_vc"),
|
||||
sg.Radio(
|
||||
i18n("输入监听"),
|
||||
i18n("Input voice monitor"),
|
||||
"function",
|
||||
key="im",
|
||||
default=False,
|
||||
enable_events=True,
|
||||
),
|
||||
sg.Radio(
|
||||
i18n("输出变声"),
|
||||
i18n("Output converted voice"),
|
||||
"function",
|
||||
key="vc",
|
||||
default=True,
|
||||
enable_events=True,
|
||||
),
|
||||
sg.Text(i18n("算法延迟(ms)")),
|
||||
sg.Text(i18n("Algorithmic delays (ms)")),
|
||||
sg.Text("0", key="delay_time"),
|
||||
sg.Text(i18n("推理时间(ms)")),
|
||||
sg.Text(i18n("Inference time (ms)")),
|
||||
sg.Text("0", key="infer_time"),
|
||||
],
|
||||
]
|
||||
@@ -669,17 +679,17 @@ if __name__ == "__main__":
|
||||
|
||||
def set_values(self, values):
|
||||
if len(values["pth_path"].strip()) == 0:
|
||||
sg.popup(i18n("请选择pth文件"))
|
||||
sg.popup(i18n("Please choose the .pth file"))
|
||||
return False
|
||||
if len(values["index_path"].strip()) == 0:
|
||||
sg.popup(i18n("请选择index文件"))
|
||||
sg.popup(i18n("Please choose the .index file"))
|
||||
return False
|
||||
pattern = re.compile("[^\x00-\x7F]+")
|
||||
if pattern.findall(values["pth_path"]):
|
||||
sg.popup(i18n("pth文件路径不可包含中文"))
|
||||
sg.popup(i18n("pth path cannot contain unicode characters"))
|
||||
return False
|
||||
if pattern.findall(values["index_path"]):
|
||||
sg.popup(i18n("index文件路径不可包含中文"))
|
||||
sg.popup(i18n("index path cannot contain unicode characters"))
|
||||
return False
|
||||
self.set_devices(values["sg_input_device"], values["sg_output_device"])
|
||||
self.config.use_jit = False # values["use_jit"]
|
||||
|
||||
Reference in New Issue
Block a user