Skip to content

pianobin/immerAnki

Repository files navigation

immerAnki

A Firefox (and Chrome) browser extension for creating Anki flashcards from Japanese audio while watching videos.

Record a short clip of a spoken Japanese sentence, get an automatic transcription and English translation, edit either field, queue the card — with the audio attached — then export everything as a single .apkg file to import into Anki.

Demo (v0.1.5):

immerAnki_demo_5.mp4

Features

  • Records audio directly from your browser tab (no separate app needed)
  • Captures a screenshot of the current tab when recording starts
  • Transcribes Japanese speech using Whisper running locally in the browser — no API key, no cost
  • Translates to English via MyMemory (free, no key required)
  • Editable transcription and translation fields before saving
  • Queues cards locally across browser sessions; exports them as a standard .apkg file
  • No AnkiConnect, no Anki plugin, no Anki needs to be open while you work
  • Works in Firefox and Chrome

Prerequisites

  • Node.js 18+
  • Anki (only needed at import time — not while recording)

Getting Started

1. Install dependencies

npm install

2. Build the extension

npm run build

This produces a dist/ folder containing the compiled extension.

3. Load the extension in Firefox

  1. Open about:debugging in Firefox
  2. Click This Firefox
  3. Click Load Temporary Add-on…
  4. Select dist/manifest.json

The extension is now active. A small immerAnki panel will appear in the bottom-right corner of every page.

4. First use

  1. Navigate to any page with a video (e.g. YouTube)
  2. Click Record in the panel
  3. Firefox will show a screen-share picker — select your current tab and enable Share tab audio (only needed once per session)
  4. Play the sentence you want to capture, then click Stop
  5. A screenshot is captured automatically when you start recording; you can see a preview in the panel and remove it if desired
  6. Wait a few seconds for transcription (the Whisper model downloads ~290 MB on first run and is then cached permanently)
  7. Edit the Japanese and English fields if needed
  8. Type a deck name (e.g. Japanese::Immersion) and click Queue Card
  9. Repeat for as many sentences as you like
  10. When ready, click Export N cards in the panel header
  11. Open Anki and go to File → Import — select the downloaded .apkg file

Development

npm run build  # one-off production build (both main + content script)
npm run watch  # watch mode for both builds (use with Option B below)
npm run lint   # web-ext lint against the dist/ folder

Running the extension locally

Start both build watchers:

npm run watch

Then in Firefox:

  1. Go to about:debuggingThis FirefoxLoad Temporary Add-on…
  2. Select dist/manifest.json

The extension stays loaded until Firefox is closed. After each rebuild, click Reload next to the extension in about:debugging to pick up the changes.

About

Browser extension to convert Japanese audio clips into Anki flashcards

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages