AI pipeline that discovers African first-hand historical texts and narrates them as audiobooks
# African Voices Audiobook Pipeline
> *"Until the lion learns to write, every story will glorify the hunter."*
An AI pipeline that discovers, validates, and narrates African first-hand historical accounts — preserving authentic voices as high-quality audiobooks.
---
## What It Does
Most of African history has been told through colonial filters. This project flips that.
It automatically:
1. **Discovers** publicly available African first-hand texts — memoirs, oral histories, autobiographies, and translated oral traditions — from open digital archives
2. **Validates** that sources are real and accessible
3. **Extracts** text directly from PDFs
4. **Formats** the script for natural spoken narration
5. **Plans** a culturally appropriate voice — elder, storyteller, West African accent, measured pace
6. **Generates** a professional `.mp3` audiobook using OpenAI TTS
---
## Sample Output
The pipeline discovered and narrated an excerpt from a study of **Anukili Ugama**, an Igbo epic — sourced directly from the Internet Archive.
The voice planner chose:
```json
{
"voice": "elder_male",
"tone": "wise, slow, storytelling",
"speed": 0.85,
"accent": "West African"
}
```
> *"To truly grasp the significance and impact of Anukili Ugama within the Igbo culture and community... one must explore the narrative through its historical context and societal functions. This approach offers insight into how the story mirrors the communal values and identity of the Igbo people..."*
---
## Architecture
```
Internet Archive (PDF)
↓
SourceDiscoveryAgent — finds real, accessible PDFs via AI + archive search
SourceValidationAgent — confirms each PDF is genuinely downloadable
PDFExtractionAgent — downloads, parses, and cleans the text
ScriptFormatterAgent — rewrites for natural spoken delivery
VoicePlanningAgent — picks voice, tone, speed, and cultural accent
TTSAgent — generates the final .mp3
```
Each agent is a single Python class with one jo …