D-ID Client SDK - v3.0.9
    Preparing search index...

    Interface Voice

    One voice in D-ID's catalog of text-to-speech voices.

    The SDK does not fetch voices itself; the type is exported so an application that lists them — to build a voice picker, say — can type the result and then feed id and provider into the provider object it passes as TextStreamScript.provider. provider is the wide Providers enum, while each provider variant requires its own literal type, so switch on it to build the matching variant, for example Providers.Elevenlabs to an ElevenlabsTtsProvider. The catalog also lists voices agents cannot speak with (Google voices, for example), so keep only the providers TtsProvider has a variant for.

    interface Voice {
        access: VoiceAccess;
        gender: string;
        id: string;
        language?: string;
        languages: { accent?: string; language: string; locale: string }[];
        name: string;
        provider: Providers;
        styles: string[];
    }
    Index
    access: VoiceAccess

    Which accounts may use the voice. See VoiceAccess.

    gender: string

    The gender the voice is labelled with.

    id: string

    Identifier of the voice: the value to pass as a provider object's voice_id.

    language?: string

    The language of the voice, as a name rather than a locale code, when the catalog sets one.

    languages: { accent?: string; language: string; locale: string }[]

    Each language the voice speaks, with its locale code such as en-US.

    Type Declaration

    • Optionalaccent?: string

      The accent, when the catalog names one.

    • language: string

      The language, as a name such as English.

    • locale: string

      Its locale code, such as en-US.

    name: string

    Display name of the voice.

    provider: Providers

    The provider that serves the voice. See Providers.

    styles: string[]

    The speaking styles this particular voice offers, for example as a style. Styles differ from voice to voice.