Generate long-form audio

Audiobooks, courses, and other long scripts — upload the file, run once, stitch from the manifest.

Long-form is just “many lines” — Onepin voices each line independently and delivers one audio file per line, plus a manifest.csv to stitch them in order. Chapters, courses, narration: same pipeline, bigger script.

Upload the script as a file

Don’t paste a book inline — upload it and point the Script node at the upload:

1created = client.uploads.create(filename="chapter-01.txt", category="script").data
2# PUT the bytes, confirm, then:
3node["config"] = {"input_type": "file", "source_language": "en-us",
4 "upload_ids": [upload_id]}

A .txt splits into lines; a .csv gives you a column per field (set csv_column). One line = one audio file = one unit of validation and retry.

Know the limits

LimitValue
Script file10 MB, up to 50 files per Script node
Inline text500,000 characters
Lines per run100,000 — 10,000 when any validator is in the graph

For book-length projects, run a chapter per run (or per workflow): retries stay cheap, a failed run re-does one chapter instead of the book, and you stay well inside the validator cap.

Estimate before you run

Long scripts are where cost surprises live — preview first:

$onepin workflows preview-run "$WF" # estimated credits, no execution

Stitch the output

The export ZIP is ordered by the manifest:

sink_preview_1/en-us/…_line_000.mp3 … _line_NNN.mp3
manifest.csv ← line order, text, language, file path

Concatenate in manifest order — for example with ffmpeg:

$unzip -o chapter-01.zip
$ls sink_preview_1/en-us/*.mp3 | sort | sed "s/^/file '/;s/$/'/" > list.txt
$ffmpeg -f concat -safe 0 -i list.txt -c copy chapter-01.mp3

Runs are asynchronous — start the run and poll (--watch in the CLI); a long script takes minutes, not seconds. There’s no per-run wall-clock limit; lines synthesize in parallel batches.