Fix bug: add missing get_style_vector function

This commit is contained in:
litagin02
2024-01-08 16:22:32 +09:00
parent ade5d641e8
commit fb43a178a3

View File

@@ -61,9 +61,9 @@ class Model:
def get_style_vector_from_audio(
self, audio_path: str, weight: float = 1.0
) -> np.ndarray:
from style_gen import extract_style_vector
from style_gen import get_style_vector
xvec = extract_style_vector(audio_path)
xvec = get_style_vector(audio_path)
mean = self.style_vectors[0]
xvec = mean + (xvec - mean) * weight
return xvec