This commit is contained in:
Saifeddine ALOUI 2024-05-19 16:56:53 +02:00
parent 8a7ff03bda
commit 4e85868276
7 changed files with 322 additions and 328 deletions

@ -1 +1 @@
Subproject commit 124f614480049b8f67d55bbe0d10e13bf441c55d
Subproject commit 104293d5e922d0631f307e23da30069efcc8e2de

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-5c94dc41.js"></script>
<link rel="stylesheet" href="/assets/index-ffe056f8.css">
<script type="module" crossorigin src="/assets/index-e10f7fc6.js"></script>
<link rel="stylesheet" href="/assets/index-59e861b5.css">
</head>
<body>
<div id="app"></div>

View File

@ -148,6 +148,7 @@
<div class="flex flex-row items-center">
<div class="text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer"
title="speak"
v-if ="this.$store.state.config.active_tts_service!='None'"
@click.stop="speak()"
:class="{ 'text-red-500': isTalking }">
<i data-feather="volume-2"></i>
@ -520,7 +521,7 @@ export default {
}
},
speak() {
if(this.$store.state.config.xtts_enable && this.$store.state.config.xtts_use_streaming_mode){
if(this.$store.state.config.active_tts_service!="browser" && this.$store.state.config.active_tts_service!="None"){
this.isSpeaking = true;
axios.post("./text2Audio",{text:this.message.content}).then(response => {
this.isSpeaking = false;

View File

@ -883,143 +883,7 @@
</tr>
</table>
</Card>
<Card title="Browser Audio" :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="activate_audio_infos" class="text-sm font-bold" style="margin-right: 1rem;">Activate audio infos:</label>
</td>
<td>
<div class="flex flex-row">
<input
type="checkbox"
id="activate_audio_infos"
required
v-model="configFile.activate_audio_infos"
@change="settingsChanged=true"
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
</div>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="audio_auto_send_input" class="text-sm font-bold" style="margin-right: 1rem;">Send audio input automatically:</label>
</td>
<td>
<div class="flex flex-row">
<input
type="checkbox"
id="audio_auto_send_input"
required
v-model="configFile.audio_auto_send_input"
@change="settingsChanged=true"
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
</div>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="auto_speak" class="text-sm font-bold" style="margin-right: 1rem;">Enable auto speak:</label>
</td>
<td>
<div class="flex flex-row">
<input
type="checkbox"
id="auto_speak"
required
v-model="configFile.auto_speak"
@change="settingsChanged=true"
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
</div>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="audio_pitch" class="text-sm font-bold" style="margin-right: 1rem;">audio pitch:</label>
</td>
<td>
<input id="audio_pitch" v-model="configFile.audio_pitch"
@change="settingsChanged=true"
type="range" min="0" max="10" step="0.1"
class="flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500">
<input v-model="configFile.audio_pitch"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="audio_silenceTimer" class="text-sm font-bold" style="margin-right: 1rem;">audio in silence timer (ms):</label>
</td>
<td>
<input id="audio_silenceTimer" v-model="configFile.audio_silenceTimer"
@change="settingsChanged=true"
type="range" min="0" max="10000" step="1"
class="flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500">
<input v-model="configFile.audio_silenceTimer"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="audio_in_language" class="text-sm font-bold" style="margin-right: 1rem;">Input Audio Language:</label>
</td>
<td>
<!-- Select element for choosing the input audio language -->
<select
id="audio_in_language"
v-model="configFile.audio_in_language"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
<!-- Options with language codes and corresponding language names -->
<option v-for="language in audioLanguages" :key="language.code" :value="language.code">
{{ language.name }}
</option>
</select>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="audio_out_voice" class="text-sm font-bold" style="margin-right: 1rem;">Output Audio Voice:</label>
</td>
<td>
<!-- Select element for choosing the output audio voice -->
<select
id="audio_out_voice"
v-model="configFile.audio_out_voice"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
<!-- Options with available voices in the browser -->
<option v-for="voice in audioVoices" :key="voice.name" :value="voice.name">
{{ voice.name }}
</option>
</select>
</td>
</tr>
</table>
</Card>
</div>
</div>
</div>
@ -1289,6 +1153,7 @@
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
<option value="None">None</option>
<option value="browser">Use Browser TTS (doesn't work in realtime mode)</option>
<option value="xtts">XTTS</option>
<option value="openai_tts">Open AI TTS</option>
</select>
@ -1480,6 +1345,134 @@
</table>
</Card>
<Card title="TTS services" :is_shrunk="true" :is_subcard="true" class="pb-2 m-2">
<Card title="Browser Audio" :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="activate_audio_infos" class="text-sm font-bold" style="margin-right: 1rem;">Activate audio infos:</label>
</td>
<td>
<div class="flex flex-row">
<input
type="checkbox"
id="activate_audio_infos"
required
v-model="configFile.activate_audio_infos"
@change="settingsChanged=true"
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
</div>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="audio_auto_send_input" class="text-sm font-bold" style="margin-right: 1rem;">Send audio input automatically:</label>
</td>
<td>
<div class="flex flex-row">
<input
type="checkbox"
id="audio_auto_send_input"
required
v-model="configFile.audio_auto_send_input"
@change="settingsChanged=true"
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
</div>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="auto_speak" class="text-sm font-bold" style="margin-right: 1rem;">Enable auto speak:</label>
</td>
<td>
<div class="flex flex-row">
<input
type="checkbox"
id="auto_speak"
required
v-model="configFile.auto_speak"
@change="settingsChanged=true"
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
</div>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="audio_pitch" class="text-sm font-bold" style="margin-right: 1rem;">audio pitch:</label>
</td>
<td>
<input id="audio_pitch" v-model="configFile.audio_pitch"
@change="settingsChanged=true"
type="range" min="0" max="10" step="0.1"
class="flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500">
<input v-model="configFile.audio_pitch"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="audio_silenceTimer" class="text-sm font-bold" style="margin-right: 1rem;">audio in silence timer (ms):</label>
</td>
<td>
<input id="audio_silenceTimer" v-model="configFile.audio_silenceTimer"
@change="settingsChanged=true"
type="range" min="0" max="10000" step="1"
class="flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500">
<input v-model="configFile.audio_silenceTimer"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="audio_in_language" class="text-sm font-bold" style="margin-right: 1rem;">Input Audio Language:</label>
</td>
<td>
<!-- Select element for choosing the input audio language -->
<select
id="audio_in_language"
v-model="configFile.audio_in_language"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
<!-- Options with language codes and corresponding language names -->
<option v-for="language in audioLanguages" :key="language.code" :value="language.code">
{{ language.name }}
</option>
</select>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="audio_out_voice" class="text-sm font-bold" style="margin-right: 1rem;">Output Audio Voice:</label>
</td>
<td>
<!-- Select element for choosing the output audio voice -->
<select
id="audio_out_voice"
v-model="configFile.audio_out_voice"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
<!-- Options with available voices in the browser -->
<option v-for="voice in audioVoices" :key="voice.name" :value="voice.name">
{{ voice.name }}
</option>
</select>
</td>
</tr>
</table>
</Card>
<Card title="XTTS service" :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>

@ -1 +1 @@
Subproject commit fcd4800924edae3a0f92fb16461ce2fa09806837
Subproject commit dc32810661017a9a267c4999c910cbb0204b1a2e