Skip to main content

Bilingual audiobook interleaver

Project description

Bilbo

Bilingual audiobook interleaver. Takes two audiobooks of the same book in different languages and creates a single audiobook that alternates between them sentence-by-sentence.

Example

From The Alloy of Law by Brandon Sanderson (English + German):

https://github.com/user-attachments/assets/aff6c1cb-6f67-43a8-bc9f-3fd6ab3a5c8a

EN: The revolver was nothing fancy to look at, though the six-shot cylinder was machined with such care in the steel alloy frame that there was no play in its movement.

DE: Der Revolver machte zwar keinen besonders ansehnlichen Eindruck, doch die sechsschüssige Trommel war mit solcher Präzision in den Rahmen aus einer Stahllegierung eingesetzt, dass in ihren Bewegungen nicht das geringste Spiel war.


EN: There was no gleam to the metal or exotic material on the grip, but it fit his hand like it was meant to be there.

DE: Das Metall schimmerte nicht und in den Griff waren keinerlei exotische Materialien eingelassen, aber die Waffe lag so gut in seiner Hand, als wäre sie eigens dafür geschaffen worden.


EN: The waist-high fence was flimsy, the wood grayed with time, held together with fraying lengths of rope.

DE: Der hüfthohe Zaun war baufällig, das Holz, mit der Zeit grau geworden, wurde von ausgefransten Seilen zusammengehalten.

Prerequisites

  • Python 3.10+
  • ffmpeg and ffprobe on PATH
  • CUDA-capable GPU recommended (CPU works but is much slower)

Installation

pip install bilbo-audiobook

Or with uv:

uv tool install bilbo-audiobook

Usage

Process a book

bilbo process \
  --l1-audio en.mp3 \
  --l2-audio de.mp3 \
  --l1-lang en \
  --l2-lang de \
  --title "My Book"

This runs the full pipeline (transcribe, segment, align, export) and stores results in ~/.bilbo/books/<slug>/.

Library management

bilbo list              # List all books
bilbo info <slug>       # Show details about a book
bilbo delete <slug>     # Delete a book

How it works

  1. Transcription — Speech-to-text via faster-whisper with word-level timestamps
  2. Segmentation — Sentence boundary detection via pySBD
  3. Alignment — Cross-lingual sentence matching using LaBSE embeddings via sentence-transformers
  4. Assembly — Audio normalization/extraction/interleaving via ffmpeg
  5. Metadata — Cover art + text metadata merging (optionally via local LLM with ollama)

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

bilbo_audiobook-0.1.1.tar.gz (153.4 kB view details)

Uploaded Source

Built Distribution

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

bilbo_audiobook-0.1.1-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

Details for the file bilbo_audiobook-0.1.1.tar.gz.

File metadata

  • Download URL: bilbo_audiobook-0.1.1.tar.gz
  • Upload date:
  • Size: 153.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for bilbo_audiobook-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b56573ac87e858cd3d87f4e828a3f6d569818c79f2243246eaf532fdea2e2993
MD5 355b68b18b9ac2e9ba5c2f437b3a1857
BLAKE2b-256 4220e33f8fe9a6a5a07948b7d156dcb7595c9ffad61b527afd847045a414ae82

See more details on using hashes here.

File details

Details for the file bilbo_audiobook-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: bilbo_audiobook-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for bilbo_audiobook-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 38a2815e1e16b17b81c06d8a96e273430be99b0370e11e59360acc6cf52e2291
MD5 ee28d3f73cd0a16ba10badf426479c0d
BLAKE2b-256 fe502b8802901e01de21b0637ccd9fc4e8a517c4976da00be84f5b7d276bc579

See more details on using hashes here.

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