2023-04-28 07:36:08 +09:00
|
|
|
from dataclasses import dataclass, field
|
|
|
|
|
|
|
|
|
|
|
|
@dataclass
|
|
|
|
class RVCSettings:
|
2023-07-23 19:39:52 +09:00
|
|
|
gpu: int = -9999
|
2023-04-28 07:36:08 +09:00
|
|
|
dstId: int = 0
|
|
|
|
|
2023-09-22 00:50:09 +09:00
|
|
|
f0Detector: str = "rmvpe_onnx" # dio or harvest
|
2023-06-21 09:18:51 +09:00
|
|
|
tran: int = 12
|
2023-04-28 07:36:08 +09:00
|
|
|
silentThreshold: float = 0.00001
|
2023-06-21 09:18:51 +09:00
|
|
|
extraConvertSize: int = 1024 * 4
|
2023-05-16 10:38:23 +09:00
|
|
|
|
2023-04-28 07:36:08 +09:00
|
|
|
indexRatio: float = 0
|
2023-06-01 13:28:45 +09:00
|
|
|
protect: float = 0.5
|
2023-04-28 07:36:08 +09:00
|
|
|
rvcQuality: int = 0
|
|
|
|
silenceFront: int = 1 # 0:off, 1:on
|
|
|
|
modelSamplingRate: int = 48000
|
|
|
|
|
|
|
|
speakers: dict[str, int] = field(default_factory=lambda: {})
|
2023-06-21 09:18:51 +09:00
|
|
|
# isHalf: int = 1 # 0:off, 1:on
|
|
|
|
# enableDirectML: int = 0 # 0:off, 1:on
|
2023-04-28 07:36:08 +09:00
|
|
|
# ↓mutableな物だけ列挙
|
|
|
|
intData = [
|
|
|
|
"gpu",
|
|
|
|
"dstId",
|
|
|
|
"tran",
|
|
|
|
"extraConvertSize",
|
|
|
|
"rvcQuality",
|
|
|
|
"silenceFront",
|
|
|
|
]
|
2023-06-01 13:28:45 +09:00
|
|
|
floatData = ["silentThreshold", "indexRatio", "protect"]
|
2023-06-21 09:18:51 +09:00
|
|
|
strData = ["f0Detector"]
|