Before You Start
- Complete Quickstart to understand basic operations
- Ensure you have LLM Providers configured — the audio file needs a provider with a transcription endpoint, and the image needs a vision model
- Read Loaders for how cognee turns audio and images into the text it then processes
- Have
text_to_speech.mp3andexample.pngin amultimedia_audio_image_processing_example_data/directory next to the script — you can download the example media files from the cognee GitHub repository
Code in Action
What Just Happened
Step 1: Locate the Media Files
multimedia_audio_image_processing_example_data/ directory — swap in your own paths to ingest different media.
Step 2: Remember the Audio and the Image
remember() picks a loader per file from its type: the .mp3 goes to the audio loader for transcription, the .png to the image loader for vision transcription. From there both are ordinary text, so the same chunking, extraction, and summarization steps build one graph across the two files.
Step 3: Recall the Summaries
SearchType.SUMMARIES returns the summaries generated during ingestion rather than asking an LLM to answer the question, which makes it a direct way to see what cognee understood from each file. Everything printed here comes from the transcriptions, so it is also the quickest check that the audio and image were read correctly.
Advanced Usage
Get More Out of Images
Get More Out of Images
Images are transcribed with an extraction-oriented prompt that asks for entities, their attributes, relationships, and any visible text — set
IMAGE_EXTRACTION_ENABLED="false" to fall back to a short caption instead. With IMAGE_OCR_ENABLED="true" and pip install cognee[rapidocr], a local OCR pass appends the text it recognizes to the transcription, which helps on dense screenshots and scans. See Loaders for every image setting and its default.Other Media Formats
Other Media Formats
The same call handles the rest of the audio extensions (
.wav, .flac, .m4a, and more) and the image formats the vision loader claims. Video files take the video loader, which transcribes the audio track with inline [HH:MM:SS] timestamps; .mp4 and .webm work as-is, other containers need ffmpeg on your PATH.Loaders
How each file type is turned into text before ingestion.
remember()
The full parameter surface of the ingestion call this guide uses.
SearchType
Every search mode, including when to prefer SUMMARIES.