Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TTS]add fastspeech2 cnndecoder onnx model #1712

Merged
merged 2 commits into from Apr 18, 2022

Conversation

yt605155624
Copy link
Collaborator

No description provided.

@zh794390558 zh794390558 requested review from zh794390558 and removed request for zh794390558 April 18, 2022 07:10
Copy link
Collaborator

@zh794390558 zh794390558 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zh794390558 zh794390558 merged commit b78bc63 into PaddlePaddle:develop Apr 18, 2022
full_name = args.am
elif filed == 'voc':
full_name = args.voc
model_dir = str(Path(args.inference_dir) / (full_name + ".onnx"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉共用的函数里面用args不是很好,传具体的参数会不会更好,因为万一有的args没有这个参数或者参数名字不一样就不好用。很多共用的函数都用的args

get_spk_id = True
spk_id = np.array([args.spk_id])
if args.lang == 'zh':
input_ids = frontend.get_input_ids(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉 frontend 的相关功能新建一个函数会跟好,更清晰一些,并且单独也可以用



# streaming am
def get_streaming_am_predictor(args):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里需不需要标注下针对的是astspeech2_cnndecoder模型

return normalized_mel


def get_sess(args, filed='am'):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里注释下是onnx推理吧,清晰些。下面是onnx的都可以注释一下

description="Paddle Infernce with acoustic model & vocoder.")
# acoustic model
parser.add_argument(
'--am',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

流式am的模型还是写明是fastspeech2_cnndecoder感觉更好

parser.add_argument(
'--am',
type=str,
default='fastspeech2_csmsc',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

支持流式am的模型都换成fastspeech2_cnndecoder吧,免得有点混乱

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个不行,因为现在模型的命名方式是类似于 fastspeech2_csmsc_am_decoder.onnx,我注释歇写清楚一点吧

@yt605155624 yt605155624 deleted the add_cnndecoder_onnx branch June 16, 2022 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants