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_available()
For more instructions, read the docstings of the RubberBandStretcher class and the Option enum, or see the documentation of Rubber Band Library.
Metadata
Release files for pylibrb 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pylibrb-0.1.2.tar.gz | 33.3 kB | Details |
Built distributions (wheels)
Total release size: 36.7 MB
Release files / pylibrb-0.1.2.tar.gz
| Download URL | pylibrb-0.1.2.tar.gz |
|---|---|
| Size | 33.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
206b5857dd4d073d7bc87a4aeb22d7d235e671b8256c999c41ffbe098228a3ba
|
|
BLAKE2b-256 checksum How to use checksums |
c9964ed0cedacc7763c11b44a238240ae037f2290120fd619039aadff466a02d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp312-abi3-win_amd64.whl
| Download URL | pylibrb-0.1.2-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
8ab810bd58581da194b4c4bfb8883033dc122a63842ba8d27e2faad084761fe6
|
|
BLAKE2b-256 checksum How to use checksums |
f8e05cbac14c76f8e3cf151c2b6444fe340eeaf9f3097016a5ad205bbc4e753f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pylibrb-0.1.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
7088cb716fe07540f28bd26bf11315eec73fe6578a7d1d7d55d07019190098df
|
|
BLAKE2b-256 checksum How to use checksums |
fcdc6611dd8376ffcb388d53cc9f3c05417091e74e828b2b3e04ec08cfaa2445
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp312-abi3-macosx_11_0_arm64.whl
| Download URL | pylibrb-0.1.2-cp312-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
60380fd59fb286700d3f950e9db6388cee1b27a1ab27a1c6ee8e509fd9cd68cf
|
|
BLAKE2b-256 checksum How to use checksums |
f64409da209c85c1a669d0947dca139d116c78fe452b9bcbc3c64bc3972f729a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp312-abi3-macosx_10_14_x86_64.whl
| Download URL | pylibrb-0.1.2-cp312-abi3-macosx_10_14_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 abi3 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
24bd04333ca0e8a08f6763de16c3932adb1d45ff8b07103c388322b8e3a4bc98
|
|
BLAKE2b-256 checksum How to use checksums |
ec321afbc08d701bce9b36f50825f3cb9028b0cee1f0caacd0342cbcf4bb3b13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp311-cp311-win_amd64.whl
| Download URL | pylibrb-0.1.2-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0815af8a5e8ad2c10f85f70fa5906943ac8f70b823f4e40c9e80d70c292399f9
|
|
BLAKE2b-256 checksum How to use checksums |
035f5a2858df85e4dc9095c38dd4d97b76f1706e10334c7e57c967c2baf74325
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pylibrb-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
9be5d357b1801eac7676e18a04b02e4d979c75f0b453dfbb14b95e69154d0844
|
|
BLAKE2b-256 checksum How to use checksums |
9e012d7c14f25fd5dd2af3319fdf09a8370eaae1acd700d2695a55bf9b3d2a2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | pylibrb-0.1.2-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6c93ac459d219348ec8ea41fcb0e8a37a2dd8dde23e7ec60af7a2555702623a3
|
|
BLAKE2b-256 checksum How to use checksums |
b84b912369be7e3bc667117c5fe645b1022a7d970733a6ee1123d2f305ee133e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp311-cp311-macosx_10_14_x86_64.whl
| Download URL | pylibrb-0.1.2-cp311-cp311-macosx_10_14_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
f671a61761dd065a6114fd91b474a1b4304de717372f88a7c02795787485706b
|
|
BLAKE2b-256 checksum How to use checksums |
7c0bafe352dcf350cce146e1cb1dc798b4eb31a4be77b47db679ae81799b9771
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp310-cp310-win_amd64.whl
| Download URL | pylibrb-0.1.2-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f8d9402dca1ac98c4333f23f38b9550a498435e8bd2ead2f4b28522158a2e18e
|
|
BLAKE2b-256 checksum How to use checksums |
8a5524042dca9444b34122d47d0132f611e5b8110e461184633fde608241e630
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pylibrb-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
a292e4842a1cbfae8650133d8d1db44aaff148581018eac854fa7d3ac668b6bd
|
|
BLAKE2b-256 checksum How to use checksums |
d1265ccc3cc522f7731f5fcee92f7986f775fe7b1f9e2825704de2045582070e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | pylibrb-0.1.2-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8015b78f422d187df9cba307e2aaa56264863f71206b95e934dbf2878b41c674
|
|
BLAKE2b-256 checksum How to use checksums |
85b73f0f8333607509afc98ae44c96ee53fa5e32b67f1bd2198bfaae12229fea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp310-cp310-macosx_10_14_x86_64.whl
| Download URL | pylibrb-0.1.2-cp310-cp310-macosx_10_14_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
edff91ad53f9a250f2443e269c3962cab0d204fba2660cb51860b28c31f85d46
|
|
BLAKE2b-256 checksum How to use checksums |
93c0734fab864cf61b0f16b619a7fe17335427ad100b997d270acd5336cb8ff3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp39-cp39-win_amd64.whl
| Download URL | pylibrb-0.1.2-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
12de41a6e9840c3ec9cfbabe800bc3f1339a2cee98a09f2ba2aaded6f6e05b1d
|
|
BLAKE2b-256 checksum How to use checksums |
0b5d4ca9ed35b7759b54bb761f26fcc4857513f1ac8b020ce66b8b94b23a9ea0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pylibrb-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
a0d5703e6ad5a57293b0bd270dcad458d2660d28152aa93f745a98051a0e3864
|
|
BLAKE2b-256 checksum How to use checksums |
bca67b85b9711517cfd9e94c24a191cf493fc3f8a217bde5d3e7f0038d5e6acd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | pylibrb-0.1.2-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
116e1a94ea849fd95e568c52559491fe10dd7b6b6214727a05ad0f935de8eb67
|
|
BLAKE2b-256 checksum How to use checksums |
959bbc908ba767108135885d551cd3bcf759bfa3d91a6f3a2b1554049e97d8ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp39-cp39-macosx_10_14_x86_64.whl
| Download URL | pylibrb-0.1.2-cp39-cp39-macosx_10_14_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.9 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
6baa4673dc388f758ef989c503326dc7984b31ae868cd7bc88d42886563e8e8e
|
|
BLAKE2b-256 checksum How to use checksums |
95541ffc264e02f32849ad01328b0a9143d590b1c5c1580edc8f0044e2cf652c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp38-cp38-win_amd64.whl
| Download URL | pylibrb-0.1.2-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
bfa0e0c55acb6015fe8cfee384b972bc5ec2283c19e21bac7fc497e6f0bed545
|
|
BLAKE2b-256 checksum How to use checksums |
3aab074e2e9d048dc55c5bf0114ad4be258eb93892cac67c7b97916af2fb5ee0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pylibrb-0.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
a66341f478c546129b96ac748cf4a83eb76c1a73ee494ee305e116252eb5e436
|
|
BLAKE2b-256 checksum How to use checksums |
1b20a512ea78b19d9b476b0892a1102cc4be3865c1d377de3b14626e293dbd10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp38-cp38-macosx_11_0_arm64.whl
| Download URL | pylibrb-0.1.2-cp38-cp38-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.8 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
db9217d060f30b4a9089a95fcc367c68fbb234906fcd3c97065e42933a339c08
|
|
BLAKE2b-256 checksum How to use checksums |
9f6acee6036ac753c073d3d0cede145e19587ffb005affcdf83b52752d9514f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pylibrb-0.1.2-cp38-cp38-macosx_10_14_x86_64.whl
| Download URL | pylibrb-0.1.2-cp38-cp38-macosx_10_14_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.8 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
e5ebe0eb920ee26d9898789b2102f3798167c3bb22af98813f22cdfd85f44838
|
|
BLAKE2b-256 checksum How to use checksums |
5f2764e6250ea3f68abc924c3f2c963b40e64dcf77965cf1a2fc5544c120b72b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|