This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
In my community, stories have always been passed down through oral narratives. Many would sit by the fire and listen to the stories of old, told from one generation to another. The fire was not only a source of warmth. It became a place where children learned who they were, where elders were heard, and where
people who had lived long before us could still feel close.
With changing times (and the changing climate) sitting together by the fire has become less attainable. When those moments disappear, we risk losing more than stories. We can lose names, warnings, humour, courage, and the small details that connect us to where we come from.
I kept wondering: if our gathering places are changing, can we create a new kind of place where these stories can still be encountered?
That question became Hadithi, an immersive portal into oral tradition.
Visitors do not simply read a summary. They enter a legend's landscape, meet a conversational interpretation of its central character, and ask questions using text or their voice.
The portal now opens onto two complete destinations:
- Kenya (Africa), where visitors travel to the Kano Plains and meet a conversational interpretation of Luanda Magere from Luo oral tradition;
- Mexico (Latin America), where visitors enter a moonlit river landscape shaped around the regional tellings of La Llorona.
The interface labels Luanda as a conversational interpretation from oral tradition. La Llorona is visibly marked as a research draft requiring cultural review, and the experience does not merge. The sources are from approved literal devices (e.g. museum records) and wikipedia as a minor source.
Demo
- Live demo: https://hadithi-zciw.onrender.com/
- Video demo:
Code
Hadithi
Hadithi is an immersive, source-aware oral traditions portal. Its launch experiences are:
- Luanda Magere — Kenya, Africa
- La Llorona — Mexico and Latin America
Visitors enter a legend's landscape, ask questions by text or microphone, and see the sources and regional tellings behind each answer.
Experience preview
Luanda Magere speaks in the first person from the Kano Plains experience, with text, microphone and destination controls kept visible.
La Llorona appears in the river environment beside the English/Spanish chat with the cultural-review status visible in the interface.
Current prototype
- Three.js globe journey with labelled Kenya and Mexico destination cards
- User-triggered procedural airship engine, wind, arrival, plains and river audio
- Kano Plains landscape with a licensed, rigged Luanda Magere character moving sunlight and shadow
- La Llorona moonlit riverbank with water, mist, reeds, procedural ambience, an animated character, and bilingual source-grounded text conversation
- First-person, source-grounded Luanda Magere conversation in English and Kiswahili
- …
The main implementation areas are:
-
app/main.py— FastAPI routes, grounded generation, schema validation and deterministic fallbacks; -
app/static/portal.js— Three.js scene, character interaction, chat, world destinations, airship transition audio, conversation memory, microphone recording and Kano Plains ambience; -
app/static/la-llorona-environment.js— moonlit river, adapted character, bilingual chat and procedural river ambience; -
app/services/transcription.py— faster-whisper CPU transcription; -
app/content/luanda_magere.json— approved narrative passages; -
app/content/luanda_magere_sources.json— source registry and editorial safeguards; -
app/content/la_llorona.jsonandapp/content/la_llorona_sources.json— regional narrative pack, source registry and cultural safeguards; -
scripts/adapt_la_llorona_model.py— reproducible Blender adaptation and idle-animation export; -
tests/test_app.py— grounding, fallback, conversation and route tests.
How I Built It
The immersive portal
The browser begins with a globe suspended in a dark portal. Two readable
destination cards sit below it:
- Kenya — Luanda Magere
- Mexico and Latin America — La Llorona
Choosing Kenya moves the camera toward the world and reveals the Kano Plains.
Choosing Mexico opens a separate moonlit river environment. Both journeys begin with a short Web Audio transition built from filtered noise and oscillators. It sounds like an airship engine, rising wind and an arrival tone, but no audio file is downloaded and autoplay rules are respected because the sound begins
from the visitor's click.
Luanda faces the visitor beside a chat surface. The moving sun changes the direction of his shadow, turning a central part of the legend into something the visitor can explore.
La Llorona stands farther downriver with her Mournful_Idle animation. Mist, reeds, reflections and restrained moonlight build the atmosphere without turning the experience into a generic horror scene. Her conversation remains text-first because the available synthetic voices did not sound natural enough
for the character.
Voice input
Visitors can type a question or record it using MediaRecorder. FastAPI sends the recording to the open faster-whisper base model using CPU INT8 inference.
During local measurement:
- the first transcription completed in approximately 8.54 seconds;
- a warm transcription completed in approximately 4.67 seconds.
Natural spoken output is intentionally disabled until a reliable neural text-to-speech provider is available. I preferred readable chat over silently falling back to a robotic browser voice.
Open-model conversation
The live experience currently uses
@cf/meta/llama-3.2-3b-instruct through Cloudflare Workers AI's
OpenAI-compatible endpoint.
For each question, Hadithi sends:
- the current question;
- a bounded recent conversation history;
- approved cultural-source passages;
- instructions to preserve uncertainty and oral variants;
- a strict schema for the answer, source IDs, topic and gesture.
Conversation history provides context but is explicitly excluded as factual evidence.
The model successfully understood mixed-language input such as:
"Yeah, alikuwa ametoka wapi?"
The selected interface language controls whether Luanda responds in English or Kiswahili.
Grounding and validation
Hadithi checks every returned source ID against an approved registry. A model answer cannot display an invented citation.
If the model returns invalid structured data, cites an unapproved source, claims grounding without evidence, times out, or becomes unavailable, the server returns a reviewed deterministic response. The interface visibly tells the visitor when this happens.
The Luanda source pack includes material associated with:
- National Museums of Kenya and Google Arts & Culture;
- Kisumu County;
- University of Nairobi scholarship on heroic traditions;
- University of Nairobi research on orature, heroism and gender.
For La Llorona, Hadithi is building a broader regional source pack using UNAM research, the Smithsonian Latino Center, Guatemala's Ministry of Culture, folklore scholarship, historical associations, and Wikipedia. Wikipedia is identified as a community-edited source in the model context and in displayed
citations rather than being presented as equivalent to peer-reviewed research.
Architecture
Browser
|- Three.js: destination globe, Kano Plains and moonlit river
|- Characters: Luanda Magere and animated La Llorona
|- MediaRecorder: voice questions
|- Web Audio API: airship transition and procedural ambience
`- Chat: conversation, citations and provider status
FastAPI
|- separate approved source packs for each legend
|- bounded conversation context
|- strict generation and citation validation
|- reviewed deterministic fallbacks
`- faster-whisper transcription
Cloudflare Workers AI
`- @cf/meta/llama-3.2-3b-instruct
Learning through provider failures
The final architecture came from several failed experiments:
- Hugging Face reached Gemma but required inference credits;
- free OpenRouter Gemma providers returned capacity errors;
- Cloudflare authenticated correctly, but the selected Gemma model was not available to the account;
- Llama initially returned prose instead of the required JSON;
- a public Chatterbox narration service returned upstream failures.
I switched to an available Llama model, enabled strict structured output, kept provider failures visible, and retained reviewed answers for core questions.
Why Does Open Innovation Matter?
Open models make it possible to build this experience without making one vlosed provider the permanent owner of its future.
The grounding layer, source registry, validation rules and deterministic answers remain part of Hadithi. The conversational model can be hosted through Cloudflare, another compatible provider, or eventually on community-controlled infrastructure.
That matters for cultural technology. A school, museum, archive or community should be able to inspect how a story is represented, replace a model, improve the source pack, and challenge an interpretation.
Open innovation also made failure visible. Instead of disguising unavailable providers or unsupported answers, Hadithi can explain what happened and continue with reviewed material.
My Agent Session
GitHub Copilot helped me iterate through the Three.js experiences, transcription pipeline, provider integrations, structured-output failures, citation checks, conversation memory, Blender character adaptation, mobile layout and test coverage.
The useful part of the agent workflow was not receiving one perfect generated solution. It was being able to test assumptions, inspect failures, replace unreliable providers and preserve the decisions that made the experience safer.
The Spirit of It
The moment the project landed for me was not when the model produced its first answer. It was when the world stopped being a decorative globe and became a choice: Kenya or Mexico, the Kano Plains or a moonlit river.
For a moment, the story no longer felt like a paragraph preserved somewhere on the internet. It felt close again. Someone could speak in English, add a Kiswahili phrase, ask a follow-up, and receive an answer without the experience pretending that every version of the legend was certain.
That matters to me because stories do not remain alive simply because they have been stored. They remain alive when someone is curious enough to ask another question and when another person still cares enough to answer.
Hadithi is built around a simple idea: oral traditions should not become static museum labels, and AI should not rewrite them into confident fiction.
The gathering place may be changing, but the need to listen remains.
Prize Categories
- Open-Source AI / main challenge submission
- Render partner category — https://hadithi-zciw.onrender.com/
- AI application runtime: Render hosts Hadithi’s FastAPI backend and interactive frontend.
- Open-model transcription: Runs faster-whisper on CPU for Luanda’s microphone questions.
- Source-aware processing: Runs the source-pack selection, structured-answer validation, citation checks, and reviewed fallbacks.
- Public access: Provides an HTTPS experience reviewers can use without installing tools or relying on your laptop.
-
Reproducible deployment:
render.yamldocuments the build, startup, health check, and environment configuration. Clear provider roles: Render hosts the application and Whisper; Cloudflare Workers AI runs Llama inference.
GitHub Copilot : I used it for coding






Top comments (2)
Amazing!!
Thank you🙏🏽