audiobook-length
Estimate how long a book takes to listen to at a given narration pace and playback speed. You can start from a word count, a page count, a text file, or an EPUB that isn't copy-protected.
The formula and rounding match the CocoReader audiobook length calculator: listening minutes are words ÷ (narration wpm × speed). CocoReader: Book to Audiobook is the iOS app this tool sits beside.
This package does not synthesise speech. It only estimates time.
Install
pip install audiobook-length
Defaults
These are the same assumptions as the site calculator:
| Setting | Default | Range |
|---|---|---|
| Narration pace | 155 words per minute | 130–180 |
| Playback speed | 1× | 0.75, 1, 1.25, 1.5, 1.75, 2 |
| Silent reading pace | 238 wpm (non-fiction) or 260 wpm (fiction) | — |
| Words per page | 275 | 250, 275, or 300 |
| Daily listening | 30 minutes | — |
155 wpm is a common industry estimate for narrated audiobooks (roughly 9,300 words per finished hour). Silent reading defaults follow Brysbaert (2019). Times longer than an hour are rounded to the nearest five minutes; shorter times to the nearest minute. A 90,000-word novel is 9 h 40 m at 1× and 4 h 50 m at 2×.
Catalog word counts on the CocoReader site are rounded to the nearest thousand before they are shown. This package exposes round_words_to_nearest_thousand for that, and leaves raw counts alone unless you call it.
Usage
from audiobook_length import estimate, format_duration, words_from_epub
result = estimate(words=90_000)
print(format_duration(result.listening_minutes))
# 9 h 40 m
result = estimate(pages=300, words_per_page=275, speed=1.5)
print(format_duration(result.listening_minutes))
# 5 h 55 m
result = estimate(text="Call me Ishmael. Some years ago...")
result = estimate(epub="book.epub", speed=1.25)
Or from the command line:
audiobook-length --words 90000
audiobook-length --pages 300 --speed 1.5
audiobook-length --text-file chapter.txt --wpm 160
audiobook-length --epub book.epub --speed 1.25
Word counts from text and EPUB
Text is split on whitespace. That is a simple count, not the tokenizer CocoReader uses when it reads a book aloud, so hyphenated words, footnotes, and drop caps may not match the app.
An EPUB is opened as a zip, the spine is read from the package document, and the visible text is taken from each spine item. Copy-protected EPUBs are not supported. Files that cannot be opened raise EpubError.
License
MIT. Copyright 2026 Philip Daquin.
Metadata
Release files for audiobook-length 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| audiobook_length-0.1.0.tar.gz | 12.5 kB | Without provenance | Details for audiobook_length-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| audiobook_length-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for audiobook_length-0.1.0-py3-none-any.whl |
Total release size: 22.3 kB
Release files / audiobook_length-0.1.0.tar.gz
| Download URL | audiobook_length-0.1.0.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a26f15e91a6ceac520ec326db66c27acd2d4bc7c3df0fe8f517ee6daae4b29ad
|
|
BLAKE2b-256 checksum How to use checksums |
da8fbfa3e55b9142d403cb901580fd59f720c6ae2be1a689928db0f14ad83995
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / audiobook_length-0.1.0-py3-none-any.whl
| Download URL | audiobook_length-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a8b391e80edff0d2518dd2227ccd045a7220ac2a62ba705baaa27cbfba8e9b08
|
|
BLAKE2b-256 checksum How to use checksums |
c6adce82dfd1c6b5f9f735cfa44bd56e468f067023a7a03d26176170f03a0700
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for audiobook-length 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.