惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
G
Google Developers Blog
有赞技术团队
有赞技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Blog — PlanetScale
Blog — PlanetScale
罗磊的独立博客
博客园 - 聂微东
V
Visual Studio Blog
博客园_首页
D
DataBreaches.Net
腾讯CDC
I
InfoQ
F
Fortinet All Blogs
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 【当耐特】
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
云风的 BLOG
云风的 BLOG
月光博客
月光博客
Recent Announcements
Recent Announcements
MongoDB | Blog
MongoDB | Blog
C
Check Point Blog

Hacker News - Newest: "AI"

AI can't read an investor deck AI as an attorney? Student uses ChatGPT, Gemini to sue UW over alleged racial discrimination Hacking MCP Servers in AI Systems – The Rug Pull: Tool Changes After Approval GitHub - MeepCastana/KubeezCut: Free Web based video editor Can AI judge journalism? A Thiel-backed startup says yes, even if it risks chilling whistleblowers Coming soon: 10 Things That Matter in AI Right Now DARPA built an AI to fact-check enemy weapons claims What explains heterogeneity in AI adoption? When AI Meets Muscle: Context-Aware Electrical Stimulation Promises a New Way to Guide Human Movements - Department of Computer Science AI Changed How We Build. It Did Not Change What Matters. Linux rules on using AI-generated code - Copilot is OK, but humans must take 'full responsibility for the… Meta spins up AI version of Mark Zuckerberg to engage with employees Code Mode: Let Your AI Write Programs, Not Just Call Tools | TanStack Blog GitHub - Delavalom/graft: Go framework for building AI agents. Type-safe tools, multi-provider (OpenAI, Anthropic, Gemini, Bedrock), zero vendor SDKs. India's TCS tops estimates, says new AI models did not dent services demand Gen Z's fading AI hype Strong feeling: we are in a folded AI reality GitHub - machinarii/total-recall-catalog: A reference catalog of latest knowledge retrieval, memory & RAG systems GitHub - mensfeld/code-on-incus: Give each AI agent its own isolated machine with root, Docker, and systemd. Active defense detects and stops threats automatically.. Quantization, LoRA, and the 8% Problem: Benchmarking Local LLMs for Production AI Iran war: We spoke to the man making Lego-style AI videos that experts say are powerful propaganda Powell, Bessent discussed Anthropic's Mythos AI cyber threat with major U.S. banks GitHub - immartian/bellamem: Persistent belief-graph memory for AI agents. Retrieves decisive context by importance — not recency, not RAG, not /compact. recursive-mode: The Repo-Native Operating System for AI Engineering After the attack on Sam Altman's home, will AI CEO's go on the offensive? The biggest advance in AI since the LLM Opus 4.6 vs GPT 5.4 One Prompt Unity World Generation Test “AI polls” are fake polls Client Challenge Can AI be a 'child of God'? Inside Anthropic's meeting with Christian leaders
GitHub - MohammdKopa/kami-subs: Live AI-generated subtitl...
mohamedkeba · 2026-05-18 · via Hacker News - Newest: "AI"

Live AI-generated subtitles, overlaid on any browser video, translated into any language — running locally on your machine.

Captures the audio of whatever's playing in your browser tab, transcribes it with faster-whisper, translates the output, and overlays it on the video. No cloud, no API keys, no per-minute fees. Works on anything that isn't DRM-protected — YouTube, Twitch, podcasts, lectures, vimeo embeds, news streams.

MIT License Platform Manifest


Why this exists

Chrome's built-in Live Caption is English-only and doesn't translate. Whisper desktop apps work on files, not live audio. Most "translate any video" tools are paid SaaS that don't work on private content. There's no good free option for "live subs, your language, any video, running on your own GPU."

This is that.


How it works

┌────────────────────────┐    PCM 16k mono      ┌──────────────────────────┐
│ Chrome extension       │ ──── WebSocket ────▶ │ Python backend           │
│  • tabCapture audio    │                      │  • faster-whisper        │
│  • chunk + resample    │                      │  • translate → target    │
│  • overlay subtitles   │ ◀── JSON transcripts │  • FastAPI WS @ :8765    │
└────────────────────────┘                      └──────────────────────────┘
        ▲                                                  ▲
        │  click Start                       launches via  │
        └─────────────  Native Messaging ──────────────────┘

The backend stays on your machine. The extension talks to it over ws://127.0.0.1:8765/ws. The Native Messaging host lets the extension itself spawn the backend when you click Start, so you don't have to run a separate terminal.


Requirements

  • OS: Windows 10/11 (Linux/macOS support hasn't been written — see Contributing)
  • Chrome or Edge (Chromium ≥ 116)
  • Python 3.10+ on PATH
  • GPU strongly recommended for real-time performance — an NVIDIA card with CUDA 12 + cuDNN 9 gets you sub-second latency. CPU works but introduces 3-5s delay with the small model.
  • ~500 MB disk for the small Whisper model (downloaded on first run). Larger models up to ~3 GB.

Install

Clone the repo, then:

1. Backend dependencies (one-time)

cd kami-subs\backend
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt

First Whisper run downloads model weights into your local cache.

2. Load the extension

  1. Open chrome://extensions
  2. Toggle Developer mode (top right)
  3. Click Load unpacked
  4. Pick the extension/ folder of this repo
  5. Pin the Kami Subs action button to your toolbar

The extension ID is pinned to cbahglicegngghebkgnegbbgbpfdncka via the manifest key, so it stays stable across reloads.

3. Register the Native Messaging host (one-time)

This lets the extension auto-start the backend when you click Start.

powershell -ExecutionPolicy Bypass -File extension\native\install.ps1

That writes extension\native\com.kamisubs.host.json and registers it under HKCU\Software\Google\Chrome\NativeMessagingHosts\com.kamisubs.host (plus the Edge equivalent). No admin needed — current-user registry only.

To remove, run uninstall.ps1 from the same folder.


Use

  1. Open a tab with a video
  2. Click the Kami Subs icon → pick model + device → Start
  3. Backend boots in the background, popup shows Backend: up (pid …)
  4. Subtitles appear over the video within a chunk or two
  5. Hit Stop when done — backend is killed automatically

Skip step 3 (Native Messaging install) if you prefer manual control — just run python server.py in backend/ yourself. The popup will say Backend: native host missing but capture still works.


Settings (popup)

Field Default Notes
Source language Auto detect Set explicitly to skip Whisper's lang detection
Target language Arabic Translation target
Whisper model small tiny for speed, large-v3 for quality (GPU only realistically)
Device GPU (CUDA) cpu if you don't have an NVIDIA GPU
Font size 28px Slider 14–56
Position Bottom Bottom / Top
Backend URL ws://127.0.0.1:8765/ws Change if running the backend remotely

Env vars (backend)

Set these before running server.py manually if you want to override defaults. The Native Messaging launcher reads them from the popup settings, so these only matter if you start the backend yourself.

Var Default Options
KAMI_MODEL small tiny, base, small, medium, large-v3
KAMI_DEVICE cpu cpu, cuda
KAMI_COMPUTE int8 int8 (CPU), float16 (GPU), int8_float16 (low VRAM GPU)
KAMI_TRANSLATOR google google (deep-translator), none
KAMI_HOST 127.0.0.1 bind host
KAMI_PORT 8765 bind port
KAMI_VAD false Enable Silero VAD pre-filtering

Troubleshooting

Backend: native host missing — run install.ps1 The Native Messaging host isn't registered. Re-run extension\native\install.ps1. If you previously installed it, check that the registry key HKCU\Software\Google\Chrome\NativeMessagingHosts\com.kamisubs.host points to the right path.

cublas64_12.dll not found or cudnn64_9.dll not found when launching with KAMI_DEVICE=cuda The CUDA DLLs need to be in a directory Python can find. The backend tries to locate them automatically inside .venv/Lib/site-packages/nvidia/*/bin (installed as part of nvidia-cublas-cu12 / nvidia-cudnn-cu12). If you installed faster-whisper without those pip packages, install them: pip install nvidia-cublas-cu12 nvidia-cudnn-cu12.

Subtitles are delayed and getting further behind real-time Your model is bigger than your hardware can handle in real-time. Either pick a smaller model in the popup, or switch to GPU device. End-to-end latency on CPU with small is ~3-5s and grows under dense speech.

Subtitles repeat the last word over and over when the video pauses Should be fixed in current version (silence gate). If it returns, check that backend/server.py has the SILENCE_RMS constant and the _handle_chunk helper.

Nothing happens — no transcripts, no errors

  • Confirm the video is playing audio: the extension passes captured audio through, so you should hear normal sound. Silence means tab capture didn't get the audio stream.
  • DRM-protected sites (Netflix, Disney+, Shahid, most paid streamers) return silence via tabCapture because Widevine encrypts the audio. Works fine on YouTube, Twitch, free streaming sites, lectures, news.

Specified native messaging host not found. The host JSON has allowed_origins baked in for extension ID cbahglicegngghebkgnegbbgbpfdncka. If you changed the manifest key and got a different ID, edit extension/native/com.kamisubs.host.json (or the .template) to match, then re-run install.ps1.


Known limitations

  • Windows only for the auto-start launcher. The extension + backend work cross-platform, but the Native Messaging install script is PowerShell + Windows registry. Linux/macOS users can run the backend manually.
  • DRM sites are silent — fundamental tab capture limitation, not solvable from this extension.
  • Google Translate rate-limits — the free deep-translator endpoint will throttle if you burn through a lot of long videos. Argos Translate (fully offline) is on the roadmap.
  • Single tab at a time — Chrome's tabCapture only allows one active capture per extension instance.
  • ScriptProcessorNode is deprecated but works reliably in offscreen documents today.

Roadmap

  • Argos Translate offline mode (no internet needed for translation)
  • AudioWorklet replacement for ScriptProcessorNode
  • macOS / Linux Native Messaging installer
  • Bilingual mode (original + translation stacked)
  • Per-site overlay position memory
  • Whisper streaming mode (partial transcripts before chunk-end)
  • VAD-aware adaptive chunking instead of fixed 1.5s

File map

kami-subs/
├── extension/
│   ├── manifest.json
│   ├── background.js          # MV3 service worker — orchestrates everything
│   ├── offscreen.html         # required host for getUserMedia in MV3
│   ├── offscreen.js           # tab audio capture + chunking + WebSocket client
│   ├── content.js             # subtitle overlay mounted on the active video
│   ├── content.css            # overlay styling (RTL-aware)
│   ├── popup/                 # extension popup UI
│   ├── icons/                 # 16/48/128 PNG — drop your own
│   └── native/                # Native Messaging host (auto-start backend)
│       ├── launcher.bat
│       ├── launcher.py
│       ├── com.kamisubs.host.json.template
│       ├── install.ps1
│       └── uninstall.ps1
└── backend/
    ├── server.py              # FastAPI + WebSocket + whisper + translator
    ├── config.py              # env-driven runtime config
    └── requirements.txt

Contributing

PRs welcome, especially:

  • Cross-platform installers (macOS / Linux Native Messaging)
  • Argos Translate integration for fully-offline mode
  • Better resampler than the current linear-interpolation hack
  • Streaming partial transcripts

Open an issue first if you're planning anything substantial so we can align.


License

MIT — do what you want, just don't blame me if it breaks. ✨