Skip to main content

Python bindings for the RubberBand library

Project description

pylibrb

tests

pylibrb (py-lib-rubberband) is a simple Python extension exposing Rubber Band Library using nanobind bindings.

Since this is not a wrapper around a command-line app (like pyrubberband), both offline and real-time modes are available.

Currently this extenstion exposes only a single class: RubberBandStretcher, which implements all the functionalities of the underlying C++ class. The interface is nearly identical to the original library, with a few changes to make it a bit more Pythonic by:

  • using snake_case
  • not using (magic) numbers to represent the state

Throughout the library, audio is accepted and returned in the form of NumPy ndarrays.

Example

from pylibrb import RubberBandStretcher, Option, create_audio_array

# create a stretcher
stretcher = RubberBandStretcher(sample_rate=16000,
                                channels=1,
                                options=Option.PROCESS_REALTIME | Option.ENGINE_FINER,
                                initial_time_ratio=0.5)
stretcher.set_max_process_size(1024)

# provide the audio to the stretcher, until some output is available
audio_in = create_audio_array(channels_num=1, samples_num=1024)
while not stretcher.available():
  audio_in[:] = 0  # get the next batch of samples, here we just use silence
  stretcher.process(audio_in)

# retrieve the available samples
audio_out = stretcher.retrieve(stretcher.available())

For more instructions, read the docstings of the RubberBandStretcher class and the Option enum, or see the documentation of Rubber Band Library.

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

pylibrb-0.0.2.tar.gz (21.9 kB view details)

Uploaded Source

Built Distributions

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

pylibrb-0.0.2-pp39-pypy39_pp73-win_amd64.whl (411.1 kB view details)

Uploaded PyPyWindows x86-64

pylibrb-0.0.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (526.9 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

pylibrb-0.0.2-pp39-pypy39_pp73-macosx_10_14_x86_64.whl (437.1 kB view details)

Uploaded PyPymacOS 10.14+ x86-64

pylibrb-0.0.2-cp311-cp311-win_amd64.whl (211.4 kB view details)

Uploaded CPython 3.11Windows x86-64

pylibrb-0.0.2-cp311-cp311-musllinux_1_1_x86_64.whl (790.1 kB view details)

Uploaded CPython 3.11musllinux: musl 1.1+ x86-64

pylibrb-0.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (270.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pylibrb-0.0.2-cp311-cp311-macosx_11_0_arm64.whl (204.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pylibrb-0.0.2-cp311-cp311-macosx_10_14_x86_64.whl (225.1 kB view details)

Uploaded CPython 3.11macOS 10.14+ x86-64

pylibrb-0.0.2-cp310-cp310-win_amd64.whl (211.7 kB view details)

Uploaded CPython 3.10Windows x86-64

pylibrb-0.0.2-cp310-cp310-musllinux_1_1_x86_64.whl (790.3 kB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ x86-64

pylibrb-0.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (270.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pylibrb-0.0.2-cp310-cp310-macosx_11_0_arm64.whl (204.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pylibrb-0.0.2-cp310-cp310-macosx_10_14_x86_64.whl (225.4 kB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

pylibrb-0.0.2-cp39-cp39-win_amd64.whl (211.8 kB view details)

Uploaded CPython 3.9Windows x86-64

pylibrb-0.0.2-cp39-cp39-musllinux_1_1_x86_64.whl (790.3 kB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ x86-64

pylibrb-0.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (270.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pylibrb-0.0.2-cp39-cp39-macosx_11_0_arm64.whl (204.9 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

pylibrb-0.0.2-cp39-cp39-macosx_10_14_x86_64.whl (225.4 kB view details)

Uploaded CPython 3.9macOS 10.14+ x86-64

pylibrb-0.0.2-cp38-cp38-win_amd64.whl (212.0 kB view details)

Uploaded CPython 3.8Windows x86-64

pylibrb-0.0.2-cp38-cp38-musllinux_1_1_x86_64.whl (790.3 kB view details)

Uploaded CPython 3.8musllinux: musl 1.1+ x86-64

pylibrb-0.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (270.6 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

pylibrb-0.0.2-cp38-cp38-macosx_11_0_arm64.whl (204.4 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

pylibrb-0.0.2-cp38-cp38-macosx_10_14_x86_64.whl (225.0 kB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

File details

Details for the file pylibrb-0.0.2.tar.gz.

File metadata

  • Download URL: pylibrb-0.0.2.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pylibrb-0.0.2.tar.gz
Algorithm Hash digest
SHA256 84746169aae2489c22b8da2df7c0b66b9c896fb2e6ee8f46ce40e800e0311fc5
MD5 1f29c9336a24e9184a33e94aef2be7e0
BLAKE2b-256 493446bf18ad9bcb2dac04457ab9a77f72bb382cbfa6dc17693f2649a24f6230

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-pp39-pypy39_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-pp39-pypy39_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 0bb46af3550a55dee0850f8c3dd3a5282c333fcecc99fe8e5b18c9a5a7cfdf3b
MD5 227ee80cf701843e7f707f1d18adfb64
BLAKE2b-256 ccdb8a2e0df52035b708475c9d241d9882d4ada9d2c67b80aea2a78eca28b108

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 960e47ace72c24b941d8f0a000479ed60bcf7b42bc02c92075eea0e1720afecf
MD5 a4159853e790ed07eae1f5222a4fa93e
BLAKE2b-256 498902b4221622c44f457353cbe93b0989addcf166978bd6ca8e5d6fe1505844

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-pp39-pypy39_pp73-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-pp39-pypy39_pp73-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 3298ec88bc05e0961d5e7add1a2c7d873429fe7e25d753b998a4b6a305b29282
MD5 9394b3bd170f0cc766b9a228f164be0d
BLAKE2b-256 f93be0ae5471feea2e560abce06e6cbaf10b614b8b8dd1fbb3f69be1da6fd157

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pylibrb-0.0.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 211.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pylibrb-0.0.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3c976794b5cebd18da7f93830dffa8094dab0ca6a4b08036566e2469cde946bb
MD5 7a19deae91b484a98eef5cf014b9fd8e
BLAKE2b-256 2bbf2c6b217fa5f95b6c012d316c47691b0444d3339cf523ecbc01484f9fdd79

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp311-cp311-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 af125d23d44aab78eb4f7cc80787ead140edc5cd455fde0663ca21fea52a34ce
MD5 1b12c07c4dfdef233d5166408fac6c5d
BLAKE2b-256 2a2f4d167a74f0b32ddeaf2e2a6303a23d14f31aa23683ad6493159cbe17cf6d

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ae9dbc5db941abd8a842c4fd1ac6794aacbe2608ac9b38f1d7c04fc865cdcc5d
MD5 78bbe79f1998f18b8e762670c9b61661
BLAKE2b-256 ebb43811e9815177e8d73a80b82fecfcf16bfd59694fcd31a49f5f94b73f77b0

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 64ace7a2431c215d64e059fb11e206f4aa7d816634541127df619dbf2a66b76e
MD5 96fae758d682c4194835983d68bbb8e5
BLAKE2b-256 2deb148d0a5fd986da7d39e125be26ff2588c1d1d818b19d55d934afa9d09251

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp311-cp311-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 a38b909dd249adf1dd509e15cabd01aa4f95726b26bf388cd9b5d1febd88e57b
MD5 ba92e11c51a4cc63ab997279bcaf5290
BLAKE2b-256 aed66e1f6b296ff6a445b04141d21e8d3edf8f1e6a191f321fe9af41493cd807

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pylibrb-0.0.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 211.7 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pylibrb-0.0.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 44db997cef4d0ed3ab347541ad0eb14516aa03dd2cb0dcfcbb2a5f628ba089a1
MD5 2ff12bd1c5ad82854d2d391a5316e315
BLAKE2b-256 0268acbe7cf86ea3cc9a3a2b78ce7f0906e3120011ce85845f33840528956299

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 d6e34ef8b26cf5760a32c00c8ef0769a0fc5538f5011dfba4b63260bac8ce946
MD5 86c1d79da7e7a4fdc39675c192e47209
BLAKE2b-256 4c27af6c03b69cbc915ff3b86cb1f48256c2aec97d3950471daf8c2089bb8f99

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0f95f80a2e305f45b563deed14d886173d9d635bdc6e6bbd5e075a42e7213c84
MD5 5706a6fce63a14a15e533e2f807369fe
BLAKE2b-256 0286bc03f21913abee2128f1cc9f51ba00d8aa5b1fcd1ac4dbcef8db2542a5ba

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cb7860642decf31cc0e49f4c4deba25eba6836ef2c7fd42f2a5bfa7955dccd6b
MD5 2fb36ea28c3a13ba3f88dd60e4e73a73
BLAKE2b-256 409aa0ab6d8268b136cac7df232fa41f71b394520da2daa9d5cd45e3fbeca565

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 e579c9bb9dde232523d634dedccfe826aef3a4bec6df02a1c7906fd6168a23a7
MD5 678c47d7fc683abee4d93061a6ae13b1
BLAKE2b-256 c09bf370c4f913c8426e15fa0c612fa1c4092494303bd3e9ac1cd35feeff2539

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pylibrb-0.0.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 211.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pylibrb-0.0.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1cce914e96845ae0d21e904481a0586726b27ef96f542c8e0c09d40a7da78155
MD5 84df2948611b48997e67313c2c749103
BLAKE2b-256 7ff8bc0b292a7b68004e8784f474424834db85fd6f1edef24b03ba6fa0ff1d33

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp39-cp39-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 5b8ba282167d9a490f507f52b07448862a3bad859da2cceeb4c57501c497cb5f
MD5 673c8d3887fefe28a2c59a0422ad3b38
BLAKE2b-256 d44633d2e94d290935bfe9825e018b69718f5ab8302114042004a694d184d97a

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 59b1377f3755f42d96a3ba8c777d84cd0209d814282743a4a1fb5d33db0e929b
MD5 b57196299bcaf4074b9e90234dd0b8f7
BLAKE2b-256 33d1b5b1eddf3cd4de4f286748693aa51fe066d53298f96f09f5604189054357

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d8d1cd634d37f9c39f3de8846a87014f6579995af81542ded7e64576812c944f
MD5 6b9e71f554da8b3a33eeb80865824ca7
BLAKE2b-256 318b66be273203d1d8c17ec34a0d7ef9162cb8ef294e0a6446f1ae9d99898588

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 464082e97ba02aad9664ab8f88a3e017d500b288f1ea932a6fcc6f924ce973fa
MD5 301d02d1776f46c98bae0857ed01c77a
BLAKE2b-256 10f49061a28da913172442080747db0cd87b4a87c805fad1a10198a76d2f1428

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pylibrb-0.0.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 212.0 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pylibrb-0.0.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 7aa1934a9e0bc46a294307b7ede81751166816a024bb70f524d29de57675e11b
MD5 d3aa6873cbaa699ab6a5c71c1358ca98
BLAKE2b-256 8665417e2d1ff926187b5efb80012243a04844849d54831452a5090e8daa7a10

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp38-cp38-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 de703637de612cc24bd355970f1e84babf81893715451b5f75b6d5a0173e10cd
MD5 63aa5670f1b5c3196d85a3d42c358e45
BLAKE2b-256 47e23b8d8f0d1375d20874d1f5e891e44cef29fc34d3cdec9ad7d3150f626142

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9b8af3dcfed19f1712accf0aa9101a46b9b8b53411f6c6140dc3c198a67500af
MD5 ad7cf9ef4fffd0b814854764bdd4b83c
BLAKE2b-256 2967faec6f35799f75758a2662cad557870f5c59298d73eb1c61994499fa4d59

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0f61169c1c653dae54f194dc08933f3d80f8a5d7483a72d47bb2e8da4e4f1a13
MD5 b4b5bdde393abe47b77034d85565d193
BLAKE2b-256 da2163a9891535d36312fce5a81e675e3c6444e5ed10dcc51e4a070eee573e97

See more details on using hashes here.

File details

Details for the file pylibrb-0.0.2-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for pylibrb-0.0.2-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 dbc10df2fc9eab81a1720040041de58d46381361fcac41c7907976273621acc7
MD5 6a4dd7c600a238d548407b2671ee9529
BLAKE2b-256 526201c8d08830e47b653a6fb22bb83201e67c49801259e1ab1c175bd364fd9a

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