feat: Integrate IndexTTS2 model and update related schemas and frontend components
This commit is contained in:
@@ -305,6 +305,11 @@ export const ttsApi = {
|
||||
)
|
||||
return response.data
|
||||
},
|
||||
|
||||
indextts2FromDesign: async (data: { voice_design_id: number; text: string; emo_text?: string; emo_alpha?: number }): Promise<JobCreateResponse> => {
|
||||
const response = await apiClient.post<JobCreateResponse>(API_ENDPOINTS.TTS.INDEXTTS2_FROM_DESIGN, data)
|
||||
return response.data
|
||||
},
|
||||
}
|
||||
|
||||
const normalizeJobType = (jobType: string): JobType => {
|
||||
|
||||
@@ -20,6 +20,7 @@ export interface AudiobookCharacter {
|
||||
description?: string
|
||||
instruct?: string
|
||||
voice_design_id?: number
|
||||
use_indextts2?: boolean
|
||||
}
|
||||
|
||||
export interface AudiobookChapter {
|
||||
@@ -93,7 +94,7 @@ export const audiobookApi = {
|
||||
updateCharacter: async (
|
||||
projectId: number,
|
||||
charId: number,
|
||||
data: { name?: string; gender?: string; description?: string; instruct?: string; voice_design_id?: number }
|
||||
data: { name?: string; gender?: string; description?: string; instruct?: string; voice_design_id?: number; use_indextts2?: boolean }
|
||||
): Promise<AudiobookCharacter> => {
|
||||
const response = await apiClient.put<AudiobookCharacter>(
|
||||
`/audiobook/projects/${projectId}/characters/${charId}`,
|
||||
|
||||
@@ -13,6 +13,7 @@ export const API_ENDPOINTS = {
|
||||
CUSTOM_VOICE: '/tts/custom-voice',
|
||||
VOICE_DESIGN: '/tts/voice-design',
|
||||
VOICE_CLONE: '/tts/voice-clone',
|
||||
INDEXTTS2_FROM_DESIGN: '/tts/indextts2-from-design',
|
||||
},
|
||||
JOBS: {
|
||||
LIST: '/jobs',
|
||||
|
||||
Reference in New Issue
Block a user