How sivangbagri/note_be works
Project Type & Purpose
• This is a backend microservice (“Multilingual Note‑Taking Agent”) built with FastAPI.
• It provides REST endpoints to upload meeting audio, transcribe it, summarize content, perform keyword search, run sentiment analysis, and export PDF summaries.
• Core AI components: Whisper/Faster‑Whisper for ASR; LangChain + Qwen/DeepSeek for summarization; SQLite FTS5 for transcript storage; fpdf for PDF export.
File Structure & Architectural Patterns
• Entry point:
• main.py – FastAPI app, routers for /upload_audio, /search, /export_pdf.
• Service modules (under modules/):
• transcriber.py – orchestrates whisper ASR.
• summarizer.py – calls LangChain pipelines to extract summary & action items.
• search.py – queries transcripts.db (SQLite FTS5).
• exporter.py – uses fpdf to assemble PDF with summaries + sentiment charts/fonts.
• fonts/ – PDF font assets.
• Utility modules (under utils/):
• format.py – text cleanup & PDF formatting helpers.
• sentiments.py – computes sentiment scores (charts/tables).
• Persistence & artifacts:
• transcripts.db – SQLite with full-text search.
• output/ – generated PDF summaries.
• Configuration:
• requirements.txt – dependency list (FastAPI, Whisper, LangChain, fpdf, SQLite, etc.).
Key Components
a. API Layer (FastAPI)
b. ASR Service
c. Summarization Service
d. Search Service
e. PDF Export Service
f. Utilities
• “Utils” (format.py, sentiments.py) supporting Summarizer & Exporter.
g. Data Store
h. External ML Models
i. Output Storage
Architectural Patterns & Principles
• Layered architecture: Presentation (API) → Service layer (modules) → Data layer (SQLite)
• Modular design: each AI capability is its own module
• Single Responsibility: transcriber only handles ASR, summarizer only handles summarization, etc.
• Dependency injection: main.py wires modules into FastAPI routers.
Final Checklist
• Clear, self‑explanatory labels on all components
• Grouping of related components (e.g., all modules under a “Service Layer” boundary)
• External dependencies (AI models, client) shown outside the core boundary
• Data store and output artifacts distinctly represented