Skip to content

xDarkzx/The-Rosetta-Engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Rosetta Engine

Decode the language of the pharaohs — hear it spoken aloud.

An AI-powered Ancient Egyptian hieroglyph explorer that lets you browse, translate, and hear the language of the Nile. Drag glyphs onto a cartouche board, type English to get hieroglyphs, discover lost words, and listen to reconstructed Egyptian pronunciation through neural voice synthesis.


Features

  • Hieroglyph Explorer — Browse 700+ hieroglyphs from the Gardiner Sign List, filtered by category and type (uniliteral, biliteral, triliteral, determinative, ideogram)
  • Cartouche Board — Drag and drop glyphs to compose words and phrases, reorder with drag, see live transliteration
  • English-to-Hieroglyph Translation — Type English words or phrases and get hieroglyphic translations with AI assistance
  • Voice Synthesis — Hear reconstructed Ancient Egyptian pronunciation via XTTS v2 neural text-to-speech with a Coptic-trained reference voice
  • Lost Words Engine — AI-powered discovery of unattested Egyptian words by analyzing Afro-Asiatic language patterns
  • Semitic Vocalization — Reconstructs missing vowels using comparative Semitic linguistics (Arabic, Hebrew, Akkadian cognates)
  • Random Word & Sentence Discovery — Explore 200+ Egyptian words and 90+ sentence templates spanning spells, prayers, royal decrees, love poetry, and medical texts
  • Phoneme Engine — Converts transliterated Egyptian into speakable pronunciation using linguistic reconstruction rules
  • Dark Egyptian Theme — Gold-on-dark UI with hieroglyph fonts, glow effects, and cartouche styling

Tech Stack

Python FastAPI React Vite TailwindCSS

Layer Technology
Frontend React 19, Vite 6, Tailwind CSS 3.4
Backend Python 3.11+, FastAPI, Uvicorn
Voice Coqui XTTS v2 (neural TTS, GPU accelerated)
AI Ollama (local LLM for translation & lost words)
Data Gardiner Sign List, TLA Corpus (5,030 lemmas)
Font Noto Sans Egyptian Hieroglyphs (Google Fonts)

Screenshots

Screenshots coming soon — run the app to see it in action!

Quick Start

One-Click (Windows)

Double-click start.bat — launches both servers and opens the browser.

Manual Setup

Prerequisites: Python 3.11+, Node.js 18+, Ollama (optional, for AI features)

Backend:

cd backend
python -m venv venv
venv\Scripts\activate                   # Windows
# source venv/bin/activate              # macOS/Linux
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
pip install -r requirements.txt
python main.py                          # Starts on port 8042

XTTS v2 model loads in the background (~30s, first run downloads ~1.8GB).

Frontend:

cd frontend
npm install
npm run dev                             # Starts on port 5173

Open http://localhost:5173 in your browser.

Voice Reference

Place a .wav file in backend/audio/reference/ for voice cloning. XTTS v2 clones that voice for all generated speech. Coptic and deep male reference voices are included.

Architecture

┌─────────────────────────────────────────────────┐
│                   Browser                        │
│  React 19 + Tailwind + Noto Egyptian Hieroglyphs │
│  ┌───────────┐ ┌──────────┐ ┌────────────────┐  │
│  │SymbolGrid │ │Cartouche │ │  MeaningPanel   │  │
│  │           │→│  Board   │→│  + AudioPlayer  │  │
│  └───────────┘ └──────────┘ └────────────────┘  │
└───────────────────────┬─────────────────────────┘
                        │ REST API
┌───────────────────────┴─────────────────────────┐
│              FastAPI Backend (:8042)              │
│  ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │
│  │ /glyphs  │ │/translate│ │     /speak       │ │
│  │ /words   │ │  + LLM   │ │   XTTS v2 TTS   │ │
│  └────┬─────┘ └────┬─────┘ └───────┬──────────┘ │
│       │            │               │             │
│  ┌────┴────┐  ┌────┴──────┐  ┌────┴───────────┐ │
│  │Gardiner │  │ Translator│  │  Phoneme Engine │ │
│  │  Signs  │  │ Lost Words│  │  Semitic Vocal. │ │
│  │TLA Data │  │  Ollama   │  │  Coptic Ref WAV │ │
│  └─────────┘  └───────────┘  └─────────────────┘ │
└──────────────────────────────────────────────────┘

How the AI Features Work

Lost Words Engine

Discovers plausible but unattested Egyptian words by:

  1. Analyzing patterns in the 5,030-lemma TLA corpus
  2. Applying Afro-Asiatic root morphology rules
  3. Using a local LLM to validate semantic plausibility
  4. Generating pronunciation via the phoneme engine

Semitic Vocalization

Ancient Egyptian was written without vowels. The vocalization engine reconstructs them by:

  1. Comparing Egyptian roots against cognates in Arabic, Hebrew, and Akkadian
  2. Applying known vowel-pattern rules from Coptic (the last stage of Egyptian)
  3. Using stress patterns from comparative Afro-Asiatic linguistics

Voice Synthesis

Pronunciation is generated through:

  1. The phoneme engine converts transliterated Egyptian into IPA-like phonemes
  2. XTTS v2 neural TTS synthesizes speech using a Coptic-trained reference voice
  3. Output is served as WAV audio for in-browser playback
  4. Conditioning latents are cached for instant repeat generation

Credits

  • Thesaurus Linguae Aegyptiae (TLA) — Berlin-Brandenburg Academy of Sciences, 5,030 lemma corpus
  • Gardiner Sign List — Sir Alan Gardiner's classification of Egyptian hieroglyphs
  • Coqui XTTS v2 — Neural text-to-speech model
  • Noto Sans Egyptian Hieroglyphs — Google Fonts
  • Ollama — Local LLM inference

License

Apache License 2.0 — see LICENSE for details.

About

An AI-powered Ancient Egyptian hieroglyph explorer that lets you browse, translate, and *hear* the language of the Nile. Drag glyphs onto a cartouche board, type English to get hieroglyphs, discover lost words, and listen to reconstructed Egyptian pronunciation through neural voice synthesis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors