A voice-to-note application for readers. Capture thoughts while reading physical books using voice recordings, and let AI structure them into organized, tagged notes.
Demo
Try it out at marginal-ia.com
Note: The demo runs on free tiers of Railway, Groq, and Supabase, so you may occasionally hit rate limits. For heavy usage, consider self-hosting with your own API keys.
Features
- Voice Recording - Record thoughts hands-free while reading
- AI-Powered Parsing - Automatically extracts quotes, comments, page numbers, and tags from transcriptions
- Book Context Awareness - AI corrects phonetic transcription errors using book/author context
- ISBN Lookup - Add books by entering their ISBN
- Export Options - Export to Obsidian (markdown with frontmatter) or CSV (Notion, Excel)
- Multilingual - Preserves the original language of your notes
Tech Stack
- Frontend: Streamlit
- Backend: Supabase (PostgreSQL + Auth)
- AI: Groq (Whisper for transcription, Llama for parsing)
- Book Data: Open Library API
Getting Started
Prerequisites
- Python 3.11+
- uv package manager
- Supabase account
- Groq API key
Installation
-
Clone the repository:
git clone https://github.com/yourusername/marginal-ia.git cd marginal-ia -
Install dependencies:
-
Set up Supabase:
- Create a new Supabase project
- Run the schema from
supabase_schema.sqlin the SQL editor - Enable Row Level Security (RLS) policies are included in the schema
-
Configure environment variables:
Fill in your credentials:
SUPABASE_URL=your_supabase_url SUPABASE_KEY=your_supabase_anon_key GROQ_API_KEY=your_groq_api_key -
Run the app:
uv run streamlit run main.py
Docker
-
Build the image:
docker build -t marginal-ia . -
Run the container:
docker run -p 8501:8501 \ -e SUPABASE_URL=your_supabase_url \ -e SUPABASE_KEY=your_supabase_anon_key \ -e GROQ_API_KEY=your_groq_api_key \ marginal-ia
-
Open http://localhost:8501 in your browser
Deployment on Streamlit Cloud
- Push your code to GitHub
- Connect your repo to Streamlit Cloud
- Add your environment variables in the Streamlit Cloud dashboard
- The
packages.txtfile ensures system dependencies (ffmpeg, libzbar) are installed
Project Structure
marginal-ia/
├── main.py # Entry point (auth + routing)
├── pages/
│ ├── login.py # Authentication
│ ├── recorder.py # Voice recording & AI parsing
│ ├── books.py # Book management
│ └── notes.py # Note viewing & export
├── structures/
│ ├── book.py # Book dataclass
│ └── note.py # Note dataclass
├── utils/
│ ├── db.py # Database client
│ ├── sidebar.py # Navigation
│ ├── parser.py # AI note structuring
│ ├── isbn.py # ISBN lookup
│ └── export.py # Export functionality
├── supabase_schema.sql # Database schema
├── pyproject.toml # Dependencies
└── packages.txt # System dependencies
Usage
- Sign up/Login with email and password
- Add a book manually or by entering its ISBN
- Select the book from the sidebar
- Record your thoughts while reading
- Review the AI-parsed note (quote, comment, tags)
- Export your notes to Obsidian or CSV when ready
Note Tags
The AI automatically assigns one or more tags to each note:
character- Character analysis or observationsquestion- Questions raised by the textremark- General remarksquote- Notable quotes worth rememberingsummary- Chapter or section summariesidea- Ideas sparked by the readingconnection- Connections to other works or conceptscritique- Critical analysis
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.