Convert serialized EPUB books into M4B audiobooks with Chatterbox Multilingual TTS.
Project description
chatterbook
Convert EPUB books into M4B audiobooks with Chatterbox Multilingual TTS.
from chatterbook import Book
book = Book("book.epub")
book.convert(
language="ko",
voice_path="voices/narrator.wav",
style="warm",
batch_size=8,
speed=0.9,
)
Book reads the EPUB immediately and builds a JSON-compatible representation
with title, chapters, paragraphs, narration/dialogue segments, and pause timing.
You can serialize and restore that representation without reading the EPUB again:
data = book.to_dict()
book = Book.from_dict(data)
book.convert("audiobooks/book.m4b", language="ko")
By default, the output filename is read from the EPUB title metadata and written
as Title.m4b in the current directory. You can also pass a path or directory.
voice_path is an optional short WAV reference clip for voice cloning. If it is
omitted, Chatterbox's bundled default conditionals are used.
Chapters are split into paragraph and speech segments when the Book is built.
Quoted dialogue is marked separately and generated with slightly more expressive
settings. Commas, sentence endings, paragraph breaks, and narration/dialogue
transitions add real silence after each segment to improve audiobook pacing.
The default audiobook pacing is intentionally slower than raw TTS:
speed=0.9comma_pause_ms=120sentence_pause_ms=300paragraph_pause_ms=600dialogue_pause_ms=300
M4B output requires ffmpeg on your PATH. During conversion, chatterbook shows
one colored tqdm progress bar for the whole EPUB. Pass show_progress=False
to disable it.
When voice_path is used, conversion prepares voice conditionals once per
same-style batch instead of once per segment. Tune batch_size to control how
many adjacent narration or dialogue segments are grouped for that preparation
step.
To export chapter WAV files instead of one M4B:
book.convert(
"audio",
language="ko",
output_format="wav",
)
Styles
neutral: balanced defaultwarm: slightly softer narrationdramatic: more expressive narration
You can override a style with explicit generation values:
book.convert(
language="ko",
exaggeration=0.7,
cfg_weight=0.3,
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chatterbook-0.4.3.tar.gz.
File metadata
- Download URL: chatterbook-0.4.3.tar.gz
- Upload date:
- Size: 232.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38b6e024a0bb6d65ad092afe78a0a257cc5845c7b97ea03c34bcd3293d629047
|
|
| MD5 |
ee40d9793364f135e79e8eb632cc1eff
|
|
| BLAKE2b-256 |
9a86c3051d860820b97c9e3b9fcab902ebf9789887a5496631f5414ebd31683c
|
Provenance
The following attestation bundles were made for chatterbook-0.4.3.tar.gz:
Publisher:
workflow.yml on smturtle2/chatterbook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chatterbook-0.4.3.tar.gz -
Subject digest:
38b6e024a0bb6d65ad092afe78a0a257cc5845c7b97ea03c34bcd3293d629047 - Sigstore transparency entry: 1484587909
- Sigstore integration time:
-
Permalink:
smturtle2/chatterbook@7b001ddbe9a7c7c69fe5bdd08c2d63d6a104fbff -
Branch / Tag:
refs/tags/v0.4.3 - Owner: https://github.com/smturtle2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@7b001ddbe9a7c7c69fe5bdd08c2d63d6a104fbff -
Trigger Event:
release
-
Statement type:
File details
Details for the file chatterbook-0.4.3-py3-none-any.whl.
File metadata
- Download URL: chatterbook-0.4.3-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77f89cfa14fb89ab766af5c9f13e252a67eeb2c145e29548ba67a72e1eb28556
|
|
| MD5 |
575be715a6d0fb904548ab08078060fd
|
|
| BLAKE2b-256 |
70baf54afc794be0ff5fc7f5c564c9c1735e6b623506bb742508c8b25c98e1a4
|
Provenance
The following attestation bundles were made for chatterbook-0.4.3-py3-none-any.whl:
Publisher:
workflow.yml on smturtle2/chatterbook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chatterbook-0.4.3-py3-none-any.whl -
Subject digest:
77f89cfa14fb89ab766af5c9f13e252a67eeb2c145e29548ba67a72e1eb28556 - Sigstore transparency entry: 1484587942
- Sigstore integration time:
-
Permalink:
smturtle2/chatterbook@7b001ddbe9a7c7c69fe5bdd08c2d63d6a104fbff -
Branch / Tag:
refs/tags/v0.4.3 - Owner: https://github.com/smturtle2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@7b001ddbe9a7c7c69fe5bdd08c2d63d6a104fbff -
Trigger Event:
release
-
Statement type: