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.4.tar.gz (22.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.4-pp39-pypy39_pp73-win_amd64.whl (422.2 kB view details)

Uploaded PyPyWindows x86-64

pylibrb-0.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (538.0 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

pylibrb-0.0.4-pp39-pypy39_pp73-macosx_10_14_x86_64.whl (448.2 kB view details)

Uploaded PyPymacOS 10.14+ x86-64

pylibrb-0.0.4-cp311-cp311-win_amd64.whl (222.6 kB view details)

Uploaded CPython 3.11Windows x86-64

pylibrb-0.0.4-cp311-cp311-musllinux_1_1_x86_64.whl (801.2 kB view details)

Uploaded CPython 3.11musllinux: musl 1.1+ x86-64

pylibrb-0.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (281.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pylibrb-0.0.4-cp311-cp311-macosx_11_0_arm64.whl (215.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pylibrb-0.0.4-cp311-cp311-macosx_10_14_x86_64.whl (236.2 kB view details)

Uploaded CPython 3.11macOS 10.14+ x86-64

pylibrb-0.0.4-cp310-cp310-win_amd64.whl (222.8 kB view details)

Uploaded CPython 3.10Windows x86-64

pylibrb-0.0.4-cp310-cp310-musllinux_1_1_x86_64.whl (801.4 kB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ x86-64

pylibrb-0.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (281.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pylibrb-0.0.4-cp310-cp310-macosx_11_0_arm64.whl (216.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pylibrb-0.0.4-cp310-cp310-macosx_10_14_x86_64.whl (236.5 kB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

pylibrb-0.0.4-cp39-cp39-win_amd64.whl (223.0 kB view details)

Uploaded CPython 3.9Windows x86-64

pylibrb-0.0.4-cp39-cp39-musllinux_1_1_x86_64.whl (801.3 kB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ x86-64

pylibrb-0.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (281.6 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pylibrb-0.0.4-cp39-cp39-macosx_11_0_arm64.whl (216.0 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

pylibrb-0.0.4-cp39-cp39-macosx_10_14_x86_64.whl (236.5 kB view details)

Uploaded CPython 3.9macOS 10.14+ x86-64

pylibrb-0.0.4-cp38-cp38-win_amd64.whl (223.2 kB view details)

Uploaded CPython 3.8Windows x86-64

pylibrb-0.0.4-cp38-cp38-musllinux_1_1_x86_64.whl (801.4 kB view details)

Uploaded CPython 3.8musllinux: musl 1.1+ x86-64

pylibrb-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (281.7 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

pylibrb-0.0.4-cp38-cp38-macosx_11_0_arm64.whl (215.5 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

pylibrb-0.0.4-cp38-cp38-macosx_10_14_x86_64.whl (236.1 kB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: pylibrb-0.0.4.tar.gz
  • Upload date:
  • Size: 22.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.4.tar.gz
Algorithm Hash digest
SHA256 58139bc248c1bdb657625c2d7e91fe558459155e682f611f876200200890fe2b
MD5 038902a38031fce9686ef8e525de041b
BLAKE2b-256 ddf6a1a91395fb79156793898d6043a89491536635ba24e4a5e9576471b6515b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-pp39-pypy39_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 407a3c1d0ef06e07984ef0eb8e8365fd22d298426f189ed342f89ec068197e3c
MD5 6a6c4c4656aaff7bc61e2f85e767596c
BLAKE2b-256 40517773d313a2057243b5d14a47f95993ca9d696fb4dfdd40d1ea4e9df247dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ddca5474a9fa17153a1d8722e9e517b9bb22420daa2b88ce7989b62538eabb6e
MD5 61b7b46440fd4ccbee4d97b821b55572
BLAKE2b-256 15b376af2cbb70788d96aeeb05060dbb34508c90d85d309a384ec9a5353ae388

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-pp39-pypy39_pp73-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 466cd52ee4983536fc9ddec8599625d70ff789b55e64ceb673536d46d0ba751c
MD5 e4df824f0a3aaa7f51d5a0cef05fe9df
BLAKE2b-256 2cd8135391d5ffaaaadab71e6bfef37a6658cbbc0524858dea899b903ba889e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibrb-0.0.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 222.6 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.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2d24b3a882753f889e5bd52152b9540d178c3fbc718218a1c7f3af1934dbd0ee
MD5 46266cf89541362432daae658eb34533
BLAKE2b-256 febc511517559071a2b489efdb630c8c37fe222407bcbbd15834447a102c23c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 6b1739f8a03a85b0217299f7b2dc1a09775ca5e76f2bfdc3bb0bdb1a91b9c055
MD5 5867b3fc75ee1f5ca352cc663256243c
BLAKE2b-256 f6b2a6125ea1137b9d57184e6c463236b8c9c339ba2706ef7d4238447d01a5ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 47116fc74c9f2b97ff10d07b573286294f414002caa8e9c9a7a8c0d51bf7167b
MD5 2194d538b654a54e1f584919970f9279
BLAKE2b-256 6bd0814aa0ad1a0211995af3aea040f9c017c37243ef1260af2cfffcd4ddce95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cab2f5a6baebece02aaa72403a029028437d575554fa7c21ac9cf81bca94489c
MD5 9128df16f5288da15bc989faf20193bd
BLAKE2b-256 facb09a6af47ae247c0208c3d3176fe0aa80d4e0da5670fdc39d26820f5a645b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 9bf4d3075d00926d5608d92116dc6b9b0b0c1cc144a8f7235d97d4091d4993db
MD5 a154ba83e557a82660d806169200261e
BLAKE2b-256 8fa00b75f700d25cc52b0b81334a8396b139b1e12476ed1fe237633b3650ce10

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibrb-0.0.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 222.8 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.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8b3580a3588c76e713f58815944f9038eb2a662458d7032fceac292e6b1d862c
MD5 ffc554e2f954bd0fdb581572147501ba
BLAKE2b-256 b102cdcf83d249d15906b8664c45df5c80d9d50dcf434288680c290da6ab85a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 2f89f88e3494196abc6627aee88875a6ef3888344b294028cb4715fe17cb0c66
MD5 dea110be9415822fcb23059ba570b9c0
BLAKE2b-256 f91193a80bfa608f880d57068662f0ebc16e94ba6c3a5ffdee455a0462d4900d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 27cc69d8237f47fa175e9834698120f32cb8003b61c5029c38bb7b3e5f65ca39
MD5 f623e92e5fc8b7e3ff55e9bb79a2deb8
BLAKE2b-256 4f0a68fd0d0949953ea55faca58d082a6e23201e4d10352f0f1d2346e8ba20e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c61007fc532190ad2cb52bf6b872eb9886c71d1d2df35fe140b404539a50e867
MD5 5deb5cd886bbc28b84af723a5fb3a34e
BLAKE2b-256 a83d7b1a8d11d3fffe9563916c3e72a384b8c7605ebb14d7a2d10886822e3e4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 68eb4955b526d1c3f327104f57b544b3869cd9e084b38afb27dfe5cecb9ca2ee
MD5 9662eb046f673b3df86185e976c59fb4
BLAKE2b-256 c93e85ba089ffc8b629e523114238add5ce7b37e2d2a4256a919f80cfb16e669

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibrb-0.0.4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 223.0 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.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7c1984f67305ccb88a229bf43b47466b68cfebf12997c0382023849f2eed9772
MD5 7b92ec61fe5bb7ceaee24e97fd92856d
BLAKE2b-256 600c9358fd92346c5396ca43b94505e56339a237bb99fa23a995bed9634db9e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 f8f05eca4940d28b894c3331bb9134684b6ec84c7783407302b02299a326c1e6
MD5 675fc2ba2af06c6d7dda3a849be31020
BLAKE2b-256 b1a68f12340ca94c669ef5eeeced3b867a73991e2982f23c31205d07b4774e47

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0c70ef0774b99dbf8cbe04816f07bfb5c71a8dfec1a1178c07618f18b215d041
MD5 0d82d591b813436301d81c54aa32273e
BLAKE2b-256 709e8e3e9fa2de36a1f70eef32105a00803f210b271fa8a6e01e781ccf4e9b94

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bee22bf9a2b678b26b935cd838475cdedfe0d7873461743740881ae45f6e94da
MD5 3a84454c8e457ac9e6824b3d21261de9
BLAKE2b-256 13d8df7c3d07f7ea87516a547e2db2a931d7a0310d78450ddd4aa51fca397730

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 5e03946b7c261185ed5a02406a1c89579b88b6d306045d035c272b05135479b6
MD5 14822702ce95dc79f208906d2c262139
BLAKE2b-256 3cfea806f2abbe757ac93968ccfce35dbbf27396a4011b3f6164621c7ece8706

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibrb-0.0.4-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 223.2 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.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 600f75a24de3ebecf4af04702e26edaccada51ae7ff1fbea4d8fce6a4256f025
MD5 776b1bf47a1fde6785603af9ab548bbd
BLAKE2b-256 b16f52e421d42c253210ed4ba9fd1e6b08646de83281ea4a3668d3b6097257f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 eae06b8916820e5fda7989503751e1ba6221a8acdbea8713ed28843a3f2af6fd
MD5 7030fa65c0c200ea51861c1e1069f4eb
BLAKE2b-256 4b8acaeb24e3eef6c9dfaa9be6375177be5f1ee8caf5df72b6eb4afa26d42a99

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 284ec28a9c889297bf898746b551f24fe4b5fcf523e0c696109b7f53f6d8694d
MD5 c9b6b7330867954d3fe6e9c62646cd49
BLAKE2b-256 1d7913d9f10d400ce3b15acb347e9d9083e7fd0506e0a2cfe6e1571d92d368fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 54f0a525a9d667c82725db2eb6f77756bb2289608f3bb95a452b7e9de73634f5
MD5 7b30c44d036f61e62ef76331e049cfd3
BLAKE2b-256 80e8b80effe5a88f91bca6620a995803b0c1996a775b159b186f85a03ff446ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibrb-0.0.4-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 df14ec99e348e26998eaa6c632f5c02400ceea7e82c70ce76d88fa7248e48c35
MD5 c4b1df4fbd5bf323e503e224201accfa
BLAKE2b-256 9552d30f390501c9c8bc46f4f3237047f4b8788683e0ce767cdc8d40f29c305c

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