enhanced ui (added sound devices selection)

This commit is contained in:
Saifeddine ALOUI 2024-05-20 15:09:00 +02:00
parent 4bb1bb3fbc
commit 57f6b7eea6
7 changed files with 295 additions and 243 deletions

View File

@ -1,5 +1,5 @@
# =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
version: 99
version: 100
binding_name: null
model_name: null
model_variant: null
@ -89,7 +89,11 @@ active_ttm_service: "None" # musicgen (offline)
# -------------------- Services --------------------------
# ***************** STT *****************
# STT service
stt_input_device: null
# ASR STT service
asr_enable: false
asr_base_url: http://localhost:9000
@ -104,6 +108,8 @@ whisper_model: base
# ***************** TTS *****************
tts_output_device: null
# Voice service
xtts_enable: false
xtts_base_url: http://localhost:8020

View File

@ -487,7 +487,8 @@ def start_recording(data:Identification):
channels=1,
buffer_size=10,
model=lollmsElfServer.config.whisper_model,
snd_device=None,
snd_input_device=lollmsElfServer.config.stt_input_device,
snd_output_device=lollmsElfServer.config.tts_output_device,
logs_folder="logs",
voice=None,
block_while_talking=True,

@ -1 +1 @@
Subproject commit f5853c81636c97570fbc3015cb185c4bb9b5eac2
Subproject commit 45cc5e39b9d207b682310637089617a8b5c05b31

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-807bc66c.js"></script>
<link rel="stylesheet" href="/assets/index-6a71f446.css">
<script type="module" crossorigin src="/assets/index-72c42fda.js"></script>
<link rel="stylesheet" href="/assets/index-f34702e1.css">
</head>
<body>
<div id="app"></div>

View File

@ -1219,6 +1219,47 @@
</table>
</Card>
<Card title="Audio devices settings" :is_subcard="true" class="pb-2 m-2">
<table class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
<tr>
<td style="min-width: 200px;">
<label for="stt_input_device" class="text-sm font-bold" style="margin-right: 1rem;" title="Input device">Audio Input device:</label>
</td>
<td style="width: 100%;">
<select
id="stt_input_device"
required
v-model="configFile.stt_input_device"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
<option v-for="snd_input_device in snd_input_devices" :key="snd_input_device" :value="snd_input_device">
{{ snd_input_device }}
</option>
</select>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="tts_output_device" class="text-sm font-bold" style="margin-right: 1rem;" title="Input device">Audio Output device:</label>
</td>
<td style="width: 100%;">
<select
id="tts_output_device"
required
v-model="configFile.tts_output_device"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
<option v-for="tts_output_device in tts_output_devices" :key="tts_output_device" :value="tts_output_device">
{{ tts_output_device }}
</option>
</select>
</td>
</tr>
</table>
</Card>
<Card title="Lollms service" :is_shrunk="true" :is_subcard="true" class="pb-2 m-2">
<table class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
<tr>
@ -3425,6 +3466,8 @@ export default {
'Content-Type': 'application/json'
},
defaultModelImgPlaceholder:defaultModelImgPlaceholder,
snd_input_devices: [],
snd_output_devices: [],
voices: [],
voice_languages:{
"Arabic": "ar",
@ -5690,12 +5733,14 @@ export default {
console.log("Constructing")
this.load_everything()
this.getSeviceVoices()
this.snd_input_devices = await axios.get("/get_snd_input_devices")
this.snd_output_devices = await axios.get("/get_snd_output_devices")
},
activated() {
//this.load_everything()
},
computed: {
rendered_models_zoo:{
get(){
if (this.searchModel){