voice-changer/server/voice_changer/utils/VoiceChangerModel.py

23 lines
539 B
Python
Raw Normal View History

2023-04-28 06:39:51 +09:00
from typing import Any, Protocol, TypeAlias
import numpy as np
AudioInOut: TypeAlias = np.ndarray[Any, np.dtype[np.int16]]
class VoiceChangerModel(Protocol):
2023-04-28 06:39:51 +09:00
def get_processing_sampling_rate(self) -> int:
...
def get_info(self) -> dict[str, Any]:
...
def inference(self, data: tuple[Any, ...]) -> Any:
...
2023-06-16 00:56:18 +09:00
def generate_input(self, newData: AudioInOut, inputSize: int, crossfadeSize: int) -> tuple[Any, ...]:
2023-04-28 06:39:51 +09:00
...
def update_settings(self, key: str, val: Any) -> bool:
...