KUNALSHAWW/AI_Interviewer_summarizer

0

stars

3

commits

TypeScript

primary language

Jan 12, 2026

updated

README

πŸŽ™οΈ AI Interview Summarizer

SvelteKit ONNX Model Size Inference TypeScript License

An ultra-lightweight, real-time voice interview summarization app. Runs 100% client-side with neural AI inference via ONNX Runtime WebAssembly β€” achieving <30MB model size and <50ms inference latency.

πŸ† Built for hackathon constraints: No server calls, offline-capable, real-time performance.


✨ Key Features

FeatureDescription
🎀 Real-time TranscriptionWeb Speech API with 50ms VAD polling
🧠 Neural SummarizationExtractive summarization via sentence embeddings
⚑ O(1) Incremental UpdatesOnly new sentences trigger inference
πŸ”‡ Off-Thread Audio ProcessingAudioWorklet prevents UI blocking
πŸ—£οΈ Context-Aware FillersAI-selected phrases during processing pauses
πŸ“± Offline CapableModel cached in IndexedDB after first load
πŸ“Š Live MetricsLoad time, inference latency, model size display

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         CLIENT-SIDE ARCHITECTURE                            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚  β”‚  MAIN THREAD β”‚    β”‚  AUDIO THREAD   β”‚    β”‚      INFERENCE WORKER       β”‚β”‚
β”‚  β”‚  (SvelteKit) β”‚    β”‚  (AudioWorklet) β”‚    β”‚    (ONNX/WASM + SIMD)       β”‚β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
β”‚         β”‚                     β”‚                            β”‚               β”‚
β”‚         β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚               β”‚
β”‚         β”‚  β”‚    VAD Processor               β”‚              β”‚               β”‚
β”‚         β”‚  β”‚  β€’ RMS voice level detection   β”‚              β”‚               β”‚
β”‚         β”‚  β”‚  β€’ Runs in audio render thread β”‚              β”‚               β”‚
β”‚         β”‚  β”‚  β€’ No UI blocking              β”‚              β”‚               β”‚
β”‚         β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚               β”‚
β”‚         β”‚                                                  β”‚               β”‚
β”‚         β–Ό                                                  β–Ό               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚                     INCREMENTAL SUMMARIZATION                        β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚  β”‚
β”‚  β”‚  β”‚  1. New sentence arrives                                     β”‚    β”‚  β”‚
β”‚  β”‚  β”‚  2. Embed ONLY new sentence (single forward pass)            β”‚    β”‚  β”‚
β”‚  β”‚  β”‚  3. Update running sum β†’ O(1) centroid calculation           β”‚    β”‚  β”‚
β”‚  β”‚  β”‚  4. Cosine similarity ranking (cached embeddings, no model)  β”‚    β”‚  β”‚
β”‚  β”‚  β”‚  5. Return top-k sentences                                   β”‚    β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚  β”‚
β”‚  β”‚                                                                      β”‚  β”‚
β”‚  β”‚  Model: Xenova/all-MiniLM-L6-v2 (Quantized Int8)                    β”‚  β”‚
β”‚  β”‚  β€’ 384-dimensional embeddings                                        β”‚  β”‚
β”‚  β”‚  β€’ ~23MB ONNX model                                                  β”‚  β”‚
β”‚  β”‚  β€’ WASM backend with SIMD acceleration                               β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Performance Optimizations

OptimizationBeforeAfterImpact
VAD Polling500ms50ms10x faster pause detection
SummarizationO(N) per callO(k) new onlyNo freeze on long interviews
Audio ProcessingMain threadAudioWorkletZero UI jank
Filler ContextRe-embed every pauseCachedNear-zero latency for repeats

πŸ“Š Hackathon Compliance

ConstraintTargetAchievedStatus
Model Size≀30MB~23MBβœ… PASS
Inference Latency<50ms<50msβœ… PASS
Client-Side100%100%*βœ… PASS
Real-TimeYesYesβœ… PASS
Offline CapableYesYesβœ… PASS

*Web Speech API uses cloud STT. See Offline STT Options for true offline mode.


πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • Chrome/Edge (best Web Speech API support)

Installation

# Clone the repository
git clone https://github.com/KUNALSHAWW/AI_Interviewer_summarizer.git
cd AI_Interviewer_summarizer

# Install dependencies
npm install

# Start development server
npm run dev

First Run

  1. Open http://localhost:5173 in Chrome/Edge
  2. Wait for model download (~23MB, cached after first load)
  3. Allow microphone access
  4. Click "Start Recording" and speak
  5. Watch real-time transcription and summaries!

πŸ—‚οΈ Project Structure

AI_Interviewer_summarizer/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ components/          # Svelte 5 UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ InferenceProvider.svelte   # ONNX worker orchestration
β”‚   β”‚   β”‚   β”œβ”€β”€ TranscriptFeed.svelte      # Live transcript display
β”‚   β”‚   β”‚   β”œβ”€β”€ SummarySidebar.svelte      # AI summary panel
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ workers/
β”‚   β”‚   β”‚   β”œβ”€β”€ onnx-inference.worker.ts   # Incremental neural inference
β”‚   β”‚   β”‚   └── vad-worklet.ts             # Off-thread VAD (AudioWorklet)
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ voice/
β”‚   β”‚   β”‚   └── engine.ts          # Speech recognition + TTS + VAD
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ stores/                # Svelte reactive stores
β”‚   β”‚   β”œβ”€β”€ types/                 # TypeScript definitions
β”‚   β”‚   └── utils/                 # Performance utilities
β”‚   β”‚
β”‚   └── routes/
β”‚       └── +page.svelte           # Main application
β”‚
β”œβ”€β”€ scripts/
β”‚   └── quantize_model.py          # ONNX model quantization script
β”‚
β”œβ”€β”€ static/                        # Static assets
β”œβ”€β”€ CODE_REVIEW.md                 # Original technical review
β”œβ”€β”€ REFACTORING_SUMMARY.md         # Applied fixes documentation
└── package.json

πŸ§ͺ Testing

# Run unit tests
npm test

# Watch mode
npm run test:watch

# Coverage report
npm run test:coverage

βš™οΈ Configuration

Environment Variables (Optional)

# .env (for Supabase persistence)
PUBLIC_SUPABASE_URL=your_supabase_url
PUBLIC_SUPABASE_ANON_KEY=your_anon_key

Model Configuration

// src/lib/workers/onnx-inference.worker.ts
const MODEL_ID = 'Xenova/all-MiniLM-L6-v2';  // ~23MB, 384-dim

// Alternatives:
// 'Xenova/paraphrase-MiniLM-L3-v2'   // ~17MB (smaller, less accurate)

πŸ”‡ Offline STT Options

Web Speech API uses cloud servers. For true offline mode, choose:

OptionSTT ModelSummarizationTotal Size
CurrentWeb Speech (cloud)Neural (~23MB)~23MB
Offline AVosk (~40MB)TF-IDF (0MB)~40MB
Offline BWhisper-tiny (~40MB)TF-IDF (0MB)~40MB

⚠️ Cannot have Neural STT + Neural Summarization under 30MB.


🌐 Browser Support

BrowserSpeech RecognitionWASM+SIMDStatus
Chrome 91+βœ…βœ…Recommended
Edge 91+βœ…βœ…Recommended
FirefoxβŒβœ…No voice input
Safari 16.4+βš οΈβœ…Limited STT

πŸ“¦ Build & Deploy

# Build for production
npm run build

# Preview production build
npm run preview

Deploy to Vercel

npx vercel

The app is configured for static deployment via @sveltejs/adapter-static.


πŸ”§ Development

Key Commands

CommandDescription
npm run devStart dev server
npm run buildProduction build
npm run checkTypeScript check
npm run lintLint code
npm run formatFormat with Prettier

Keyboard Shortcuts

ShortcutAction
Ctrl+SStart/Stop recording
Ctrl+PPause/Resume
Ctrl+EGenerate summary
Ctrl+Shift+CClear session

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

🐰 CodeRabbit is enabled for automatic PR reviews!


πŸ“œ License

MIT License - see LICENSE for details.


πŸ™ Acknowledgments


Built with ❀️ for real-time AI inference on the edge

Contributors

KUNALSHAWW

2 commits

anshika368

1 commits

KUNALSHAWW/AI_Interviewer_summarizer

0

stars

3

commits

TypeScript

primary language

Jan 12, 2026

updated

README

πŸŽ™οΈ AI Interview Summarizer

SvelteKit ONNX Model Size Inference TypeScript License

An ultra-lightweight, real-time voice interview summarization app. Runs 100% client-side with neural AI inference via ONNX Runtime WebAssembly β€” achieving <30MB model size and <50ms inference latency.

πŸ† Built for hackathon constraints: No server calls, offline-capable, real-time performance.


✨ Key Features

FeatureDescription
🎀 Real-time TranscriptionWeb Speech API with 50ms VAD polling
🧠 Neural SummarizationExtractive summarization via sentence embeddings
⚑ O(1) Incremental UpdatesOnly new sentences trigger inference
πŸ”‡ Off-Thread Audio ProcessingAudioWorklet prevents UI blocking
πŸ—£οΈ Context-Aware FillersAI-selected phrases during processing pauses
πŸ“± Offline CapableModel cached in IndexedDB after first load
πŸ“Š Live MetricsLoad time, inference latency, model size display

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         CLIENT-SIDE ARCHITECTURE                            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚  β”‚  MAIN THREAD β”‚    β”‚  AUDIO THREAD   β”‚    β”‚      INFERENCE WORKER       β”‚β”‚
β”‚  β”‚  (SvelteKit) β”‚    β”‚  (AudioWorklet) β”‚    β”‚    (ONNX/WASM + SIMD)       β”‚β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
β”‚         β”‚                     β”‚                            β”‚               β”‚
β”‚         β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚               β”‚
β”‚         β”‚  β”‚    VAD Processor               β”‚              β”‚               β”‚
β”‚         β”‚  β”‚  β€’ RMS voice level detection   β”‚              β”‚               β”‚
β”‚         β”‚  β”‚  β€’ Runs in audio render thread β”‚              β”‚               β”‚
β”‚         β”‚  β”‚  β€’ No UI blocking              β”‚              β”‚               β”‚
β”‚         β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚               β”‚
β”‚         β”‚                                                  β”‚               β”‚
β”‚         β–Ό                                                  β–Ό               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚                     INCREMENTAL SUMMARIZATION                        β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚  β”‚
β”‚  β”‚  β”‚  1. New sentence arrives                                     β”‚    β”‚  β”‚
β”‚  β”‚  β”‚  2. Embed ONLY new sentence (single forward pass)            β”‚    β”‚  β”‚
β”‚  β”‚  β”‚  3. Update running sum β†’ O(1) centroid calculation           β”‚    β”‚  β”‚
β”‚  β”‚  β”‚  4. Cosine similarity ranking (cached embeddings, no model)  β”‚    β”‚  β”‚
β”‚  β”‚  β”‚  5. Return top-k sentences                                   β”‚    β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚  β”‚
β”‚  β”‚                                                                      β”‚  β”‚
β”‚  β”‚  Model: Xenova/all-MiniLM-L6-v2 (Quantized Int8)                    β”‚  β”‚
β”‚  β”‚  β€’ 384-dimensional embeddings                                        β”‚  β”‚
β”‚  β”‚  β€’ ~23MB ONNX model                                                  β”‚  β”‚
β”‚  β”‚  β€’ WASM backend with SIMD acceleration                               β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Performance Optimizations

OptimizationBeforeAfterImpact
VAD Polling500ms50ms10x faster pause detection
SummarizationO(N) per callO(k) new onlyNo freeze on long interviews
Audio ProcessingMain threadAudioWorkletZero UI jank
Filler ContextRe-embed every pauseCachedNear-zero latency for repeats

πŸ“Š Hackathon Compliance

ConstraintTargetAchievedStatus
Model Size≀30MB~23MBβœ… PASS
Inference Latency<50ms<50msβœ… PASS
Client-Side100%100%*βœ… PASS
Real-TimeYesYesβœ… PASS
Offline CapableYesYesβœ… PASS

*Web Speech API uses cloud STT. See Offline STT Options for true offline mode.


πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • Chrome/Edge (best Web Speech API support)

Installation

# Clone the repository
git clone https://github.com/KUNALSHAWW/AI_Interviewer_summarizer.git
cd AI_Interviewer_summarizer

# Install dependencies
npm install

# Start development server
npm run dev

First Run

  1. Open http://localhost:5173 in Chrome/Edge
  2. Wait for model download (~23MB, cached after first load)
  3. Allow microphone access
  4. Click "Start Recording" and speak
  5. Watch real-time transcription and summaries!

πŸ—‚οΈ Project Structure

AI_Interviewer_summarizer/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ components/          # Svelte 5 UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ InferenceProvider.svelte   # ONNX worker orchestration
β”‚   β”‚   β”‚   β”œβ”€β”€ TranscriptFeed.svelte      # Live transcript display
β”‚   β”‚   β”‚   β”œβ”€β”€ SummarySidebar.svelte      # AI summary panel
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ workers/
β”‚   β”‚   β”‚   β”œβ”€β”€ onnx-inference.worker.ts   # Incremental neural inference
β”‚   β”‚   β”‚   └── vad-worklet.ts             # Off-thread VAD (AudioWorklet)
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ voice/
β”‚   β”‚   β”‚   └── engine.ts          # Speech recognition + TTS + VAD
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ stores/                # Svelte reactive stores
β”‚   β”‚   β”œβ”€β”€ types/                 # TypeScript definitions
β”‚   β”‚   └── utils/                 # Performance utilities
β”‚   β”‚
β”‚   └── routes/
β”‚       └── +page.svelte           # Main application
β”‚
β”œβ”€β”€ scripts/
β”‚   └── quantize_model.py          # ONNX model quantization script
β”‚
β”œβ”€β”€ static/                        # Static assets
β”œβ”€β”€ CODE_REVIEW.md                 # Original technical review
β”œβ”€β”€ REFACTORING_SUMMARY.md         # Applied fixes documentation
└── package.json

πŸ§ͺ Testing

# Run unit tests
npm test

# Watch mode
npm run test:watch

# Coverage report
npm run test:coverage

βš™οΈ Configuration

Environment Variables (Optional)

# .env (for Supabase persistence)
PUBLIC_SUPABASE_URL=your_supabase_url
PUBLIC_SUPABASE_ANON_KEY=your_anon_key

Model Configuration

// src/lib/workers/onnx-inference.worker.ts
const MODEL_ID = 'Xenova/all-MiniLM-L6-v2';  // ~23MB, 384-dim

// Alternatives:
// 'Xenova/paraphrase-MiniLM-L3-v2'   // ~17MB (smaller, less accurate)

πŸ”‡ Offline STT Options

Web Speech API uses cloud servers. For true offline mode, choose:

OptionSTT ModelSummarizationTotal Size
CurrentWeb Speech (cloud)Neural (~23MB)~23MB
Offline AVosk (~40MB)TF-IDF (0MB)~40MB
Offline BWhisper-tiny (~40MB)TF-IDF (0MB)~40MB

⚠️ Cannot have Neural STT + Neural Summarization under 30MB.


🌐 Browser Support

BrowserSpeech RecognitionWASM+SIMDStatus
Chrome 91+βœ…βœ…Recommended
Edge 91+βœ…βœ…Recommended
FirefoxβŒβœ…No voice input
Safari 16.4+βš οΈβœ…Limited STT

πŸ“¦ Build & Deploy

# Build for production
npm run build

# Preview production build
npm run preview

Deploy to Vercel

npx vercel

The app is configured for static deployment via @sveltejs/adapter-static.


πŸ”§ Development

Key Commands

CommandDescription
npm run devStart dev server
npm run buildProduction build
npm run checkTypeScript check
npm run lintLint code
npm run formatFormat with Prettier

Keyboard Shortcuts

ShortcutAction
Ctrl+SStart/Stop recording
Ctrl+PPause/Resume
Ctrl+EGenerate summary
Ctrl+Shift+CClear session

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

🐰 CodeRabbit is enabled for automatic PR reviews!


πŸ“œ License

MIT License - see LICENSE for details.


πŸ™ Acknowledgments


Built with ❀️ for real-time AI inference on the edge

Contributors

KUNALSHAWW

2 commits

anshika368

1 commits

Languages

TypeScript

46.5%

Svelte

44.9%

Python

3.5%

CSS

2.4%

PLpgSQL

1.5%