Update TextGen/router.py
Browse files50 unmodified lines5152535455565775 unmodified lines13313413513613713813914014114214314414514614714850 unmodified linesmy_hf_token=os.environ["HF_TOKEN"]tts_client = Client("Jofthomas/xtts",hf_token=my_hf_token)main_npcs={"Blacksmith":"./voices/Blacksmith.mp3",75 unmodified linesvoice=determine_vocie_from_npc(message.npc, message.genre)# Use the Gradio client to generate the wav fileresult = tts_client.predict(prompt=message.input,language=message.language,audio_file_pth=handle_file(voice),mic_file_path=None,use_mic=False,voice_cleanup=False,no_lang_auto_detect=False,agree=True,api_name="/predict")# Get the path of the generated wav filewav_file_path = result[1]50 unmodified lines5152535455565775 unmodified lines13313413513613713813914014114214350 unmodified linesmy_hf_token=os.environ["HF_TOKEN"]tts_client = Client("Jofthomas/voice-clone",hf_token=my_hf_token)main_npcs={"Blacksmith":"./voices/Blacksmith.mp3",75 unmodified linesvoice=determine_vocie_from_npc(message.npc, message.genre)# Use the Gradio client to generate the wav fileresult = tts_client.predict(text=message.input,audio=handle_file(voice),api_name="/predict")# Get the path of the generated wav filewav_file_path = result[1]
TextGen/router.py+4-9