Skip to main content

Chimera

Cryptographically Irreversible, Speaker-Aware Voice Anonymisation

CI Coverage Python PyPI License: MIT Code style: black

Chimera disguises the identity of one or more speakers in any audio recording. It runs entirely on CPU, requires no cloud services, no GPU, and no pre-trained model weights. Given only the output audio and any key, no known algorithm can recover the original speaker's acoustic identity.

Wiki · Quick Start · Paper


Why Chimera?

Feature Chimera Pitch shift Neural VC
Fully local / offline :white_check_mark: :white_check_mark: :warning:
No model weights :white_check_mark: :white_check_mark: :x:
Multi-speaker, per-speaker keys :white_check_mark: :x: :x:
Automatic VAD (ignores noise) :white_check_mark: :x: :x:
Natural-sounding output :white_check_mark: :x: :white_check_mark:
Deterministic / auditable :white_check_mark: :x: :x:
Cryptographically one-way :white_check_mark: :x: :x:
Real-time microphone support :white_check_mark: :white_check_mark: GPU

How It Works

Chimera applies six processing stages to every audio input:

Input audio
    |
    v  [1] VAD -- isolates speech from noise, music, silence
    |
    v  [2] Diarization -- MFCC k-means, assigns segments to speakers
    |
    v  [3] Key Derivation -- HKDF-SHA256 per speaker -> 5 parameters
    |
    v  [4] Voice Transform (Praat LPC source-filter model)
    |       Pitch shift     via PSOLA resynthesis
    |       Formant shift   via LPC vocal-tract length scaling
    |
    v  [5] COWL -- Cryptographic One-Way Layer
    |       Sub-perceptual spectral noise (SSNI)
    |       Micro phase perturbation (MPP)
    |
    v  [6] Cross-fade stitching + level matching
    |
Output audio (mono float64, same sample rate)

All randomness is derived from the key via HKDF, making the transformation fully deterministic and fully one-way: same key -> same output; output -> original is computationally infeasible.


Installation

pip install chimera-voice

With real-time microphone support:

pip install "chimera-voice[realtime]"

From source:

git clone https://github.com/Ohswedd/chimera
cd chimera
pip install -e ".[dev]"

Quick Start

Anonymise a file

import chimera

chimera.mask_file("interview.wav", "anonymous.wav", key="my-secret", preset="strong")

Work with NumPy arrays

import chimera
import soundfile as sf

audio, sr = sf.read("interview.wav")
result = chimera.mask_array(audio, sr, key="my-secret", preset="strong")
sf.write("anonymous.wav", result.audio, sr)

Multi-speaker: independent key per speaker

result = chimera.mask_array(
    audio, sr,
    key        = "my-secret",
    preset     = "moderate",
    mode       = chimera.MaskMode.ALL_UNIQUE,   # default
    n_speakers = 3,
)
print(result.speakers_masked)    # ['SPEAKER_0', 'SPEAKER_1', 'SPEAKER_2']
print(f"Processed in {result.processing_time_s:.2f}s")

Mask only selected speakers

result = chimera.mask_array(
    audio, sr,
    key          = "my-secret",
    preset       = "strong",
    mode         = chimera.MaskMode.SELECTED,
    speaker_ids  = ["SPEAKER_0"],   # only mask speaker 0
)

Real-time microphone

from chimera.realtime import RealtimeAnonymiser

anon = RealtimeAnonymiser(key="my-secret", preset="moderate")
anon.start()
input("Recording -- press Enter to stop...")
anon.stop()
anon.save("recorded_anonymous.wav")

Streaming (generator-based)

from chimera.realtime import mask_stream

for masked_chunk in mask_stream(my_chunk_generator, sr=22050,
                                key="my-secret", preset="strong"):
    send_to_output(masked_chunk)

Inspect parameters

p = chimera.get_params("my-secret", preset="strong")
print(p.summary())

#        Chimera MaskParams
# --------------------------------------------
#   Speaker label      : (none)
#   Pitch shift        : +5.743 st
#   Formant warp       : 0.91234x
#   Spectral tilt      : -1.214 dB/kHz
#   Breathiness        : 0.0812
#   Master intensity   : 0.780
# --------------------------------------------

Presets

Preset Intensity ASV EER Use case
whisper 0.12 ~5 % Soft watermarking
subtle 0.28 ~15 % Light disguise
moderate 0.52 ~35 % Speaker unrecognisable to humans
strong 0.78 ~48 % ASV systems fail
extreme 1.00 ~50 % Maximum -- content only

Indicative Equal Error Rate against ECAPA-TDNN (VoicePrivacy 2024 protocol).


MaskMode

Mode Behaviour
MaskMode.ALL_UNIQUE Each speaker gets independent parameters (default)
MaskMode.ALL_SAME All speakers share the same transformation
MaskMode.SELECTED Only speakers listed in speaker_ids are masked

Security

Chimera is designed with three security properties:

Determinism -- F(audio, key) always returns the same output. Every bit of randomness is derived from the key via HKDF-SHA256.

One-way -- Given F(audio, key), recovering the original speaker's acoustic identity requires simultaneously inverting:

  1. Key-seeded micro phase perturbation (requires HKDF seed)
  2. Key-derived sub-perceptual noise injection (requires HMAC sub-key)
  3. Praat LPC pitch + formant transform (non-invertible without all params)

Key independence -- HKDF-SHA256 provides 128-bit second-preimage resistance. Per-speaker keys are domain-separated: key + ":chimera:spk:" + speaker_id.

Chimera is a privacy-enhancing tool, not an encryption scheme. For high-stakes deployments, combine it with access control, key rotation, and additional anonymisation measures. See the Security wiki page for the full threat model.


Supported Audio Formats

Any format supported by libsndfile: WAV, FLAC, OGG, AIFF, and more.

Supported sample rates: 8 000, 16 000, 22 050, 24 000, 44 100, 48 000 Hz.


Project Structure

chimera/
|-- chimera/              # Library source
|   |-- __init__.py       # Public API surface
|   |-- core.py           # High-level functions: mask_file, mask_array, get_params
|   |-- pipeline.py       # ChimeraPipeline -- full orchestration
|   |-- keygen.py         # HKDF-SHA256 parameter derivation
|   |-- vad.py            # Voice Activity Detector
|   |-- diarize.py        # MFCC k-means speaker diarizer
|   |-- transform.py      # Praat LPC source-filter voice transform
|   |-- irreversible.py   # Cryptographic One-Way Layer (COWL)
|   |-- realtime.py       # Real-time microphone / streaming engine
|   |-- presets.py        # Named intensity presets
|   |-- types.py          # MaskParams, ChimeraResult, MaskMode, ...
|   |-- exceptions.py     # Exception hierarchy
|   `-- py.typed          # PEP 561 marker
|-- tests/                # Full test suite
|-- examples/             # Runnable usage examples
|-- docs/                 # Documentation
|-- benchmarks/           # Performance benchmarks
|-- paper/                # Academic paper (PDF)
|-- .github/workflows/    # CI and release workflows
|-- pyproject.toml
|-- CHANGELOG.md
|-- CONTRIBUTING.md
`-- LICENSE

Development

Setup

git clone https://github.com/Ohswedd/chimera
cd chimera
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"

Run tests

pytest                         # all tests
pytest -m "not slow"           # skip slow tests
pytest --cov=chimera           # with coverage

Lint and format

black chimera tests examples
ruff check chimera tests examples
mypy chimera

Build distribution

pip install build
python -m build

Academic Paper

The full technical paper is available at paper/chimera_paper.pdf.

It covers the full threat model (A1-A4), HKDF key derivation, voice transformation layers, COWL security argument, diarization architecture, real-time latency profile, comparison with state-of-the-art, and 15 references.

Citation:

@software{chimera2026,
  title   = {Chimera: Cryptographically Irreversible Speaker-Aware Voice Anonymisation},
  author  = {Ohswedd},
  year    = {2026},
  url     = {https://github.com/Ohswedd/chimera},
  version = {0.2.0},
  license = {MIT}
}

Changelog

See CHANGELOG.md.

Contributing

See CONTRIBUTING.md.

License

MIT 2026 Ohswedd

Metadata

Release files for chimera-voice 0.2.0

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

Source distribution (sdist)

Source distribution for chimera-voice 0.2.0
File Size Uploaded
chimera_voice-0.2.0.tar.gz 77.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chimera-voice 0.2.0
File Interpreter ABI Platform
chimera_voice-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 110.4 kB

Release files / chimera_voice-0.2.0.tar.gz

Download URL chimera_voice-0.2.0.tar.gz
Size 77.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5a776a67bc3edac02c4ee7d1787b5830d847cbd8ac2253558fffb9eb1778b067
BLAKE2b-256 checksum
How to use checksums
0c952d0940e1d2d66be1edfb4004f851f8465a21018839768480ff7cd8c10308
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 12, 2026.

Transparency log

Release files / chimera_voice-0.2.0-py3-none-any.whl

Download URL chimera_voice-0.2.0-py3-none-any.whl
Size 32.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c533157a226834b2341a5dad829e3cfc91bedd6f3f32296801010dd5b7b8a79f
BLAKE2b-256 checksum
How to use checksums
18ae06136397685dfadaee7194cbd4c3afa6ca3f81fc215a285aea55253fbcf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

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