Skip to main content

MP3 to M4B Audiobook Converter - Convert MP3 files to M4B format with chapter support

Project description

MP3 to M4B Audiobook Converter (bpm4b)

A Flask-based web application for converting MP3 files to M4B audiobook format with chapter support.

Install and run with: pip install bpm4b then bpm4b

BPM4B - Professional AI Audiobook Suite (v9.0.0)

A professional multimedia processing suite for converting MP3 to M4B, M4B to MP3, and generating AI Audiobooks from documents with high-fidelity TTS and automatic chapter support.

Installation

pip install bpm4b

For local development:

git clone https://github.com/jdjchelp-jpg/bpm4b.git
cd bpm4b
pip install -e .

Features

๐ŸŽฏ Document to Audiobook (AI Gen)

  • Convert PDF, DOCX, TXT, and EPUB to high-quality audiobooks.
  • Powered by Kokoro-82M High-Fidelity local TTS (no Cloud costs).
  • Automatic chapter detection and timing.

๐Ÿ“ Unified Media Conversion

  • MP3 to M4B: Create chapterized audiobooks for Apple Books/Audible.
  • M4B to MP3: Convert audiobooks to standard high-quality MP3 (128k+).
  • Integrated FFmpeg processing for lossy/lossless conversion.

โฑ Automatic Chapter Builder

  • Interactive timestamp generator.
  • Support for HH:MM:SS and Seconds format.
  • Batch import/export of chapter metadata.

๐Ÿš€ Premium Web Interface

  • Modern Glassmorphism UI.
  • Real-time progress monitoring.
  • Drag-and-drop workflow.

Usage

Web Interface

bpm4b web

Then navigate to http://localhost:5000.

CLI Commands

# Convert MP3 to M4B
bpm4b convert input.mp3 output.m4b

# Convert M4B to MP3
bpm4b convert archive.m4b audio.mp3

# Generate AI Audiobook from PDF
bpm4b audiobook book.pdf book.m4b --voice af_heart

Requirements

  • Python 3.8+
  • FFmpeg (Installed and in PATH)

API Endpoints

POST /api/mp3-to-m4b

Converts an MP3 file to M4B with optional chapters.

Form Data:

  • mp3_file: The MP3 file to convert
  • chapters (optional): JSON array of chapter objects. start_time accepts seconds (number) or MM:SS format (string):
[
  {"title": "Chapter 1", "start_time": 0},
  {"title": "Chapter 2", "start_time": "6:30"},
  {"title": "Chapter 3", "start_time": 3600}
]

Response: Returns an M4B file as a download.

Project Structure

.
โ”œโ”€โ”€ bpm4b/              # Main package directory
โ”‚   โ”œโ”€โ”€ __init__.py    # Package initialization
โ”‚   โ”œโ”€โ”€ app.py         # Flask application (for local development)
โ”‚   โ”œโ”€โ”€ cli.py         # Command-line interface entry point
โ”‚   โ”œโ”€โ”€ core.py        # Shared core functions
โ”‚   โ”œโ”€โ”€ api/
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ””โ”€โ”€ index.py   # Vercel serverless function
โ”‚   โ””โ”€โ”€ templates/
โ”‚       โ””โ”€โ”€ index.html # Frontend interface
โ”œโ”€โ”€ setup.py           # Package installation configuration
โ”œโ”€โ”€ vercel.json        # Vercel configuration
โ”œโ”€โ”€ requirements.txt   # Python dependencies
โ”œโ”€โ”€ uploads/           # Temporary uploaded files (created automatically)
โ”œโ”€โ”€ outputs/           # Generated files (created automatically)
โ””โ”€โ”€ README.md          # This file

Notes

  • Maximum file size for uploads: 100MB
  • Temporary files are cleaned up automatically
  • M4B output files can be large (typically 0.96-2GB per hour of audio depending on bitrate)
  • The default audio bitrate is 64kbps AAC, which provides good quality for speech

License

MIT

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

bpm4b-9.0.0.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

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

bpm4b-9.0.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file bpm4b-9.0.0.tar.gz.

File metadata

  • Download URL: bpm4b-9.0.0.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bpm4b-9.0.0.tar.gz
Algorithm Hash digest
SHA256 9143f38a935781030839dd2edac500960c5b28dd9cf4fcf7a40097052a4e8c1e
MD5 b8377c8cdc741b4a88dd75f30c7fc4fc
BLAKE2b-256 bf88099427d279a141317168c25bfb7dfafab6394e4c9b9b37627996641ef505

See more details on using hashes here.

Provenance

The following attestation bundles were made for bpm4b-9.0.0.tar.gz:

Publisher: publish.yml on jdjchelp-jpg/bpm4b

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

File details

Details for the file bpm4b-9.0.0-py3-none-any.whl.

File metadata

  • Download URL: bpm4b-9.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bpm4b-9.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba8b5d001a0177dd404b3d4c431b0d2268a78b23b15e4dabcea5f70d479adfd2
MD5 61c231e6ca811e98dbcba2f8b787815c
BLAKE2b-256 904349707b459d2867fd5aebc7c2202eb0ab47d05305ecafea2dde35ba6ffb70

See more details on using hashes here.

Provenance

The following attestation bundles were made for bpm4b-9.0.0-py3-none-any.whl:

Publisher: publish.yml on jdjchelp-jpg/bpm4b

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