Skip to main content

Amun — a Breath–Computer Interface. Pilot a falcon with your breath. No electrodes. Just air.

Project description

Amun — a Breath–Computer Interface

𓅃 Amun — a Breath–Computer Interface

Same acronym. No electrodes. Just air.

Pilot the falcon of Horus across the Egyptian sky using nothing but your breath. Soft breath glides · a hard exhale climbs · silence dives into gravity.

Amun gameplay

A ground-up reimagining of CoffeeIsAllYouNeed/Invisible-Driver. The original was a Brain–Computer Interface — drive a car with EEG brain waves through an Arduino, electrodes and a clustering model. Amun keeps the exact acronym and changes the principle: here BCI means Breath–Computer Interface. The signal source becomes the microphone every device already has — no electrodes, no Arduino, fully offline.

Why this is "the same idea, but better"

Invisible-Driver (original) Amun (this repo)
Principle Brain waves (EEG) Breath (acoustic) — and optionally brain, see below
Hardware Arduino + BioAmp + gel electrodes None — any microphone
Acronym Brain–Computer Interface Breath–Computer Interface
Game drive a racing car fly the falcon of Horus over Egypt
Dependencies Python ML stack + serial zero for the core game
Runs offline partly 100% offline

The science still lives in Python — a real ingestion → preprocessing → features → classify → engine pipeline with k-means calibration — but the microphone moves into the browser, so the whole thing runs with no third-party dependencies.

Quickstart

git clone https://github.com/Lord1Egypt/Amun
cd Amun
python -m amun           # opens the game in your browser

Allow the microphone and breathe. No microphone? Press and hold SPACE.

Headless / no browser (great for a quick check or CI):

python -m amun --source sim --duration 5 --no-input

How the breath becomes flight

microphone ─▶ ingestion ─▶ preprocessing ─▶ features ─▶ classify ─▶ engine ─▶ render
 (browser)    loudness      noise-floor +     RMS /      k-means      falcon    canvas
              frames        EMA smoothing     ZCR        anchors      physics
  • Silence → no thrust → gravity → the falcon dives.
  • Soft breath → partial thrust → the falcon glides level.
  • Hard exhale → full thrust → the falcon climbs.

Deep dive: docs/ARCHITECTURE.md · docs/SIGNAL_PIPELINE.md · docs/CALIBRATION.md.

Optional hardware (it works without any)

Amun is "the hidden one" — it accepts any invisible signal, but always falls back to the microphone if no hardware is present.

Tier Input What you need
0 · default breath via browser mic nothing
1 · DIY the Amun Amulet — breath sensor + OLED + RGB + buzzer Arduino/ESP32 + parts
2 · Brain a NeuroSky MindWave (real EEG attention) the headset
amun --source serial   --serial-port /dev/rfcomm0   # Amun Amulet (breath)
amun --source neurosky --serial-port /dev/rfcomm0   # NeuroSky (brain)
# if the device isn't found, Amun automatically uses the browser mic

Tier 2 brings the original "control with your mind" idea back as a bonus — so Amun is a superset of Invisible-Driver. Full build, BOM and wiring: docs/HARDWARE.md.

Project layout

src/amun/      engine · ingestion · preprocessing · features · classify · calibrate · server · thinkgear
src/amun/templates/  the browser game (Web Audio mic + canvas renderer)
model/         your calibration profile (JSON)
tools/         sample data · demo-gif · banner/logo · Gemini asset gen · test runner
tests/         pytest suite (engine · features · classify · websocket · server · thinkgear)
notebooks/     breath-signal exploration + honest clustering metric
docs/          architecture & guides     hardware/  Amun Amulet sketch + BOM

Tests

pip install -e ".[dev]"
python tools/test_all.py        # data + calibration + headless run + pytest (exit 0)

See TESTING.md. Everything runs with no microphone and no hardware.

Honesty note

All performance/quality numbers (e.g. the calibration silhouette score) are measured on bundled, reproducible data — never invented. Your own calibration produces a score for your microphone and breathing.

Status

Live build log: CHECKPOINTS.md.

License

MIT © 2026 Mohamed Mounir (Lord1Egypt)

Amun

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

amun_bci-1.0.0.tar.gz (38.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

amun_bci-1.0.0-py3-none-any.whl (34.9 kB view details)

Uploaded Python 3

File details

Details for the file amun_bci-1.0.0.tar.gz.

File metadata

  • Download URL: amun_bci-1.0.0.tar.gz
  • Upload date:
  • Size: 38.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for amun_bci-1.0.0.tar.gz
Algorithm Hash digest
SHA256 21ce49fa826f4d292a52a5703467860d02b080522c4481d71de49528f2879dc7
MD5 19b71c50420f0d9b15785382db9f054c
BLAKE2b-256 96c1f2f0c389d8da4028034e0e5190ddda5bdffdf0122353f12e6905a60e948b

See more details on using hashes here.

File details

Details for the file amun_bci-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: amun_bci-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 34.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for amun_bci-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 223b0077a131151468caf09588b7018a1afa4b2e911c79e5b076533a8bf1a34a
MD5 156f5ac02ee577d87492114c8d73ffb5
BLAKE2b-256 7a1e5d6caed95a9ec589b62e9a68be0654376f856d56b16199e1d7ecb850c255

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page