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.1.tar.gz (10.7 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.1-pp39-pypy39_pp73-win_amd64.whl (882.5 kB view details)

Uploaded PyPyWindows x86-64

pylibrb-0.0.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (760.4 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

pylibrb-0.0.1-pp39-pypy39_pp73-macosx_10_14_x86_64.whl (664.7 kB view details)

Uploaded PyPymacOS 10.14+ x86-64

pylibrb-0.0.1-cp311-cp311-win_amd64.whl (682.8 kB view details)

Uploaded CPython 3.11Windows x86-64

pylibrb-0.0.1-cp311-cp311-musllinux_1_1_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11musllinux: musl 1.1+ x86-64

pylibrb-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (503.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pylibrb-0.0.1-cp311-cp311-macosx_11_0_arm64.whl (427.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pylibrb-0.0.1-cp311-cp311-macosx_10_14_x86_64.whl (452.7 kB view details)

Uploaded CPython 3.11macOS 10.14+ x86-64

pylibrb-0.0.1-cp310-cp310-win_amd64.whl (683.1 kB view details)

Uploaded CPython 3.10Windows x86-64

pylibrb-0.0.1-cp310-cp310-musllinux_1_1_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ x86-64

pylibrb-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (504.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pylibrb-0.0.1-cp310-cp310-macosx_11_0_arm64.whl (427.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pylibrb-0.0.1-cp310-cp310-macosx_10_14_x86_64.whl (453.0 kB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

pylibrb-0.0.1-cp39-cp39-win_amd64.whl (683.3 kB view details)

Uploaded CPython 3.9Windows x86-64

pylibrb-0.0.1-cp39-cp39-musllinux_1_1_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ x86-64

pylibrb-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (504.0 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pylibrb-0.0.1-cp39-cp39-macosx_11_0_arm64.whl (427.3 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

pylibrb-0.0.1-cp39-cp39-macosx_10_14_x86_64.whl (453.0 kB view details)

Uploaded CPython 3.9macOS 10.14+ x86-64

pylibrb-0.0.1-cp38-cp38-win_amd64.whl (683.4 kB view details)

Uploaded CPython 3.8Windows x86-64

pylibrb-0.0.1-cp38-cp38-musllinux_1_1_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.8musllinux: musl 1.1+ x86-64

pylibrb-0.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (504.1 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

pylibrb-0.0.1-cp38-cp38-macosx_11_0_arm64.whl (426.9 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

pylibrb-0.0.1-cp38-cp38-macosx_10_14_x86_64.whl (452.6 kB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: pylibrb-0.0.1.tar.gz
  • Upload date:
  • Size: 10.7 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.1.tar.gz
Algorithm Hash digest
SHA256 958232993c7872b4a03a283741685bdaab9439495b39274b56400315b8a674d2
MD5 336b5a620646a925fae1e7c4a872f76e
BLAKE2b-256 9a475eba1a43a98b80d5f88802a86d92d40c698305523a9e6fd46f361641bd7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-pp39-pypy39_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 a5a3f05186ee80ca8e93d1c3e8d198319b918a86cd054d097ce287faa7d45383
MD5 45edc961b551d243bd4a89aa1fefb6c4
BLAKE2b-256 a4524ed947c11a7b28c023c7ec0cfd51fe0ad787315b39c569ea667d36729f89

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 42325226cd15f8e80334306d9b8f39d0258f6e067247904d7b85d4c6fb3b5611
MD5 d612d6b1394856f5f90af09eb7357532
BLAKE2b-256 931579bf8ba68c350947a25d7ff1a0007cc26b3f3c21f88fb69efd95c6d01484

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-pp39-pypy39_pp73-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 ebbe648f9541d40c54eceb29c07432c676d81dc8a669f0deb671c9fb59abf82e
MD5 c936a1c3db4b58434ce0a4799a916eea
BLAKE2b-256 24af6ed9307313c71914ddbb72dd8dae5d4e2a8a0d1653332de659f2786be9be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibrb-0.0.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 682.8 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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7d0a5e11a67428919f886c7a7d250e324bbc0874f31db366dfbc4d06729be923
MD5 d89919a9b6f50b4553176d7ac91bd8b1
BLAKE2b-256 5cde83ee75baffc015c5f23734e9f4a8c1ee3d04311df9c6d4f39e59c1a79c32

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 0e75f9f6be7cd856ef209fb65d3764700c43a9ac5e38da2de713adf4c3718ee8
MD5 7cedf4f89830032ed61de7aa3e9e6f3a
BLAKE2b-256 64eb24281fc015a25847ec754b6999f83e30ed94ab3c9d33bd2239cc803f43f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 40186632e730e9697d6e27b97ecfbdb2afd89566b1741fa5a5cdb8b878d0bd47
MD5 579c521c49dd4f70f67abdf545b00d91
BLAKE2b-256 76f5bf6316b0fdf8418ef245286fa75ce58aa1f824df8fd04b0b433f5914efbf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6aa71de0dc40e1fd8b80a7c360399a62dcb6bb6c46082cbd777335687d4186b8
MD5 628a5e65b088d2f14e5017011e94f423
BLAKE2b-256 e46e3eb1cb34a597d37ed3635baec2e4c0316e218e47c4f58a8885a24db81460

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 129a19fe0023c6ab5c50dcdf4f9d8f9d98add469e5b6f2e5f9e9204e4bbb269a
MD5 55a7c2f0d230c1154f69a117259843bc
BLAKE2b-256 2315343ad10a7f1c5ef2ee2720c2852ac62a9eaf977c28faf614f0919b3c6259

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibrb-0.0.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 683.1 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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 086156a6e6b5069bec54eaff81192d26e6496e88213e0747d7fa97b9fc8e1052
MD5 02780014c89c17ed54e7dc874c51c2c3
BLAKE2b-256 3038c7b26df9e5278a8855b4d8b6c7cc278994885a597ea6444e99b4771a9dbd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 80e23ef58ef6956fad4d3005c07d0bf22278d52d2bcd42292e576e8cafd01155
MD5 45938d1ec13534c4914f691475bd546f
BLAKE2b-256 ff2e0a6ec1046c7c2c67c3dfc139544f4487e8986731dd7e3f2be8362b5e14b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bb389956fae01a1ee6e95537287cf02e3d8be3611c11a8ea60322d1ed1afab00
MD5 12a46b5a6050f6804c0b7f8d0cace67b
BLAKE2b-256 c6c65bca0755eba74ddb19bf76fa425817c65a21f0382c018cd46ce5f30fe20b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2a2b18cbb136c698bd028b499f207fd7d5e493f1fff30585a517001626d33892
MD5 165dfa23526a8c97d6ed656eadbd772a
BLAKE2b-256 6356deaf1fe6e7396f551ffb97b3be6fe0312f309e86724f839e4ea615bc32ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 292d8ac135950fec6262920723db21312898a2fdde607b5d732dc04be34f3861
MD5 9049a8c3b77a22071d83d335ede225f3
BLAKE2b-256 9c90529756a9703500c6deda6446462ee06ae88843f99b7ca503322e597d345f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibrb-0.0.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 683.3 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.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e43bd82fe8e1a6a77d8191a6291ca09d43b7eef03dd9e7ef4b6133d13d243684
MD5 fd51c050ad23b0bfe3003859322f04ac
BLAKE2b-256 3a7f9a8e5b638d3f44c0c750a5d2329d4a45386837271c2861642c99a179c966

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 6101f2317dd6c2ced649587a75d013a311ceb559fd0a5f0d1b7d6a368b416daa
MD5 c25474aff77cc54c752957aeec6e1e00
BLAKE2b-256 28f4e3b8ec231c0bf04153090db5b48b6317b29665cdff01309de964db7b4ad3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 69063fd210a3539416f8ba8a2a8b22daba379d848e6494976b87d4a2d70ebf3d
MD5 549bcfe7a218eefbe87eaffc40214283
BLAKE2b-256 18aa0b58c45cddbedf2d6b173cad0c700e64ec9207c6cb77b0e2c336a4491617

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1e2197c871976aae4694496a17eade6700dc2cb89b8a9c2afcbf1e48255cc9ef
MD5 45e034a61b16381c4844b58fc2dbd0a1
BLAKE2b-256 459612feb248d330487d5113987ae7629a97fe36124fc92ab4c8795703b4ce6e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 8487c8b4b5b97cff4aa1dce462ba081c4ebcdd3a180e4eba59c7d31bbb63340f
MD5 28891451127d8566758d571d07c8183c
BLAKE2b-256 a2d3e029463863211dff8f3a2dc800b6acc04fae5802afb143d889de0060e147

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibrb-0.0.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 683.4 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.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d972f4f09925301ead470544fc4fa56dc75c288c561bd2365a8e31cc2c81ffed
MD5 7004990fdb443dbdd41a93ff23749509
BLAKE2b-256 863d75e2710733b6ccc2f556027d1d1b9c8d32e998db3bdc0727b3703c32608d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 0c7ce28c27dbb4cda7065dba10651e39e3b263b6703703ec9f12297b0b981411
MD5 aae1247923dc52e9bf0942256d01dd96
BLAKE2b-256 c848da56c94826593a3063dc3bf47565a190df0ba58dc2ad8cd8aeb99eb5e200

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8063f913d8096679ad44488a0834e8f5815cf39bb88d569454f2bfcbe8dec48c
MD5 e6a97d157b48ed4dafb4f6beea4d0d94
BLAKE2b-256 23ab0082f362483273b22f72abdbac848b0fd215821e96eb9f33fee1eb962467

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 49feaca8d66639e3e34059227df90873ff1d020ccb16938aa7bc97dd30a06758
MD5 a7a3bdf9ebbbde7518e11c93d102a649
BLAKE2b-256 165b5ce7b8bc3f27824383e111296873fc68b715098cf7f3755633400100426f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.1-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 0e7f4e00d6b2072a0dfc8eb09c9611d4d6a7b59f39931594374d6e5153cb9dfb
MD5 3e5d1bc24986c6af4d0dda70f9dc33b9
BLAKE2b-256 19506abaddc93a237454539f0311b6dcc88d0454efe52215700bbd7d0656d401

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