How sergeytrubkin/voice-over-translation works
Project type and purpose
• This is a browser user-script (Tampermonkey/Violentmonkey) extension that provides on-the-fly voice-over translation of videos in the browser.
• It hooks into video players on supported sites, downloads audio, sends it to translation APIs or proxy/back-end services, renders subtitles, and mixes original/translated audio.
File-structure analysis
• src/ – core TypeScript/JavaScript modules:
– audioDownloader/ – audio capture logic
– core/ – event system, cache manager, translation handler, video manager
– localization/ – all locale files and provider
– subtitles/ – subtitle processing and UI widget
– ui/ – UI components, views, and manager
– utils/ – helpers (iframe connector, storage, API wrappers)
• src/styles/ – SCSS definitions for components and subtitles
• dist/ – built user-script bundles (minified and non-minified)
• scripts/wiki-gen/ – tooling to generate wiki pages from config
• patches/ – patch-package patches for vot.js dependency
• config files – package.json, ESLint, Prettier, tsconfig, bun.lock, biome.json
• tests/ – unit tests and fixtures (headers.json, ui.js)
• .github/ – CI workflows for build and release
README insights
• Describes main features: real-time translation via Yandex.Translate, subtitle display (neural/auto-generated), audio saving, hotkey controls, volume syncing, styling customization.
• Lists external services/domains: vot-worker (proxy balancer), media-proxy, VOT-backend for unsupported formats.
• Build instructions: npm or Bun, build scripts for multiple variants.