Description#
Purpose: Generate a video to synchronize the mouth movements of a specified digital human with the audio.
Sources of digital humans:Users upload videos to customize digital humans (avatarSourceFrom=0).
Use the system's existing public digital human ID (referred to as public model below) (avatarSourceFrom=1).
Use the user-defined digital human ID (referred to as private model below) (avatarSourceFrom=2).
Users upload images to customize digital humans (avatarSourceFrom=3).
Users upload audio (audioSourceFrom=0).
Use text-to-speech (TTS) (audioSourceFrom=1).
About avatar1 and avatar2 modes:
| Avatar 1 (parameter modeType=0) | Avatar 2 (parameter modeType=1) |
|---|
| Image input | Not supported | Take the image as the first frame input of Avatar 2, and the character movements in the subsequent video will be automatically generated according to the audio rhythm |
| Video input | Only modify the mouth shape according to the audio, without changing the character movements in the video | Take the first frame of the video as the first frame input of Avatar 2, and the character movements in the subsequent video will be automatically generated according to the audio rhythm |
Main Process#
1.
Call the Get Upload Credential interface. Pay attention to the uploadUrl and fileId fields returned by the interface. 2.
Upload the local audio/video/image to the address of uploadUrl. Upload File 3.
Call the submit task interface. Pay attention to the taskId field returned by the interface. 4.
Call the query task interface to obtain the task execution status and results. Optional Processes#
1.
To use a public model digital human when submitting a task, please call AiAvatar Query. 2.
When querying public model digital humans, if you want to search by ethnicity, please call Ethnicity Query with the parameter scene=video_avatar. 3.
To use a public voice when submitting a task, please call Voice Query. 4.
If you want to save the video as a private model when submitting the task, set the parameter isSave2CustomAiAvatar=true.
5.
If you want to specify the subtitle style when submitting the task, please call Caption List. Modified at 2025-08-14 06:42:31