Assemblyai
AssemblyAIAudioTranscriptReader #
Bases: BaseReader
Reader for AssemblyAI audio transcripts.
It uses the AssemblyAI API to transcribe audio files and loads the transcribed text into one or more Documents, depending on the specified format.
To use, you should have the assemblyai python package installed, and the
environment variable ASSEMBLYAI_API_KEY set with your API key.
Alternatively, the API key can also be passed as an argument.
Audio files can be specified via an URL or a local file path.
Source code in llama_index/readers/assemblyai/base.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | |
load_data #
load_data() -> List[Document]
Transcribes the audio file and loads the transcript into documents.
It uses the AssemblyAI API to transcribe the audio file and blocks until the transcription is finished.
Source code in llama_index/readers/assemblyai/base.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | |
TranscriptFormat #
Bases: Enum
Transcript format to use for the document reader.
Source code in llama_index/readers/assemblyai/base.py
12 13 14 15 16 17 18 19 20 21 22 23 24 | |
SENTENCES
class-attribute
instance-attribute
#
SENTENCES = 'sentences'
Multiple documents, splits the transcription by each sentence
PARAGRAPHS
class-attribute
instance-attribute
#
PARAGRAPHS = 'paragraphs'
Multiple documents, splits the transcription by each paragraph
SUBTITLES_SRT
class-attribute
instance-attribute
#
SUBTITLES_SRT = 'subtitles_srt'
One document with the transcript exported in SRT subtitles format
SUBTITLES_VTT
class-attribute
instance-attribute
#
SUBTITLES_VTT = 'subtitles_vtt'
One document with the transcript exported in VTT subtitles format
options: members: - AssemblyAIAudioTranscriptReader