{
  "markdown": "<div align=\"center\">\n\n# Voice Truthgate by mosADD\n\n*(formerly VoiceCheck)*\n\n### Is this really my contact — live? Honest voice authenticity. Open-core, MIT.\n\n[![CI](https://github.com/Hei33enberg/voice-truthgate/actions/workflows/ci.yml/badge.svg)](https://github.com/Hei33enberg/voice-truthgate/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-informational.svg)](./LICENSE)\n[![npm: MCP](https://img.shields.io/npm/v/@mosadd/voice-truthgate-mcp?label=%40mosadd%2Fvoice-truthgate-mcp)](https://www.npmjs.com/package/@mosadd/voice-truthgate-mcp)\n[![Privacy: on-device](https://img.shields.io/badge/privacy-on--device-brightgreen.svg)](#privacy--on-device-by-design)\n[![Part of mosADD](https://img.shields.io/badge/part%20of-mosADD-5af082)](https://github.com/Hei33enberg/mosADD-OS)\n[![Try it live](https://img.shields.io/badge/try%20it-live-8A2BE2.svg)](https://mosadd.com/voice-truthgate)\n\nVoice authenticity that's **honest about its own limits**. It never gives you a bare\n\"REAL / FAKE\" — it gives you a **confidence signal** and a plain disclaimer, because getting\nthis wrong about a real person is harmful.\n\n**[▶ Try it live](https://mosadd.com/voice-truthgate)** &nbsp;·&nbsp;\n[How it works](https://mosadd.com/voice-truthgate/how-it-works) &nbsp;·&nbsp;\n[Model card](https://mosadd.com/model-card) &nbsp;·&nbsp;\n[API docs](./docs/VOICE-TRUTHGATE-API.md)\n\n</div>\n\n---\n\n## Why \"detect the deepfake\" is the wrong game — and what we do instead\n\nThe whole voice-AI industry races to **generate** speech; almost nobody ships an honest tool\nto tell you what's real. The naïve answer — a standalone \"is this audio AI?\" detector — is a\n**losing game**, and we have our own numbers to prove it: on modern premium TTS, our best\nsingle-clip detector measured **AUC ≈ 0.61** (barely better than a coin). Anyone selling you\n\"99% deepfake detection\" is selling snake oil.\n\nSo Voice Truthgate asks a **better, answerable** question: **\"is this really my contact,\nlive?\"** We answer it by **fusing signals**, not by guessing at a waveform:\n\n- **L0 — Identity.** *Who* is this, and are they a known human or a known agent? (An agent\n  *should* sound synthetic — that's not an alarm.)\n- **L1 — Voiceprint.** Does the voice match *this specific person's* enrolled print? Strong at\n  rejecting a **different** human (≈0% false accept in our tests, ~4.6% EER on clean speech).\n- **L2 — Acoustic.** A weak, abstain-heavy synthetic-speech signal (the on-device band below).\n- **L3 — Live rhythm.** *The un-copyable part* — see [the moat](#the-moat-fake-live-conversation-not-fake-file).\n\nEvery layer is a **signal, not a verdict**, fused with the others and shipped with a\ndisclaimer. We would rather abstain than be confidently wrong.\n\n### The honest proof: why voiceprint alone isn't enough\n\nWe ran a **targeted-clone test** on our own voiceprint engine — clone an enrolled person, then\ntry to pass as them. Result: a targeted clone was **accepted 63% of the time** at our operating\nthreshold, and **no threshold** cleanly separates \"a clone of you\" from \"you\" without also\nrejecting real callers. That's not a flaw we hide — it's *the reason the product fuses identity\n+ voiceprint + liveness instead of trusting the voice alone.* Voice is one signal. Never the\nwhole decision.\n\n---\n\n## Three ways to use it\n\n### 1. Open SDK — on-device, MIT, zero infra\n\nThe acoustic band (L2) runs **in the browser** — your audio never leaves the device.\n\n```ts\nimport { analyzeVoiceTruthgate } from \"@mosadd/voice-truthgate\";\n\n// Decode your audio to mono PCM (a Float32Array), e.g. at 16 kHz.\nconst result = await analyzeVoiceTruthgate({ samples, sampleRate: 16000 });\n\nconsole.log(result.band.label);  // \"Likely authentic\" | \"Uncertain\" | \"Likely synthetic\"\nconsole.log(result.confidence);  // 0..1 — lead with the band, not this number\nconsole.log(result.disclaimer);  // ALWAYS present — render it next to the result\n```\n\nInject your own trained model as an optional server detector — the SDK never hard-codes an\nendpoint or key, and it **fails open** (unreachable model ⇒ the on-device band still stands and\nnever silently becomes \"authentic\"):\n\n```ts\nimport { analyzeVoiceTruthgate, createHeuristicDetector, createServerDetector } from \"@mosadd/voice-truthgate\";\n\nconst server = createServerDetector({\n  analyze: async (payload) => callYourModel(payload), // → { confidence, modelVersion }\n  version: \"your-model-v1\",\n});\nconst result = await analyzeVoiceTruthgate({ samples, sampleRate: 16000 },\n  { detectors: [createHeuristicDetector(), server] });\n```\n\n> The SDK packages aren't on npm yet — clone this repo (`npm install` wires the workspaces) or\n> vendor `packages/*`. Runnable demo: **`npm run example`**, or open `examples/browser-check`.\n\n### 2. MCP tool — give any AI agent an authenticity check\n\nLive on npm. Enrol a voice and verify a call clip **from Claude, Cursor, your own fleet — any\nMCP agent**:\n\n```bash\nnpx -y @mosadd/voice-truthgate-mcp\n```\n\n```json\n{ \"mcpServers\": { \"voice-truthgate\": {\n  \"command\": \"npx\", \"args\": [\"-y\", \"@mosadd/voice-truthgate-mcp\"],\n  \"env\": { \"VTG_API_KEY\": \"vtg_live_your_key\" }\n} } }\n```\n\nTools: `voice_truthgate_enroll`, `voice_truthgate_verify`, `voice_truthgate_list_subjects`. See\n[`mcp/`](./mcp).\n\n### 3. Market API — enrol / verify from any app\n\nFor contact centres, IVRs, or any backend. Enrol the voices you protect, then verify a call\nclip against a subject → an honest banded verdict (`likely_same_person` / `likely_different_person`\n/ `inconclusive`) with a synthetic-voice caution:\n\n```bash\ncurl -X POST \"$VTG_URL\" -H \"X-API-Key: $KEY\" \\\n  -F action=verify -F subject_id=ceo -F audio=@incoming_call.wav\n```\n\nFull reference: **[docs/VOICE-TRUTHGATE-API.md](./docs/VOICE-TRUTHGATE-API.md)** · machine-readable\n**[OpenAPI spec](./docs/openapi.yaml)** (import as an OpenAI GPT Action / any tool).\n\n> **Drop it into your stack:** copy-paste recipes for **Claude, OpenAI (GPT Action + Agents SDK),\n> Vercel AI SDK, v0, and LangChain** → **[docs/USE-IN-YOUR-AGENT.md](./docs/USE-IN-YOUR-AGENT.md)**.\n> One MCP server, every ecosystem.\n\n---\n\n## The moat: fake live *conversation*, not fake *file*\n\nA live AI impersonation runs **speech → STT → LLM → TTS** — which is **half-duplex and\nturn-based**. It categorically **cannot** reply in <~300 ms, **overlap** you, **backchannel**\n(\"mhm\" while you talk), or interrupt mid-sentence. Humans in live conversation do all four\nconstantly. **We can measure this because we own the channel's millisecond, per-speaker turn\ntiming** — nobody holding only an audio file can. (In corpus analysis, *overlap rate alone*\nseparates a bot pipeline from human turn-taking almost perfectly.)\n\nThis is L3, and it's the un-copyable signal. It's held to the same honesty rail as everything\nelse: it **only fires from a profile calibrated on real labelled turn logs** — until then it\nmeasures, never accuses. That calibration is the frontier we're building toward.\n\n---\n\n## The three confidence bands (L2 acoustic)\n\n| Band | Score | What it means |\n|---|---|---|\n| 🟢 **Likely authentic** | `0.00 – 0.35` | No strong synthetic-voice signals. This does **NOT** prove the voice is real — a good deepfake can score here. |\n| 🟡 **Uncertain** | `0.35 – 0.65` | Mixed / weak signals. Inconclusive; prefer a longer, uncompressed sample + human review. |\n| 🔴 **Likely synthetic** | `0.65 – 1.00` | Signals consistent with AI-generated or cloned speech. **NOT** proof — verify with a human before acting. |\n\nEvery result carries this disclaimer, verbatim:\n\n> **This is a signal, not a verdict.** Automated voice-authenticity detection is probabilistic\n> and can be wrong in both directions. Do not use this result alone to accuse, identify, or make\n> legal/forensic decisions about a person.\n\n## Architecture (the open SDK)\n\nTwo stages, both **on-device**; an optional trained model is *injected* by the host app.\n\n```\n        ┌──────────────── your device / browser (nothing leaves it) ────────────────┐\n mic /  │  record or      decode to        STAGE 1: instant heuristic                │\n file ──┼─▶ upload  ─────▶ 16 kHz mono ───▶ (pure DSP, 0 MB, default)  ──────────────┼──▶ band\n        │                  Float32 PCM   └▶ STAGE 2: stronger model (opt-in) ─────────┼──▶  +\n        │                                   (a real classifier via transformers.js)  │    disclaimer\n        └──────────────────────────────────────────────────────────────────────────┘\n                     (optional) injected SERVER detector — your model, your transport;\n                      authoritative when it answers, FAIL-OPEN when it doesn't.\n```\n\nFusion is **band-first and fails to \"unknown\", never to \"safe\"** — nothing usable ⇒\n`available: false`, band `uncertain`, never `likely-authentic`. Deeper design:\n[docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md).\n\n## Packages\n\n| Package | Role |\n|---|---|\n| [`@mosadd/voice-truthgate`](./packages/voice-truthgate) | The brains — fuses the stages into an honest band, always attaches the disclaimer. |\n| [`@mosadd/voice-analyzer-core`](./packages/voice-analyzer-core) | Stage 1: the instant, pure-DSP on-device heuristic. |\n| [`@mosadd/detection-sdk`](./packages/detection-sdk) | Pluggable `Detector` / `Verdict` frame + fail-open `runDetectors`. |\n| [`@mosadd/threat-engine`](./packages/threat-engine) | Shared severity/scoring primitives (transitive dependency). |\n| [`@mosadd/voice-truthgate-mcp`](./mcp) | **On npm** — the MCP server (enrol/verify tools for AI agents). |\n\n## Honesty — the caveats, stated plainly\n\n- **Standalone detection is a losing game.** Our own single-clip detector measured **AUC ≈ 0.61**\n  on modern premium TTS. The product's value is **fusion + honesty**, not a magic detector.\n- **Voiceprint is foolable by a targeted clone** (~63% accepted in our test) → it's a signal to\n  *fuse*, never a standalone verdict. Great at rejecting a *different* human; weak against a\n  clone *of you*.\n- **Codec compression is the #1 accuracy killer** (Opus / MP3 / telephony, −10–40%). Prefer\n  uploaded, less-compressed clips.\n- **L3 live-rhythm is un-calibrated today** — it measures but does not accuse until fit on real\n  labelled turn logs (weight-zero-until-calibrated).\n- **Short, noisy, or distressed real speech** raises false positives; accuracy varies by language\n  and accent.\n- **npm:** the MCP server is published; the SDK packages are publish-*ready* but not yet on npm.\n- **Not for accusations, forensics, or legal decisions.** See each package's `MODEL_CARD.md`.\n\n## Privacy — on-device by design\n\nThe public checker has nowhere to send your audio: Stage 1 and the opt-in Stage 2 run locally.\nThe SDK ships **no** transport and **no** endpoint. A server model (or the market API) is\nsomething you *opt into*; the SDK sends nothing on its own. The market API holds enrolled\nvoiceprints server-side under strict access control and returns only a **signal**, never the raw\nbiometric.\n\n## Part of the mosADD ecosystem\n\nVoice Truthgate is the **authenticity / trust layer** of [mosADD](https://mosadd.com) — the\nopen comms stack for AI agents and the humans who direct them. It composes with:\n\n- **[mosADD-OS](https://github.com/Hei33enberg/mosADD-OS)** — the **comms layer**: E2EE DMs,\n  channels, web rooms, and email, all exposed as MCP tools (`npx -y @mosadd/mcp`). Your agents\n  talk and coordinate there; Voice Truthgate answers *\"is this contact really who they claim,\n  live?\"* on the same channel.\n- **[mosadd.com](https://mosadd.com)** — the product + the live checker + the in-app add-on.\n\nBoth are open, both publish under the `@mosadd/*` npm scope. (mosADD-OS is Apache-2.0; this repo\nis MIT — the public authenticity SDK stays maximally permissive.)\n\n## Roadmap\n\n- [x] Publish the MCP server to npm (`@mosadd/voice-truthgate-mcp`)\n- [ ] Publish the SDK packages to npm (`@mosadd/*`)\n- [ ] Calibrate L3 live-rhythm on real labelled turn logs (the moat — turn it from measure to trigger)\n- [ ] Threat-informed, always-fresh accuracy benchmark (per-condition numbers, no headline claim)\n- [ ] Quantize the opt-in Stage-2 model (~379 MB → ~95 MB)\n\n## Contributing\n\nIssues and PRs welcome — see [CONTRIBUTING.md](./CONTRIBUTING.md) and the\n[Code of Conduct](./CODE_OF_CONDUCT.md). **Keep the honesty rails intact** (no bare verdicts,\nkeep the disclaimer, no accuracy claims). Security: [SECURITY.md](./SECURITY.md).\n\n## License\n\n[MIT](./LICENSE) © mosADD. Third-party attributions (transformers.js, the referenced Hugging\nFace model) are in [NOTICE](./NOTICE).\n",
  "bytes": 12516,
  "sha": "cce74b2dfad58e911e58b19aff291e0a97485b6bca55bb110fc6e134e9d1bea8",
  "repo_slug": "hei33enberg/voice-truthgate",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_hei33enberg_voice_truthgate_mc_e8460c20/readme"
}