Overview
SacredTexts AI is a progressive web application (PWA) that leverages artificial intelligence to analyse and visualise the connections among the sacred texts of the world's major religious traditions.
The application combines modern machine-learning technologies with interactive visualisations and data sonification to provide a unique tool for the comparative study of religions, accessible to researchers and enthusiasts alike.
Advanced AI Analysis
Uses Google Gemini to extract themes, concepts and cross-references from sacred texts.
Graph Visualisation
Interactive representation of concept connections with physics-based simulation.
Export
Export to JSON-LD and RDF/Turtle for interoperability with research tools.
Installable PWA
Installable as a native app on any device, with offline support for browsing history.
Accessibility
Designed with accessibility in mind, including screen-reader support and keyboard navigation.
Getting Started
Initial Setup
Analysis ready to use
The analysis uses Gemini through the app's server, which holds a key of its own, so you can start right away. If you prefer to use your own quota, create a free key on Google AI Studio and enter it in the settings.
Configure the Application
From the gear icon (⚙️) in the top bar you choose the model, enter the optional personal key and, on a computer, switch to the local Ollama engine.
Select a Text
Choose a sample text from the dropdown menu or paste a passage from any sacred text directly into the text field.
Run the Analysis
Click the "Analyse with AI" button and wait for the artificial intelligence to process the text. The results will appear in the graph and in the side panel.
Enable Audio (Optional)
Click the volume button in the graph header to activate sonification. The numbered button sets the density of the soundscape (1 sparse, 2 medium, 3 dense).
💡 Tip
Install the application as a PWA for a better experience! On Chrome, click the install icon in the address bar.
Features
Main Interface
The interface is divided into three main panels:
- Input Panel (left): Area for selecting or entering the sacred text to analyse, with tradition filters and preloaded sample texts.
- Connection Graph (centre): Interactive visualisation showing the hierarchical structure of concepts extracted from the text, with integrated audio controls, generative audio synchronized to graph nodes and audio interaction through node clicking, hovering and dragging.
- Detailed Analysis (right): Text panel with source and author identification, themes, in-depth historical context, keywords, AI research leads and export options.
Navigation Bar
- History (🕐): Access previously saved analyses stored locally.
- Guide (📖): This complete documentation.
- Settings (⚙️): Configure API key and advanced options.
Graph Controls
- Replay (▶): Replays the cinematic graph construction, revisiting each node in sequence.
- Zoom (+/-): Zoom in or out of the visualisation.
- Reset View: Return to the initial position.
- AI Confidence (👁): Activates the X-Ray mode that displays node opacity proportional to the AI model's confidence.
- Audio On/Off (🔊): Enable/disable sonification.
- Sound density: The numbered button sets how dense the soundscape is (1 sparse, 2 medium, 3 dense). The sound signature follows the tradition of the text.
History and Favourites
Every analysis is automatically saved in the local history. You can:
- Search past analyses by keyword
- Mark analyses as favourites to find them easily
- Reload a previous analysis with a single click
- Export in various formats (JSON, JSON-LD, RDF/Turtle)
Connection Graph
The graph is an interactive visual representation of the semantic structure of the analysed text. It uses a physics-based simulation algorithm to position nodes organically.
Hierarchical Structure
The graph features three levels of nodes:
- Central Node (Source): Represents the analysed text. It is the focal point from which all themes branch out.
- Thematic Clusters: Groupings of related concepts, colour-coded by category (theology, ethics, mysticism, practice).
- Child Nodes (Children): Specific concepts extracted from the text, linked to their parent cluster.
Interactions
| Action | How to |
|---|---|
| Zoom | Mouse wheel or + / - buttons |
| Pan (move view) | Click and drag on the background |
| Move a node | Click on the node and drag |
| View node details | Quick click on the node (without dragging) |
| Hover info | Hover over a node to see the tooltip |
| Reset view | Reset button in the toolbar |
Node Details Sidebar
Clicking on a node opens a sidebar that displays:
- Name and Category: Colour-coded badge with the concept's category
- Quotation: The original text associated with the node
- Child Nodes: Clickable list of connected sub-concepts
- Cross-References: Links to other texts or traditions
- Actions: Copy quotation, focus on the node in the graph
Colour Coding
Theology
Concepts relating to the divine nature, doctrines and fundamental beliefs.
Ethics
Moral precepts, rules of conduct and justice.
Mysticism
Spiritual experiences, contemplation and union with the divine.
Practice
Rituals, prayers, daily practices and observances.
Further Reading
For a detailed explanation of how the AI prompt, the validation pipeline and the graph's physics parameters work, see the Behind the Scenes page.
Audio Sonification
SacredTexts AI accompanies the graph with a generative soundscape. Each tradition has its own sound signature, made of a source (a voice, a string, a bell), a gesture in time and an acoustic space. The signatures are built entirely by synthesis and are inspired by a way of playing. Liturgy and recorded repertoire stay with the communities they belong to.
How to enable audio
- Audio starts together with the graph when the analysis ends. The 🎵 button in the graph toolbar turns it off and on
- The numbered button next to it sets the density of the soundscape (1 sparse, 2 medium, 3 dense)
- The info bar below the controls shows the current profile, the mode, the voices and the space
The sound signatures
| Tradition | Profile | What you hear |
|---|---|---|
| ✝️ Christianity | Latin chant on the organ | Plainchant melodies (intonation, sustained reciting tone, melismas, cadence on the final) played on a singing organ stop, open fifth at cadences, bell toll, cathedral acoustics |
| ☦️ Orthodox Christianity | Byzantine chant with ison | Choir over a vocal drone, melismatic line, stone church |
| ✡️ Judaism | Cantillation | Solo voice, short tropes with grace notes and narrow vibrato, Ahava Rabbah mode, intimate hall. The shofar marks the central node |
| ☪️ Islam | Arabic instrumental profile | Solo ney in Hijaz mode: held note, quick melisma, a pause in which the dome is heard. Some phrases stretch out as in a taqsim, rising to a peak, taking a breath and descending to the resting note |
| ☪️ Sufism | Sufi profile | Ney, frame drum in a slow ostinato, drone |
| 🕉 Hinduism | Alap in Bhairav | Plucked tanpura with its bridge buzz, plucked string with glides (meend) and slow oscillations (andolan) |
| ☸️ Buddhism | East Asian ritual | Chanted sections alternating with sections of bells alone, the large bell marking the change |
| ☯️ Taoism | Silk string | Guqin: a few plucked notes, a glide on the decaying sound, harmonics, long silences |
| 🌐 Other traditions | Abstract sonification | A breathing synth pad and tuned percussion tied to the graph structure |
Each profile declares a limited scope. "Silk string" is inspired by the guqin, the scholars' zither, and is distinct from Taoist liturgy. The Islamic profile is instrumental and leaves Quranic recitation to its own context.
Graph and sound
- Central node. When it appears the profile's signal sounds: the bell, the shofar, the large bowl bell, the stone chime
- Themes and concepts. A theme starts a short cell, a concept a note or a stroke. The vertical position of the node sets the pitch, the horizontal one the stereo position, the category (theology, ethics, mysticism, practice) shifts register and duration
- Click and hover. A click plays an accented gesture, hovering a softer note
- Dragging. Towards the sides the sound darkens, upwards the space grows. On release everything returns to the profile
- Related traditions. When the analysis documents a relation with another tradition, its signal appears now and then in the distance
How the tradition is chosen
For a text taken from the database, the database tradition applies. For a pasted text, the tradition recognised by the analysis applies, first from the closed-list field and then from the full name. The interface filter steps in when the other sources are silent.
💡 Tip
The signatures live on details (the breath of the ney, the buzz of the tanpura, the cathedral tail): headphones reveal them better. On iPhone, audio follows the ring/silent switch.
Data Export
SacredTexts AI supports exporting analyses in standard formats for interoperability with academic research tools and linked data.
Available Formats
JSON
Native application format. Contains all analysis data in a structured format.
JSON-LD
JSON for Linked Data. Uses Schema.org and Dublin Core vocabulary for maximum interoperability.
RDF/Turtle
RDF format in Turtle syntax. Ideal for import into triple stores and SPARQL endpoints.
How to Export
- Run an analysis or load one from history
- In the "Detailed Analysis" panel, click the Export button
- Select the desired format from the dropdown menu
- The file will be downloaded automatically
Semantic Vocabulary
The JSON-LD and RDF formats use the following vocabularies:
- Schema.org: Primary vocabulary for entities and relationships
- Dublin Core (dcterms): Bibliographic metadata
- SKOS: Concepts and thematic relationships
- stai: Custom namespace for app-specific properties
Academic Use
The JSON-LD and RDF formats comply with Semantic Web standards and can be imported into tools such as Protege, Apache Jena, or published as Linked Open Data.
Detailed Analysis
The Detailed Analysis panel presents AI processing results in a structured textual format. The analysis engine supports two user-selectable Google Gemini models, Gemini 3.5 Flash-Lite (default, fast and cost-effective) and 3.6 Flash, each with its own usage limits. The model is selected from Settings (≅). Each model has an independent API quota.
Analysis Sections
- Text Source: Dynamic header that identifies the analysed text, displaying title, author (when recognised by the AI), religious tradition with emoji and section/chapter. It updates automatically with each analysis.
- Main Themes: The macro-themes identified in the text, each with a brief description and importance level.
- Historical-Cultural Context: In-depth analysis with 9 structured fields: historical period, socio-cultural environment, author, original audience, literary genre, significance within the tradition, received influences, cultural impact and interpretive currents.
- Keywords: Significant terms extracted from the text with their meaning in the religious context.
- Research Leads: Epistemological questions generated by the AI based on tensions, paradoxes and inter-tradition connections found in the text. Clickable to copy or re-analyse.
⚠️ Important Note
The analysis is generated by an AI model and may contain inaccuracies or interpretations not academically validated. It is recommended to verify the information with scholarly sources for research use. The AI may reflect biases present in its training data.
AI Transparency
To view the exact prompt sent to the AI, model comparisons and the text curation methodology, visit Behind the Scenes.
Audio - how it is built
The audio engine (version 5) lives in js/audio/ and is written in JavaScript on the browser's Web Audio API alone.
tradition.jsmaps the tradition name to a canonical keyprofiles.jsdescribes each profile: declared scope, mode in cents, voices, spacegrammars.jsgenerates the phrases (psalm tone, tropes, melisma and pause, alap, chanting, pluck and silence) with seeded randomnessvoices.jsholds the synthesised voices: sung voices on a source-filter model, physically modelled strings, additive organ, modal-synthesis bells, shofar, ney, frame drumstring-worklet.jsis a physical model of a plucked string (extended Karplus-Strong) for tanpura, the string with meend and the guqin, with an automatic fallback where AudioWorklet is missingengine.jsschedules everything on the audio clock six seconds ahead, so the music holds even with the tab in the background. On phones and tablets, after the screen turns off or a call comes in, the audio resumes by itself with a new phrase, or asks for a tap on the screen
Each voice has its own stereo position and a send to the profile's reverb (a synthetic impulse response with pre-delay
and high-frequency damping). The same code runs in an offline audio context: scripts/audio-lab/ renders the profiles
in a few seconds and measures their levels, spectrum and recognisability.
Supported Traditions
SacredTexts AI includes sample texts from eight major world religious traditions. You can also analyse texts from any tradition by entering them manually.
Included Sample Texts
- Bible and Christian Tradition: Genesis, Psalms, Gospels (John, Matthew, Luke), Pauline Epistles, Revelation, Church Fathers (Augustine, Benedict), Mystics (Francis, John of the Cross, Teresa of Avila, Meister Eckhart), Desert Fathers, Pseudo-Dionysius
- Quran: Surah Al-Fatiha, Verse of Light
- Torah/Jewish Tradition: Shema Israel, Psalm 137
- Hinduism: Gayatri Mantra, Shanti Mantra
- Buddhism: Dhammapada
- Taoism: Tao Te Ching
- Sufism: Rumi (Masnavi)
- Orthodoxy: Jesus Prayer (Philokalia)
⚠️ Disclaimer
The texts in the database are provided for educational and informational purposes. All translations are drawn from recognized academic editions: NRSV (1989) for biblical texts, and established scholarly translations for other traditions (Chadwick/Oxford, Kavanaugh & Rodriguez/ICS, Vannini/Adelphi, Abdel Haleem/Oxford, D.C. Lau/Penguin, etc.). Each text includes full metadata with translator, publisher and publication year. For academic or research use, it is still recommended to verify the texts against the original critical editions (Nestle-Aland, BHS, Sources Chrétiennes, etc.).
Sources and Verification
For detailed information on translation sources, critical reference editions and the AI-assisted curation process, see Behind the Scenes - Text Selection and Translation.
Settings
Personal Google Gemini key (optional)
The analysis works with the app's key, held on the server. A personal key is for those who want to use their own quota, and the app's server uses it in place of its own. For security reasons it stays only in the current browser session and must be re-entered when the application is reopened.
⚠️ Security
Never share your personal key. If you suspect it has been compromised, regenerate it immediately from Google AI Studio.
Comparative Study Mode
This option relaxes the AI safety filters to allow the analysis of religious texts that might otherwise be blocked (e.g. controversial passages, apocryphal texts, cross-tradition comparisons).
Note: This mode is intended exclusively for academic and comparative study of religions. The user is responsible for appropriate use.
Automatic Updates
The application automatically checks for new version availability. When an update is detected, a prompt will appear to reload the page and obtain the latest features.
Roadmap
SacredTexts AI is under continuous development. Here is the feature status overview:
Completed in v2.30.0
Sound-signature audio engine (v2.30.0)
A sound signature for each tradition with dedicated voices, gesture grammars, physically modelled strings and its own acoustic space. A single audio mode with three densities, native Web Audio.
Completed in v2.2.0
Data Sonification
Generative audio engine with one sound signature per tradition, on native Web Audio and synced to the graph.
JSON-LD/RDF Export
Export in Semantic Web standard formats for academic interoperability.
Node Details Sidebar
Side panel with complete information, navigation and actions on graph nodes.
Cache Busting System
Automatic updates with new version detection and reload prompt.
Completed in v2.9.16
"Behind the Scenes" Page
New interactive page with 7 sections: text inventory with critical sources, AI prompt anatomy, graph mechanism, AI model comparison, tools and timeline, prompt playground, credits and methodology.
Translation Metadata in Texts
Added metadata field to all 48 sacred texts with Italian translation source, critical edition in original language and academic notes.
Integrated Navigation
New "Behind the Scenes" button in the navbar, link in the Info modal and cross-references in the user guide.
AI Research Leads
Automatic generation of epistemological questions based on text analysis. Click to copy, double-click to re-analyse.
AI Confidence (X-Ray Mode)
Visualisation of AI model certainty: opacity proportional to confidence, dashed borders for low values, colour-coded percentage badge.
Cache and Update Management
Styled update banner, buttons for update checks and cache clearing in settings, complete SKIP_WAITING flow.
Dynamic Source Header
Automatic identification of the analysed text with title, author, tradition and emoji in the results panel.
Generative Audio Engine with Node Interaction
Full generative audio engine with 5 presets, tradition-specific scales and melodic fragments, FM drone, node click/hover/drag interaction and audio info bar.
AI Model Selector
Selector with 2 Gemini models (3.5 Flash-Lite, 3.6 Flash). Default Gemini 3.5 Flash-Lite. Each model has an independent API quota.
Welcome Splash with Version and Update Check
Welcome screen at launch displaying the current version and automatic update availability check.
429 Retry Fix with Exponential Backoff
Intelligent handling of rate limiting errors (HTTP 429) with an exponential backoff retry strategy to ensure API call stability.
Planned
AI Disclaimer and Validation
"Not academically validated" badge on results with explanatory tooltip.
Academic Presentation Mode
Layout optimised for projection with enlarged fonts, simplified controls and slide export.
Tradition-Specific Generative Audio
7 authentic musical scales (Ionian, Ahava Rabbah, Maqam Hijaz, Raga Bhairav, Pentatonic, Chinese Gong, Natural Minor), 35 melodic fragments per tradition, tradition-specific parameter modifiers (register, tempo, drone, reverb, filter). Automatic tradition detection from dropdown or AI analysis.
Immersive Graph Animations
Slower and smoother node movements with recalibrated physics (damping 0.92, halved velocity). Camera transitions 1800ms with ease-in-out-quart easing. Slowed node pulsation for a “breathing” effect.
Textual Variant Comparison
Different translations of the same passage with difference highlighting and philological notes.
Intertextuality Visualisation
Connections between texts from different traditions with a multi-tradition graph and connection type filters.