Toggle Menu
Prev Up Next

# `langchain_community.document_loaders.assemblyai`.AssemblyAIAudioLoaderById

class langchain_community.document_loaders.assemblyai.AssemblyAIAudioLoaderById(transcript_id: str, api_key: str, transcript_format: TranscriptFormat)

  Load AssemblyAI audio transcripts.

  It uses the AssemblyAI API to get an existing transcription and loads the transcribed text into one or more Documents, depending on the specified format.

  Initializes the AssemblyAI AssemblyAIAudioLoaderById.

  Parameters

    - transcript_id (str) – Id of an existing transcription.

    - transcript_format (TranscriptFormat) – Transcript format to use. See class `TranscriptFormat` for more info.

    - api_key (str) – AssemblyAI API key.

  Methods

  `__init__`(transcript_id, api_key, ...) | Initializes the AssemblyAI AssemblyAIAudioLoaderById.
  `alazy_load`() | A lazy loader for Documents.
  `aload`() | Load data into Document objects.
  `lazy_load`() | Load data into Document objects.
  `load`() | Load data into Document objects.
  `load_and_split`([text_splitter]) | Load Documents and split into chunks.

  __init__(transcript_id: str, api_key: str, transcript_format: TranscriptFormat)

    Initializes the AssemblyAI AssemblyAIAudioLoaderById.

    Parameters

      - transcript_id (str) – Id of an existing transcription.

      - transcript_format (TranscriptFormat) – Transcript format to use. See class `TranscriptFormat` for more info.

      - api_key (str) – AssemblyAI API key.

  async alazy_load() → AsyncIterator[Document]

    A lazy loader for Documents.

    Return type

      AsyncIterator[Document]

  async aload() → List[Document]

    Load data into Document objects.

    Return type

      List[Document]

  lazy_load() → Iterator[Document]

    Load data into Document objects.

    Return type

      Iterator[Document]

  load() → List[Document]

    Load data into Document objects.

    Return type

      List[Document]

  load_and_split(text_splitter: Optional[TextSplitter] = None) → List[Document]

    Load Documents and split into chunks. Chunks are returned as Documents.

    Do not override this method. It should be considered to be deprecated!

    Parameters

      text_splitter (Optional[TextSplitter]) – TextSplitter instance to use for splitting documents. Defaults to RecursiveCharacterTextSplitter.

    Returns

      List of Documents.

    Return type

      List[Document]