Skip to content

Commit c846df0

Browse files
fix(stage-ui): correct default base url for index-tts
fix #728
1 parent 743c276 commit c846df0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/stage-ui/src/stores/providers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ export const useProvidersStore = defineStore('providers', () => {
11521152
description: 'index-tts.github.io',
11531153
iconColor: 'i-lobe-icons:bilibiliindex',
11541154
defaultOptions: () => ({
1155-
baseUrl: 'http://localhost:11996/tts',
1155+
baseUrl: 'http://localhost:11996/tts/',
11561156
}),
11571157
createProvider: async (config) => {
11581158
const provider: SpeechProvider = {
@@ -1169,7 +1169,7 @@ export const useProvidersStore = defineStore('providers', () => {
11691169
capabilities: {
11701170
listVoices: async (config) => {
11711171
const voicesUrl = config.baseUrl as string
1172-
const response = await fetch(`${voicesUrl}/audio/voices`)
1172+
const response = await fetch(`${voicesUrl}audio/voices`)
11731173
if (!response.ok) {
11741174
throw new Error(`Failed to fetch voices: ${response.statusText}`)
11751175
}
@@ -1188,7 +1188,7 @@ export const useProvidersStore = defineStore('providers', () => {
11881188
validators: {
11891189
validateProviderConfig: (config) => {
11901190
const errors = [
1191-
!config.baseUrl && new Error('Base URL is required. Default to http://localhost:11996/tts for Index-TTS.'),
1191+
!config.baseUrl && new Error('Base URL is required. Default to http://localhost:11996/tts/ for Index-TTS.'),
11921192
].filter(Boolean)
11931193

11941194
const res = baseUrlValidator.value(config.baseUrl)

0 commit comments

Comments
 (0)