whisper-to-cards

Whisper-to-Cards

Turn audio (talks, lectures, tutorials) into accessible notes + tagged, actionable flashcards (Anki). Works in GitHub Codespaces and publishes a public /demo/ page via GitHub Pages.

Live demo: https://tkhatton.github.io/whisper-to-cards/
Repo: https://github.com/TKHatton/whisper-to-cards

Quick Start (TL;DR)

  1. Put audio in inputs/ (mp3/m4a/wav).
  2. Process one file:
    scripts/run_one.sh "inputs/YourFile.mp3" "Odin :: Foundations" small
    
  3. Make a deck (pick one):
poetry run python scripts/make_decks.py --mode ds
# or
poetry run python scripts/make_decks.py --mode git
  1. (Optional) Publish demo:
scripts/publish.sh

One-Time Setup

These are already added in this repo. If anything’s missing, re-create from the chat.

chmod +x scripts/run_one.sh
chmod +x scripts/make_decks.py
# (optional) if you have publish.sh and auto_run.py:
chmod +x scripts/publish.sh

For .apkg export (optional): poetry add genanki

What the scripts do

scripts/run_one.sh <audio> "<Deck Name>" <model>

Runs ASR → segment → structure → render → bundle.

scripts/make_decks.py --mode ds|git

Builds tagged Anki decks from your run:

Automatic Mode (Drop-a-file → Runs)

Leave this watcher running in one terminal tab:

poetry run python scripts/auto_run.py

Now whenever you add/modify an audio file in inputs/, it will:

Demo Site (GitHub Pages)

Local/Codespaces: open the forwarded port URL → `/demo/`.

Public: `https://tkhatton.github.io/whisper-to-cards/demo/`

The demo iframe reads `outputs/notes.html`; buttons download PDF/CSV/APKG/ZIP.

Troubleshooting