diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/process.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/process.py b/scripts/process.py index 3a2b788..bd25b3c 100644 --- a/scripts/process.py +++ b/scripts/process.py @@ -12,6 +12,8 @@ from become_yukarin import AcousticConverter from become_yukarin import SuperResolution from become_yukarin.config.config import create_from_json as create_conv_config from become_yukarin.config.sr_config import create_from_json as create_sr_config +from become_yukarin.dataset.dataset import AcousticFeatureProcess +from become_yukarin.dataset.dataset import WaveFileLoadProcess parser = argparse.ArgumentParser() parser.add_argument('-cmd', '--conv_model_directory', type=Path, default=Path('/mnt/dwango/hiroshiba/become-yukarin/')) @@ -54,7 +56,15 @@ def process(p: Path, acoustic_converter: AcousticConverter, super_resolution: Su try: print(str(p)) input = acoustic_converter(p) - wave = super_resolution(input.spectrogram, acoustic_feature=input, sampling_rate=param.voice_param.sample_rate) + + acoustic_feature_process = AcousticFeatureProcess( + 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, + ) + + wave = super_resolution(acoustic_feature_process(input).spectrogram, acoustic_feature=input, sampling_rate=param.voice_param.sample_rate) librosa.output.write_wav(str(output / p.stem) + '.wav', wave.wave, wave.sampling_rate, norm=True) except: import traceback |
