Skip to content

GenerateSpeechOptions

Options for generateSpeech.

  • SpeechCommonOptions

optional authContextRef?: string

Secure-storage slot for provider credentials. Never a raw secret.

SpeechCommonOptions.authContextRef


optional destinationRef?: string

Opaque application destination, resolved by the host. Never a path or URL.


optional execution?: TextExecutionOptions

SpeechCommonOptions.execution


locale: string

BCP 47 tag, e.g. "de-AT".

SpeechCommonOptions.locale


optional localeMatch?: LocaleMatch

"language" (default) requires the language and prefers the region, so de-AT may be served by de-DE. "exact" requires the whole tag.

SpeechCommonOptions.localeMatch


optional mediaTypes?: string[]

Acceptable media types; always a hard requirement. Absent lets the provider choose.


optional model?: string

Model profile to route within, as configured on the engine. Omitted or "auto" routes across every registered target. Never a vendor model or voice id.

SpeechCommonOptions.model


optional requestId?: string

Fixes the run id, for correlation.

SpeechCommonOptions.requestId


optional telemetry?: Telemetry

SpeechCommonOptions.telemetry


text: string

The text to speak. Plain text; markup such as SSML is out of scope.

SpeechCommonOptions.text


optional voice?: SpeechVoice | SpeechVoiceInfo & Pick<SpeechVoice, "requirement">

The voice: an entry from listVoices, or provider-neutral traits. A voice left "preferred" falls back to its traits when it is gone or another provider serves the run; a "required" one never relaxes silently.

SpeechCommonOptions.voice