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).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
text | str | yes | Text to speak (1 to 20000 characters). | |
voice | str | None | None | no | Voice name of the adapter. Default: the adapter default voice. |
model | str | None | None | no | Model to use. Default: the configured adapter. |
dlp_mode | str | None | None | no | DLP applied to the text: block (default), mask, tokenize or detect. |
**extra | Any | no | Extra 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).