Skip to content

Conversation

yt605155624
Copy link
Collaborator

No description provided.

@yt605155624 yt605155624 force-pushed the add_cnndecoder_onnx branch from a7402e3 to da93f94 Compare April 18, 2022 07:00
@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.

3 participants