upgraded functions in tts and stt

This commit is contained in:
Saifeddine ALOUI 2024-05-20 17:27:13 +02:00
parent 513485df49
commit 0d79c67db4
3 changed files with 3 additions and 3 deletions

View File

@ -527,6 +527,6 @@ def stop_recording(data:Identification):
# preprocessed_text= add_period(ai_text)
# voice_file = [v for v in voices_folder.iterdir() if v.stem==voice and v.suffix==".wav"]
# lollmsElfServer.tts.tts_to_audio(preprocessed_text, voice_file[0].name, language=language)
# lollmsElfServer.tts.tts_audio(preprocessed_text, voice_file[0].name, language=language)
return text

@ -1 +1 @@
Subproject commit 2b4f4cf7f6bcf6e9b859d7b097d1595c921aaedb
Subproject commit 14ff02b6d2d6737f69bb70e46361cae9cb0c358f

View File

@ -1255,7 +1255,7 @@ class LOLLMSWebUI(LOLLMSElfServer):
fn = self.personality.name.lower().replace(' ',"_").replace('.','')
fn = f"{fn}_{message_id}.wav"
url = f"audio/{fn}"
self.xtts.tts_to_file(client.generated_text, Path(self.personality.audio_samples[0]).name, f"{fn}", language=language)
self.xtts.tts_file(client.generated_text, Path(self.personality.audio_samples[0]).name, f"{fn}", language=language)
fl = f"\n".join([
f"<audio controls>",
f' <source src="{url}" type="audio/wav">',