add gst style dict suport in synthesize

This commit is contained in:
Edresson 2020-07-30 21:51:43 -03:00 committed by erogol
parent 27ddef141d
commit d038a00602
1 changed files with 5 additions and 1 deletions

View File

@ -155,6 +155,10 @@ if __name__ == "__main__":
if args.gst_style is None:
gst_style = C.gst['gst_style_input']
else:
# check if gst_style string is a dict, if is dict convert else use string
try:
gst_style = json.loads(args.gst_style)
except:
gst_style = args.gst_style
wav = tts(model, vocoder_model, args.text, C, args.use_cuda, ap, use_griffin_lim, args.speaker_fileid, speaker_embedding=speaker_embedding, gst_style=gst_style)