Python bindings for the RubberBand library
Project description
pylibrb
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pylibrb-0.0.5-pp39-pypy39_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 382640b3d69c6202bdd47e270f491da481f0bf9f34b8596eeeb0c711f69f76d8 |
|
MD5 | e306184b4c7747165d934d4fd40e5649 |
|
BLAKE2b-256 | a673ffb049b83297b3091396b07966c4dbdec47e40d25167148f189a60ed1f51 |
Hashes for pylibrb-0.0.5-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 296ffb23475caf7541adbc00e511b762e3e67cde4f4913add1069d7fb297ccae |
|
MD5 | 2ffcd012126de14b959c839bc75d633c |
|
BLAKE2b-256 | c0100497e88b4d632fc024e68712f1d6d88fef864e039cc0c9eb492b633de7f7 |
Hashes for pylibrb-0.0.5-pp39-pypy39_pp73-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b835082146f58139d7c7be217b6c16ac6ba86c907f18c7a98d5c54da7d84d078 |
|
MD5 | a93481abefb637196ab4b72efc5b63e2 |
|
BLAKE2b-256 | 90c7a67e0ad9cee2df232e24ad9faf3a420bd0ccc909ab3aaa06bc4a7faf26a9 |
Hashes for pylibrb-0.0.5-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bef15891dd9eb1712f3d4e6268c997ac3bd21cfdc7df506b1b3744db25709895 |
|
MD5 | e840e532223e3cc82a09d3a5b801e54c |
|
BLAKE2b-256 | f210267e0900cd6d73a2e89d2177da56d0551c3272dc2133b47fe0d784de42dd |
Hashes for pylibrb-0.0.5-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fae84c68f8dfc99816f9944c3a61ffa9e5c87a9ba64119ae1e221168a4557e2 |
|
MD5 | a7e6b766801de72c2c720f3f0e308019 |
|
BLAKE2b-256 | 78b9f77c4eb1e6f413fc021f68c894f6d9c39cf0dd599a22c4ab391eeb0d0f68 |
Hashes for pylibrb-0.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 392a42cef6c0263cd70cf8c8de3495948e648593263c75ab838ae3d8f3973808 |
|
MD5 | b844d72c920ef35ce3a0387a418ad170 |
|
BLAKE2b-256 | 73e3f7d7219e9e6e2c147b09c6f14956f31b10794252c92918c8db271a37c228 |
Hashes for pylibrb-0.0.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89cf2fc048e5819906f3f01b97b26b065ea03c3c2b527f7dcb2592983ace8425 |
|
MD5 | 4ad5d841f02b220577c6166e6063a587 |
|
BLAKE2b-256 | d9b0ae2afbdcee2e5ae6e3cdc609414294ae40ea18a8feaa424ca5adfda5d7f0 |
Hashes for pylibrb-0.0.5-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff5d3509b3c52cd5bc3ac9e4bc8520a1e487f146f529b8851a62206f6e9cc651 |
|
MD5 | 5cc2c972f9673991076a9a0075874f41 |
|
BLAKE2b-256 | 0c4b85fd072f0e45ed52579a113f4902258e8d7a981e0ba246c7e3dcd1a29772 |
Hashes for pylibrb-0.0.5-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc18114f13657615412c635b7a68917f124db2d964c4c192855ffd86ed5ae75d |
|
MD5 | fdba7d9d4e4df69cf3a54f8a0fb5ac10 |
|
BLAKE2b-256 | 9371d5260a731df03550b46fcb83abff9f431cb47f8f5254df95844f5a5d76ab |
Hashes for pylibrb-0.0.5-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92c295074535780105bb1d1aa0fc69694bb96db15f865ee82f775ee112253aae |
|
MD5 | 16723c1c2bcf71a1b2196496e15db06f |
|
BLAKE2b-256 | 93e61775dc10d8709a4460a9150fdb27d391f341730c1efaa9a69ace94152f15 |
Hashes for pylibrb-0.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe6d036739b3709386cad6425eca3aa6017478bea75402f03a24de916a510566 |
|
MD5 | 5d29699bf4eb625e2d32aed60bb7355e |
|
BLAKE2b-256 | 3b40ea68f1cc791e73aa6e38950e37ec812ffcf593bc45061563935807670816 |
Hashes for pylibrb-0.0.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1d38c4f90eb54a1c16a7f68281809b05eed1260c7e3b034c15153e8acc6f238 |
|
MD5 | a3e9cecbf8c1a75e8bb4aa7c0c31c894 |
|
BLAKE2b-256 | 6bfe04cf07f8b50b2c07a3906c8feb75a02d67becee06d169ae9df51119bd4b7 |
Hashes for pylibrb-0.0.5-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c64e558a0e9f07ca1953a29ea1162201a420a3f706ef9843f9b6ebdfb11eb7c |
|
MD5 | 8ead72a031b4cc1ee91aa591aff78bf5 |
|
BLAKE2b-256 | fdc899eefc5029ea5014b74b260de46f29728b9a12b3ba123837412449870b52 |
Hashes for pylibrb-0.0.5-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff04b2a24364e07076c4fb114bd00747a6bc0850e5e87948665ae0a05d4b84e5 |
|
MD5 | 1d8e156f8f91c672f785ebee8c7bdc34 |
|
BLAKE2b-256 | 943e9aa92129937e2c490adfc1fd85b38ffe7020a83ec124a0511abfe768282f |
Hashes for pylibrb-0.0.5-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f91c6992beff6bb9255c7dafbbfa0143f2fac21efeb402fb42f9b082739fddc2 |
|
MD5 | 54ea0f26ecceb13256b42ce1b5de091a |
|
BLAKE2b-256 | f19a41b9e056fec82e84a2e45b35ba09af96e1f1b124e9362058adc3658ec9d7 |
Hashes for pylibrb-0.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd150748d75b99b7a992c3251c75ba3bc88bfcb7e6b29c9c9371442ecbd8b9d4 |
|
MD5 | 5f1ef891724a2ecfb37424938a87412f |
|
BLAKE2b-256 | 13f40bc0f4513fafd789ec63d8f649a00039246f6a725eaa7498931e87286c65 |
Hashes for pylibrb-0.0.5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 130b528e3e193ce6307f9d6242370ff2ae7c8f81a91129933267073ceb392210 |
|
MD5 | ef36a24ffe7ce45c07abd94a7aa96213 |
|
BLAKE2b-256 | 6267dde8235319a3f374da5876aa6fc2cda6c394d25cf339179db7a9a27fa7f0 |
Hashes for pylibrb-0.0.5-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6e1cda1637d8d0109e3209c3105c1c59e328bddef41e28f4eec36c8f4e438dc |
|
MD5 | 16ccb6d5e7c3a7278885ae74f6b90ba3 |
|
BLAKE2b-256 | 81ca61ddb25de94c7f34ad8fdfe2b33cd02234b248bca8b4a906128976f4d07d |
Hashes for pylibrb-0.0.5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 328d3f5b2f5b95cb8b7f83a09e25383c3ad44bec4dc50b9c28f9e85b7d13cbf1 |
|
MD5 | 06f59d6c4ff8c2872d5cfe56ca5958db |
|
BLAKE2b-256 | af8d3b401fa52c6c17771b1d617793a357c076937f3a7517183d93746ee56ae0 |
Hashes for pylibrb-0.0.5-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ed782d91139759074862799fe1f03f9abc6283eff03916fee8112585f88d277 |
|
MD5 | 780f9e1b4fb3d0ccd7362edf083aa318 |
|
BLAKE2b-256 | 7b325e9a66f900ca0c0d09c3079d8c6e8fdea066aecaf3e882576e0a49156ab5 |
Hashes for pylibrb-0.0.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5211d8126611ad7445fd5467f3b68a82ffc4145fb6d1be9050b7a156fa36a8a9 |
|
MD5 | 27b7e33e35c949a9be4b422fc0ab3131 |
|
BLAKE2b-256 | e79d54e971b667f1c40d27e74ae465514f9088cd80166c89615b2f704a60b6bb |
Hashes for pylibrb-0.0.5-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc343293670a778f264fb14bf63bdd9ab2df6da2972cf0639b8b0b2c3f8bf27a |
|
MD5 | 673be94e2a0aac9f2ea6f247fc4e2729 |
|
BLAKE2b-256 | 8b967ebe3998d1e412f4f2ad7b35fe35c365b7c4046e7bf57a9dfd28755a00f5 |
Hashes for pylibrb-0.0.5-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9da6036b2e41fa7ccb550d340e4f44bd298a85033151263282be00518beceb22 |
|
MD5 | c2c90da8361d92d7c3b741a603be65a4 |
|
BLAKE2b-256 | d7496b3e10be75f0d9dc8624c54cbb81f42a8c4aa3e35d7bb9718d67c6531b01 |