') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); GitHub - rodolfocamara/AiNotes · GitHub
Skip to content

Repository files navigation

AiNotes

Desktop app for recording, transcribing, and searching meetings — 100% local, GPU-accelerated, with speaker diarization. Built with Tauri + React + faster-whisper + SpeechBrain.

No cloud. No API keys. Your audio and transcripts never leave your machine.

Features

  • Record meetings with mic + system audio (loopback) captured together
  • Call detection — suggests "Record now" when Teams / Zoom / Meet are active
  • GPU-accelerated transcription (faster-whisper + CTranslate2, int8 on NVIDIA) — typical RTF ~0.03x (30s of audio → 1s on GTX 1080 Ti)
  • Speaker diarization (SpeechBrain ECAPA-TDNN + agglomerative clustering) — fully local, no HuggingFace token required
  • Full-text search across all transcriptions (SQLite FTS5)
  • Multiple Whisper models — tiny / base / small / medium / large-v2

Stack

LayerTech
UIReact 19 + TypeScript + Vite
ShellTauri 2 (Rust)
BackendPython (Click CLI, JSON IPC)
StorageSQLite (FTS5 for search)
ASRfaster-whisper / CTranslate2
DiarizationSpeechBrain ECAPA-TDNN + scikit-learn

Architecture

┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ React UI │────▶│ Tauri (Rust)│────▶│ Python CLI │
│ (Vite dev) │ │ commands │ │ (Click) │
└─────────────┘ └─────────────┘ └──────┬──────┘
▼
┌───────────┐
│ SQLite │
│ recordings│
│ models │
└───────────┘

Every Tauri command invokes the Python CLI as a subprocess and parses its JSON stdout. The recording process spawns detached and is controlled via a lock file.

Requirements

  • Windows 10 / 11 (primary target; Linux/macOS untested)
  • Python 3.10+
  • Node 18+
  • Rust (for Tauri) — install via rustup
  • NVIDIA GPU with CUDA 12 support (optional but strongly recommended)

Setup

:: 1. Install Python dependenciescd python
pip install -r requirements.txt
:: Install PyTorch with CUDA support separately (not on PyPI)
pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu124
cd ..
:: 2. Install Node dependencies
npm install
:: 3. Run in development
npm run tauri dev

On first launch, Whisper models (~500 MB – 3 GB depending on size) and the SpeechBrain ECAPA-TDNN model (~80 MB) download into data/models/.

Producing a standalone installer

build_app.bat

This runs PyInstaller to bundle the Python CLI into a single .exe sidecar, then builds the Tauri installer (.msi + .exe) in src-tauri/target/release/bundle/.

Project layout

AiNotes/
├── src/ React + TypeScript UI
├── src-tauri/ Rust / Tauri shell
│ ├── src/lib.rs Command handlers
│ └── binaries/ PyInstaller sidecar (generated)
├── python/
│ └── ainotes/ Python backend
│ ├── cli.py Click CLI (all JSON output)
│ ├── db.py SQLite + FTS5
│ ├── recorder.py WASAPI loopback + mic capture
│ ├── transcriber.py faster-whisper pipeline
│ ├── diarizer.py SpeechBrain ECAPA-TDNN
│ └── call_detector.py pycaw-based call detection
└── data/ Runtime data (gitignored)
├── recordings/
├── models/
└── ainotes.db

Performance notes

On an i7-7700K + GTX 1080 Ti (Pascal, CC 6.1):

Audio lengthModelDeviceTimeRTF
71ssmallcuda int8~2s0.025x
71ssmallcpu int8~30s0.4x

Diarization runs on CPU (to avoid a cuDNN conflict with CTranslate2) and adds ~1-3 minutes for a one-hour meeting.

Why CPU for diarization?

faster-whisper (via CTranslate2) loads cuDNN 9 DLLs from the nvidia-* pip packages. PyTorch 2.6 ships its own cuDNN, and when both sit in the same process they compete for symbols, crashing with exit code 127. Since ECAPA-TDNN is small and fast on CPU, running diarization there is the simplest robust fix.

License

MIT — see LICENSE file.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages