voice-changer/server/voice_changer/DiffusionSVC/pitchExtractor/PitchExtractor.py
w-okada 371e1b8cac Diffusion SVC:
pitch extractor sr is changed from fixed(16k) to audio sampl rate
2023-07-17 21:03:53 +09:00

15 lines
379 B
Python

from typing import Protocol
from voice_changer.utils.VoiceChangerModel import AudioInOut
class PitchExtractor(Protocol):
def extract(self, audio: AudioInOut, sr: int, block_size: int, model_sr: int, pitch, f0_up_key, silence_front=0):
...
def getPitchExtractorInfo(self):
return {
"pitchExtractorType": self.pitchExtractorType,
}