mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 12:16:22 +00:00
upgraded xtts
This commit is contained in:
parent
e6bcfe5f86
commit
666ef124cb
@ -142,10 +142,6 @@ whisper_model: base
|
||||
tts_output_device: 0
|
||||
|
||||
# Voice service
|
||||
xtts_enable: false
|
||||
xtts_base_url: http://localhost:8020
|
||||
xtts_use_deepspeed: false
|
||||
xtts_use_streaming_mode: true
|
||||
auto_read: false
|
||||
xtts_current_voice: null
|
||||
xtts_current_language: en
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit aa21fdfb49b827d202fd5a648802789098aeea40
|
||||
Subproject commit 3a00e968fb1396fa177e8e2b69799cd8d700d8ff
|
@ -438,7 +438,7 @@ class LOLLMSWebUI(LOLLMSElfServer):
|
||||
run_scripts=True)
|
||||
|
||||
mounted_personalities.append(personality)
|
||||
if self.config.xtts_enable and self.config.auto_read and len(personality.audio_samples)>0:
|
||||
if self.config.auto_read and len(personality.audio_samples)>0:
|
||||
try:
|
||||
from lollms.services.xtts.lollms_xtts import LollmsXTTS
|
||||
if self.tts is None:
|
||||
@ -450,14 +450,11 @@ class LOLLMSWebUI(LOLLMSElfServer):
|
||||
|
||||
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
|
||||
voices_folders=[voices_folder, Path(__file__).parent.parent.parent/"services/xtts/voices"],
|
||||
)
|
||||
|
||||
except:
|
||||
except Exception as ex:
|
||||
trace_exception(ex)
|
||||
self.warning(f"Personality {personality.name} request using custom voice but couldn't load XTTS")
|
||||
except Exception as ex:
|
||||
ASCIIColors.error(f"Personality file not found or is corrupted ({personality_path}).\nReturned the following exception:{ex}\nPlease verify that the personality you have selected exists or select another personality. Some updates may lead to change in personality name or category, so check the personality selection in settings to be sure.")
|
||||
|
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
4
web/dist/index.html
vendored
@ -6,8 +6,8 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>LoLLMS WebUI</title>
|
||||
<script type="module" crossorigin src="/assets/index-3668bdb2.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-d2781252.css">
|
||||
<script type="module" crossorigin src="/assets/index-53ee2d5d.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-5cbc5b69.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -696,7 +696,7 @@ export default {
|
||||
if(ss!=se){
|
||||
text = text.slice(ss,se)
|
||||
}
|
||||
axios.post("./text2Audio",{text:text}).then(response => {
|
||||
axios.post("./text2Wave",{text:text}).then(response => {
|
||||
console.log(response.data.url)
|
||||
let url = response.data.url
|
||||
this.audio_url = bUrl+url
|
||||
|
@ -2264,60 +2264,13 @@
|
||||
</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>
|
||||
<td style="min-width: 200px;">
|
||||
<label for="xtts_enable" class="text-sm font-bold" style="margin-right: 1rem;">Enable voice service:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex flex-row">
|
||||
<input
|
||||
type="checkbox"
|
||||
id="xtts_enable"
|
||||
required
|
||||
v-model="configFile.xtts_enable"
|
||||
@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="install_xtts_service" class="text-sm font-bold" style="margin-right: 1rem;">xTTS service:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex flex-row">
|
||||
<button class="hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center" @click="reinstallAudioService">install xtts service</button>
|
||||
<button class="hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center" @click="startAudioService">start xtts service</button>
|
||||
<a class="hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center" :href="this.$store.state.config.xtts_base_url+'/docs'" target="_blank">show xtts service entries</a>
|
||||
<a class="hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center" href="https://github.com/ParisNeo/xtts-api-server/blob/main/LICENSE" target="_blank">licence</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="min-width: 200px;">
|
||||
<label for="xtts_base_url" class="text-sm font-bold" style="margin-right: 1rem;">xtts base url:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex flex-row">
|
||||
<input
|
||||
type="text"
|
||||
id="xtts_base_url"
|
||||
required
|
||||
v-model="configFile.xtts_base_url"
|
||||
@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="xtts_current_language" class="text-sm font-bold" style="margin-right: 1rem;">Current language:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex flex-row">
|
||||
<select v-model="xtts_current_language" @change="settingsChanged=true" :disabled="!xtts_enable">
|
||||
<select v-model="xtts_current_language" @change="settingsChanged=true" >
|
||||
<option v-for="(value, key) in voice_languages" :key="key" :value="value">
|
||||
{{ key }}
|
||||
</option>
|
||||
@ -2332,51 +2285,15 @@
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex flex-row">
|
||||
<select v-model="xtts_current_voice" @change="settingsChanged=true" :disabled="!xtts_enable">
|
||||
<select v-model="xtts_current_voice" @change="settingsChanged=true" >
|
||||
<option v-for="voice in voices" :key="voice" :value="voice">
|
||||
{{ voice }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="min-width: 200px;">
|
||||
<label for="xtts_use_deepspeed" class="text-sm font-bold" style="margin-right: 1rem;">Enable deepspeed:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex flex-row">
|
||||
<input
|
||||
type="checkbox"
|
||||
id="xtts_use_deepspeed"
|
||||
required
|
||||
v-model="configFile.xtts_use_deepspeed"
|
||||
@change="settingsChanged=true"
|
||||
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
|
||||
:disabled="!xtts_enable"
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="min-width: 200px;">
|
||||
<label for="xtts_use_streaming_mode" class="text-sm font-bold" style="margin-right: 1rem;">Enable streaming mode:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex flex-row">
|
||||
<input
|
||||
type="checkbox"
|
||||
id="xtts_use_streaming_mode"
|
||||
required
|
||||
v-model="configFile.xtts_use_streaming_mode"
|
||||
@change="settingsChanged=true"
|
||||
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
|
||||
:disabled="!xtts_enable"
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="min-width: 200px;">
|
||||
<label for="auto_read" class="text-sm font-bold" style="margin-right: 1rem;">Enable auto read:</label>
|
||||
</td>
|
||||
@ -2389,7 +2306,7 @@
|
||||
v-model="configFile.auto_read"
|
||||
@change="settingsChanged=true"
|
||||
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
|
||||
:disabled="!xtts_enable"
|
||||
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
@ -3215,7 +3132,7 @@
|
||||
<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="xtts_enable" class="text-sm font-bold" style="margin-right: 1rem;">Enable elastic search service:</label>
|
||||
<label for="elastic_search_service" class="text-sm font-bold" style="margin-right: 1rem;">Enable elastic search service:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex flex-row">
|
||||
@ -4458,24 +4375,6 @@ export default {
|
||||
});
|
||||
|
||||
},
|
||||
reinstallAudioService(){
|
||||
axios.post('install_xtts',{client_id:this.$store.state.client_id})
|
||||
.then(response => {
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
},
|
||||
startAudioService(){
|
||||
axios.personalitiesFiltered('start_xtts', {client_id:this.$store.state.client_id})
|
||||
.then(response => {
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
},
|
||||
reinstallElasticSearchService(){
|
||||
axios.post('install_vllm', {client_id:this.$store.state.client_id})
|
||||
.then(response => {
|
||||
@ -6406,15 +6305,6 @@ export default {
|
||||
this.$store.state.config.auto_read = value
|
||||
},
|
||||
},
|
||||
xtts_enable:{
|
||||
get() {
|
||||
return this.$store.state.config.xtts_enable;
|
||||
},
|
||||
set(value) {
|
||||
// You should not set the value directly here; use the updateSetting method instead
|
||||
this.$store.state.config.xtts_enable = value
|
||||
},
|
||||
},
|
||||
xtts_current_language:{
|
||||
get() {
|
||||
return this.$store.state.config.xtts_current_language;
|
||||
@ -6641,11 +6531,6 @@ export default {
|
||||
|
||||
},
|
||||
watch: {
|
||||
xtts_enable(newValue) {
|
||||
if (!newValue) {
|
||||
this.configFile.auto_read = false;
|
||||
}
|
||||
},
|
||||
bec_collapsed() {
|
||||
nextTick(() => {
|
||||
feather.replace()
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 1d604c626ba6a61a9661eb84f065983486f030b9
|
||||
Subproject commit 3d24a21b17fb39af78f2cfc2f22bb1535a042b74
|
Loading…
Reference in New Issue
Block a user