voice-changer/server/voice_changer/DDSP_SVC/DDSP_SVCSetting.py

41 lines
960 B
Python
Raw Permalink Normal View History

2023-05-07 23:51:24 +03:00
from dataclasses import dataclass, field
@dataclass
class DDSP_SVCSettings:
2023-07-23 13:39:52 +03:00
gpu: int = -9999
2023-05-08 12:02:15 +03:00
dstId: int = 1
2023-05-07 23:51:24 +03:00
2023-05-08 12:02:15 +03:00
f0Detector: str = "dio" # dio or harvest or crepe # parselmouth
2023-05-07 23:51:24 +03:00
tran: int = 20
silentThreshold: float = 0.00001
extraConvertSize: int = 1024 * 32
2023-05-08 23:04:34 +03:00
useEnhancer: int = 0
useDiff: int = 1
2023-05-13 19:04:29 +03:00
# useDiffDpm: int = 0
diffMethod: str = "dpm-solver" # "pndm", "dpm-solver"
2023-05-08 23:04:34 +03:00
useDiffSilence: int = 0
diffAcc: int = 20
diffSpkId: int = 1
kStep: int = 120
threshold: int = -45
2023-05-07 23:51:24 +03:00
speakers: dict[str, int] = field(default_factory=lambda: {})
# ↓mutableな物だけ列挙
intData = [
"gpu",
"dstId",
"tran",
"extraConvertSize",
2023-05-08 23:04:34 +03:00
"useEnhancer",
"useDiff",
2023-05-13 19:04:29 +03:00
# "useDiffDpm",
2023-05-08 23:04:34 +03:00
"useDiffSilence",
"diffAcc",
"diffSpkId",
"kStep",
2023-05-07 23:51:24 +03:00
]
2023-05-08 12:02:15 +03:00
floatData = ["silentThreshold"]
2023-06-22 04:46:12 +03:00
strData = ["f0Detector", "diffMethod"]