mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-01-18 18:56:32 +00:00
Enhanced xtts
This commit is contained in:
parent
650624b0e3
commit
a44340025f
@ -1,5 +1,5 @@
|
|||||||
# =================== Lord Of Large Language Models Configuration file ===========================
|
# =================== Lord Of Large Language Models Configuration file ===========================
|
||||||
version: 33
|
version: 35
|
||||||
binding_name: null
|
binding_name: null
|
||||||
model_name: null
|
model_name: null
|
||||||
|
|
||||||
@ -49,14 +49,18 @@ enable_gpu: true
|
|||||||
# Automatically open the browser
|
# Automatically open the browser
|
||||||
auto_show_browser: true
|
auto_show_browser: true
|
||||||
|
|
||||||
|
# Voice service
|
||||||
|
enable_voice_service: false
|
||||||
|
xtts_base_url: http://127.0.0.1:8020
|
||||||
|
auto_read: false
|
||||||
|
current_voice: null
|
||||||
|
current_language: en
|
||||||
|
|
||||||
# Audio
|
# Audio
|
||||||
media_on: false
|
media_on: false
|
||||||
audio_in_language: 'en-US'
|
audio_in_language: 'en-US'
|
||||||
auto_speak: false
|
auto_speak: false
|
||||||
auto_read: false
|
|
||||||
enable_voice_service: false
|
|
||||||
audio_out_voice: null
|
audio_out_voice: null
|
||||||
current_voice: null
|
|
||||||
audio_pitch: 1
|
audio_pitch: 1
|
||||||
audio_auto_send_input: true
|
audio_auto_send_input: true
|
||||||
audio_silenceTimer: 5000
|
audio_silenceTimer: 5000
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 48195e92362053d1f7f55c113afa668a816f245c
|
Subproject commit 79a9c0296f27b132109b697e94f198ba4c58f18e
|
BIN
web/dist/assets/cpp_block-109b2fbe.png
vendored
Normal file
BIN
web/dist/assets/cpp_block-109b2fbe.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
BIN
web/dist/assets/html5_block-205d2852.png
vendored
Normal file
BIN
web/dist/assets/html5_block-205d2852.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
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">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>LoLLMS WebUI - Welcome</title>
|
<title>LoLLMS WebUI - Welcome</title>
|
||||||
<script type="module" crossorigin src="/assets/index-86a16b68.js"></script>
|
<script type="module" crossorigin src="/assets/index-7d4b529a.js"></script>
|
||||||
<link rel="stylesheet" href="/assets/index-bd13400e.css">
|
<link rel="stylesheet" href="/assets/index-7d925527.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
@ -80,6 +80,10 @@
|
|||||||
title="Add javascript block" @click.stop="addBlock('javascript')">
|
title="Add javascript block" @click.stop="addBlock('javascript')">
|
||||||
<img :src="javascript_block" width="25" height="25">
|
<img :src="javascript_block" width="25" height="25">
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="editMsgMode" class="text-lg hover:text-secondary duration-75 active:scale-90 p-2"
|
||||||
|
title="Add c++ block" @click.stop="addBlock('c++')">
|
||||||
|
<img :src="cpp_block" width="25" height="25">
|
||||||
|
</div>
|
||||||
<div v-if="editMsgMode" class="text-lg hover:text-secondary duration-75 active:scale-90 p-2"
|
<div v-if="editMsgMode" class="text-lg hover:text-secondary duration-75 active:scale-90 p-2"
|
||||||
title="Add bash block" @click.stop="addBlock('bash')">
|
title="Add bash block" @click.stop="addBlock('bash')">
|
||||||
<img :src="bash_block" width="25" height="25">
|
<img :src="bash_block" width="25" height="25">
|
||||||
@ -147,12 +151,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="this.$store.state.config.enable_voice_service" class="flex flex-row items-center">
|
<div v-if="this.$store.state.config.enable_voice_service" class="flex flex-row items-center">
|
||||||
<div class="text-lg hover:text-red-600 duration-75 active:scale-90 p-2"
|
<div v-if="isSynthesizingVoice" class="text-lg hover:text-red-600 duration-75 active:scale-90 p-2"
|
||||||
title="read"
|
title="read"
|
||||||
@click.stop="read()"
|
@click.stop="read()"
|
||||||
:class="{ 'text-red-500': isTalking }">
|
:class="{ 'text-red-500': isTalking }">
|
||||||
<i data-feather="voicemail"></i>
|
<i data-feather="voicemail"></i>
|
||||||
</div>
|
</div>
|
||||||
|
<svg v-else aria-hidden="true" class="w-6 h-6 animate-spin fill-secondary" viewBox="0 0 100 101"
|
||||||
|
fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path
|
||||||
|
d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
|
||||||
|
fill="currentColor" />
|
||||||
|
<path
|
||||||
|
d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
|
||||||
|
fill="currentFill" />
|
||||||
|
</svg>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -190,8 +204,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DynamicUIRenderer v-if="message.ui !== null && message.ui !== undefined && message.ui !== ''" class="w-full h-full" :code="message.ui"></DynamicUIRenderer>
|
<DynamicUIRenderer v-if="message.ui !== null && message.ui !== undefined && message.ui !== ''" class="w-full h-full" :code="message.ui"></DynamicUIRenderer>
|
||||||
<audio controls autoplay v-if="audio_url!=null" ref="audio_player">
|
<audio controls autoplay v-if="audio_url!=null" :key="audio_url">
|
||||||
<source :src="audio_url" type="audio/wav">
|
<source :src="audio_url" type="audio/wav" ref="audio_player" >
|
||||||
Your browser does not support the audio element.
|
Your browser does not support the audio element.
|
||||||
</audio>
|
</audio>
|
||||||
|
|
||||||
@ -237,18 +251,20 @@ import userImgPlaceholder from "../assets/default_user.svg"
|
|||||||
const bUrl = import.meta.env.VITE_LOLLMS_API_BASEURL
|
const bUrl = import.meta.env.VITE_LOLLMS_API_BASEURL
|
||||||
import { nextTick } from 'vue'
|
import { nextTick } from 'vue'
|
||||||
import feather from 'feather-icons'
|
import feather from 'feather-icons'
|
||||||
|
import DynamicUIRenderer from "./DynamicUIRenderer.vue"
|
||||||
import MarkdownRenderer from './MarkdownRenderer.vue';
|
import MarkdownRenderer from './MarkdownRenderer.vue';
|
||||||
import RenderHTMLJS from './RenderHTMLJS.vue';
|
import RenderHTMLJS from './RenderHTMLJS.vue';
|
||||||
import JsonViewer from "./JsonViewer.vue";
|
import JsonViewer from "./JsonViewer.vue";
|
||||||
import Step from './Step.vue';
|
import Step from './Step.vue';
|
||||||
import axios from 'axios'
|
import axios from 'axios';
|
||||||
import python_block from '@/assets/python_block.png';
|
import python_block from '@/assets/python_block.png';
|
||||||
import javascript_block from '@/assets/javascript_block.svg';
|
import javascript_block from '@/assets/javascript_block.svg';
|
||||||
|
import cpp_block from '@/assets/cpp_block.png';
|
||||||
|
import html5_block from '@/assets/html5_block.png';
|
||||||
|
|
||||||
|
|
||||||
import bash_block from '@/assets/bash_block.png';
|
import bash_block from '@/assets/bash_block.png';
|
||||||
|
|
||||||
|
|
||||||
import DynamicUIRenderer from "./DynamicUIRenderer.vue"
|
|
||||||
export default {
|
export default {
|
||||||
// eslint-disable-next-line vue/multi-word-component-names
|
// eslint-disable-next-line vue/multi-word-component-names
|
||||||
name: 'Message',
|
name: 'Message',
|
||||||
@ -271,6 +287,9 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isSynthesizingVoice:false,
|
||||||
|
cpp_block:cpp_block,
|
||||||
|
html5_block:html5_block,
|
||||||
javascript_block:javascript_block,
|
javascript_block:javascript_block,
|
||||||
python_block:python_block,
|
python_block:python_block,
|
||||||
bash_block:bash_block,
|
bash_block:bash_block,
|
||||||
@ -334,19 +353,19 @@ export default {
|
|||||||
this.voices = this.speechSynthesis.getVoices();
|
this.voices = this.speechSynthesis.getVoices();
|
||||||
},
|
},
|
||||||
read(){
|
read(){
|
||||||
if(this.isSpeaking){
|
if(this.isSynthesizingVoice){
|
||||||
this.$refs.audio_player.pause()
|
this.$refs.audio_player.pause()
|
||||||
this.isSpeaking=false
|
this.isSynthesizingVoice=false
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.isSpeaking=true
|
this.isSynthesizingVoice=true
|
||||||
axios.post("./read",{text:this.message.content}).then(response => {
|
axios.post("./read",{text:this.message.content}).then(response => {
|
||||||
let url = response.data.url
|
let url = response.data.url
|
||||||
console.log(url)
|
console.log(url)
|
||||||
this.audio_url = url
|
this.audio_url = url
|
||||||
}).catch(ex=>{
|
}).catch(ex=>{
|
||||||
this.$store.state.toast.showToast(`Error: ${ex}`,4,false)
|
this.$store.state.toast.showToast(`Error: ${ex}`,4,false)
|
||||||
this.generating=false
|
this.isSynthesizingVoice=false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -550,6 +569,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
}, watch: {
|
}, watch: {
|
||||||
|
audio_url(newUrl) {
|
||||||
|
if (newUrl) {
|
||||||
|
this.$refs.audio_player.src = newUrl;
|
||||||
|
}
|
||||||
|
},
|
||||||
'message.content': function (newContent) {
|
'message.content': function (newContent) {
|
||||||
if(this.$store.state.config.auto_speak){
|
if(this.$store.state.config.auto_speak){
|
||||||
if(!this.isSpeaking){
|
if(!this.isSpeaking){
|
||||||
|
@ -22,13 +22,21 @@
|
|||||||
class="w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer">
|
class="w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer">
|
||||||
<i data-feather="volume-2"></i>
|
<i data-feather="volume-2"></i>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button v-if="!isSynthesizingVoice"
|
||||||
title="read"
|
title="read"
|
||||||
@click.stop="read()"
|
@click.stop="read()"
|
||||||
:class="{ 'text-red-500': isTalking }"
|
|
||||||
class="w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer">
|
class="w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer">
|
||||||
<i data-feather="voicemail"></i>
|
<i data-feather="voicemail"></i>
|
||||||
</button>
|
</button>
|
||||||
|
<svg v-else aria-hidden="true" class="w-6 h-6 animate-spin fill-secondary" viewBox="0 0 100 101"
|
||||||
|
fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path
|
||||||
|
d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
|
||||||
|
fill="currentColor" />
|
||||||
|
<path
|
||||||
|
d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
|
||||||
|
fill="currentFill" />
|
||||||
|
</svg>
|
||||||
<button v-show="!generating" id="export-button" @click="exportText" class="w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"><i data-feather="upload"></i></button>
|
<button v-show="!generating" id="export-button" @click="exportText" class="w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"><i data-feather="upload"></i></button>
|
||||||
<button v-show="!generating" id="import-button" @click="importText" class="w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"><i data-feather="download"></i></button>
|
<button v-show="!generating" id="import-button" @click="importText" class="w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"><i data-feather="download"></i></button>
|
||||||
|
|
||||||
@ -61,8 +69,8 @@
|
|||||||
|
|
||||||
<span>Cursor position {{ cursorPosition }}</span>
|
<span>Cursor position {{ cursorPosition }}</span>
|
||||||
</div>
|
</div>
|
||||||
<audio controls autoplay v-if="audio_url!=null">
|
<audio controls autoplay v-if="audio_url!=null" :key="audio_url">
|
||||||
<source :src="audio_url" type="audio/wav">
|
<source :src="audio_url" type="audio/wav" ref="audio_player">
|
||||||
Your browser does not support the audio element.
|
Your browser does not support the audio element.
|
||||||
</audio>
|
</audio>
|
||||||
|
|
||||||
@ -166,6 +174,7 @@ import Toast from '../components/Toast.vue'
|
|||||||
import MarkdownRenderer from '../components/MarkdownRenderer.vue';
|
import MarkdownRenderer from '../components/MarkdownRenderer.vue';
|
||||||
import ClipBoardTextInput from "@/components/ClipBoardTextInput.vue";
|
import ClipBoardTextInput from "@/components/ClipBoardTextInput.vue";
|
||||||
import Card from "@/components/Card.vue"
|
import Card from "@/components/Card.vue"
|
||||||
|
import { nextTick, TransitionGroup } from 'vue'
|
||||||
const bUrl = import.meta.env.VITE_LOLLMS_API_BASEURL
|
const bUrl = import.meta.env.VITE_LOLLMS_API_BASEURL
|
||||||
|
|
||||||
async function showInputPanel(name, default_value="", options=[]) {
|
async function showInputPanel(name, default_value="", options=[]) {
|
||||||
@ -315,6 +324,7 @@ export default {
|
|||||||
name: 'PlayGroundView',
|
name: 'PlayGroundView',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isSynthesizingVoice:false,
|
||||||
audio_url:null,
|
audio_url:null,
|
||||||
mdRenderHeight:300,
|
mdRenderHeight:300,
|
||||||
selecting_model:false,
|
selecting_model:false,
|
||||||
@ -424,6 +434,14 @@ export default {
|
|||||||
created(){
|
created(){
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
audio_url(newUrl) {
|
||||||
|
if (newUrl) {
|
||||||
|
console.log("Audio changed url to :",newUrl)
|
||||||
|
this.$refs.audio_player.src = newUrl;
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
selectedModel: {
|
selectedModel: {
|
||||||
@ -492,15 +510,21 @@ export default {
|
|||||||
this.voices = this.speechSynthesis.getVoices();
|
this.voices = this.speechSynthesis.getVoices();
|
||||||
},
|
},
|
||||||
read(){
|
read(){
|
||||||
this.generating=true
|
this.isSynthesizingVoice=true
|
||||||
axios.post("./read",{text:this.text}).then(response => {
|
axios.post("./read",{text:this.text}).then(response => {
|
||||||
console.log(response.data.url)
|
console.log(response.data.url)
|
||||||
let url = response.data.url
|
let url = response.data.url
|
||||||
this.audio_url = bUrl+url
|
this.audio_url = bUrl+url
|
||||||
this.generating=false
|
this.isSynthesizingVoice=false
|
||||||
|
nextTick(() => {
|
||||||
|
feather.replace()
|
||||||
|
})
|
||||||
}).catch(ex=>{
|
}).catch(ex=>{
|
||||||
this.$refs.toast.showToast(`Error: ${ex}`,4,false)
|
this.$refs.toast.showToast(`Error: ${ex}`,4,false)
|
||||||
this.generating=false
|
this.isSynthesizingVoice=false
|
||||||
|
nextTick(() => {
|
||||||
|
feather.replace()
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
speak() {
|
speak() {
|
||||||
|
@ -688,7 +688,97 @@
|
|||||||
|
|
||||||
</table>
|
</table>
|
||||||
</Card>
|
</Card>
|
||||||
<Card title="Audio" :is_subcard="true" class="pb-2 m-2">
|
|
||||||
|
|
||||||
|
<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="enable_voice_service" class="text-sm font-bold" style="margin-right: 1rem;">Enable voice service:</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="flex flex-row">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
id="enable_voice_service"
|
||||||
|
required
|
||||||
|
v-model="configFile.enable_voice_service"
|
||||||
|
@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_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="current_language" class="text-sm font-bold" style="margin-right: 1rem;">Current language:</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="flex flex-row">
|
||||||
|
<select v-model="current_language" @change="settingsChanged=true" :disabled="!enable_voice_service">
|
||||||
|
<option v-for="language in voice_languages" :key="language" :value="language">
|
||||||
|
{{ language }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td style="min-width: 200px;">
|
||||||
|
<label for="current_voice" class="text-sm font-bold" style="margin-right: 1rem;">Current voice:</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="flex flex-row">
|
||||||
|
<select v-model="current_voice" @change="settingsChanged=true" :disabled="!enable_voice_service">
|
||||||
|
<option v-for="voice in voices" :key="voice" :value="voice">
|
||||||
|
{{ voice }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</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>
|
||||||
|
<td>
|
||||||
|
<div class="flex flex-row">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
id="auto_read"
|
||||||
|
required
|
||||||
|
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="!enable_voice_service"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</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">
|
<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>
|
<tr>
|
||||||
<td style="min-width: 200px;">
|
<td style="min-width: 200px;">
|
||||||
@ -725,57 +815,6 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="min-width: 200px;">
|
|
||||||
<label for="enable_voice_service" class="text-sm font-bold" style="margin-right: 1rem;">Enable voice service:</label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="flex flex-row">
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
id="enable_voice_service"
|
|
||||||
required
|
|
||||||
v-model="configFile.enable_voice_service"
|
|
||||||
@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="current_voice" class="text-sm font-bold" style="margin-right: 1rem;">Current voice:</label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="flex flex-row">
|
|
||||||
<select v-model="current_voice" @change="settingsChanged=true" :disabled="!enable_voice_service">
|
|
||||||
<option v-for="voice in voices" :key="voice" :value="voice">
|
|
||||||
{{ voice }}
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</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>
|
|
||||||
<td>
|
|
||||||
<div class="flex flex-row">
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
id="auto_read"
|
|
||||||
required
|
|
||||||
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="!enable_voice_service"
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="min-width: 200px;">
|
<td style="min-width: 200px;">
|
||||||
<label for="audio_pitch" class="text-sm font-bold" style="margin-right: 1rem;">audio pitch:</label>
|
<label for="audio_pitch" class="text-sm font-bold" style="margin-right: 1rem;">audio pitch:</label>
|
||||||
</td>
|
</td>
|
||||||
@ -1853,6 +1892,11 @@ export default {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
voices: [],
|
voices: [],
|
||||||
|
voice_languages: [
|
||||||
|
"en",
|
||||||
|
"fr",
|
||||||
|
"es"
|
||||||
|
],
|
||||||
binding_changed:false,
|
binding_changed:false,
|
||||||
SVGGPU:SVGGPU,
|
SVGGPU:SVGGPU,
|
||||||
models_zoo:[],
|
models_zoo:[],
|
||||||
@ -3976,6 +4020,16 @@ export default {
|
|||||||
this.$store.state.config.enable_voice_service = value
|
this.$store.state.config.enable_voice_service = value
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
current_language:{
|
||||||
|
get() {
|
||||||
|
return this.$store.state.config.current_language;
|
||||||
|
},
|
||||||
|
set(value) {
|
||||||
|
// You should not set the value directly here; use the updateSetting method instead
|
||||||
|
console.log("Current voice set to ",value)
|
||||||
|
this.$store.state.config.current_language = value
|
||||||
|
},
|
||||||
|
},
|
||||||
current_voice:{
|
current_voice:{
|
||||||
get() {
|
get() {
|
||||||
if (this.$store.state.config.current_voice===null || this.$store.state.config.current_voice===undefined){
|
if (this.$store.state.config.current_voice===null || this.$store.state.config.current_voice===undefined){
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 1a7efd7fdd572d09d537a6d6d0be9e6d05106d28
|
Subproject commit 268f64f4c6fa1d8afa89003a838d125492d374cc
|
Loading…
Reference in New Issue
Block a user