Imagine you need to process an incoming document—a scanner outputs a PDF with an invoice, a doctor dictates an audio commentary, and a client sends a photo of a defective part. Each data type requires its own tool, and gluing them into a single multimodal AI pipeline is the task of a multimodal AI system. We implement such solutions for manufacturing, medicine, and logistics: this reduces manual work by 60–80% and lowers errors to 0.5% according to our project data. The core stack is a Vision LLM (e.g., Claude Sonnet 4.5), Whisper: Robust Speech Recognition via Large-Scale Weak Supervision (Whisper large-v3) for audio, and a custom TTS model. Typical latency: 2–5 seconds per complex request.
Key challenges addressed by multimodal pipelines
Heterogeneous data formats. A client sends photos, scans, audio recordings, videos—all need to be combined and analyzed in a single context. Without a multimodal pipeline, you end up using separate utilities, leading to context loss and errors. For video, we extract key frames, analyze motion and defects.
Recognition quality. Old OCR systems fail on non-standard fonts, Whisper struggles with accents and noise. We select model combinations, fine-tune for your domain, and add post-processing with LLM validation.
Latency. Sequential processing through multiple APIs gives latency >30 seconds. We build parallel pipelines with queues (RabbitMQ/Kafka) and embedding caching—typical response time is 2–5 seconds.
Multimodal fusion architecture
The basic architecture includes four steps:
- Audio → text via Whisper (model
whisper-1, supports 99 languages). - Images—encoded as base64 and passed to a Vision LLM (Claude, GPT-4o). For large images, we apply adaptive resizing while preserving quality.
- Documents—extract text via pdfplumber / PyMuPDF, then merge with text.
- Fusion—all modalities are collected into a single
contentarray and sent to the LLM with the task prompt.
Below is a Python (asyncio) code example we use in production:
from anthropic import AsyncAnthropic
from openai import AsyncOpenAI
import base64
import aiohttp
from pathlib import Path
from typing import Union
from pydantic import BaseModel
anthropic_client = AsyncAnthropic()
openai_client = AsyncOpenAI()
class MultimodalInput(BaseModel):
text: str | None = None
image_paths: list[str] = []
audio_path: str | None = None
document_path: str | None = None
class MultimodalPipeline:
async def process(self, input_data: MultimodalInput, task: str) -> str:
"""Process multimodal input"""
content_blocks = []
# 1. Audio → text
if input_data.audio_path:
transcript = await self.transcribe_audio(input_data.audio_path)
content_blocks.append({"type": "text", "text": f"[Audio transcription]: {transcript}"})
# 2. Images
for image_path in input_data.image_paths:
image_block = await self.prepare_image(image_path)
content_blocks.append(image_block)
# 3. Documents (PDF)
if input_data.document_path:
doc_text = await self.extract_document(input_data.document_path)
content_blocks.append({"type": "text", "text": f"[Document]:\n{doc_text}"})
# 4. Text query
if input_data.text:
content_blocks.append({"type": "text", "text": input_data.text})
content_blocks.append({"type": "text", "text": f"\nTask: {task}"})
response = await anthropic_client.messages.create(
model="claude-sonnet-4-5",
max_tokens=4096,
messages=[{"role": "user", "content": content_blocks}],
)
return response.content[0].text
async def transcribe_audio(self, audio_path: str) -> str:
"""Transcribe audio via Whisper"""
with open(audio_path, "rb") as f:
transcription = await openai_client.audio.transcriptions.create(
file=(Path(audio_path).name, f.read()),
model="whisper-1",
language="ru",
)
return transcription.text
async def prepare_image(self, image_path: str) -> dict:
"""Prepare image for Claude Vision"""
if image_path.startswith("http"):
async with aiohttp.ClientSession() as session:
async with session.get(image_path) as resp:
image_data = base64.b64encode(await resp.read()).decode()
media_type = resp.content_type or "image/jpeg"
else:
with open(image_path, "rb") as f:
image_data = base64.b64encode(f.read()).decode()
ext = Path(image_path).suffix.lower()
media_type = {"jpg": "image/jpeg", "jpeg": "image/jpeg",
"png": "image/png", "gif": "image/gif",
"webp": "image/webp"}.get(ext[1:], "image/jpeg")
return {
"type": "image",
"source": {"type": "base64", "media_type": media_type, "data": image_data}
}
async def extract_document(self, pdf_path: str) -> str:
"""Extract text from PDF document"""
import pdfplumber
text_parts = []
with pdfplumber.open(pdf_path) as pdf:
for page in pdf.pages:
text = page.extract_text()
if text:
text_parts.append(text)
return "\n\n".join(text_parts)[:10000]
Practical case: invoice processing
One of our clients—a logistics company—received 500+ invoices daily. Manual entry took 15 minutes per document and had an 8% error rate. We deployed a multimodal pipeline:
- Scan of invoice → Claude Vision extracts table, amounts, signatures.
- If there is an audio comment (e.g., "correct to 2000 rubles") — Whisper transcribes, LLM corrects the JSON.
- Result is written to 1C via API.
Results: processing time dropped from 15 minutes to 2 seconds, errors from 8% to 0.5%. Annual savings of $60,000 (Client case study).
How we build a multimodal pipeline
- Task audit—you send sample data, we measure baseline and set goals.
- Design—select models: Claude Sonnet for vision, Whisper large-v3 for audio, TTS-1 for synthesis. Optimize pipeline.
- Implementation—write code (Python, async), set up queues, cache, monitoring.
- Testing—A/B test against old system, record improvement.
- Deployment—containerize, deploy in your environment (on-prem or cloud).
Why trust us with a multimodal pipeline?
With 5+ years of AI experience and 50+ implemented projects, we build production-grade multimodal AI pipelines. We use production stacks: PyTorch, Hugging Face, LangChain, vLLM. We guarantee quality through monitoring p99 latency and accuracy on your data. Certified specialists in Claude, GPT-4, and Whisper. We work with any models: from open-source LLaMA to proprietary APIs. For fine-tuning we use LoRA and QLoRA on your data. We always offer the optimal balance of speed and accuracy.
For searching multimodal data we use RAG architecture with vector DBs (ChromaDB, Qdrant). This allows fast retrieval of relevant information from large archives of documents, images, and audio recordings, improving query accuracy.
Estimated timelines and budget
| Component | Timeline | Typical cost |
|---|---|---|
| Vision image analysis | 2–3 days | $3,000–$5,000 |
| Whisper transcription | 1–2 days | $1,000–$2,000 |
| Voice pipeline (STT+TTS) | 1 week | $5,000–$8,000 |
| Video analysis (frame sampling) | 1–2 weeks | $8,000–$12,000 |
| Production system with queue | 2–3 weeks | $10,000–$15,000 |
Cost is calculated individually—depends on number of models, need for fine-tuning, and infrastructure. Contact us for an accurate estimate.
What's included
- Pipeline source code with documentation.
- Models and weights (if fine-tuning is used).
- Integration with your systems (API, queues).
- Monitoring dashboard (metrics: latency, accuracy, throughput).
- Team training (2 hours).
- 1 month support after deployment.
Model comparison for vision tasks
| Model | Context window | Speed (p50 latency) | Accuracy on tables |
|---|---|---|---|
| Claude Sonnet 4.5 | 200K tokens | 1.5 sec | 98% |
| GPT-4o | 128K tokens | 2.0 sec | 96% |
| Gemini 1.5 Pro | 1M tokens | 2.5 sec | 94% |
In our tests, Claude Sonnet 4.5 is 30% faster than GPT-4o at table parsing and gives 2% fewer errors. However, for long videos with large context, Gemini 1.5 Pro is more efficient.
To find the optimal solution for your data, contact our engineer. Get a consultation within a day. Write to us—we'll build a multimodal pipeline for your task.







