mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-02-06 21:52:50 +08:00
Merge pull request #1660 from RVC-Project/formatter-dev
chore(format): run black on dev
This commit is contained in:
commit
4769472ba2
24
gui_v1.py
24
gui_v1.py
@ -14,6 +14,7 @@ import multiprocessing
|
||||
|
||||
flag_vc = False
|
||||
|
||||
|
||||
def printt(strr, *args):
|
||||
if len(args) == 0:
|
||||
print(strr)
|
||||
@ -153,16 +154,24 @@ if __name__ == "__main__":
|
||||
data["rmvpe"] = data["f0method"] == "rmvpe"
|
||||
data["fcpe"] = data["f0method"] == "fcpe"
|
||||
if data["sg_input_device"] not in self.input_devices:
|
||||
data["sg_input_device"] = self.input_devices[self.input_devices_indices.index(sd.default.device[0])]
|
||||
data["sg_input_device"] = self.input_devices[
|
||||
self.input_devices_indices.index(sd.default.device[0])
|
||||
]
|
||||
if data["sg_output_device"] not in self.output_devices:
|
||||
data["sg_output_device"] = self.output_devices[self.output_devices_indices.index(sd.default.device[1])]
|
||||
data["sg_output_device"] = self.output_devices[
|
||||
self.output_devices_indices.index(sd.default.device[1])
|
||||
]
|
||||
except:
|
||||
with open("configs/config.json", "w") as j:
|
||||
data = {
|
||||
"pth_path": "",
|
||||
"index_path": "",
|
||||
"sg_input_device": self.input_devices[self.input_devices_indices.index(sd.default.device[0])],
|
||||
"sg_output_device": self.output_devices[self.output_devices_indices.index(sd.default.device[1])],
|
||||
"sg_input_device": self.input_devices[
|
||||
self.input_devices_indices.index(sd.default.device[0])
|
||||
],
|
||||
"sg_output_device": self.output_devices[
|
||||
self.output_devices_indices.index(sd.default.device[1])
|
||||
],
|
||||
"sr_type": "sr_model",
|
||||
"threhold": -60,
|
||||
"pitch": 0,
|
||||
@ -737,7 +746,8 @@ if __name__ == "__main__":
|
||||
callback=self.audio_callback,
|
||||
blocksize=self.block_frame,
|
||||
samplerate=self.gui_config.samplerate,
|
||||
dtype="float32")
|
||||
dtype="float32",
|
||||
)
|
||||
self.stream.start()
|
||||
|
||||
def stop_stream(self):
|
||||
@ -950,6 +960,8 @@ if __name__ == "__main__":
|
||||
printt("Output device: %s:%s", str(sd.default.device[1]), output_device)
|
||||
|
||||
def get_device_samplerate(self):
|
||||
return int(sd.query_devices(device=sd.default.device[0])['default_samplerate'])
|
||||
return int(
|
||||
sd.query_devices(device=sd.default.device[0])["default_samplerate"]
|
||||
)
|
||||
|
||||
gui = GUI()
|
||||
|
Loading…
Reference in New Issue
Block a user