Skip to content

audiobook generator.stub

Nicolas Cravino edited this page Apr 15, 2026 · 3 revisions

id: audiobook-generator name: Audiobook Generator repo_path: ~/Documents/sw30labs/repos/audiobook_generator remote_url: https://github.com/sw30labs/audiobook_generator.git primary_language: Python framework: LangGraph + Qwen3-TTS ingested: 2026-04-11 last_commit_date: 2026-04-11 category: local-inference-mlx stacks: [langgraph, agentic]

Audiobook Generator

Purpose

Convert books to audiobooks using Qwen3-TTS and LangGraph. Multi-format support (RTF, TXT, MD, HTML, DOCX), smart chapter detection, semantic chunking, TTS tag preprocessing, quality verification via faster-whisper STT, checkpoint-based resumption, parallel generation.

Supported Formats

  • RTF
  • TXT
  • Markdown
  • HTML
  • DOCX

Architecture

LangGraph StateGraph with workflow nodes:

  1. Convert: Format-specific parsing (RTF → striprtf, DOCX → python-docx, HTML → BeautifulSoup)
  2. Conversion QA: Verify parsed content via Ollama QA agent
  3. Split: Detect chapters via regex and semantic markers
  4. Chunk: Semantic chunking for paragraph grouping
  5. TTS Preprocess: Clean markup, normalize whitespace, format tags
  6. TTS Generate: Qwen3-TTS with parallel synthesis
  7. Audio QA: Verify audio quality via faster-whisper STT roundtrip
  8. Merge: Combine audio chunks, normalize levels, add metadata

Key Features

  • Smart chapter detection
  • Semantic text chunking
  • TTS tag preprocessing
  • Quality verification (whisper-based STT)
  • Checkpoint-based resumption
  • Parallel generation

Dependencies

langchain, langgraph, langchain-ollama, striprtf, markdownify, python-docx, beautifulsoup4, soundfile, librosa, numpy, scipy, faster-whisper, typer, rich, tqdm, pydantic, qwen-tts, torch

Tags

python, langgraph, mlx, apple-silicon, local-inference, tts, stt, audio

Cross-references

Clone this wiki locally