(self)
| 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() |
no test coverage detected