fix module imports

This commit is contained in:
Brandon Thomas
2023-05-04 00:06:04 -07:00
parent 50ea8fc649
commit ad7b937eea
@@ -12,7 +12,7 @@ import torch
from cm_time import timer
from numpy import dtype, float32, ndarray
from so_vits_svc_fork import f0
from so_vits_svc_fork import f0 as so_vits_svc_f0
from so_vits_svc_fork import utils
from so_vits_svc_fork import cluster
@@ -147,13 +147,13 @@ class Svc:
"crepe", "crepe-tiny", "parselmouth", "dio", "harvest"
] = "dio",
):
f0 = so_vits_svc_fork.f0.compute_f0(
f0 = so_vits_svc_f0.compute_f0(
audio,
sampling_rate=self.target_sample,
hop_length=self.hop_size,
method=f0_method,
)
f0, uv = so_vits_svc_fork.f0.interpolate_f0(f0)
f0, uv = so_vits_svc_f0.interpolate_f0(f0)
f0 = torch.as_tensor(f0, dtype=self.dtype, device=self.device)
uv = torch.as_tensor(uv, dtype=self.dtype, device=self.device)
f0 = f0 * 2 ** (tran / 12)
@@ -266,7 +266,7 @@ class Svc:
chunk_length_min = chunk_length_min = (
int(
min(
sr / so_vits_svc_fork.f0.f0_min * 20 + 1,
sr / so_vits_svc_f0.f0_min * 20 + 1,
chunk_seconds * sr,
)
)
@@ -590,7 +590,7 @@ class RealtimeVC2:
LOG.info(f"input_audio_store: {self.input_audio_store.shape}")
sr = self.svc_model.target_sample
chunk_length_min = (
int(min(sr / so_vits_svc_fork.f0.f0_min * 20 + 1, chunk_seconds * sr)) // 2
int(min(sr / so_vits_svc_f0.f0_min * 20 + 1, chunk_seconds * sr)) // 2
)
LOG.info(f"Chunk length min: {chunk_length_min}")
chunk_list = list(