This commit is contained in:
Saifeddine ALOUI 2024-01-28 23:37:57 +01:00
parent 80d72ca433
commit aae34ea873
7 changed files with 10 additions and 10 deletions

View File

@ -744,7 +744,7 @@ try:
try:
from lollms.services.xtts.lollms_xtts import LollmsXTTS
if self.tts is None:
self.tts = LollmsXTTS(self, voice_samples_path=Path(__file__).parent/"voices")
self.tts = LollmsXTTS(self, voice_samples_path=Path(__file__).parent/"voices", xtts_base_url= self.config.xtts_base_url)
except:
return jsonify({"url": None})
@ -1600,7 +1600,7 @@ try:
def post_to_personality(self):
data = request.get_json()
if hasattr(self.personality.processor,'handle_request'):
return self.personality.processor.handle_request(data)
return await self.personality.processor.handle_request(data)
else:
return jsonify({})

View File

@ -70,7 +70,7 @@ async def text2Audio(request: Request):
try:
from lollms.services.xtts.lollms_xtts import LollmsXTTS
if lollmsElfServer.tts is None:
lollmsElfServer.tts = LollmsXTTS(lollmsElfServer, voice_samples_path=Path(__file__).parent/"voices")
lollmsElfServer.tts = LollmsXTTS(lollmsElfServer, voice_samples_path=Path(__file__).parent/"voices", xtts_base_url= lollmsElfServer.config.xtts_base_url)
except:
return {"url": None}
@ -83,7 +83,7 @@ async def text2Audio(request: Request):
try:
from lollms.services.xtts.lollms_xtts import LollmsXTTS
if lollmsElfServer.tts is None:
lollmsElfServer.tts = LollmsXTTS(lollmsElfServer, voice_samples_path=Path(__file__).parent/"voices")
lollmsElfServer.tts = LollmsXTTS(lollmsElfServer, voice_samples_path=Path(__file__).parent/"voices", xtts_base_url= lollmsElfServer.config.xtts_base_url)
language = lollmsElfServer.config.current_language# convert_language_name()
if voice!="main_voice":
voices_folder = lollmsElfServer.lollms_paths.custom_voices_path

@ -1 +1 @@
Subproject commit ab64cda254a7ed876ebdf138f124231ae725e7af
Subproject commit b1682f8ea667397c5af89320fb69e012e4878f35

View File

@ -445,7 +445,7 @@ class LOLLMSWebUI(LOLLMSElfServer):
try:
from lollms.services.xtts.lollms_xtts import LollmsXTTS
if self.tts is None:
self.tts = LollmsXTTS(self, voice_samples_path=Path(__file__).parent.parent/"voices")
self.tts = LollmsXTTS(self, voice_samples_path=Path(__file__).parent.parent/"voices", xtts_base_url= self.config.xtts_base_url)
except:
self.warning(f"Personality {personality.name} request using custom voice but couldn't load XTTS")
except Exception as ex:
@ -1387,7 +1387,7 @@ class LOLLMSWebUI(LOLLMSElfServer):
self.process_chunk("Generating voice output",MSG_TYPE.MSG_TYPE_STEP_START,client_id=client_id)
from lollms.services.xtts.lollms_xtts import LollmsXTTS
if self.tts is None:
self.tts = LollmsXTTS(self, voice_samples_path=Path(__file__).parent.parent/"voices")
self.tts = LollmsXTTS(self, voice_samples_path=Path(__file__).parent.parent/"voices", xtts_base_url= self.config.xtts_base_url)
language = convert_language_name(self.personality.language)
self.tts.set_speaker_folder(Path(self.personality.audio_samples[0]).parent)
fn = self.personality.name.lower().replace(' ',"_").replace('.','')

View File

@ -2182,7 +2182,7 @@
@choice-selected="onVariantChoiceSelected"
@close-dialog="oncloseVariantChoiceDialog"
@choice-validated="onvalidateVariantChoice"
/>
/>
</template>
<style scoped>

@ -1 +1 @@
Subproject commit 71f07f9f6ed6450bde23cff7d6c6cc157a498665
Subproject commit 5b3f86f44275c333f0f8b3dd3e9779f0a0fb6709

@ -1 +1 @@
Subproject commit 7d67d412ef94a7d67a3fe3f9ac47db325b69e0c2
Subproject commit 2aa62668525ff93e9e270c18236c7bd98ec3a737