feat: Add support for fetching speakers by backend from user preferences and create Aliyun documentation.

This commit is contained in:
2026-02-03 19:09:46 +08:00
parent 18fd1f0fa5
commit 26a8a6d08c
2 changed files with 8 additions and 4 deletions

View File

@@ -221,8 +221,9 @@ export const ttsApi = {
}))
},
getSpeakers: async (): Promise<Speaker[]> => {
const response = await apiClient.get<Speaker[]>(API_ENDPOINTS.TTS.SPEAKERS)
getSpeakers: async (backend?: string): Promise<Speaker[]> => {
const params = backend ? { backend } : {}
const response = await apiClient.get<Speaker[]>(API_ENDPOINTS.TTS.SPEAKERS, { params })
return response.data.map((speaker) => ({
name: speaker.name,
description: SPEAKER_DESCRIPTIONS_ZH[speaker.name] || speaker.description,