Quickstart
Install the assemblyai-haystack package using pip. This package installs and uses the AssemblyAI Python SDK and Haystack 2.0. You can find more information about the SDK at the AssemblyAI Python SDK GitHub repository.Usage
Add anAssemblyAITranscriber
component and initialize it by passing your AssemblyAI API key. Once the pipeline is ready to run, make sure to pass at least the file_path
argument to the run
function. The file_path
can be a URL
or a local file path. In the run
function, you can also specify whether you want summarization and speaker diarization results.
Calling
indexing.run()
blocks until the transcription is finished.transcription
summarization
speaker_labels
AssemblyAITranscriber
is used in a Haystack pipeline, transcription happens by default. In the metadata of the transcription, you will also get the ID
of the transcription and the URL
of your audio file.
A bullet point summary of what is being discussed will be returned if summarization
is set to TRUE
. The transcription divided into utterances of speakers will be returned if speaker_labels
is set to TRUE
.
The output of the AssemblyAITranscriber
is a Haystack document. When all features are turned on, the created document looks like this: