YandexSTTParser#

class langchain_community.document_loaders.parsers.audio.YandexSTTParser(*, api_key: str | None = None, iam_token: str | None = None, model: str = 'general', language: str = 'auto')[source]#

Transcribe and parse audio files. Audio transcription is with OpenAI Whisper model.

Initialize the parser.

Parameters:
  • api_key (str | None) – API key for a service account

  • role. (with the ai.speechkit-stt.user)

  • iam_token (str | None) – IAM token for a service account

  • role.

  • model (str) – Recognition model name. Defaults to general.

  • language (str) – The language in ISO 639-1 format. Defaults to automatic language recognition.

Either api_key or iam_token must be provided, but not both.

Methods

__init__(*[,Β api_key,Β iam_token,Β model,Β ...])

Initialize the parser.

lazy_parse(blob)

Lazily parse the blob.

parse(blob)

Eagerly parse the blob into a document or documents.

__init__(*, api_key: str | None = None, iam_token: str | None = None, model: str = 'general', language: str = 'auto')[source]#

Initialize the parser.

Parameters:
  • api_key (str | None) – API key for a service account

  • role. (with the ai.speechkit-stt.user)

  • iam_token (str | None) – IAM token for a service account

  • role.

  • model (str) – Recognition model name. Defaults to general.

  • language (str) – The language in ISO 639-1 format. Defaults to automatic language recognition.

Either api_key or iam_token must be provided, but not both.

lazy_parse(blob: Blob) β†’ Iterator[Document][source]#

Lazily parse the blob.

Parameters:

blob (Blob)

Return type:

Iterator[Document]

parse(blob: Blob) β†’ list[Document]#

Eagerly parse the blob into a document or documents.

This is a convenience method for interactive development environment.

Production applications should favor the lazy_parse method instead.

Subclasses should generally not over-ride this parse method.

Parameters:

blob (Blob) – Blob instance

Returns:

List of documents

Return type:

list[Document]