Skip to main content

enterprise_ai.multimodal.audio

Source: sdks/python/src/enterprise_ai/multimodal/audio/__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 AudioClient​

/v1/multimodal/diarize and /v1/multimodal/dlp.

Resource

AudioClient.diarize​

diarize(media_id: str, language: str | None = None, model: str | None = None, **extra: Any) -> Any

Diarize an audio. Starts a diarization job (who spoke when) on an audio media or inline audio (201, the job). Only min_speakers and max_speakers apply here (word_timestamps answers 422 parameter_unsupported); min_speakers must not exceed max_speakers (422 parameter_invalid); an option the configured provider cannot honour answers 422 parameter_unsupported. Needs tenant_admin, developer or agent.

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

NameTypeDefaultRequiredDescription
media_idstryesStored audio media.
languagestr | NoneNonenoSpoken language, for example fr. Default: detected by the adapter.
modelstr | NoneNonenoModel to use. Default: the configured adapter.
**extraAnynoExtra fields merged into the request body.

Returns: Any. Decoded JSON answer of the operation "Diarize an audio".

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

AudioClient.dlp​

dlp(media_id: str, mode: str = 'detect', **extra: Any) -> Any

Run the DLP on a text or a media. Inspects text, the extracted text of a stored media, or inline content (scanned first), with the tenant DLP rules. Returns source, extracted_text_chars, the processed text, findings, action and classification. Nothing is stored. Any tenant principal may call it. Audited as multimodal.dlp.

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

NameTypeDefaultRequiredDescription
media_idstryesStored media whose extracted text is inspected.
modestr'detect'nodetect (default), mask, tokenize or block.
**extraAnynoExtra fields merged into the request body.

Returns: Any. Decoded JSON answer of the operation "Run the DLP on a text or a media".

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