All Products
Search
Document Center

Intelligent Media Services:Process intelligent timeline jobs in parallel

Last Updated:Nov 26, 2024

This topic describes how to integrate an avatar video into a timeline by using the text content, MediaId, and MediaURL.

Procedure

You can learn about avatars through the following topics:

Background information

You can use the methods described in this topic to integrate avatars into a timeline and generate videos.

You can use one of the following methods to configure avatars on the timeline based on specific scenarios and your business requirements:

  1. Text specified by the Content parameter.

  2. The ID of the audio file specified by the MediaId parameter.

  3. The URL of the audio file specified by the MediaURL parameter.

Method 1: Generate an avatar video by using text

You only need to enter text content. The system generates a video in which the avatar reads the text. This process is similar to the process described in the Convert text into audio topic. You can specify the type, intonation, and speed of the voice to generate avatar videos of different speech styles.

Note
  1. In the following example, two video tracks are used. The first track has a global image, which is used as the background. The second track contains an avatar video generated based on text content.

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

  3. AI_ASR is specified to automatically generate 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

You can specify the ID of an audio file in the MediaId parameter to generate an avatar video. To obtain the audio file ID, upload or register the file in the Intelligent Media Services (IMS) console.

Note
  1. In the following example, two video tracks are used. The first track has a global image, which is used as the background. The second track contains an avatar video generated based on an audio file specified by MediaId.

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

  3. AI_ASR is specified to automatically generate 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 you store an audio file in an Object Storage Service (OSS) bucket, you can specify the URL of the audio file in the MediaURL parameter to generate an avatar video. This way, you do not need to register the audio file.

Note
  1. In the following example, two video tracks are used. The first track has a global image, which is used as the background. The second track contains an avatar video generated based on an audio file specified by MediaURL.

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

  3. AI_ASR is specified to automatically generate 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