INNER CODE UNIT · Python
end
voicepaw/so-vits-svc-fork · src/so_vits_svc_fork/inference/core.py:82
end=start + max_chunk_length,
)
start += max_chunk_length
if end - start > 0:
yield Chunk(is_speech=True, audio=audio[start:end], start=start, end=end)
last_end = end
if last_end != len(audio):
yield Chunk(is_speech=False, audio=audio[last_end:], start=last_end, end=len(audio))
class Svc:
def __init__(
self,
*,
net_g_path: Path | str,
config_path: Path | str,
device: torch.device | str | None = None,
cluster_model_path: Path | str | None = None,