This commit is contained in:
Saifeddine ALOUI 2024-05-18 20:56:11 +02:00
parent 91571a5e86
commit d9dae6b2e4
8 changed files with 1292 additions and 1110 deletions

View File

@ -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

@ -1 +1 @@
Subproject commit 42ebabfe0d8c70f6ec13d5585e52212c4aa15cb8
Subproject commit 397d21a3bef1d555ec18eff7308859ff40e78519

View File

@ -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"<audio controls>",
f' <source src="{url}" type="audio/wav">',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
web/dist/index.html vendored
View File

@ -6,8 +6,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LoLLMS WebUI - Welcome</title>
<script type="module" crossorigin src="/assets/index-ce134d76.js"></script>
<link rel="stylesheet" href="/assets/index-d51e4b15.css">
<script type="module" crossorigin src="/assets/index-0266685d.js"></script>
<link rel="stylesheet" href="/assets/index-0a0ae0b8.css">
</head>
<body>
<div id="app"></div>

File diff suppressed because it is too large Load Diff

@ -1 +1 @@
Subproject commit e0bcb7028277a1936f7875633dc507cf0cbb92dc
Subproject commit 029f45f3d876a6e95107087044cf5bac16ff8880