1
0
mirror of https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git synced 2026-06-09 20:40:48 +08:00

optimize(infer): move modules into rvc

This commit is contained in:
源文雨
2024-06-08 00:14:03 +09:00
parent 44725ddd2c
commit eb24434260
8 changed files with 468 additions and 618 deletions

View File

@@ -38,9 +38,9 @@ class ContentVec(Model):
super().__init__(vec_path, device)
def __call__(self, wav: np.ndarray[typing.Any, np.dtype]):
return self.__forward(wav)
return self.forward(wav)
def __forward(self, wav: np.ndarray[typing.Any, np.dtype]):
def forward(self, wav: np.ndarray[typing.Any, np.dtype]):
if wav.ndim == 2: # double channels
wav = wav.mean(-1)
assert wav.ndim == 1, wav.ndim