Skip to main content

Convert EPUB books into chapter WAV audio with Chatterbox Multilingual TTS.

Project description

chatterbook

Convert EPUB books into M4B audiobooks with Chatterbox Multilingual TTS.

from chatterbook import convert_epub

convert_epub(
    "book.epub",
    language="ko",
    voice_path="voices/narrator.wav",
    style="warm",
    max_chars=300,
    speed=0.9,
    paragraph_pause_ms=600,
    dialogue_pause_ms=300,
)

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:

convert_epub("book.epub", "audiobooks/book.m4b", language="ko")

voice_path is an optional short WAV reference clip for voice cloning. If it is omitted, Chatterbox's bundled default conditionals are used.

Long chapters are split on EPUB paragraph boundaries. Paragraph pauses are preserved with inserted silence, and quoted dialogue is generated as separate, slightly more expressive audio segments.

The default audiobook pacing is intentionally slower than raw TTS:

  • speed=0.9
  • paragraph_pause_ms=600
  • dialogue_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.

To export chapter WAV files instead of one M4B:

convert_epub(
    "book.epub",
    "audio",
    language="ko",
    output_format="wav",
)

Styles

  • neutral: balanced default
  • warm: slightly softer narration
  • dramatic: more expressive narration

You can override a style with explicit generation values:

convert_epub(
    "book.epub",
    language="ko",
    exaggeration=0.7,
    cfg_weight=0.3,
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chatterbook-0.3.0.tar.gz (229.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chatterbook-0.3.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file chatterbook-0.3.0.tar.gz.

File metadata

  • Download URL: chatterbook-0.3.0.tar.gz
  • Upload date:
  • Size: 229.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chatterbook-0.3.0.tar.gz
Algorithm Hash digest
SHA256 17734f9cb33a1a9110d9872ff1d01f96817a7924858d001bc7938da4b779441c
MD5 d9cf8aad5da9ffc12df137177bc7c3e1
BLAKE2b-256 58b2ea20acdd0206a32da27fc213dca2bf6518beaed888bc95882957220b5f5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for chatterbook-0.3.0.tar.gz:

Publisher: workflow.yml on smturtle2/chatterbook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chatterbook-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: chatterbook-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chatterbook-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ff4b87c8421e07bab5dce2f0d0f1e125c64b044caa0b4931960029d48297bed
MD5 a99309be842b3c2e7a5016646f9a39d6
BLAKE2b-256 6e70e538f74c6687c4ba52b20ad348720d5305a34e6e047493fb5da0d9452e1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for chatterbook-0.3.0-py3-none-any.whl:

Publisher: workflow.yml on smturtle2/chatterbook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page