chore: vc_single -> vc_inference
This commit is contained in:
@@ -73,7 +73,7 @@ from rvc.modules.vc.modules import VC
|
|||||||
def main():
|
def main():
|
||||||
vc = VC()
|
vc = VC()
|
||||||
vc.get_vc("{model.pth}")
|
vc.get_vc("{model.pth}")
|
||||||
tgt_sr, audio_opt, times, _ = vc.vc_single(
|
tgt_sr, audio_opt, times, _ = vc.vc_inference(
|
||||||
1, Path("{InputAudio}")
|
1, Path("{InputAudio}")
|
||||||
)
|
)
|
||||||
wavfile.write("{OutputAudio}", tgt_sr, audio_opt)
|
wavfile.write("{OutputAudio}", tgt_sr, audio_opt)
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class VC:
|
|||||||
|
|
||||||
return self.n_spk, return_protect, index
|
return self.n_spk, return_protect, index
|
||||||
|
|
||||||
def vc_single(
|
def vc_inference(
|
||||||
self,
|
self,
|
||||||
sid: int,
|
sid: int,
|
||||||
input_audio_path: Path,
|
input_audio_path: Path,
|
||||||
@@ -164,7 +164,7 @@ class VC:
|
|||||||
paths = [path.name for path in paths]
|
paths = [path.name for path in paths]
|
||||||
infos = []
|
infos = []
|
||||||
for path in paths:
|
for path in paths:
|
||||||
tgt_sr, audio_opt, _, info = self.vc_single(
|
tgt_sr, audio_opt, _, info = self.vc_inference(
|
||||||
sid,
|
sid,
|
||||||
Path(path),
|
Path(path),
|
||||||
f0_up_key,
|
f0_up_key,
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ def inference(
|
|||||||
):
|
):
|
||||||
vc = VC()
|
vc = VC()
|
||||||
vc.get_vc(modelpath)
|
vc.get_vc(modelpath)
|
||||||
tgt_sr, audio_opt, times, _ = vc.vc_single(
|
tgt_sr, audio_opt, times, _ = vc.vc_inference(
|
||||||
sid,
|
sid,
|
||||||
input,
|
input,
|
||||||
f0_up_key,
|
f0_up_key,
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ def infer(
|
|||||||
load_dotenv()
|
load_dotenv()
|
||||||
vc = VC()
|
vc = VC()
|
||||||
vc.get_vc(modelpath)
|
vc.get_vc(modelpath)
|
||||||
tgt_sr, audio_opt, times, _ = vc.vc_single(
|
tgt_sr, audio_opt, times, _ = vc.vc_inference(
|
||||||
sid,
|
sid,
|
||||||
inputpath,
|
inputpath,
|
||||||
f0upkey,
|
f0upkey,
|
||||||
|
|||||||
Reference in New Issue
Block a user