fix(stage-ui): correct default base url for index-tts

fix #728
This commit is contained in:
Typed SIGTERM
2025-11-06 17:53:27 +08:00
committed by GitHub
parent 743c27685a
commit c846df0325
+3 -3
View File
@@ -1152,7 +1152,7 @@ export const useProvidersStore = defineStore('providers', () => {
description: 'index-tts.github.io',
iconColor: 'i-lobe-icons:bilibiliindex',
defaultOptions: () => ({
baseUrl: 'http://localhost:11996/tts',
baseUrl: 'http://localhost:11996/tts/',
}),
createProvider: async (config) => {
const provider: SpeechProvider = {
@@ -1169,7 +1169,7 @@ export const useProvidersStore = defineStore('providers', () => {
capabilities: {
listVoices: async (config) => {
const voicesUrl = config.baseUrl as string
const response = await fetch(`${voicesUrl}/audio/voices`)
const response = await fetch(`${voicesUrl}audio/voices`)
if (!response.ok) {
throw new Error(`Failed to fetch voices: ${response.statusText}`)
}
@@ -1188,7 +1188,7 @@ export const useProvidersStore = defineStore('providers', () => {
validators: {
validateProviderConfig: (config) => {
const errors = [
!config.baseUrl && new Error('Base URL is required. Default to http://localhost:11996/tts for Index-TTS.'),
!config.baseUrl && new Error('Base URL is required. Default to http://localhost:11996/tts/ for Index-TTS.'),
].filter(Boolean)
const res = baseUrlValidator.value(config.baseUrl)