# Voice Changer-API Access

AI Voice Changer provides you with 21 sound choices. Use it for free to protect privacy or to joke with friends.

# Task Creation

Create an algorithm task based on the input parameters and return the task id

# Request Address

/v3/pic/vc/batch

# Request Parameter

Method

post

Header

Field Required Type Value Description
Content-Type YES string application/json
Authorization YES string Basic xxxxxxxxx Basic base64 (appkey:appsecret) created by users combining appkey and secret

Body

Field Son Field Required Type Value Description
file_link - YES string Cloud storage address of audio file
file_info - YES object Audio file information
- file_size YES number File size, with unit of byte
- file_md5 YES string MD5 value of audio file
- file_time YES number integer (int) audio duration, with unit of seconds (s)
- file_ext YES string Audio file format, wav
voice_type - YES integer Voice type: 0: Male; 1: Female; 2: Children; 3: AI robot; 4: Donald Duck; 5: Chipmunk; 6: Transformer; 7: Mobile phone; 8: Old radio; 9: Diving; 10: Traditional robot; 11: Traditional robot 2; 12: Hoarse sound; 13: Unemotionality; 14: Custom tone; 15: Custom tone 2; 16: Sonic; 17: Fast; 18: Turtle speed; 19: Snail; 20: Library; 21: Wardrobe; 22: Bathroom
file_ext - NO string Need to generate file format, only support mp3 and wav, defaulting mp3
priority - YES integer Priority, range [0,9]

Sample Code

{
  "file_link": "Downloadable audio file link",
  "file_ext": "wav",
  "file_info": {
    "file_size": 10778976,
    "file_md5": "1bf1f1e6f112b2fb5836c1c3abcb5411",
    "file_time": 168,
    "file_ext": "wav"
  },
  "voice_type": 12,
  "priority": 1
}

# Input File Restriction

Audio Format Audio Size Audio Length
MP3 WAV No more than 50 MB

# Return Data

Body

Field Son Field Required Type Value Description
code - YES number Status Code
msg - YES string Request Information
data - YES object Response Data
- task_id YES string Task id

Sample Code

{
  "code": 0,
  "msg": "",
  "data": {
    "task_id": "6a4eab77-be30-430a-bf0e-3048042a34ef"
  }
}

# Result Acquisition

Request task processing result based on task id

# Request Address

/v3/pic/vc/result/{stask_id}

# Request Parameter

Method

get

Header

Field Required Type Value Description
Content-Type YES string application/json
Authorization YES string Basic xxxxxxxxx Basic base64 (appkey:appsecret) created by users combining appkey and secret

Path Parameter

Field Son Field Required Type Value Description
task_id - YES string Task id

# Return Data

Body

Field Son Field Required Type Value Description
code - YES number Status Code
msg - YES string Request Information
data - YES object Response Data
- status YES string Task Status: 1- Waiting; 2 - In progress; 3 - Task complete; 4 - Task failure; 5 - Task closed; 6 - Task timed out
- wait_time YES string The waiting time before the next request, with unit of s
- voice_result YES string Audio download link after processing
- reason YES string Cause of failure
Last Updated: 12/1/2023, 5:45:54 PM