List voices for speaker assignment
client.VideoTranslate.Voices.List(ctx, query) (*VideoTranslateVoiceListResponse, error)
GET/v1/video-translate/voices
Lists the voices that can be used as values in config.speaker_voices.
voice_id is the external voice ID to submit. name and is_favorite reflect the
authenticated account’s personalization; default_name is the catalog name.
Ordered by favorites first, then name (case-insensitive), then voice_id.
List voices for speaker assignment
package main
import (
"context"
"fmt"
"github.com/chamelaion/chamelaion-go/v2"
"github.com/chamelaion/chamelaion-go/v2/option"
)
func main() {
client := githubcomchamelaionchamelaiongo.NewClient(
option.WithBearerToken("My Bearer Token"),
)
voices, err := client.VideoTranslate.Voices.List(context.TODO(), githubcomchamelaionchamelaiongo.VideoTranslateVoiceListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", voices.Pagination)
}
{
"voices": [
{
"voice_id": "21m00Tcm4TlvDq8ikWAM",
"name": "Rachel (narration)",
"default_name": "Rachel",
"description": "Calm, young adult female voice.",
"language": "en",
"application": "narration",
"gender": "Female",
"is_favorite": true
}
],
"pagination": {
"limit": 50,
"offset": 0,
"total": 1
}
}{
"error": "gender must be one of Male, Female, Other"
}{
"error": "favorite must be true or false"
}{
"error": "missing authorization header"
}{
"error": "invalid authorization format"
}{
"error": "missing token"
}{
"error": "invalid token"
}{
"error": "unauthorized"
}{
"error": "rate limit exceeded"
}{
"error": "internal error"
}Returns Examples
{
"voices": [
{
"voice_id": "21m00Tcm4TlvDq8ikWAM",
"name": "Rachel (narration)",
"default_name": "Rachel",
"description": "Calm, young adult female voice.",
"language": "en",
"application": "narration",
"gender": "Female",
"is_favorite": true
}
],
"pagination": {
"limit": 50,
"offset": 0,
"total": 1
}
}{
"error": "gender must be one of Male, Female, Other"
}{
"error": "favorite must be true or false"
}{
"error": "missing authorization header"
}{
"error": "invalid authorization format"
}{
"error": "missing token"
}{
"error": "invalid token"
}{
"error": "unauthorized"
}{
"error": "rate limit exceeded"
}{
"error": "internal error"
}