Files
old-books/_pipeline/settings.yaml
T
2026-10-17 15:27:14 -05:00

76 lines
2.8 KiB
YAML

# One settings file for the whole pipeline. Relative paths are relative to the repo root.
books_dir: books # where book folders live: books/<first-author>/<book>/
work_dir: /tmp/audiobook-work # scratch only (OCR output, wav pieces). Point at local NVMe in production.
# Where finished audio goes. Empty = the book folder in the repo (the agreed default).
# Set to a folder to write <archive_dir>/<first-author>/<book>/audio there instead.
archive_dir: ""
narrator: "" # spoken in the credits only if filled in (leave empty for a TTS voice)
# Inserted parts. All OFF by default. Per-book and per-chapter switches in book.json override these.
summaries:
chapter_preview: false
chapter_summary: false
concept_summary: false # one mid-chapter concept summary
# OpenAI-compatible chat endpoint, used only when a summary switch is on.
llm:
endpoint: "" # e.g. http://host:8081/v1/chat/completions
model: ""
api_key_env: "" # name of an environment variable that holds the key (never put a key here)
timeout_s: 300
# OpenAI-compatible speech endpoint.
voice:
endpoint: http://127.0.0.1:8000/v1/audio/speech
model: chatterbox
voice: default
extra: {} # extra JSON fields sent with every request (for example speed)
timeout_s: 600
max_chunk_chars: 300 # long paragraphs are cut at sentence ends into pieces this size or smaller
gap_sentence_s: 0.25 # pause between pieces inside a paragraph
gap_paragraph_s: 0.7 # pause between paragraphs and after cues and labels
ocr:
enabled: true # run ocrmypdf only when a page has no text layer
language: eng
min_chars_per_page: 10 # fewer characters than this = no text layer
script:
retail_sample_words: 400 # about 2.5 minutes at 155 words per minute (ACX asks for 1 to 5 minutes)
chime_label: Chime
license:
public_domain_max_year: 1930 # US, as of 2026
audio:
sample_rate: 44100
channels: 1
mp3_bitrate: 192k
head_room_tone_s: 0.75 # ACX 0.5 to 1
tail_room_tone_s: 2.0 # ACX 1 to 5
room_tone_db: -66 # RMS level of the room tone (ACX noise floor limit is -60)
target_rms_db: -20.5 # ACX -23 to -18
peak_ceiling_db: -4.0 # limiter ceiling; ACX limit is -3 and MP3 encoding can add a little
chime_hz: 660
chime_s: 1.0
chime_db: -18 # peak level of the chime in the final file, kept soft
acx: # limits used by the checker (R13)
min_bitrate_kbps: 192
sample_rate: 44100
rms_min_db: -23
rms_max_db: -18
peak_max_db: -3
noise_floor_max_db: -60
head_min_s: 0.5
head_max_s: 1.0
tail_min_s: 1.0
tail_max_s: 5.0
max_minutes: 120
retail_min_s: 60
retail_max_s: 300
speech_window_db: -50 # a 50 ms window louder than this counts as speech when measuring head and tail