Skip to main content

🎙️ VoiceVeritas

Detect whether an interview answer is being read from a script — or genuinely spoken.

CI PyPI License: Apache-2.0 Python 3.10+ Code style: ruff

Audio-only read-speech detection for AI interview anti-cheating. Try the live demo → · English speech, uploads not stored.

vv predict output

English | 简体中文


Why

Online interviews are increasingly vulnerable to a simple cheat: the candidate reads a prepared answer (or a ChatGPT-generated one) off-screen. Human reviewers struggle to tell scripted from spontaneous speech reliably — but the acoustic signatures differ measurably.

VoiceVeritas is an open-source, audio-only system that takes an interview answer recording and returns

P(read | audio) ∈ [0, 1]   —   the probability the audio was read/recited

plus per-segment scores, confidence, and (for the interpretable baseline) the prosodic cues that drove the decision.

📌 State of research — the approach follows the SLT 2024 paper Classification of Spontaneous and Scripted Speech for Multilingual Audio: frozen pretrained speech-transformer embeddings + a light classifier beat handcrafted prosodic features. To our knowledge, no open-source implementation of interview read-speech detection existed before this project.

🌐 Scope: English speech. The project targets English interview audio only — by design, not by omission. Speech-style cues (pause rhythm, F0 dynamics, disfluency patterns) are language-specific; extending to other languages requires native spontaneous+read corpora per language, not just machine translation of docs. PRs for new languages are welcome following data.md.

Results

⚠️ Known limitations — read before quoting any number below. The benchmark is cross-domain (LibriSpeech audiobook read vs AMI meeting spontaneous) and small (65 test utterances from unseen speakers). Real interview audio sits between those domains: treat these numbers as an upper bound, recalibrate on your own traffic, and expect degradation below ~15 dB SNR. Details: benchmark.md · robustness.md.

Speaker-disjoint benchmark (LibriSpeech read vs AMI spontaneous, 65 test utterances from unseen speakers; full details & caveats in benchmark.md):

Model Test AUC-ROC EER FPR@TPR95
Track A · prosody + LightGBM (interpretable) 0.978 4% 4%
Track A · + noise-aware augmentation (default) 0.998 4% 4%
Track A+ASR · + lexical/alignment features ([asr] extra) 0.998 5% 0%
Track B · frozen wav2vec2-base + MLP 1.000 0% 0%
Ensemble · median(prosody-aug, wav2vec-aug) 0.997 7.5% 4%

Noise-robustness (white noise 10 dB): Track A 0.644 → 0.965 with augmentation; Track B's white-noise inversion (0.137) fixed to 0.998; the robust ensemble holds 0.994. Every prediction carries an estimated_snr_db and a below-15 dB reliability warning. Latency (Track A API, 10 s audio, CPU-only): p50 243 ms end-to-end.

$ vv predict runs/<run>/model.joblib answer.wav
model             : prosody_lgbm
P(read)           : 0.000
verdict@0.5       : SPONTANEOUS
top contributors :
  speechseg_mean     -0.832   ← long speech runs = spontaneous planning
  pause_total_ratio  -0.776   ← natural pause structure

⚠️ These are cross-domain research numbers — recalibrate on your own traffic before any operational use (ethics). Neither track survives ≤10 dB SNR — see the robustness report before deploying.

Architecture

flowchart LR
    A["Audio (.wav .mp3 .m4a)"] --> B["Preprocess\n16 kHz mono"]
    B --> C["Track A · Prosody\nVAD · F0 · Jitter/Shimmer\nPause stats · nPVI · rate"]
    B --> D["Track B · SSL backbone\nfrozen wav2vec2\nmean+std pooled embeddings"]
    C --> E["LightGBM\n+ calibration"]
    D --> F["MLP head\n(BCE)"]
    E --> G["Segment scores →\nmedian aggregation"]
    F --> G
    G --> H["P(read) · confidence\nfeature attribution"]
  • Track A (interpretable baseline): energy VAD + 34 handcrafted prosodic features (F0 statistics, jitter, shimmer, pause/silence distribution, nPVI rhythm, syllable-rate variability) → LightGBM with isotonic calibration.
  • Track B (performance): frozen self-supervised backbone (wav2vec 2.0) embeddings, chunk-level scoring, median aggregation — the SOTA recipe from the literature.
  • Metrics that respect candidates: besides AUC-ROC/AUC-PR we report EER and FPR@TPR95, because flagging a fluent honest candidate is worse than missing a subtle reader.

Quickstart

Option A — pretrained model, zero training (Track A, ~140 KB artifact):

# Python 3.10+; also works with pip/pipx, uvx, or any virtualenv
pip install voiceveritas
vv download-model                                        # fetches the pretrained artifact
vv predict "$(vv download-model)" examples/example_spontaneous.wav

Two synthetic example clips ship in examples/ so the pipeline can be exercised in seconds — real-speech benchmarks live in benchmark.md.

Option B — reproduce the full pipeline from source:

# 1. Install (Python 3.10+; uv recommended — or: pip install -e ".[api,deep]")
uv sync --extra api --extra deep

# 2. Prepare the public benchmark data (~750 MB) and train the baseline
uv run vv prepare librispeech --download
uv run vv prepare ami --download
cat data/manifests/librispeech.jsonl data/manifests/ami.jsonl > data/manifests/benchmark.jsonl
uv run vv train --config configs/baseline.yaml

# 3. Score a single file (segment scores + feature attribution)
uv run vv predict runs/<timestamp>_baseline/model.joblib answer.wav

# 4. Serve the REST API (Swagger UI at http://localhost:8000/docs)
uv run vv serve runs/<timestamp>_baseline

# 5. Stress a model under noise / telephony / resampling conditions
uv run vv robustness runs/<timestamp>_baseline --manifest data/manifests/benchmark.jsonl
API example
curl -X POST http://localhost:8000/v1/predict \
  -F "audio=@answer.wav" \
  -F "reference_text=optional (reserved, unused by audio-only models)"
{
  "read_probability": 0.87,
  "label": "read",
  "confidence": 0.72,
  "segmented_scores": [{"start_s": 0, "end_s": 25.7, "score": 0.87}],
  "processing_ms": 184,
  "model": {"name": "prosody_lgbm", "package_version": "0.1.0"}
}

Repository layout

src/voiceveritas/     core package (audio IO, VAD, features, models, training, API)
configs/              experiment configs (baseline / deep)
scripts/              benchmarking utilities, examples & asset generators
examples/             two synthetic clips for instant smoke-testing
demo/hf-space/        Hugging Face Space (Gradio) web demo — deployable as-is
docs/                 usage, data, benchmark, model card, ethics charter
tests/                unit + integration tests on synthetic fixtures

Documentation

Status & roadmap

  • Dual-track models, speaker-disjoint benchmark, CLI + FastAPI + Docker
  • Robustness suite — noise/SNR/bitrate stress tests + honest degradation report
  • Pretrained release — Track-A artifact via vv download-model + the releases page
  • ASR lexical/alignment features — fillers, pause-syntax misalignment, formality (faster-whisper; [asr] extra)
  • Noise-aware training (on by default) + SNR estimation & reliability warnings in every prediction
  • Noise-robust deep track (inversion fixed) + median ensembles (vv ensemble)
  • Character-level forced alignment (WhisperX recipe, zero extra deps) — capability shipped; benchmark evaluation exposed a coverage leak, documented and rejected
  • Noise-augmented ASR track — evaluated, negative result (see robustness.md)
  • Installable from PyPI; one-command pretrained model (vv download-model); live Gradio demo in demo/hf-space/
  • In-domain evaluation corpus (same-speaker read vs spontaneous, e.g. SBCSAE) — the honest generalization test

Contributing

Issues and PRs are welcome — see CONTRIBUTING.md. Please read the ethics charter first: this tool is built to assist fair human review, not to automate rejection.

License

Apache-2.0. Trained-model weights and manifests inherit their training-data licenses (see docs/data.md).

Citation

@software{voiceveritas2025,
  title  = {VoiceVeritas: open-source read-speech detection for interview anti-cheating},
  author = {VoiceVeritas Contributors},
  year   = {2025},
  url    = {https://github.com/StanleyChanH/VoiceVeritas}
}

Metadata

Release files for voiceveritas 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for voiceveritas 0.1.5
File Size Uploaded Provenance Actions
voiceveritas-0.1.5.tar.gz 1.3 MB With provenance Details for voiceveritas-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for voiceveritas 0.1.5
File Interpreter ABI Platform Actions
voiceveritas-0.1.5-py3-none-any.whl Python 3 none any Details for voiceveritas-0.1.5-py3-none-any.whl

Total release size: 1.4 MB

Release files / voiceveritas-0.1.5.tar.gz

Download URL voiceveritas-0.1.5.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
ea0b3dc0142d400d524b9fcfed5c0e49f2cd18eb145186e5b2e87ab0b008a7ad
BLAKE2b-256 checksum
How to use checksums
7086a003d5709ed37089ca2c3196af9a5b365722ddf4e6387a51c2f742d0942e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / voiceveritas-0.1.5-py3-none-any.whl

Download URL voiceveritas-0.1.5-py3-none-any.whl
Size 84.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f9174a64b876f132cddd86dd5df7be3cb98b3126ca0506af27371d20f6d46af
BLAKE2b-256 checksum
How to use checksums
c38bb085bc10db7fa43a7249e794640b41934bc8be8f33bd82a15c96328c85dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for voiceveritas 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for voiceveritas-0.1.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page