diff --git a/examples/speedyspeech/baker/synthesize.py b/examples/speedyspeech/baker/synthesize.py index 262908f..c4b6cb3 100644 --- a/examples/speedyspeech/baker/synthesize.py +++ b/examples/speedyspeech/baker/synthesize.py @@ -85,6 +85,8 @@ def evaluate(args, speedyspeech_config, pwg_config): ]) paddle.jit.save(speedyspeech_inference, os.path.join(args.inference_dir, "speedyspeech")) + speedyspeech_inference = paddle.jit.load( + os.path.join(args.inference_dir, "speedyspeech")) pwg_inference = PWGInference(pwg_normalizer, vocoder) pwg_inference.eval() @@ -93,6 +95,7 @@ def evaluate(args, speedyspeech_config, pwg_config): input_spec=[InputSpec( [-1, 80], dtype=paddle.float32), ]) paddle.jit.save(pwg_inference, os.path.join(args.inference_dir, "pwg")) + pwg_inference = paddle.jit.load(os.path.join(args.inference_dir, "pwg")) output_dir = Path(args.output_dir) output_dir.mkdir(parents=True, exist_ok=True) diff --git a/examples/speedyspeech/baker/synthesize_e2e.py b/examples/speedyspeech/baker/synthesize_e2e.py index 186230c..af448c8 100644 --- a/examples/speedyspeech/baker/synthesize_e2e.py +++ b/examples/speedyspeech/baker/synthesize_e2e.py @@ -86,6 +86,8 @@ def evaluate(args, speedyspeech_config, pwg_config): ]) paddle.jit.save(speedyspeech_inference, os.path.join(args.inference_dir, "speedyspeech")) + speedyspeech_inference = paddle.jit.load( + os.path.join(args.inference_dir, "speedyspeech")) pwg_inference = PWGInference(pwg_normalizer, vocoder) pwg_inference.eval() @@ -94,6 +96,7 @@ def evaluate(args, speedyspeech_config, pwg_config): input_spec=[InputSpec( [-1, 80], dtype=paddle.float32), ]) paddle.jit.save(pwg_inference, os.path.join(args.inference_dir, "pwg")) + pwg_inference = paddle.jit.load(os.path.join(args.inference_dir, "pwg")) output_dir = Path(args.output_dir) output_dir.mkdir(parents=True, exist_ok=True)