diff options
| author | jules on spawn <spawn@cortex> | 2018-07-29 18:10:55 +0200 |
|---|---|---|
| committer | jules on spawn <spawn@cortex> | 2018-07-29 18:10:55 +0200 |
| commit | cee44f61c90c1e7cb543ed3e8148b905c3c0e554 (patch) | |
| tree | 02d7bc71c0150d584d85865c739a764c92f8fe3f | |
| parent | 1dc77585c90d74ea80068ecdc8ba5f513af3130f (diff) | |
process
| -rw-r--r-- | scripts/process.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/process.py b/scripts/process.py index 47f013f..b169f26 100644 --- a/scripts/process.py +++ b/scripts/process.py @@ -24,6 +24,7 @@ parser.add_argument('-iwd', '--input_directory', type=Path, default=Path('./inpu parser.add_argument('-owd', '--output_directory', type=Path, default=Path('./output')) parser.add_argument('-it', '--iteration', type=int) parser.add_argument('-g', '--gpu', type=int) +parser.add_argument('-f0', '--convert_f0', action='store_true') args = parser.parse_args() conv_model = args.conv_model_directory # type: Path @@ -32,6 +33,7 @@ input_directory = args.input_directory output_directory = args.output_directory it = args.iteration gpu = args.gpu +convert_f0 = args.convert_f0 conv_config = create_conv_config(conv_model / 'config.json') sr_config = create_sr_config(sr_model / 'config.json') @@ -73,7 +75,7 @@ def process(p: Path, acoustic_converter: AcousticConverter, super_resolution: Su # converted_feature.f0 = input_feature.f0.astype(numpy.float64) merged_feature = AcousticFeature( - f0=input_feature.f0, + f0=converted_feature.f0 if convert_f0 else input_feature.f0, spectrogram=converted_feature.spectrogram, aperiodicity=converted_feature.aperiodicity, mfcc=converted_feature.mfcc, |
