voice-changer/server/voice_changer/DiffusionSVC/pitchExtractor/PitchExtractor.py

15 lines
379 B
Python
Raw Normal View History

2023-07-14 07:54:08 +03:00
from typing import Protocol
from voice_changer.utils.VoiceChangerModel import AudioInOut
2023-07-14 07:54:08 +03:00
class PitchExtractor(Protocol):
def extract(self, audio: AudioInOut, sr: int, block_size: int, model_sr: int, pitch, f0_up_key, silence_front=0):
2023-07-14 07:54:08 +03:00
...
def getPitchExtractorInfo(self):
return {
"pitchExtractorType": self.pitchExtractorType,
}