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 convertchapters(optional): JSON array of chapter objects.start_timeaccepts 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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9143f38a935781030839dd2edac500960c5b28dd9cf4fcf7a40097052a4e8c1e
|
|
| MD5 |
b8377c8cdc741b4a88dd75f30c7fc4fc
|
|
| BLAKE2b-256 |
bf88099427d279a141317168c25bfb7dfafab6394e4c9b9b37627996641ef505
|
Provenance
The following attestation bundles were made for bpm4b-9.0.0.tar.gz:
Publisher:
publish.yml on jdjchelp-jpg/bpm4b
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bpm4b-9.0.0.tar.gz -
Subject digest:
9143f38a935781030839dd2edac500960c5b28dd9cf4fcf7a40097052a4e8c1e - Sigstore transparency entry: 1108042474
- Sigstore integration time:
-
Permalink:
jdjchelp-jpg/bpm4b@e667ea0469fa41039d1d6995a569c0584c9a4aec -
Branch / Tag:
refs/tags/v9.0.1 - Owner: https://github.com/jdjchelp-jpg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e667ea0469fa41039d1d6995a569c0584c9a4aec -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba8b5d001a0177dd404b3d4c431b0d2268a78b23b15e4dabcea5f70d479adfd2
|
|
| MD5 |
61c231e6ca811e98dbcba2f8b787815c
|
|
| BLAKE2b-256 |
904349707b459d2867fd5aebc7c2202eb0ab47d05305ecafea2dde35ba6ffb70
|
Provenance
The following attestation bundles were made for bpm4b-9.0.0-py3-none-any.whl:
Publisher:
publish.yml on jdjchelp-jpg/bpm4b
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bpm4b-9.0.0-py3-none-any.whl -
Subject digest:
ba8b5d001a0177dd404b3d4c431b0d2268a78b23b15e4dabcea5f70d479adfd2 - Sigstore transparency entry: 1108042475
- Sigstore integration time:
-
Permalink:
jdjchelp-jpg/bpm4b@e667ea0469fa41039d1d6995a569c0584c9a4aec -
Branch / Tag:
refs/tags/v9.0.1 - Owner: https://github.com/jdjchelp-jpg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e667ea0469fa41039d1d6995a569c0584c9a4aec -
Trigger Event:
push
-
Statement type: