From c44e1ec9b24a70cc30de5682bf1855afe5eb0485 Mon Sep 17 00:00:00 2001 From: Hiroshiba Kazuyuki Date: Thu, 25 Jan 2018 20:10:01 +0900 Subject: mypy & harvest追加 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- become_yukarin/super_resolution.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'become_yukarin/super_resolution.py') 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, -- cgit v1.2.3-70-g09d2