mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-02-01 08:48:19 +00:00
removed threading
This commit is contained in:
parent
3b975b2421
commit
558da00d55
@ -378,7 +378,7 @@ class RTCom:
|
|||||||
ASCIIColors.red(" -------------------------------------------------")
|
ASCIIColors.red(" -------------------------------------------------")
|
||||||
self.lc.info("Talking")
|
self.lc.info("Talking")
|
||||||
ASCIIColors.green("<<TALKING>>")
|
ASCIIColors.green("<<TALKING>>")
|
||||||
self.lc.tts.tts_audio(lollms_text, speaker=self.voice, file_name_or_path=str(Path(self.logs_folder)/filename)+"_answer.wave")
|
self.lc.tts.tts_audio(lollms_text, speaker=self.voice, file_name_or_path=str(Path(self.logs_folder)/filename)+"_answer.wav")
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
trace_exception(ex)
|
trace_exception(ex)
|
||||||
self.block_listening = False
|
self.block_listening = False
|
||||||
|
@ -314,13 +314,13 @@ class LollmsXTTS(LollmsTTS):
|
|||||||
voice_file = [v for v in voices_folder.iterdir() if v.stem==voice and v.suffix==".wav"]
|
voice_file = [v for v in voices_folder.iterdir() if v.stem==voice and v.suffix==".wav"]
|
||||||
if len(voice_file)==0:
|
if len(voice_file)==0:
|
||||||
return {"status":False,"error":"Voice not found"}
|
return {"status":False,"error":"Voice not found"}
|
||||||
self.xtts_audio(preprocessed_text, voice_file[0].name, f"{output_fn}", language=language)
|
self.xtts_audio(preprocessed_text, voice_file[0].name, f"{output_fn}", language=language, use_threading=use_threading)
|
||||||
|
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
trace_exception(ex)
|
trace_exception(ex)
|
||||||
return {"status":False,"error":f"{ex}"}
|
return {"status":False,"error":f"{ex}"}
|
||||||
|
|
||||||
def xtts_audio(self, text, speaker, file_name_or_path:Path|str=None, language="en", use_threading=True):
|
def xtts_audio(self, text, speaker, file_name_or_path:Path|str=None, language="en", use_threading=False):
|
||||||
text = self.clean_text(text)
|
text = self.clean_text(text)
|
||||||
def tts2_audio_th(thread_uid=None):
|
def tts2_audio_th(thread_uid=None):
|
||||||
url = f"{self.xtts_base_url}/tts_to_audio"
|
url = f"{self.xtts_base_url}/tts_to_audio"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user