langchain_community.document_loaders.assemblyai.AssemblyAIAudioLoaderById

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

加载AssemblyAI音频转录。

它使用AssemblyAI API获取现有的转录,并根据指定的格式将转录文本加载到一个或多个文档中。

初始化AssemblyAI AssemblyAIAudioLoaderById。

参数:

transcript_id:现有转录的ID。 transcript_format:要使用的转录格式。

有关更多信息,请参见类“TranscriptFormat”。

api_key:AssemblyAI API密钥。

Methods

__init__(transcript_id, api_key, ...)

初始化AssemblyAI AssemblyAIAudioLoaderById。

alazy_load()

一个用于文档的惰性加载器。

aload()

将数据加载到文档对象中。

lazy_load()

将数据加载到Document对象中。

load()

将数据加载到文档对象中。

load_and_split([text_splitter])

加载文档并分割成块。块作为文档返回。

Parameters
  • transcript_id (str) –

  • api_key (str) –

  • transcript_format (TranscriptFormat) –

__init__(transcript_id: str, api_key: str, transcript_format: TranscriptFormat)[source]

初始化AssemblyAI AssemblyAIAudioLoaderById。

参数:

transcript_id:现有转录的ID。 transcript_format:要使用的转录格式。

有关更多信息,请参见类“TranscriptFormat”。

api_key:AssemblyAI API密钥。

Parameters
  • transcript_id (str) –

  • api_key (str) –

  • transcript_format (TranscriptFormat) –

async alazy_load() AsyncIterator[Document]

一个用于文档的惰性加载器。

Return type

AsyncIterator[Document]

async aload() List[Document]

将数据加载到文档对象中。

Return type

List[Document]

lazy_load() Iterator[Document][source]

将数据加载到Document对象中。

Return type

Iterator[Document]

load() List[Document]

将数据加载到文档对象中。

Return type

List[Document]

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

加载文档并分割成块。块作为文档返回。

不要覆盖此方法。应该被视为已弃用!

参数:
text_splitter: 用于分割文档的TextSplitter实例。

默认为RecursiveCharacterTextSplitter。

返回:

文档列表。

Parameters

text_splitter (Optional[TextSplitter]) –

Return type

List[Document]