From 29f0994ea34f3df7dd5eea0b330d429b2e492211 Mon Sep 17 00:00:00 2001 From: Hiroshiba Kazuyuki Date: Sun, 4 Feb 2018 09:39:39 +0900 Subject: リアルタイム変換が可能 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_voice_changer.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/test_voice_changer.py b/tests/test_voice_changer.py index 2a42f88..ceddf9c 100644 --- a/tests/test_voice_changer.py +++ b/tests/test_voice_changer.py @@ -1,3 +1,7 @@ +import world4py +world4py._WORLD_LIBRARY_PATH = 'x64_world.dll' + + from pathlib import Path from typing import NamedTuple @@ -22,19 +26,19 @@ class AudioConfig(NamedTuple): out_norm: float -model_base_path = Path('~/trained/') +model_base_path = Path('~/Github/become-yukarin/trained/').expanduser() test_data_path = Path('tests/test-deep-learning-yuduki-yukari.wav') -test_output_path = Path('tests/output.wav') +test_output_path = Path('output.wav') print('model loading...', flush=True) -model_path = model_base_path / Path('harvest-innoise03/predictor_1340000.npz') +model_path = model_base_path / Path('harvest-innoise03/predictor_1390000.npz') config_path = model_base_path / Path('harvest-innoise03/config.json') config = create_config(config_path) acoustic_converter = AcousticConverter(config, model_path, gpu=0) print('model 1 loaded!', flush=True) -model_path = model_base_path / Path('sr-noise3/predictor_165000.npz') +model_path = model_base_path / Path('sr-noise3/predictor_180000.npz') config_path = model_base_path / Path('sr-noise3/config.json') sr_config = create_sr_config(config_path) super_resolution = SuperResolution(sr_config, model_path, gpu=0) @@ -42,7 +46,7 @@ print('model 2 loaded!', flush=True) audio_config = AudioConfig( rate=config.dataset.param.voice_param.sample_rate, - chunk=config.dataset.param.voice_param.sample_rate // 4, + chunk=config.dataset.param.voice_param.sample_rate, vocoder_buffer_size=config.dataset.param.voice_param.sample_rate // 16, out_norm=4.5, ) -- cgit v1.2.3-70-g09d2