summaryrefslogtreecommitdiff
path: root/become_yukarin/super_resolution.py
diff options
context:
space:
mode:
authorHiroshiba Kazuyuki <kazuyuki_hiroshiba@dwango.co.jp>2018-01-25 20:10:01 +0900
committerHiroshiba Kazuyuki <kazuyuki_hiroshiba@dwango.co.jp>2018-01-25 20:10:01 +0900
commitc44e1ec9b24a70cc30de5682bf1855afe5eb0485 (patch)
treedea956f863f5d04a5206a43dbc8fc62eb6c90275 /become_yukarin/super_resolution.py
parent3ecf878ec5f35c8242b0b5e488d8f8d1f50e9aaf (diff)
mypy & harvest追加
Diffstat (limited to 'become_yukarin/super_resolution.py')
-rw-r--r--become_yukarin/super_resolution.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/become_yukarin/super_resolution.py b/become_yukarin/super_resolution.py
index 163057d..7c53b9d 100644
--- a/become_yukarin/super_resolution.py
+++ b/become_yukarin/super_resolution.py
@@ -15,7 +15,7 @@ from become_yukarin.model.sr_model import create_predictor_sr
class SuperResolution(object):
- def __init__(self, config: SRConfig, model_path: Path, gpu: int = None):
+ def __init__(self, config: SRConfig, model_path: Path, gpu: int = None) -> None:
self.config = config
self.model_path = model_path
self.gpu = gpu
@@ -34,6 +34,7 @@ class SuperResolution(object):
frame_period=param.acoustic_feature_param.frame_period,
order=param.acoustic_feature_param.order,
alpha=param.acoustic_feature_param.alpha,
+ f0_estimating_method=param.acoustic_feature_param.f0_estimating_method,
)
self._low_high_spectrogram_load_process = LowHighSpectrogramFeatureLoadProcess(
validate=True,
@@ -76,13 +77,13 @@ class SuperResolution(object):
return Wave(out, sampling_rate=sampling_rate)
def convert_from_audio_path(self, input: Path):
- input = self._wave_process(str(input), test=True)
- input = self._low_high_spectrogram_process(input, test=True)
- return self.convert(input.low)
+ wave = self._wave_process(str(input), test=True)
+ feature = self._low_high_spectrogram_process(wave, test=True)
+ return self.convert(feature.low)
def convert_from_feature_path(self, input: Path):
- input = self._low_high_spectrogram_load_process(input, test=True)
- return self.convert(input.low)
+ feature = self._low_high_spectrogram_load_process(input, test=True)
+ return self.convert(feature.low)
def __call__(
self,