Talking avatars
A photo and a voice become a talking video, lips in sync, in 24 languages.
Choosing a photo that works best
Send a photo of a person as image: a public URL or an upload_… id. The best results come from:
- A face looking roughly at the camera, with the mouth clearly visible.
- Even light and a sharp image, at least as large as the resolution you ask for.
- Head and shoulders in frame, with some room around them.
Illustrated and painted characters work too, as long as the face is clear.
Voices: library voices, your own recording, or text
There are two ways to give the avatar something to say:
- A script and a voice. Send
script(the words),voice(a voice id from our library, defaultEnglish_expressive_narrator) andlanguage, such asEnglish. We speak the script in that voice and sync the lips. Voices cover 24 languages; GET /v1/models lists them all. - Your own audio. Send
audio: a recording up to 60 seconds, as a URL or an upload id. The avatar speaks it exactly, in your own voice or a voice-over artist's. You can also make the audio first with text to speech.
Send either script and voice, or audio. A script is timed at about 15 spoken characters a second, so it can run up to 60 seconds, about 900 characters.
Lengths, the 10-second minimum and the music bed
The video is as long as the speech. Avatars are priced per second: $0.11 a second at 720p and $0.18 at 1080p, billed for at least 10 seconds. A 30-second 720p avatar is $3.33.
Set music: true to add a soft music bed under the voice, for $0.088 more. Choose resolution 720p or 1080p. The video keeps the shape of your photo, so crop the photo to 9:16 for phones or 16:9 for the web before you send it.
Example: personal welcome videos for every new customer
When someone signs up to your product, send them a video of your founder greeting them by name.
- Host one photo of the founder at a stable URL, or upload it once and keep the upload id.
- On sign-up, call
avatars.createwith a script that uses the customer's first name, their language, and the customer id inmetadata. - When
job.succeededarrives, copy the video to your storage and send it in your welcome email.