feat: Implement character voice preview playback and regeneration, and add a turbo mode status indicator for audiobook projects.

This commit is contained in:
2026-03-11 15:36:43 +08:00
parent 5dded459fc
commit d3c6297a09
8 changed files with 401 additions and 76 deletions

View File

@@ -139,6 +139,14 @@ export const audiobookApi = {
return `/audiobook/projects/${projectId}/segments/${segmentId}/audio`
},
getCharacterAudioUrl: (projectId: number, charId: number): string => {
return `/audiobook/projects/${projectId}/characters/${charId}/audio`
},
regenerateCharacterPreview: async (projectId: number, charId: number): Promise<void> => {
await apiClient.post(`/audiobook/projects/${projectId}/characters/${charId}/regenerate-preview`)
},
parseAllChapters: async (projectId: number, onlyErrors?: boolean): Promise<void> => {
const params = onlyErrors ? '?only_errors=true' : ''
await apiClient.post(`/audiobook/projects/${projectId}/parse-all${params}`)