diff --git a/mozilla_voice_tts/bin/synthesize.py b/mozilla_voice_tts/bin/synthesize.py index 3de97555..1e2886b8 100644 --- a/mozilla_voice_tts/bin/synthesize.py +++ b/mozilla_voice_tts/bin/synthesize.py @@ -155,7 +155,11 @@ if __name__ == "__main__": if args.gst_style is None: gst_style = C.gst['gst_style_input'] else: - gst_style = args.gst_style + # 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)