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
Obtain a Gemini API Key
Go to Google AI Studio, sign in with your Google account and create a new free API key.
Configure the Application
Click the gear icon (⚙️) in the top bar, paste your API key into the designated field and save the settings.
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. Use the preset selector to choose among 5 generative audio presets (1-5).
💡 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.
- Preset Selector: Choose among 5 generative audio presets (1-5).
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 features a generative audio engine (GenerativeAudioEngine
in generative-audio.js) powered by Tone.js. The engine is fully synchronized
to the graph visualization: nodes trigger notes as they appear, and user interactions
shape the sound in real time. Audio is disabled by default.
How to Enable Audio
- Click the volume button (🔊) in the graph header
- On the first click, the browser will request audio permission
- The button turns gold when audio is active
- Use the preset selector to choose among 5 generative audio presets
The 5 Audio Presets
1 (default)
Warm PolySynth with long release. Slow tempo, high reverb, gentle FM drone. Ideal for meditative exploration of the graph.
2
Bright FMSynth with short attack and moderate release. Crisp bell-like tones with medium reverb and subtle delay. Clear, sparkling textures.
3
Deep AMSynth in a low register. Slow tempo with heavy reverb and prominent drone. Evokes ancient, ritualistic soundscapes.
4
Warm FMSynth with vibrato. Mid register, low drone, dark filter. Enveloping and meditative timbre.
5
Percussive PolySynth with short release. Faster tempo, dry mix with minimal reverb. Energetic pulse synchronized to node activity.
Tradition-Specific Musical Scales
The generative engine automatically selects a musical scale matching the detected religious tradition. Every note produced — whether from node interactions or the background generative layer — stays within the tradition's authentic scale:
| Tradition | Scale | Notes |
|---|---|---|
| ✝️ Christianity | Ionian mode (Gregorian) | C D E F G A B |
| ✡️ Judaism | Ahava Rabbah | C Db E F G Ab B |
| ☪️ Islam | Maqam Hijaz | C Db E F G Ab Bb |
| 🕉 Hinduism | Raga Bhairav | C Db E F# G Ab B |
| ☸️ Buddhism | Pentatonic | C D F G A |
| ☯️ Taoism | Chinese pentatonic (Gong) | C D E G A |
| General / Other | Natural Minor | C D Eb F G Ab Bb |
Each tradition also applies specific parameter modifiers to the active preset: register (octave offset), tempo multiplier, drone presence and tuning, multi-note probability, reverb wet level, and filter cutoff frequency.
Node-Audio Interaction
Interactions with graph nodes produce distinct audio responses:
- Click: Triggers an accented note in the tradition's scale, with pitch and timbre determined by the node's position and category.
- Hover: Plays a subtle, quiet note — a gentle preview without full emphasis.
- Drag: Modulates audio parameters in real time — filter cutoff, reverb wet level and delay feedback shift continuously as the node moves across the graph.
- Release: All modulated parameters smoothly return to their base values.
Audio Info Bar
When audio is active, an info bar appears below the graph header displaying: the current scale name, the notes in the scale, and the active synth type (PolySynth, FMSynth, AMSynth). This provides a transparent view of the generative parameters in use.
Optional FM Drone
Each preset can include an FM drone — a sustained low-frequency tone that provides harmonic grounding. The drone's presence, volume and frequency are configured per preset and further adjusted by tradition-specific modifiers. Presets 1 and 3 feature a prominent drone; preset 5 omits it entirely.
Technology
The generative audio engine is built on Tone.js and uses
PolySynth, FMSynth and AMSynth
with configurable effects chains (reverb, delay, filter, stereo panner).
No pre-recorded audio samples are required — all sound is synthesized in real time.
💡 Tip
The engine auto-selects the best preset based on the detected tradition. Try switching presets manually to hear the same graph data rendered through different sonic textures. Drag nodes slowly across the canvas to explore the full range of real-time audio modulation.
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 free user-selectable Google Gemini models: Gemini 2.5 Flash-Lite (default, fast and cost-effective) and 2.5 Flash (most accurate). 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
SacredTexts AI features a single generative audio engine
(GenerativeAudioEngine) built on Tone.js. All sound is synthesized
in real time — no pre-recorded samples are used. Audio is disabled by default:
click the 🔊 button in the graph toolbar to enable it.
Presets
Five selectable presets shape the overall sonic character. Use the preset selector in the graph toolbar to switch between them:
- 1 (default) — Warm PolySynth, slow tempo, prominent FM drone, high reverb.
- 2 — Bright FMSynth, bell-like tones, moderate reverb and delay.
- 3 — Deep AMSynth in a low register, heavy reverb, ritualistic drone.
- 4 — Warm FMSynth with vibrato, mid register, low drone, dark filter.
- 5 — Percussive PolySynth, faster tempo, dry mix, no drone.
Activation
- Audio disabled by default: Audio does not start automatically. Click the 🔊 button in the graph toolbar to enable it.
- Analysis change: If audio is active and a new analysis is started, the engine reconfigures automatically with the correct tradition's scale and parameters.
- 🔊 Button: Enables or disables audio at any time.
- Preset selector: Choose among 5 generative audio presets. The engine also auto-selects the best preset based on the detected tradition.
Node-Audio Interaction
Graph node interactions produce distinct audio responses:
- Click — Accented note: Triggers a prominent note in the tradition's scale, with pitch determined by node position and timbre by node category.
- Hover — Subtle note: Plays a quiet preview note without full emphasis.
- Drag — Real-time modulation: Continuously modulates filter cutoff, reverb wet level and delay feedback as the node moves across the canvas.
- Release: When the node is released, all modulated parameters smoothly return to their base values.
💡 Tip
Try different presets and slowly drag a node from the centre towards a corner to explore the full range of real-time audio modulation. The audio info bar below the graph header shows the active scale, notes, and synth type.
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
Google Gemini API Key
The API key is required to use the AI analysis. For security reasons, the key is saved only in the current browser session and will need to be re-entered when the application is reopened.
⚠️ Security
Never share your API 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.2.0
Data Sonification
Generative audio engine (Tone.js) with 5 presets, 7 tradition-specific scales, 35 melodic fragments, FM drone and real-time node interaction.
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 free Gemini models (2.5 Flash-Lite, 2.5 Flash). Default: Gemini 2.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.