bitscuit a1796e82aa pdf-to-audiobook: PDF -> narrated MP3 via edge-tts
Pipeline: extract (pdftotext) -> scan (OCR-defect report + fix template)
-> clean (noise/header removal, hyphenation, exact-string/regex OCR
repairs, chapter-heading detection) -> voices (sample + comparison)
-> chunk (sentence-aware) -> synth (resumable edge-tts) ->
stitch (ffmpeg concat + RMS verify) -> chapters (ID3v2.4 CHAP).

Config-driven per book; validated end-to-end on a clean digital PDF
and on a 546-page scanned book (byte-identical clean output to the
reference run, 95 auto-detected chapters).
2026-08-25 14:15:50 +02:00

39 lines
1.0 KiB
JSON

{
"include": {
"start": "^(Foreword|Preface|Introduction)$",
"end": "^(Glossary|Index|Bibliography|Acknowledg(?:ements)?)$",
"end_fallback": "^Appendix",
"min_line_start": 0,
"min_line_end": 2000
},
"drop_blocks": [
{
"start": "^Contents$",
"end": "^PART I$",
"end_followed_by": ["Introduction", "INTRODUCTION", "INTRO"]
}
],
"page_header_patterns": [
"^\\d{1,3}\\s+(Book title|Part [IVX]+)$",
"^(Book title)\\s*\\d{0,3}$"
],
"drop_line_patterns": [
"^(?:[Aa]sana|[Cc]hapter|[Ss]ection)\\s+\\d{1,3}$"
],
"strip_patterns": [
"\\s*\\((?:Plates?|Figure[s]?) [0-9IVXLC]+(?:\\s*(?:to|and) [0-9IVXLC]+)*\\)\\.?\\s*",
"\\s*(?:One|Two|Three|Four|Five|Six)\\*$"
],
"raw_fixes": {
"U+FFFD-containing token from `scan`": "corrected reading"
},
"regex_fixes": [
["\\bpalance\\b", "balance"]
],
"fixes": {
"exact token as it appears": "corrected text"
},
"heading_pattern": "^(?:PART [IVX]+\\b|\\d{1,3}\\.\\s+\\w|[A-Z][a-z]+\\s+[A-Z][a-z]+)$",
"heading_count_max": 150
}