import request from '@/utils/request'

/**
 * 上传音频文件并训练声音克隆音色
 * @param {FormData} formData 包含 file / voice_name / speaker_id / language / model_type
 */
export function uploadAndTrain(formData) {
  return request({
    url: '/company/voiceClone/uploadAndTrain',
    method: 'post',
    data: formData,
    headers: { 'Content-Type': 'multipart/form-data' }
  })
}

/**
 * TTS 语音合成测试
 * @param {FormData} formData 包含 speakerId / language / text
 */
export function doubaoTtsTest(formData) {
  return request({
    url: '/company/voiceClone/doubaoTtsTest',
    method: 'post',
    data: formData,
    headers: { 'Content-Type': 'multipart/form-data' }
  })
}
