15 lines
399 B
Python
15 lines
399 B
Python
from typing import Protocol
|
|
from const import EnumPitchExtractorTypes
|
|
|
|
|
|
class PitchExtractor(Protocol):
|
|
pitchExtractorType: EnumPitchExtractorTypes = EnumPitchExtractorTypes.harvest
|
|
|
|
def extract(self, audio, f0_up_key, sr, window, silence_front=0):
|
|
...
|
|
|
|
def getPitchExtractorInfo(self):
|
|
return {
|
|
"pitchExtractorType": self.pitchExtractorType.value,
|
|
}
|