Discussions

Ask a Question
Back to All

2 questions about generating an avatar video

Based on the documentation at https://docs.heygen.com/reference/create-an-avatar-video-v2#talkingphotosettings,

when creating an Avatar video with the following API
https://api.heygen.com/v2/video/generate

I used the following sample

“video_inputs": [
{
“character": {
“type": “talking_photo”,
“talking_photo_id": TalkingPhotoId,
},
“voice": {
“type": “text”,
“input_text": narrationCtrl.text.trim(),
“voice_id": voiceId,
“emotion": “Excited”,
“locale": “en-IN”,
},
“background": {
“type": “video”,
“url": backgroundVideoUrl,
“play_style": “loop”,
}
}
],
“dimension": { “width”: 720, “height”: 1280}

Question 1)

How can I get a voiceId that corresponds to the desired pronunciation for a specific language when there are many different pronunciations for each language?

When I query the Voice languages supported by https://api.heygen.com/v2/voices, I get the following value format: I can't find a Voice for a specific language in a specific country (e.g. en-IN).

{
“voice_id": “vakjM0uzzAxU4UiT0433”,
“language": “English”,
“gender": “female”,
“name": “Sophie”,
“preview_audio": “https://resource.heygen.ai/text_to_speech/locale=model=eleven_multilingual_v2id=kte4EzDuRTnsnHkATe6tDK.mp3",
“support_pause": True,
“emotion_support": False,
“support_interactive_avatar": False
}, ...

Question 2)

Are all the voiceIds in the Voice list allowed to use the above “emotion”:”Excited" values?
Or “emotion_support”: False are not available, i.e. only the voice_ids with “emotion_support”: True is the only voice_id that can be used?