Metadata-Version: 2.4
Name: chatterbook
Version: 0.2.0
Summary: Convert EPUB books into chapter WAV audio with Chatterbox Multilingual TTS.
Author: Small Turtle 2
License: MIT License
        
        Copyright (c) 2026 Small Turtle 2
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: beautifulsoup4>=4.12
Requires-Dist: chatterbox-tts<0.2,>=0.1.7
Requires-Dist: ebooklib>=0.18
Requires-Dist: torch>=2
Requires-Dist: torchaudio>=2
Requires-Dist: tqdm>=4.66
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == 'dev'
Description-Content-Type: text/markdown

# chatterbook

Convert EPUB books into M4B audiobooks with Chatterbox Multilingual TTS.

```python
from chatterbook import convert_epub

convert_epub(
    "book.epub",
    language="ko",
    voice_path="voices/narrator.wav",
    style="warm",
    max_chars=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:

```python
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 and adjacent short
paragraphs are grouped up to `max_chars`, then assembled into one chapterized
M4B.

M4B output requires `ffmpeg` on your `PATH`. During conversion, chatterbook shows
colored `tqdm` progress bars for chapters and text chunks. Pass
`show_progress=False` to disable them.

To export chapter WAV files instead of one M4B:

```python
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:

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