|
|
@ -446,6 +446,14 @@ def am_to_static(am_inference,
|
|
|
|
am_inference = jit.to_static(
|
|
|
|
am_inference = jit.to_static(
|
|
|
|
am_inference, input_spec=[InputSpec([-1], dtype=paddle.int64)])
|
|
|
|
am_inference, input_spec=[InputSpec([-1], dtype=paddle.int64)])
|
|
|
|
elif am_name == 'vits':
|
|
|
|
elif am_name == 'vits':
|
|
|
|
|
|
|
|
if am_dataset in {"aishell3", "vctk"} and speaker_dict is not None:
|
|
|
|
|
|
|
|
am_inference = jit.to_static(
|
|
|
|
|
|
|
|
am_inference,
|
|
|
|
|
|
|
|
input_spec=[
|
|
|
|
|
|
|
|
InputSpec([-1], dtype=paddle.int64),
|
|
|
|
|
|
|
|
InputSpec([1], dtype=paddle.int64),
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
else:
|
|
|
|
am_inference = jit.to_static(
|
|
|
|
am_inference = jit.to_static(
|
|
|
|
am_inference, input_spec=[InputSpec([-1], dtype=paddle.int64)])
|
|
|
|
am_inference, input_spec=[InputSpec([-1], dtype=paddle.int64)])
|
|
|
|
jit.save(am_inference, os.path.join(inference_dir, am))
|
|
|
|
jit.save(am_inference, os.path.join(inference_dir, am))
|
|
|
|