Skip to main content

enterprise_ai.multimodal.tts

Source: sdks/python/src/enterprise_ai/multimodal/tts/__init__.py. Back to the Python SDK reference index.

note

This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.

Class TtsClient​

/v1/multimodal/tts.

Resource

TtsClient.synthesize​

synthesize(text: str, voice: str | None = None, model: str | None = None, dlp_mode: str | None = None, **extra: Any) -> Any

Synthesize speech from text. Starts a text to speech job (201, the job). The text is inspected by the DLP with dlp_mode (default block: personal data answers 422 dlp_blocked; mask speaks the masked text). Usage is counted in characters. Needs tenant_admin, developer or agent.

Route: /v1/multimodal/tts (POST).

NameTypeDefaultRequiredDescription
textstryesText to speak (1 to 20000 characters).
voicestr | NoneNonenoVoice name of the adapter. Default: the adapter default voice.
modelstr | NoneNonenoModel to use. Default: the configured adapter.
dlp_modestr | NoneNonenoDLP applied to the text: block (default), mask, tokenize or detect.
**extraAnynoExtra fields merged into the request body.

Returns: Any. Decoded JSON answer of the operation "Synthesize speech from text".

Raises: the typed errors of the transport (Errors).