This commit is contained in:
Saifeddine ALOUI 2024-05-24 00:01:45 +02:00
parent 6afd883f1b
commit 1dcbe34240
2 changed files with 9 additions and 4 deletions

View File

@ -362,7 +362,7 @@ class LollmsApplication(LoLLMsCom):
self.whisper = LollmsWhisper(self, self.config.whisper_model, self.lollms_paths.personal_outputs_path)
except Exception as ex:
trace_exception(ex)
if self.config.xtts_enable and self.xtts is None:
if (self.config.xtts_enable or self.config.active_stt_service == "xtts") and self.xtts is None:
try:
from lollms.services.xtts.lollms_xtts import LollmsXTTS
voice=self.config.xtts_current_voice

View File

@ -267,9 +267,14 @@ def tts_is_ready():
@router.get("/get_snd_input_devices")
def get_snd_input_devices():
return lollmsElfServer.stt.get_devices()
if lollmsElfServer.stt:
return lollmsElfServer.stt.get_devices()
else:
return []
@router.get("/get_snd_output_devices")
def get_snd_output_devices():
return lollmsElfServer.tts.get_devices()
if lollmsElfServer.tts:
return lollmsElfServer.tts.get_devices()
else:
return []