offrecord

offrecord

Remove personal data from meeting transcripts before they reach an LLM. Fully offline.

offrecord reduces what you need to check before pasting a transcript into an LLM. It does not remove the need to check. Apache-2.0; not yet on PyPI. Read the numbers and limitations before relying on it.

Before and after

A real run on the synthetic sample that ships with the repo (every name, company and number is made up). Tier 0, rules only, no models.

offrecord redact samples/sales-call.txt --no-mapping
Original (excerpt)
Wendell Abernathy: Nice. Okay, let's jump in. So the Vellichor Media renewal is coming up on March 19, 2027.
Wendell Sandoval: Right, and honestly Vellichor is looking at the numbers pretty hard this year.
Wendell Abernathy: Understood. Last year you were at $100,000 ARR, and usage is up about 16.5%.
Wendell Sandoval: Mm-hmm.
Wendell Abernathy: We'd like to move you onto Skyquill for the same seats.
[...]
Wendell Sandoval: Okay. Between us, we might be acquired by another group before the renewal closes.
Wendell Abernathy: Oh, wow. Okay. That changes the timeline.
Wendell Sandoval: Yeah. Send the quote to bram_trevelyan@mailbox.test, or call me on 973-555-0113.
Wendell Abernathy: Got it. And should I copy Elodie Quigley?
Wendell Sandoval: Yes, Elodie runs finance now.
Redacted output (same excerpt)
# offrecord mapping=none
# speakers: A=<P1>, B=<P3>
[...]
A: Nice. Okay, let's jump in. So the <O1> renewal is coming up on <D1>.
B: Right, and honestly <N1> is looking at the numbers pretty hard this year.
A: Understood. Last year you were at $100,000 ARR, and usage is up about 16.5%. We'd like to move you onto <N2> for the same seats.
[...]
B: Okay. Between us, we might be acquired by another group before the renewal closes.
A: Oh, wow. Okay. That changes the <N3>.
B: Yeah. Send the quote to <EMAIL1>, or call me on <PH1>.
A: Got it. And should I copy <P4>?
B: Yes, <N4> runs finance now.

On the full 20-turn sample: 32 items of personal data redacted and 12 items of business context left readable but flagged for review (underlined above: figures and the acquisition remark; protect: confidential redacts those too). The default light compression took an estimated 381 → 326 tokens (14% fewer) by dropping the “Mm-hmm” backchannel and merging same-speaker turns (20 → 16). “timeline” was redacted as a possible name: for personal data, over-redaction is the preferred failure mode.

How it works

Every normalised character maps back to the original, so redactions land in the right place.

  1. normalize

    Plain text, WebVTT, SRT and Whisper-style JSON become one turn model. Spoken forms become canonical: “john at example dot com” → an email, “five five five…” → digits.

  2. redact

    Regex + validators (email, phone, card with Luhn, IP, URL, dates…), your deny-list with fuzzy and phonetic matching, name and place heuristics, and personal topics (health, family, legal). Business context (amounts, percentages, organisations, business topics) is flagged for review, or redacted too with protect: confidential. Optional NER and LLM tiers add redactions and never undo another detector’s.

  3. compress

    light (default) removes fillers, stutters and backchannel turns; medium also drops small talk and near-duplicates. Negations, decisions and numbers are never dropped, nor any placeholder.

  4. output

    Compact text with a speaker legend, or the original format. Short, consistent placeholders (<C1>, <P2>, <AMT1>) and a header carrying a random mapping id.

Install and quick start

Needs Python 3.10+. Tier 0 has no models and downloads nothing.

Install

pipx install "git+https://github.com/mohanenm/offrecord"

With the optional model tiers (NER and local LLM), then fetch the models explicitly:

pipx install "offrecord[ner,llm] @ git+https://github.com/mohanenm/offrecord"
offrecord setup models            # Tier 1
offrecord setup models --tier 2   # Tier 2

Check your machine and redact

offrecord doctor                       # Python, RAM, tiers, models, network guard
offrecord redact call.txt --no-mapping # one-way: redacted text on stdout

Reversible flow

The mapping is encrypted with a key file. Keep the key away from the mapping.

offrecord keygen                       # ~/.config/offrecord/keys/default.key
offrecord redact call.vtt -o out.txt \
    --key-file ~/.config/offrecord/keys/default.key
# ... send out.txt to an LLM, save its answer as answer.txt ...
offrecord restore answer.txt --assume-mapping \
    --mapping ~/.local/share/offrecord/mappings/<id>.ormap \
    --key-file ~/.config/offrecord/keys/default.key

LLM round trip

Copy a transcript, redact it, paste it into any chat LLM, copy the answer back, restore it.

CommandWhat it does
offrecord redact call.vtt --prompt "Summarise the decisions"Put your instruction first and tell the LLM to keep placeholders exactly as written, so its answer restores cleanly. The instruction is redacted too: “the QFA call” becomes “the <C1> call”.
offrecord pasteRedact whatever is on the clipboard, in place (accepts --prompt too).
offrecord unpasteRestore the LLM’s copied answer on the clipboard, using the most recent mapping.
offrecord initGuided setup of your deny-list (clients, codenames, people); used automatically afterwards.
offrecord denylist add "Quillfeather Analytics" --alias QFAAdd a name later, or denylist import clients.csv from a CRM export. Names are never printed back.

Tiers and hardware floors

Pick with offrecord redact --tier 0|1|2|auto (default 0; auto picks the highest tier your RAM and installed models allow). Higher tiers add redactions: Tier 1 catches names the rules miss, Tier 2 adds a narrow check for indirect identifiers (“the only pharmacy we serve in Alaska”). CPU only.

TierWhatFloor
0Rules only. No models, no downloads.Python 3.10+, 2 GB RAM (Raspberry Pi 4 class)
1NER ensemble (GLiNER small + BERT-NER, ONNX int8) + MiniLM embeddings4 GB RAM, CPU
2Phi-4-mini 3.8B (GGUF, llama.cpp) for indirect identifiers; Qwen3 1.7B fallback8 GB RAM, 4+ cores (fallback: 4 GB)

Models arrive only through the explicit offrecord setup command, with pinned versions and checksums, and live outside the repo.

Accuracy

PII recall is the share of names, contact details, account and card numbers, IPs, URLs and places that are fully redacted (every letter and digit). A transcript is PII-clean when none of those leaked. Business context (figures, organisations, business topics) is flagged by default; the third column counts what was redacted or flagged, and a flag only asks you to look. The validation set was written blind but has been looked at during development; the user set is harder phrasing that was never tuned on.

PII recall, PII-clean transcripts, business context redacted or flagged, and share of text redacted by tier on the validation and user sets
Validation (56) / user set (8)PII recallPII-clean transcriptsBusiness context redacted or flaggedText redacted
Tier 0 (rules)99.3% / 88.9%93% / 25%91% / 79%15% / 21%
Tier 1 (+ NER ensemble)99.8% / 90.2%98% / 25%97% / 82%17% / 24%
Tier 2 (+ Phi-4-mini)99.8% / 90.2%98% / 25%97% / 83%18% / 25%
Baseline: plain regexes14.2% / 7.2%0% / 0%

Sealed set: 80 transcripts written blind and opened once, against targets fixed beforehand. Tier 0 missed two of them: PII recall 93.4% (target 95%) and PII-clean transcripts 46% (target 65%), almost entirely because of place names (84% caught). Names, account and card numbers, SSNs, IPs and URLs were all caught. Tier 1 reached 96.4% and 65%. Place handling has since been improved on new tuning data; the next release will be scored on a fresh sealed set.

Read the PII-clean column first: in some transcripts a name or number still gets through, so you still read the output before sharing it. The user set has only 8 transcripts, so its numbers are loose (95% interval for Tier 0 PII recall: 81.4–95.2%). Tier 2 adds indirect identifiers rather than PII recall: on 15 held-back transcripts, descriptions of a person were redacted 63% of the time at Tier 0, 68% at Tier 1 and 78% at Tier 2. On Earnings-21 (44 real earnings calls, never tuned on) PII recall is 85.7% at Tier 0 and 89.8% at Tier 1.

All evaluation data is synthetic: generated conversations with invented names. It cannot capture real speech-recognition errors, real names and their spelling variety, domain jargon, cross-talk, or the clients and codenames in your deny-list. Expect real-world recall to be lower than these numbers, and review the flagged spans.

Privacy

What stays on your machine

  • Nothing leaves the machine at run time: no telemetry, no update checks, no downloads. Every command except setup blocks network access and child processes (the clipboard commands may start the clipboard helper), and fails if anything tries.
  • Transcript text is never logged or echoed; errors give positions and categories only.
  • Your deny-list config is treated as sensitive (it names clients and codenames) and is never echoed.
  • Every file offrecord writes is owner-only; outputs are atomic and never overwritten without --force.

Restore and the mapping file

  • The mapping (placeholder → original) is written only encrypted (Fernet; key from a passphrase via scrypt or from a key file via HKDF), to a private per-user store, never next to the output or the key.
  • Passphrases come from OFFRECORD_PASSPHRASE or a prompt, never the command line.
  • Output carries the mapping id; restore fails on a mismatch. For header-less LLM answers you confirm with --assume-mapping, and every placeholder is checked.
  • Ambiguous tokens are never restored. --no-mapping runs are one-way.

Full threat model: docs/security.md.

Limitations

No tool catches everything. Review the flagged spans before sharing output.

  • Tier 0 misses names that are ordinary dictionary words (“Amber”, “Art”) unless they are in your deny-list, a speaker label, or follow a cue like “my name is”. Tier 1 catches most of them.
  • Place names are Tier 0’s weakest category (84% caught on the sealed set): places that are ordinary words (“Mobile”, “Reading”) or appear without capitals and without a cue like “in” are the usual misses. Tier 1 catches about half of those.
  • Unknown organisations or products named with ordinary words are missed at Tier 0 and partly at Tier 1.
  • Higher tiers trade precision for recall and are slower (Tier 2 adds roughly 10 s per call transcript on a laptop CPU).
  • Sentences about someone’s health, family or legal situation are found by keyword (and by meaning at Tier 1); a personal sentence with none of those words can be missed, and a keyword sentence about no one in particular (“our cancer franchise grew”) is flagged rather than redacted. Business context (figures, organisations, layoffs, pricing) is flagged, not redacted, unless you set protect: confidential.
  • Relative dates (“yesterday”, “next Friday”) are not redacted.
  • aggressive compression is lossy by design (it never drops turns with placeholders, numbers, decisions or questions).
  • Python cannot wipe memory: decrypted mappings and transcript text stay in process memory until garbage collected.