How denizsafak/abogen works
Abogen converts books and other text sources into spoken audio with synchronized subtitles. Users submit work through either the desktop GUI or the feature-richer Web UI; inputs are extracted, prepared for conversion, synthesized by a selected TTS backend, and written as audio and subtitle outputs. The repository also supports chapter and speaker/entity workflows, plugin-based engines, LLM normalization, and Audiobookshelf/Calibre integrations. The graph combines README capabilities with the sampled source; links for unsampled subsystems are limited to documented or evident entry points.
Main entry points: conversion_service.py Conversion service · conversion_executor.py Conversion executor · app.py Web UI · main.py Desktop GUI
Components 24
User interfaces
- Desktop GUI
abogen/pyqt/main.py - Web UI
abogen/webui/app.py - Wizard routes
abogen/webui/routes/main.py - Conversion queue
abogen/pyqt/queue_manager_gui.py
Input preparation
- Text extraction
abogen/text_extractor.py - Book parsing
abogen/book_parser.py - Chapter selection
abogen/application/chapter_selection.py - Speaker analysis
abogen/speaker_analysis.py - Voice resolution
abogen/application/voice_resolver.py - Text normalization
abogen/domain/normalization.py - LLM service
abogen/llm_client.py
Conversion runtime
- Conversion service
abogen/application/conversion_service.py - Conversion executor
abogen/application/conversion_executor.py - Pipeline factory
abogen/domain/pipeline_factory.py - TTS emission
abogen/domain/conversion_pipeline.py - Kokoro engine
plugins/kokoro/engine.py - Supertonic engine
plugins/supertonic/engine.py
Output and integrations
- Audio output
abogen/domain/audio_sink.py - Subtitle generation
abogen/domain/subtitle_generation.py - EPUB export
abogen/epub3/exporter.py - Audiobookshelf
abogen/integrations/audiobookshelf.py - Calibre OPDS
abogen/integrations/calibre_opds.py
Other components
- User
- LLM endpoint
Connections 24
- User → Desktop GUI: submits work
- User → Web UI: submits work
- Desktop GUI → Conversion queue: queues jobs
- Desktop GUI → Conversion service: requests conversion
- Web UI → Wizard routes: serves wizard
- Wizard routes → Text extraction: extracts upload
- Wizard routes → Conversion service: creates job
- Text extraction → Book parsing: parses books
- Conversion service → Chapter selection: selects chapters
- Conversion service → Speaker analysis: analyzes speakers
- Conversion service → Voice resolution: resolves voices
- Conversion service → Conversion executor: executes job
- Conversion executor → Text normalization: normalizes text
- Text normalization → LLM service: requests normalization
- LLM service → LLM endpoint: sends prompts
- Conversion executor → Pipeline factory: gets pipeline
- Conversion executor → TTS emission: emits segments
- Pipeline factory → Kokoro engine: creates engine
- Pipeline factory → Supertonic engine: creates engine
- TTS emission → Audio output: writes audio
- Conversion executor → Subtitle generation: processes tokens
- Conversion service → EPUB export: exports EPUB
- Web UI → Audiobookshelf: integrates library
- Web UI → Calibre OPDS: uses OPDS