Discussions
Feature Request: API Endpoint to Query Supported Locales for a Specific Voice
I'm writing to inquire about a potential enhancement to the HeyGen API that would improve our integration workflow.
Currently, we use your API endpoints to retrieve available voices via /v2/voices and available locales via /v2/voices/locales. However, we've encountered a limitation: there doesn't appear to be a way to retrieve the specific list of locales supported by an individual voice through the API.
Current Challenge:
While the /v2/voices endpoint includes a support_locale boolean field that indicates whether a voice supports locales, it doesn't provide information about which specific locales that voice supports. This means we either have to:
- Assume all voices with
support_locale: truesupport all locales from/v2/voices/locales - Trial-and-error test voice/locale combinations when generating videos
Feature Request:
Would it be possible to add an API endpoint (or query parameter) that retrieves the supported locales for a specific voice?
For example, something like:
GET /v2/voices/{voice_id}/locales
Or as a query parameter:
GET /v2/voices/locales?voice_id={voice_id}
This would return a response similar to:
{
"error": null,
"data": {
"voice_id": "55f8c0f546884f9cbdefa113f5e7b682",
"voice_name": "Elizabeth - Friendly",
"supported_locales": [
{
"value": "English (United States)",
"label": "English (US)",
"language": "English",
"locale": "en-US",
"language_code": "en-US"
},
{
"value": "English (India)",
"label": "English (India)",
"language": "English",
"locale": "en-IN",
"language_code": "en-IN"
},
{
"value": "Portuguese (Brazil)",
"label": "Portuguese (Brazil)",
"language": "Portuguese",
"locale": "pt-BR",
"language_code": "pt-BR"
}
]
}
}
This enhancement would help us build a more robust integration and provide better locale recommendations to our users without unnecessary API calls or trial-and-error attempts.
Thank you for considering this feature request. Please let me know if this is something that can be implemented or if there's an alternative approach I'm missing.
Best regards,
Pritam