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

optimize(rvc): gather residuals

This commit is contained in:
源文雨
2024-06-08 00:44:46 +09:00
parent eb24434260
commit b91dcf2261
9 changed files with 210 additions and 200 deletions

View File

@@ -1,6 +1,7 @@
from typing import Any, Optional
import numpy as np
import parselmouth
import typing
from .f0 import F0Predictor
@@ -10,7 +11,7 @@ class PMF0Predictor(F0Predictor):
super().__init__(hop_length, f0_min, f0_max, sampling_rate)
def compute_f0(
self, wav: np.ndarray[typing.Any, np.dtype], p_len: int | None = None
self, wav: np.ndarray[Any, np.dtype], p_len: Optional[int] = None
):
x = wav
if p_len is None:
@@ -36,7 +37,7 @@ class PMF0Predictor(F0Predictor):
return f0
def compute_f0_uv(
self, wav: np.ndarray[typing.Any, np.dtype], p_len: int | None = None
self, wav: np.ndarray[Any, np.dtype], p_len: Optional[int] = None
):
x = wav
if p_len is None: