From d9dae6b2e4d5569cfdb44ffca574cb66cfe1a811 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Sat, 18 May 2024 20:56:11 +0200 Subject: [PATCH] sync --- configs/config.yaml | 36 +- lollms_core | 2 +- lollms_webui.py | 19 +- .../{index-ce134d76.js => index-0266685d.js} | 524 ++--- ...{index-d51e4b15.css => index-0a0ae0b8.css} | 2 +- web/dist/index.html | 4 +- web/src/views/SettingsView.vue | 1813 +++++++++-------- zoos/personalities_zoo | 2 +- 8 files changed, 1292 insertions(+), 1110 deletions(-) rename web/dist/assets/{index-ce134d76.js => index-0266685d.js} (51%) rename web/dist/assets/{index-d51e4b15.css => index-0a0ae0b8.css} (99%) diff --git a/configs/config.yaml b/configs/config.yaml index f9eef917..f89589a3 100644 --- a/configs/config.yaml +++ b/configs/config.yaml @@ -1,5 +1,5 @@ # =================== Lord Of Large Language Multimodal Systems Configuration file =========================== -version: 96 +version: 98 binding_name: null model_name: null model_variant: null @@ -80,10 +80,30 @@ auto_show_browser: true # copy to clipboard copy_to_clipboard_add_all_details: false +# -------------------- Services global configurations -------------------------- +# Select the active test to speach, text to image and speach to text services +active_tts_service: "None" # xtts (offline), openai_tts (API key required) +active_tti_service: "None" # autosd (offline), dall-e (online) +active_stt_service: "None" # whisper (offline), asr (offline or online), openai_whiosper (API key required) + +# -------------------- Services -------------------------- + +# ***************** STT ***************** # STT service asr_enable: false asr_base_url: http://localhost:9000 +# openai_whisper configuration +openai_whisper_key: "" +openai_whisper_model: "whisper-1" + + +# whisper configuration +whisper_activate: false +whisper_model: base + + +# ***************** TTS ***************** # Voice service xtts_enable: false xtts_base_url: http://localhost:8020 @@ -101,6 +121,13 @@ xtts_top_p: 0.85 xtts_speed: 1 xtts_enable_text_splitting: true +# openai_whisper configuration +openai_tts_key: "" +openai_tts_model: "tts-1" +openai_tts_voice: "alloy" + +# ***************** TTI ***************** + # Image generation service enable_sd_service: false sd_base_url: http://localhost:7860 @@ -109,6 +136,8 @@ sd_base_url: http://localhost:7860 dall_e_key: "" dall_e_generation_engine: "dall-e-3" +# Midjourney service key +midjourney_key: "" # Image generation service comfyui enable_comfyui_service: false @@ -118,6 +147,8 @@ comfyui_base_url: http://127.0.0.1:8188/ enable_motion_ctrl_service: false motion_ctrl_base_url: http://localhost:7861 +# ***************** TTT ***************** + # ollama service enable_ollama_service: false ollama_base_url: http://localhost:11434 @@ -202,6 +233,3 @@ show_code_of_conduct: true activate_audio_infos: true -# whisper configuration -whisper_activate: false -whisper_model: base \ No newline at end of file diff --git a/lollms_core b/lollms_core index 42ebabfe..397d21a3 160000 --- a/lollms_core +++ b/lollms_core @@ -1 +1 @@ -Subproject commit 42ebabfe0d8c70f6ec13d5585e52212c4aa15cb8 +Subproject commit 397d21a3bef1d555ec18eff7308859ff40e78519 diff --git a/lollms_webui.py b/lollms_webui.py index c437b806..a58edc02 100644 --- a/lollms_webui.py +++ b/lollms_webui.py @@ -402,6 +402,8 @@ class LOLLMSWebUI(LOLLMSElfServer): + + def rebuild_personalities(self, reload_all=False): if reload_all: self.mounted_personalities=[] @@ -1199,7 +1201,7 @@ class LOLLMSWebUI(LOLLMSElfServer): client_id=client_id, callback=partial(self.process_chunk,client_id = client_id) ) - if self.config.xtts_enable and self.config.auto_read and len(self.personality.audio_samples)>0: + if self.tts and self.config.auto_read and len(self.personality.audio_samples)>0: try: self.process_chunk("Generating voice output",MSG_TYPE.MSG_TYPE_STEP_START,client_id=client_id) from lollms.services.xtts.lollms_xtts import LollmsXTTS @@ -1209,22 +1211,13 @@ class LOLLMSWebUI(LOLLMSElfServer): else: voices_folder = Path(__file__).parent.parent.parent/"services/xtts/voices" - if self.tts is None: - self.tts = LollmsXTTS( - self, - voices_folder=voices_folder, - voice_samples_path=Path(__file__).parent.parent/"voices", - xtts_base_url= self.config.xtts_base_url, - use_deep_speed=self.config.xtts_use_deepspeed, - use_streaming_mode=self.config.xtts_use_streaming_mode - ) - if self.tts.ready: + if self.xtts.ready: language = convert_language_name(self.personality.language) - self.tts.set_speaker_folder(Path(self.personality.audio_samples[0]).parent) + self.xtts.set_speaker_folder(Path(self.personality.audio_samples[0]).parent) fn = self.personality.name.lower().replace(' ',"_").replace('.','') fn = f"{fn}_{message_id}.wav" url = f"audio/{fn}" - self.tts.tts_to_file(client.generated_text, Path(self.personality.audio_samples[0]).name, f"{fn}", language=language) + self.xtts.tts_to_file(client.generated_text, Path(self.personality.audio_samples[0]).name, f"{fn}", language=language) fl = f"\n".join([ f"