MCPcopy Index your code
hub / github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI / load

Method load

gui_v1.py:116–150  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

114 self.launcher()
115
116 def load(self):
117 input_devices, output_devices, _, _ = self.get_devices()
118 try:
119 with open("configs/config.json", "r") as j:
120 data = json.load(j)
121 data["pm"] = data["f0method"] == "pm"
122 data["harvest"] = data["f0method"] == "harvest"
123 data["crepe"] = data["f0method"] == "crepe"
124 data["rmvpe"] = data["f0method"] == "rmvpe"
125 if data["sg_input_device"] not in input_devices:
126 data["sg_input_device"] = input_devices[sd.default.device[0]]
127 if data["sg_output_device"] not in output_devices:
128 data["sg_output_device"] = output_devices[sd.default.device[1]]
129 except:
130 with open("configs/config.json", "w") as j:
131 data = {
132 "pth_path": " ",
133 "index_path": " ",
134 "sg_input_device": input_devices[sd.default.device[0]],
135 "sg_output_device": output_devices[sd.default.device[1]],
136 "threhold": "-60",
137 "pitch": "0",
138 "index_rate": "0",
139 "rms_mix_rate": "0",
140 "block_time": "0.25",
141 "crossfade_length": "0.05",
142 "extra_time": "2.5",
143 "f0method": "rmvpe",
144 "use_jit": False,
145 }
146 data["pm"] = data["f0method"] == "pm"
147 data["harvest"] = data["f0method"] == "harvest"
148 data["crepe"] = data["f0method"] == "crepe"
149 data["rmvpe"] = data["f0method"] == "rmvpe"
150 return data
151
152 def launcher(self):
153 data = self.load()

Callers 15

launcherMethod · 0.95
train_indexFunction · 0.80
load_config_jsonMethod · 0.80
mainFunction · 0.80
export_onnx.pyFile · 0.80
set_jit_modelMethod · 0.80
train-index.pyFile · 0.80
trans_weights.pyFile · 0.80
train-index-v2.pyFile · 0.80
load_language_listFunction · 0.80
locale_diff.pyFile · 0.80

Calls 1

get_devicesMethod · 0.95

Tested by

no test coverage detected