Directory Structure

project/
├── ebookconvert.py # Main script
├── modules # Python modules
│ ├── dependencies.py
│ ├── config_check.py
│ ├── process_audio.py
│ └── create_audio_out.py
├── config/ # Configuration files
│ ├── voices_config.json
│ └── sfx_default.json
├── ebook/ # Input text files
│ └── story.txt
└── audio-out/ # Output audio
└── output.wav

Software Breakdown

ebookconvert.py (Main Orchestrator)

  • Location: Main Directory
  • Command-line argument parsing
  • Input validation (files exist, paths are valid)
  • Coordinates all other modules
  • Progress tracking and error handling
  • Optional cleanup of temporary files
  • See command line arguments

dependencies.py (Dependency Checker)

  • Location:
  • Checks Python version (3.8+)
  • Validates PyTorch installation
  • Detects available backends (MPS/CUDA/CPU)
  • Verifies TTS library installation
  • Checks audio libraries (torchaudio)