diff --git a/cognee/modules/data/processing/document_types/AudioDocument.py b/cognee/modules/data/processing/document_types/AudioDocument.py index 989c881a1..0d2cddd3d 100644 --- a/cognee/modules/data/processing/document_types/AudioDocument.py +++ b/cognee/modules/data/processing/document_types/AudioDocument.py @@ -14,6 +14,6 @@ class AudioDocument(Document): text = self.create_transcript() - chunker = TextChunker(self, chunk_size = chunk_size, get_text = lambda: text) + chunker = TextChunker(self, chunk_size = chunk_size, get_text = lambda: [text]) yield from chunker.read() diff --git a/cognee/modules/data/processing/document_types/ImageDocument.py b/cognee/modules/data/processing/document_types/ImageDocument.py index 7338217a5..e8f0dd8ee 100644 --- a/cognee/modules/data/processing/document_types/ImageDocument.py +++ b/cognee/modules/data/processing/document_types/ImageDocument.py @@ -14,6 +14,6 @@ class ImageDocument(Document): # Transcribe the image file text = self.transcribe_image() - chunker = TextChunker(self, chunk_size = chunk_size, get_text = lambda: text) + chunker = TextChunker(self, chunk_size = chunk_size, get_text = lambda: [text]) yield from chunker.read()