42 lines
1.0 KiB
Python
Raw Normal View History

2023-04-28 07:36:08 +09:00
from dataclasses import dataclass, field
@dataclass
class RVCSettings:
gpu: int = 0
dstId: int = 0
2023-05-04 12:21:34 +09:00
f0Detector: str = "harvest" # dio or harvest
2023-04-28 07:36:08 +09:00
tran: int = 20
silentThreshold: float = 0.00001
extraConvertSize: int = 1024 * 32
clusterInferRatio: float = 0.1
framework: str = "PyTorch" # PyTorch or ONNX
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
modelSlotIndex: int = -1
speakers: dict[str, int] = field(default_factory=lambda: {})
2023-05-02 20:57:12 +09:00
isHalf: int = 1 # 0:off, 1:on
2023-05-04 23:50:52 +09:00
enableDirectML: int = 0 # 0:off, 1:on
2023-04-28 07:36:08 +09:00
# ↓mutableな物だけ列挙
intData = [
"gpu",
"dstId",
"tran",
"extraConvertSize",
"rvcQuality",
"modelSamplingRate",
"silenceFront",
"modelSlotIndex",
2023-05-02 20:57:12 +09:00
"isHalf",
2023-05-04 23:50:52 +09:00
"enableDirectML",
2023-04-28 07:36:08 +09:00
]
2023-06-01 13:28:45 +09:00
floatData = ["silentThreshold", "indexRatio", "protect"]
2023-04-28 07:36:08 +09:00
strData = ["framework", "f0Detector"]