genshin.applio / rvc /lib /tools /pretrained_selector.py
soiz1's picture
Upload 204 files
2f5f13b verified
raw
history blame contribute delete
421 Bytes
import os
def pretrained_selector(vocoder, sample_rate):
base_path = os.path.join("rvc", "models", "pretraineds", f"{vocoder.lower()}")
path_g = os.path.join(base_path, f"f0G{str(sample_rate)[:2]}k.pth")
path_d = os.path.join(base_path, f"f0D{str(sample_rate)[:2]}k.pth")
if os.path.exists(path_g) and os.path.exists(path_d):
return path_g, path_d
else:
return "", ""