Avatar Translator Dash app with NLP

Hi my beloved community members
I have been recently developing an application for natural language processing , in which the user input the text and convert the text into speech and create avatar video that speaks the text in perfect syn with the translated text but there is a problem with output video it must must be JSON serializable so I converted into JSON string but it diid not work
the code is Available here

please help me solve this issue thanks in advance