Seamless, natural Telugu readโaloud in the browser with smart cleaning and live word highlighting, built entirely with free/open-source components.
git clone <repo>
cd telugu-tts-ext
npm i
npm run dev:vanilla # zero-build, loads in chrome://extensionsThen load the extension:
- Open Chrome and navigate to
chrome://extensions - Enable "Developer mode" (toggle in top right)
- Click "Load unpacked" and select the
src-vanilladirectory - The extension is now ready to use!
- Dual Engine Support: Browser Web Speech API (default) + Optional WASM Pro Voice
- Smart Text Cleaning: Automatically removes citations, references, URLs, and other artifacts
- Live Word Highlighting: Real-time highlighting synchronized with speech playback
- Zero-Setup: Works immediately with browser's built-in Telugu voice
- Offline Capable: Pro voice models download once and work fully offline
- Intelligent Cleanup: Removes bracketed citations
[12],(Ref. 3), URLs, DOIs, and more - Telugu-Aware: Safe grapheme tokenization using
Intl.Segmenterfor proper Telugu text handling - Sentence Fallback: Graceful degradation to sentence-level highlighting if word boundaries are unreliable
- Clean Interface: Minimal, responsive popup with essential controls
- In-Page Overlay: Draggable, resizable overlay for comfortable reading
- Dark Mode Support: Automatically respects system color scheme preferences
- Keyboard Navigation: Full accessibility support with ARIA roles and keyboard shortcuts
- Popup UI: User controls, preferences, and status display
- Content Script: Text extraction, overlay management, and highlighting
- Service Worker: Orchestration, caching, and state management
- Offscreen Document: Audio playback and timing coordination
- Text Refinement Worker: Deterministic text cleanup pipeline
- WASM TTS Engine: Optional high-quality offline voice synthesis
- User selects text โ Content script extracts text
- Content script โ Service worker โ Text Refinement Worker (cleanup)
- Service worker routes to appropriate engine:
- Web Speech Path: Direct browser TTS with boundary events
- WASM Pro Path: ONNX inference with generated timestamps
- Offscreen document manages playback and emits highlight ticks
- Content script updates overlay in real-time
Coming soon - will be available on Chrome Web Store
- Clone this repository
- Install dependencies:
npm install - Prepare development environment:
npm run dev:vanilla - Load in Chrome:
chrome://extensionsโ "Load unpacked" โ selectsrc-vanilla
The Pro voice is optional and requires a one-time download:
- Open the extension popup
- Click "Upgrade to Pro voice"
- Confirm the ~41MB model download
- Models are cached locally and work offline thereafter
- Select Telugu text on any webpage
- Click the extension icon in Chrome toolbar
- Click "Play" to start reading
- Use "Pause/Resume" and "Stop" as needed
- Voice Selection: Choose between browser default and Pro voice
- Speed Control: Adjust playback rate (0.5x - 2.0x)
- Pitch Control: Modify voice pitch
- Smart Cleaning: Toggle intelligent text cleanup
- Queue Management: Build reading queues from multiple selections
Space: Play/PauseS: StopC: Toggle cleanupโ/โ: Adjust speedShift + โ/โ: Adjust pitch
TTS/
โโโ src-vanilla/ # Zero-build Chrome extension source
โ โโโ manifest.json # MV3 extension manifest
โ โโโ popup.html/ts # Extension popup UI
โ โโโ content.ts # Content script for text extraction
โ โโโ sw.ts # Service worker for orchestration
โ โโโ offscreen.html/ts # Offscreen document for audio
โ โโโ workers/ # Web Workers
โ โโโ lib/ # Utility libraries
โ โโโ models/ # Downloaded TTS models (.keep)
โ โโโ wasm/ # WASM runtime files (.keep)
โโโ scripts/ # CI, size checks, test harness
โโโ prd.md # Product Requirements Document
โโโ architecture.md # Technical architecture
โโโ tasks.md # Development tasks and milestones
โโโ AGENTS.md # AI development guide
The src-vanilla directory contains a zero-build implementation that can be loaded directly into Chrome without compilation. This is ideal for rapid development and testing.
npm run dev:vanilla # Prepare src-vanilla for Chrome loading
npm run models:fetch # Download TTS models for development
npm run zip # Create release package with size check
npm run lint # Run linting and formatting checks- MV3 Compliant: No eval(), CSP compliant, proper offscreen document usage
- Function Length: Keep functions โค15 lines where feasible
- TypeScript: All files use TypeScript but run directly in Chrome
- Comments: Each file includes
// VIBE: MV3, no eval, CSP compliant, โค15 lines per function
- Bundle Size: โค120 KB gzip (excluding models/wasm)
- Popup Load: โค150 ms open, โค100 ms first paint
- Text Cleanup: โค50 ms for 5k characters
- Time-to-First-Audio: โค1.5s for ~250 characters (Pro voice after initial load)
- Highlight Accuracy: โค200ms median drift with timestamps
- Local Processing: All text processing happens locally in your browser
- No Cloud Calls: No external servers except for one-time model download
- Minimal Permissions: Only requests essential permissions (storage, activeTab, offscreen, unlimitedStorage)
- No Tracking: Absolutely no telemetry or user data collection
- Open Source: Full transparency with MIT/Apache-2.0 license
- Chrome: Version 119 or later
- Node.js: Version 18 or later (for development)
- Memory: โฅ60MB free disk space for Pro voice models
- Network: Internet connection for initial Pro voice download
- Primary: Chrome (MV3 Manifest V3)
- Future: Firefox, Edge (MV3 support pending)
npm run test # Run all test suites
npm run test:cleanup # Test text cleaning accuracy
npm run test:drift # Measure highlight timing drift
npm run test:size # Verify bundle size constraints- Load extension in Chrome via
chrome://extensions - Test on Telugu Wikipedia articles and news sites
- Verify cleanup accuracy on sample paragraphs
- Test word highlighting drift with different content types
- Validate offline functionality after Pro voice download
- Basic extension structure and manifest
- Popup UI with controls
- Content script for text extraction
- Service worker message routing
- Offscreen document creation
- Text cleanup pipeline with regex rules
- Web Speech API integration
- Word highlighting with boundary events
- Sentence-level fallback
- ONNX Runtime Web integration
- Model download and caching
- WASM TTS inference pipeline
- Timestamp-based highlighting
- UI/UX improvements and accessibility
- Dark mode support
- Error handling and resilience
- Onboarding flow for Pro voice
- Comprehensive test suite
- Performance optimization
- Documentation and packaging
- CI/CD pipeline setup
We welcome contributions! Please see our contributing guidelines:
- Fork the repository
- Create a feature branch
- Make your changes following the code style guidelines
- Add tests for new functionality
- Ensure all tests pass and size constraints are met
- Submit a pull request
- Follow the MV3 compliance rules
- Keep functions small and focused
- Add comprehensive comments
- Test thoroughly with Telugu text samples
- Respect performance budgets
This project is licensed under the MIT License - see the LICENSE file for details.
- AI4Bharat for the Indic-TTS models
- Facebook for MMS TTS
- ONNX Runtime team for the WebAssembly runtime
- Chrome Extensions team for MV3 APIs
- Telugu language community for feedback and testing
- Issues: Report bugs and request features on GitHub Issues
- Documentation: See architecture.md for technical details
- Discussion: Join our GitHub Discussions
- Enhanced word alignment with phoneme-level precision
- Additional Telugu voice options
- PDF and document support
- Mobile browser compatibility
- Multi-language support (other Indian languages)
- Advanced text analysis with ML models
- Cloud sync for preferences and reading position
- Browser extensions for Firefox and Edge
Built with โค๏ธ for Telugu readers and accessibility needs