voice-changer/server/voice_changer/RVC/RVCSettings.py

34 lines
822 B
Python
Raw Normal View History

2023-04-28 01:36:08 +03:00
from dataclasses import dataclass, field
@dataclass
class RVCSettings:
gpu: int = 0
dstId: int = 0
2023-05-04 06:21:34 +03:00
f0Detector: str = "harvest" # dio or harvest
2023-06-21 03:18:51 +03:00
tran: int = 12
2023-04-28 01:36:08 +03:00
silentThreshold: float = 0.00001
2023-06-21 03:18:51 +03:00
extraConvertSize: int = 1024 * 4
2023-05-16 04:38:23 +03:00
2023-04-28 01:36:08 +03:00
indexRatio: float = 0
2023-06-01 07:28:45 +03:00
protect: float = 0.5
2023-04-28 01:36:08 +03: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 03:18:51 +03:00
# isHalf: int = 1 # 0:off, 1:on
# enableDirectML: int = 0 # 0:off, 1:on
2023-04-28 01:36:08 +03:00
# ↓mutableな物だけ列挙
intData = [
"gpu",
"dstId",
"tran",
"extraConvertSize",
"rvcQuality",
"silenceFront",
]
2023-06-01 07:28:45 +03:00
floatData = ["silentThreshold", "indexRatio", "protect"]
2023-06-21 03:18:51 +03:00
strData = ["f0Detector"]