diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-07-23 16:23:28 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-07-23 16:23:28 +0200 |
| commit | 40279603a742acb782c73be3d77558b92eb0855e (patch) | |
| tree | 80e98920546805a18c326f4a864b6ff51251fa66 | |
| parent | 41d64ffb02aae0a61cb41044757b2dd6b7b783c1 (diff) | |
process
| -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 |
