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.3-pp39-pypy39_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bc852f7e082be983217476b52687c3c50631f6d33c6ebf401844a42a7e13f58 |
|
MD5 | 0afb3934dd988c5bcfc39f29e1f2612d |
|
BLAKE2b-256 | 976d00199eeb9076d3b7c144d5b72b2ee052ee464a9cb47d76a90ef7a6d6a4b4 |
Hashes for pylibrb-0.0.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ce54fa69a89879490dbd742087db913af5949e9537c123b950738113d9e7652 |
|
MD5 | bbf0ec4750879d848a9927ffec41dce8 |
|
BLAKE2b-256 | 3382e971b87a4f9ee7366d33e6400a98b6efebbc74c95542584c4b1d430be254 |
Hashes for pylibrb-0.0.3-pp39-pypy39_pp73-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d1aba908ebd132bb465d5c6c4a06af8bd8756546f8dcf8744979ff63f56d2cb |
|
MD5 | 6c9a854e92ac6c33cb80e59239c50bfb |
|
BLAKE2b-256 | 1563afde339d4f4020b91cdd53469c4165e9242e0a5c162c5e602e4addbc0a6c |
Hashes for pylibrb-0.0.3-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9df1a922dbfe57ee1d32548eeb5365fd5149d443495beb7b24db097ab75a1ca |
|
MD5 | 85cd4eaa407466a2871907036069321f |
|
BLAKE2b-256 | dfece351c29a73a7a1e50bef428b6e6161d0ea8dda3e7d10f472c96686a7f2a7 |
Hashes for pylibrb-0.0.3-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85cfc3950b878e34a452317152f7f1f363054518f2fd7249fe21e5982c9c399f |
|
MD5 | d9741a7d5218b2f4ffda4ae3a9cc42f3 |
|
BLAKE2b-256 | 2bfddba246c3392c0f64f39dd35d28a91d4b256bdaeaabe95b0f3b6ddd7223ce |
Hashes for pylibrb-0.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d450cbd195b16fba1a3308a67853c51d12998ae973b7f63d7d22da5bf8f7e04 |
|
MD5 | 177b5741dffb490f0a5f5cd4fcae7768 |
|
BLAKE2b-256 | 1f4cc3a8e39a747ce9c6cda8dec3b7cf42dafa45d778e6c1f139c254a1c6fb0e |
Hashes for pylibrb-0.0.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 535419d454936961663446cb7ce52146a8a262a9ef980b61d5b3b7a633d05ec2 |
|
MD5 | 387981a73d2ad68bd8241a2731a87625 |
|
BLAKE2b-256 | 15bd4ba7105acbd94a8929f22afbd333a3cb64109febd96a4b933eb2ea6ceace |
Hashes for pylibrb-0.0.3-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9b9b5fdf27f99e46dddd1a09c8b8c62cf8c243c6af5cf22edafd8958362f7d6 |
|
MD5 | 82647023e9f654b1eb0ea172dabdeb92 |
|
BLAKE2b-256 | 6fc2a13ac0433c5dbfd98d09cdba38e93c0408f0be1acfc9b2ae28ffc8f1192e |
Hashes for pylibrb-0.0.3-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ba073abbc28ff9a9dc963954a8e53209b4c5a82245d60ac4782ee1356f60083 |
|
MD5 | 11163c7dd4899ede4dc959d1cffc3429 |
|
BLAKE2b-256 | 07b287c1e2d9a31b4cce7e98c57c156146f020678b3fead21c6d1bd6c08624e7 |
Hashes for pylibrb-0.0.3-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7427ea0413c8de24ade87275b3e6eda9e40c0abe34bf9fe23665ad17bd68c25e |
|
MD5 | 42fd05b58f78d93ccc7bd92db51b24a1 |
|
BLAKE2b-256 | 127dd04d538182c77cd8944c25f553872c387b285585ad1bbaff420fedbcf416 |
Hashes for pylibrb-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2e6a1cf633e8db78f38e0f14083b83e0809968eb70af7a2a7777c1e66134e4a |
|
MD5 | eb902806da682c5ff2a8f392acde0cfb |
|
BLAKE2b-256 | 29d009d3b3fa26124d6c0cb5d83f255e499aca37cc19dfa7f86c984e36155ec1 |
Hashes for pylibrb-0.0.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b95d66e4503927488e470d26ce91ebda19617ef388cdb4d1284d4024fe703807 |
|
MD5 | c7179756821105eb408b58b01c05a7cf |
|
BLAKE2b-256 | b5641cbfa5968c62798df22518d962ee6f9cd0ad62742ade88ac918e2aa60619 |
Hashes for pylibrb-0.0.3-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 828a836b004e6da60f8fd96963d79222ecf5b0e5273e4f8b968a1a57e7549124 |
|
MD5 | d78e2e08eac7e72f62092cc8a413ea5d |
|
BLAKE2b-256 | fb2b3fb43285097fdb27937df21433c1169a6195b98b64380a9dbc19504fe805 |
Hashes for pylibrb-0.0.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 063fa379c33e068b1a5a56736dd61a900999ffc4e0acc44fb52e47fbbff04b33 |
|
MD5 | 058aafbbb6faaec19bc7ac3bafd47897 |
|
BLAKE2b-256 | fda687221d9dc793c437b78f235d4a425ac4e0b3dc41cf0257c6a2a16ca2c719 |
Hashes for pylibrb-0.0.3-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cfaf7eac2105c73033949fdb9b3998eb66fec98e4a640ead95ec0a913ce4ecd |
|
MD5 | 53c4675ec5de393d0f770b80be69c6db |
|
BLAKE2b-256 | 363d27da0d610174ef09e04cbdadd558f38178828b6b3aeffe601ce21f293234 |
Hashes for pylibrb-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eccaa5ea67b922c7a19e8b6a0e2f00f44078ad413ed526713d337d12b6c1cb8 |
|
MD5 | 990db6c8fcc24c8dbaef1595bc51ba1b |
|
BLAKE2b-256 | fcba840d2865c1ab6cd97de7956b8eb9d61abf39b28bccdae47ddb0f1a402750 |
Hashes for pylibrb-0.0.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4217b0a47ac573afcd84d3111c9ef8fc815b53584f1b30f71c4ce76799fcf3e0 |
|
MD5 | 62615eaacbd80b5c6245a3a048b8b17d |
|
BLAKE2b-256 | 5994748d12c89a79973b67b1bc4cb30d98b1a6ba886016a98236ebb14e8eaf6c |
Hashes for pylibrb-0.0.3-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bfa562336a6c6c9e6402471e673d31aa17cc3f5ffcfff689b35cd4e17aa762b |
|
MD5 | fb78d5e0af70571f0145785d9498b09b |
|
BLAKE2b-256 | 556b92d90ed026d064dc472dd693d779e9f51e6680467e3cdcfd6e1404593ace |
Hashes for pylibrb-0.0.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebae5d6ef889150fac4208dc6dc7b3222b73c64507d2aa183a6a9c391ccbfc97 |
|
MD5 | 3467fe38a28c4b4cee9c5deaa43b26d9 |
|
BLAKE2b-256 | 293ed144dabb80e77c891bf293ce0de5bf43f789ab9f52b164419152e5ebd3b8 |
Hashes for pylibrb-0.0.3-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a47b0c344c88204feb3823c6b4cb6b2b3cf927ad3d0d4a54905a402b2262b548 |
|
MD5 | a109b3d2edfb33b09f712ef9995c17e0 |
|
BLAKE2b-256 | 0993f12d69238bd83a1d655cd2f49be6cd2017efba4d1254be00b1e58a347695 |
Hashes for pylibrb-0.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48eeb93ef2492d7e401d25f9b6f567f88086e13d595f48a6ebbb0890ce0fc7c0 |
|
MD5 | b58e8374ea088643e9318db91e4fd201 |
|
BLAKE2b-256 | 4b35073f8d78e9a6c3ccc92d8a2b33ad5ca541204b7a29138a1142d01c9179bd |
Hashes for pylibrb-0.0.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 004957a1b919d30e71c6d3ff63f6019811a332e0f32948392295cba4198506a9 |
|
MD5 | ee47b4016cca3381161b2d52ac504a69 |
|
BLAKE2b-256 | 6bb7fc1117c4d06d3bfeb618bdae2484c7ad960067ca2c364423bb2f4bbcec86 |
Hashes for pylibrb-0.0.3-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 944e488efeb823d31c28e47c10717c98a4594d708f350f242bbf8b4213107a07 |
|
MD5 | 790ce0f0466666d7d7cab59b185a2d54 |
|
BLAKE2b-256 | 6bb9f8af3d479b82eac64a55789326de318e15b4a1bd377921c1f9913175b446 |