Integrate avatar videos into a timeline

Updated at:
Copy as MD

Integrate avatar videos into a timeline by specifying text content, an audio MediaId, or an audio MediaURL.

Usage notes

Learn about avatars:

Background information

Integrate avatars into a timeline to generate videos with digital humans.

Configure avatars on the timeline by using one of the following methods:

  1. Text content specified by the Content parameter.

  2. An audio file ID specified by the MediaId parameter.

  3. An audio file URL specified by the MediaURL parameter.

Method 1: Generate an avatar video by using text

Enter text content and the system generates a video in which the avatar reads the text aloud. This works like the Convert text into audio feature. You can customize voice type, intonation, and speed to produce different speech styles.

Note
  1. The following example uses two video tracks. The first track has a global image as the background. The second track contains an avatar video generated from text content.

  2. In the avatar clip on the second track, Yunchen is the avatar and Zhitian is the speaker. The text is configured in the Content field.

  3. AI_ASR automatically generates subtitles.

Effect

Timeline example

{
    "VideoTracks": [{
        "VideoTrackClips": [{
            "Type": "GlobalImage",
            "MediaId": "7980d8f************e6f7e5696301"
        }]
    }, {
        "VideoTrackClips": [{
            "Comment": "Avatar-text input",
            "Type": "AI_Avatar",
            "AvatarId": "fanyu-broadcast_standing",
            "Content": "Recently, with upgrades in consumption and advancements in logistics technology, warehouse shopping is gaining popularity among consumers. This shopping method involves storing goods in a warehouse. Customers select items on an online platform and then pick them up at a logistics center. This approach prevents the usual hassles of traditional shopping, such as long lines and traffic congestion, and enhances the efficiency and security of product delivery. Many e-commerce companies have already started experimenting with this model, making it an important trend in the future of retail."
            "Voice": "zhitian",
            "Effects": [{
                "Type": "AI_ASR",
                "Font": "Alibaba PuHuiTi",
                "FontSize": 60,
                "Spacing": 1,
                "Ratio": 1
            }]
        }]
    }]
}

Method 2: Generate an avatar video by configuring the MediaId parameter

Specify an audio file ID in the MediaId parameter to generate an avatar video. To obtain the file ID, upload or register the file in the IMS console.

Note
  1. The following example uses two video tracks. The first track has a global image as the background. The second track contains an avatar video generated from an audio file specified by MediaId.

  2. In the avatar clip on the second track, Yunxin is the avatar.

  3. AI_ASR automatically generates subtitles.

Effect

Timeline example

{
    "VideoTracks": [{
        "VideoTrackClips": [{
            "Type": "GlobalImage",
            "MediaId": "eb2dd180********92ee7e7d75b6301"
        }]
    }, {
        "VideoTrackClips": [{
            "Comment": "Avatar-audio input specified by MediaId",
            "Type": "AI_Avatar",
            "AvatarId": "fanyu-broadcast_standing",
            "MediaId": "596cbd10e********b6e6f7e5696302",
            "Effects": [{
                "Type": "AI_ASR",
                "Font": "Alibaba PuHuiTi",
                "FontSize": 60,
                "Spacing": 1,
                "Ratio": 1
            }]
        }]
    }]
}

Method 3: Generate an avatar video by configuring the MediaURL parameter

If your audio file is stored in an OSS bucket, specify the file URL in the MediaURL parameter to generate an avatar video without registering the file.

Note
  1. The following example uses two video tracks. The first track has a global image as the background. The second track contains an avatar video generated from an audio file specified by MediaURL.

  2. In the avatar clip on the second track, Yunxin is the avatar.

  3. AI_ASR automatically generates subtitles.

Effect

Timeline example

{
    "VideoTracks": [{
        "VideoTrackClips": [{
            "Type": "GlobalImage",
            "MediaId": "7980d8f************e6f7e5696301"
        }]
    }, {
        "VideoTrackClips": [{
            "Comment": "Avatar-audio input specified by MediaURL",
            "Type": "AI_Avatar",
            "AvatarId": "fanyu-broadcast_standing",
            "MediaURL": "https://your_bucket.oss-cn-shanghai.aliyuncs.com/your_audio.mp3",
            "Effects": [{
                "Type": "AI_ASR",
                "Font": "Alibaba PuHuiTi",
                "FontSize": 60,
                "Spacing": 1,
                "Ratio": 1
            }]
        }]
    }]
}

Method 4: Other examples

Science popularization

News broadcast

References