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 tool (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_casefor functions, variables and properties, andSNAKE_CASEfor constants - not using (magic) numbers to represent the state
- use
is_done()to see if all the data has been processed and returned from the stretcher, instead ofavailable() == -1 - use
stretcher.formant_scale = pylibrb.AUTO_FORMANT_SCALEinstead ofstretcher.formant_scale = 0
- use
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pylibrb-0.0.8.tar.gz.
File metadata
- Download URL: pylibrb-0.0.8.tar.gz
- Upload date:
- Size: 23.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12df6a482647aa9e7c1b473f3cfef12c37491c25f64aff570f2d3e913012eeb8
|
|
| MD5 |
85faec0f9a5ed2babb3084c1a7283a6d
|
|
| BLAKE2b-256 |
6b165b50b621c40c92b869145f9ed8b96a544bf447301c97f5de2f27b30e0c01
|
File details
Details for the file pylibrb-0.0.8-pp39-pypy39_pp73-win_amd64.whl.
File metadata
- Download URL: pylibrb-0.0.8-pp39-pypy39_pp73-win_amd64.whl
- Upload date:
- Size: 403.2 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a271a7e73d6006b7e2bed07880be3fa5c255b79557b58e927a367a60e775795
|
|
| MD5 |
496f2dec777d1c8cf12537866b406199
|
|
| BLAKE2b-256 |
7fb1a15ea795fd21752a1a9b1329aacde21e607cebb29cf3b598904a3c672254
|
File details
Details for the file pylibrb-0.0.8-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pylibrb-0.0.8-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 483.5 kB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41804225cb27fb5f03e3618215866909b0eaefbf94620da0335c2e56e5233c73
|
|
| MD5 |
996b79812984e3b6babbf4316da9fd58
|
|
| BLAKE2b-256 |
975f90442da7c81db70f44b21df0bbf947d90732515e27e923f963d1d9bf7467
|
File details
Details for the file pylibrb-0.0.8-pp39-pypy39_pp73-macosx_10_14_x86_64.whl.
File metadata
- Download URL: pylibrb-0.0.8-pp39-pypy39_pp73-macosx_10_14_x86_64.whl
- Upload date:
- Size: 404.5 kB
- Tags: PyPy, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0277aa0af97a91ef47e395b5fb86030574a6e6adc3b0a14c4f9b739e52d2faf
|
|
| MD5 |
1238a0a0d3c763bfff75fd5e9af8089f
|
|
| BLAKE2b-256 |
bf9eab0c7b13ac6de0b4eaf9199cb40c2dfcd1a517acc0d6d36a3d58cd9b8a27
|
File details
Details for the file pylibrb-0.0.8-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 213.1 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f938649f8a6d4eaf5c34ec699d0832387547bcd5319ef4ddec6837e852eef8e
|
|
| MD5 |
0f78b482311de515385f5e4961e6065c
|
|
| BLAKE2b-256 |
de009f08db847eb056dcb0d5a6a21ab9ce9c1ac124a2c0f59863b1d0772a7589
|
File details
Details for the file pylibrb-0.0.8-cp311-cp311-musllinux_1_1_x86_64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp311-cp311-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 578.3 kB
- Tags: CPython 3.11, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68d3212ff2eb01c9eb1cd0febe2fa609d7e9cab0661568613ce3ca9951561273
|
|
| MD5 |
90f38b2fb7166c235979976df8f8de95
|
|
| BLAKE2b-256 |
0074d71fd23893fae7cbcda103441e38eba39e67d091fb4fb02aa483bebba87c
|
File details
Details for the file pylibrb-0.0.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 254.1 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52787e12ae9610698f753fd8ad57f2c2609cac749301e4cb6d78dc7ab7c29679
|
|
| MD5 |
da4153c6bf75a1041a2c19cfa3388cbd
|
|
| BLAKE2b-256 |
054cbf9d86ea505ac5154ba2b0f359c7aa1871353e66b8e257d5a24b840ef291
|
File details
Details for the file pylibrb-0.0.8-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 194.3 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6943760fe678af9c38be440336c671a8d311f3f27c36150f4a668ee489401ed2
|
|
| MD5 |
ae98e04c660a6965718f3ba66a348c50
|
|
| BLAKE2b-256 |
74c33b9f71a87873963e091de5916415f94a85af969118b7095379dfcdfaf00b
|
File details
Details for the file pylibrb-0.0.8-cp311-cp311-macosx_10_14_x86_64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp311-cp311-macosx_10_14_x86_64.whl
- Upload date:
- Size: 214.4 kB
- Tags: CPython 3.11, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d479d2e743e6f1556ae2d3b24d82448f3ca81eccdee3f03bf7fecfac9e4f171
|
|
| MD5 |
6d7a8b06f35ebb90f244c2dcc9d80da9
|
|
| BLAKE2b-256 |
b324eb09f4804d1e16e2a9592462fc275d5d91bbfbf434994209ecffa8b16fec
|
File details
Details for the file pylibrb-0.0.8-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 213.3 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8cc6fc6e72683685be16a7656e0128fbec554b904d0d2b905bf3d02be0825f9
|
|
| MD5 |
d256362d69077709e8e8a6d435e8e498
|
|
| BLAKE2b-256 |
785755335f8011e7e3400d804d9d84f6de333fce093be04a0ce3a774997e1d1d
|
File details
Details for the file pylibrb-0.0.8-cp310-cp310-musllinux_1_1_x86_64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp310-cp310-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 578.5 kB
- Tags: CPython 3.10, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fcb9e413ce42d28a39acbe52ba71f81943ee7b5a569a0ccdb8f05a21995a691
|
|
| MD5 |
15ee8881af45d047be3437672dd392cd
|
|
| BLAKE2b-256 |
a488eefd293ecf7431bf1ff9753433d88044e362d6bdb6ab5966f69e2145c758
|
File details
Details for the file pylibrb-0.0.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 254.3 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34a3c54bf0304a5c65a2725f42f27fa58635f89e4a4f050550a30c8524091f08
|
|
| MD5 |
2dcab0816c69ab4c23811f13ed988c91
|
|
| BLAKE2b-256 |
fdf32d88a7137d032e10268554d7c5b7d98dd733f7d3f669cc8511d76b3fa310
|
File details
Details for the file pylibrb-0.0.8-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 194.6 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24a613606fd9a5a5482796595d037140ac96ad08631353352c03f84c1911092d
|
|
| MD5 |
592b339ce264809b6837d86a91cd1d0b
|
|
| BLAKE2b-256 |
ea5521c19cd61c44a8f0b57fdcb6ec12b7bc42caf763d2fcd6bea70ac15bbc27
|
File details
Details for the file pylibrb-0.0.8-cp310-cp310-macosx_10_14_x86_64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp310-cp310-macosx_10_14_x86_64.whl
- Upload date:
- Size: 214.5 kB
- Tags: CPython 3.10, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b38e7987e340d383a95f007cac522417edbc2646c489b013d6da39367a770f49
|
|
| MD5 |
6ddbba577851827f41c4ebf645bd3ce0
|
|
| BLAKE2b-256 |
317eecb83b240da31eb2490c058f1555f74d40e541cb53786cfc66125e14ef9f
|
File details
Details for the file pylibrb-0.0.8-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 213.5 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
457d31485091cade0fdf1eba66cc1147b0ff88093cd1c675bf98a5f009c39165
|
|
| MD5 |
c6eb7629520cee2ecf2e2479fb773458
|
|
| BLAKE2b-256 |
fbac6413f2135208c418da8d54b80256ae1c3bd277e1f9be4aceec208573be3c
|
File details
Details for the file pylibrb-0.0.8-cp39-cp39-musllinux_1_1_x86_64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp39-cp39-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 578.6 kB
- Tags: CPython 3.9, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6819eac9a8ed234875902ba0dbd16a19cb8033e41e81cf91e8aa4c35627ccfb
|
|
| MD5 |
25a21db9d55af17f5a8515135956b8e9
|
|
| BLAKE2b-256 |
ffa985b2da01833814eead1bee2a697f927d22b67aae2ac418ae44006a7c9c6a
|
File details
Details for the file pylibrb-0.0.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 254.3 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02f0954fa224c82358bc65f948a585e259e1a2bf804cce3e478ad07e232d3452
|
|
| MD5 |
6ae51a7439eec287fc3a8a9a3a2d6d50
|
|
| BLAKE2b-256 |
2b5374551db9ec75a0c0ee022c453cc8a726d2a02d2df741a6e071b07af9adb1
|
File details
Details for the file pylibrb-0.0.8-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 194.6 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ab32ead4eef6c691c98405c199898bf8f1acef081b1e2d9c0688e9165a4184e
|
|
| MD5 |
83f3e537c0be3c5ae4204491860c4f56
|
|
| BLAKE2b-256 |
4887e9814ac54a64d3ca3468a273aa79e518b2ccaaa4b1832445c4180680627c
|
File details
Details for the file pylibrb-0.0.8-cp39-cp39-macosx_10_14_x86_64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp39-cp39-macosx_10_14_x86_64.whl
- Upload date:
- Size: 214.5 kB
- Tags: CPython 3.9, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90e233100f9ce5fc33b1f2b12364eaf62d7e309efa66cad1196abc5a58cf8471
|
|
| MD5 |
11523d2bd99a990f672fd5b871c522fa
|
|
| BLAKE2b-256 |
3e6f240f7ed5ad308ac9370de40cad81b1a226829459ad12d239c31324845117
|
File details
Details for the file pylibrb-0.0.8-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 213.6 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f4a88def9e940bfa67126e39457ef48f29cb8631c68686c8d9af8ce00bbb2d8
|
|
| MD5 |
e0c6dfd0db001cd0455a44c56c5dd5f1
|
|
| BLAKE2b-256 |
db565f7d9c89e914cd54092d8e04746ee634877e683b3cc2ce8ed7e7395ff9d2
|
File details
Details for the file pylibrb-0.0.8-cp38-cp38-musllinux_1_1_x86_64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp38-cp38-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 578.5 kB
- Tags: CPython 3.8, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e47fbde6162210a5dfbc355123eadf1c68e5ffb623357623d51bbc397257c559
|
|
| MD5 |
fc4cba3ba5c95dfd72334fe8ed9d7510
|
|
| BLAKE2b-256 |
daaef71e7bbe79f1f70974bbf6b959ec599b982fb2e2aa19b8cc78e9e688cebe
|
File details
Details for the file pylibrb-0.0.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 254.1 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07246e62a31f0c32103cb109082c5feab0ae95123db88baf278418cd36de81f9
|
|
| MD5 |
be76d389bb95ace8aa84a4a162cf7b9f
|
|
| BLAKE2b-256 |
16fbc6b5b02e21aad64d1f2c03bb722581cc9f3e86bd7a7bde67605da8ee347e
|
File details
Details for the file pylibrb-0.0.8-cp38-cp38-macosx_11_0_arm64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp38-cp38-macosx_11_0_arm64.whl
- Upload date:
- Size: 194.2 kB
- Tags: CPython 3.8, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db99344930eacf09145af31297effc380cfd392ca8327819256da2e0246a0552
|
|
| MD5 |
6dd93ac15e0a4f7cebcc835279f02efb
|
|
| BLAKE2b-256 |
3628a3829d5c182322f94a95d3458b79c0b416b367d80bd98cf2501f134dd1cc
|
File details
Details for the file pylibrb-0.0.8-cp38-cp38-macosx_10_14_x86_64.whl.
File metadata
- Download URL: pylibrb-0.0.8-cp38-cp38-macosx_10_14_x86_64.whl
- Upload date:
- Size: 214.1 kB
- Tags: CPython 3.8, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
961617ac05064b0e6b5d46867c94e3ceace662e3ffdf3c2c3c120d58823314d0
|
|
| MD5 |
96fba453789f7b506e3497095a47134c
|
|
| BLAKE2b-256 |
df04ce2ce0c83334f301c1110ddebb43edb391e7eda88d47456998418f4cf68a
|