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
[TTS]add fastspeech2 cnndecoder onnx model #1712
Conversation
a7402e3
to
da93f94
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
full_name = args.am | ||
elif filed == 'voc': | ||
full_name = args.voc | ||
model_dir = str(Path(args.inference_dir) / (full_name + ".onnx")) |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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'): |
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
支持流式am的模型都换成fastspeech2_cnndecoder吧,免得有点混乱
There was a problem hiding this comment.
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,我注释歇写清楚一点吧
No description provided.