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 --- scripts/extract_acoustic_feature.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'scripts/extract_acoustic_feature.py') diff --git a/scripts/extract_acoustic_feature.py b/scripts/extract_acoustic_feature.py index d6e7711..7015f2a 100644 --- a/scripts/extract_acoustic_feature.py +++ b/scripts/extract_acoustic_feature.py @@ -36,6 +36,11 @@ parser.add_argument('--pad_second', type=float, default=base_voice_param.pad_sec parser.add_argument('--frame_period', type=int, default=base_acoustic_feature_param.frame_period) parser.add_argument('--order', type=int, default=base_acoustic_feature_param.order) parser.add_argument('--alpha', type=float, default=base_acoustic_feature_param.alpha) +parser.add_argument('--f0_estimating_method', type=str, default=base_acoustic_feature_param.f0_estimating_method) +parser.add_argument('--f0_floor1', type=float, default=71) +parser.add_argument('--f0_ceil1', type=float, default=800) +parser.add_argument('--f0_floor2', type=float, default=71) +parser.add_argument('--f0_ceil2', type=float, default=800) parser.add_argument('--ignore_feature', nargs='+', default=['spectrogram', 'aperiodicity']) parser.add_argument('--disable_alignment', action='store_true') parser.add_argument('--enable_overwrite', action='store_true') @@ -67,13 +72,24 @@ def generate_feature(path1, path2): wave2 = wave_file_load_process(path2, test=True) # make acoustic feature - acoustic_feature_process = AcousticFeatureProcess( + acoustic_feature_process1 = AcousticFeatureProcess( frame_period=arguments.frame_period, order=arguments.order, alpha=arguments.alpha, + f0_estimating_method=arguments.f0_estimating_method, + f0_floor=arguments.f0_floor1, + f0_ceil=arguments.f0_ceil1, ) - f1 = acoustic_feature_process(wave1, test=True).astype_only_float(numpy.float32) - f2 = acoustic_feature_process(wave2, test=True).astype_only_float(numpy.float32) + acoustic_feature_process2 = AcousticFeatureProcess( + frame_period=arguments.frame_period, + order=arguments.order, + alpha=arguments.alpha, + f0_estimating_method=arguments.f0_estimating_method, + f0_floor=arguments.f0_floor2, + f0_ceil=arguments.f0_ceil2, + ) + f1 = acoustic_feature_process1(wave1, test=True).astype_only_float(numpy.float32) + f2 = acoustic_feature_process2(wave2, test=True).astype_only_float(numpy.float32) # pre convert if pre_convert: -- cgit v1.2.3-70-g09d2