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 (str) – 已存在转录的ID。
transcript_format (TranscriptFormat) – 要使用的转录格式。请参阅
TranscriptFormat类获取更多信息。api_key (str) – AssemblyAI API密钥。
方法
__init__(transcript_id, api_key, ...)初始化AssemblyAI AssemblyAIAudioLoaderById。
Documents的懒加载器。
aload()将数据加载到Document对象中。
将数据加载到Document对象中。
load()将数据加载到Document对象中。
load_and_split([text_splitter])加载Documents并将其拆分为块。
- __init__(transcript_id: str, api_key: str, transcript_format: TranscriptFormat)[source]¶
初始化AssemblyAI AssemblyAIAudioLoaderById。
- 参数
transcript_id (str) – 已存在转录的ID。
transcript_format (TranscriptFormat) – 要使用的转录格式。请参阅
TranscriptFormat类获取更多信息。api_key (str) – AssemblyAI API密钥。
- load_and_split(text_splitter: Optional[TextSplitter] = None) List[Document]¶
加载文档并将它们分割成块。块作为 Documents 返回。
不要覆盖此方法。它应该考虑为弃用!
- 参数
text_splitter (可选 [ TextSplitter ]) - 用于分割文档的 TextSplitter 实例。默认为 RecursiveCharacterTextSplitter。
- 返回
文档列表。
- 返回类型
List[Document]