Audio separation in Python with the Rapidly SDK
The Rapidly SDK is a model inference library built with audio in mind. Pre-trained models for speech noise suppression, de-reverberation and music stem separation are available out of the box, and we can train models for any use case. Get in touch if you have specific requirements.
Our models are trained specifically for real-time usage, achieving low latencies down to 11 milliseconds in speech separation applications. The models are designed to be small and resource-efficient, with model file sizes down to 241 KB for the smallest noise suppression model.
The Rapidly SDK is built in C++ and is compatible across various architectures. With our Python wrapper, you can easily integrate Rapidly into your Python projects and quickly process files and benchmark our models.
To learn more about Rapidly, visit Rapidly.
Installation
To install the Python wrapper for Rapidly, use pip:
python -m pip install rapidly
Rapidly requires Python 3.
How to Use
To use the API, import it and list the available models:
import rapidly
models = rapidly.list_models()
print(models)
To download and update to the latest models, simply call:
rapidly.update_models()
Process a File
To process a file with Rapidly, use the process_file function:
import rapidly
# List the available models in the models folder.
models = rapidly.list_models()
# Process a file using the first model in the list.
rapidly.process_file(
model_file_path=models[0],
input_file_path="path/to/input.wav",
output_file_path="path/to/output.wav",
selected_output_bus=0 # Bus 0 is the processed result in most models.
)
Every model has named output buses: the speech models expose the cleaned dialogue plus the removed noise (and reverb), the music model exposes vocals, bass, guitar, drums, piano and residual. You can inspect available buses like this:
rapidly_engine = rapidly.RapidlyEngine()
processor = rapidly_engine.create_processor(models[0], 2, 48000)
num_buses = processor.get_number_of_output_buses()
for i in range(num_buses):
print(i, processor.get_output_bus_name(i))
Pass the desired bus index as selected_output_bus in process_file.
Models
The models in the models folder use clear, descriptive names. For example, speech-denoise-32ms.v1.1.rapidly indicates a model designed to denoise speech with a latency of 32 ms. The micro size variant (e.g. speech-denoise-micro-32ms.v1.1.rapidly) is a compact build of the same model for CPU-constrained scenarios.
All models within a family (for example, the speech-denoise family) share similar characteristics. For general denoising, we recommend starting with speech-denoise-96ms.v1.1.rapidly to check if it meets your needs, and moving down to shorter latency variants if needed.
If you have specific requirements or challenging audio conditions, we can build customised models optimised for your use case. Feel free to contact us.
process_file uses PySoundFile to read and write audio files. WAV, FLAC, OGG, and MAT formats are supported natively. Other formats require ffmpeg to be installed.
Activation keys
On your own servers, pass the key to engine.add_license("ak_...").
In an app shipped to end users, keep the key on your backend and register a handler. The SDK calls it on a background thread when a check is due. Send request_json unchanged, as the body of POST https://api.rapidly.io/sdk/v1/activation/check with the key in the X-Auth-Key header and Content-Type: application/json, and return the reply as (http_status, body). The handler runs on the engine's check thread: return within 60 seconds, use a request timeout in your backend call, or return None and reply later. Return (0, "") when your backend was unreachable, or None to reply later with engine.submit_activation_response(status, body).
engine = rapidly.RapidlyEngine()
def handler(request_json: str):
status, body = my_backend.forward(request_json)
return status, body
engine.set_activation_request_handler(handler)
Pass None to remove the handler. engine.get_activation_status() returns a rapidly.ActivationStatus (authorized, mode, expiry, last check, refusal code, device id source), or None when no activation is in use. engine.refresh_activation() runs the next check now.
For more information, see the Rapidly documentation.
Metadata
Release files for rapidly 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| rapidly-1.2.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for rapidly-1.2.0-py3-none-win_amd64.whl |
| rapidly-1.2.0-py3-none-win32.whl | Python 3 | none | Windows x86-32 | Details for rapidly-1.2.0-py3-none-win32.whl |
| rapidly-1.2.0-py3-none-manylinux2014_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details for rapidly-1.2.0-py3-none-manylinux2014_aarch64.whl |
| rapidly-1.2.0-py3-none-manylinux1_x86_64.whl | Python 3 | none | Linux glibc 2.5+ x86-64 | Details for rapidly-1.2.0-py3-none-manylinux1_x86_64.whl |
| rapidly-1.2.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for rapidly-1.2.0-py3-none-macosx_11_0_arm64.whl |
| rapidly-1.2.0-py3-none-macosx_10_9_x86_64.whl | Python 3 | none | macOS 10.9+ x86-64 | Details for rapidly-1.2.0-py3-none-macosx_10_9_x86_64.whl |
Total release size: 57.9 MB
Release files / rapidly-1.2.0-py3-none-win_amd64.whl
| Download URL | rapidly-1.2.0-py3-none-win_amd64.whl |
|---|---|
| Size | 9.9 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
79388c2cfc0d9eb1ccb27cdcd00540b4cd65d011e09ee89201b40fffe451c9ca
|
|
BLAKE2b-256 checksum How to use checksums |
f9a3beac72a4f48859bd74d0d03b0b633fd5b2559ac77bcd3b7a6b7f37692a75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / rapidly-1.2.0-py3-none-win32.whl
| Download URL | rapidly-1.2.0-py3-none-win32.whl |
|---|---|
| Size | 9.1 MB |
| Tags | Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
53fe5fb3b30f97a50744141483aad71dfe066f4fd6770f57c088a0e9e3ec9654
|
|
BLAKE2b-256 checksum How to use checksums |
38a0ea3d2501c127daf2633d648db20e6478e3ddb37f930800a40a31ff15b185
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / rapidly-1.2.0-py3-none-manylinux2014_aarch64.whl
| Download URL | rapidly-1.2.0-py3-none-manylinux2014_aarch64.whl |
|---|---|
| Size | 8.4 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
e10b9c78fae4c5ace1434d4cf2761d917fbc4d25529c607153ea901ef39f464c
|
|
BLAKE2b-256 checksum How to use checksums |
7454e6f92a75f517b5fd575fbfc3c99ea9b89d1f956e867672b7e0a4242ba13d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / rapidly-1.2.0-py3-none-manylinux1_x86_64.whl
| Download URL | rapidly-1.2.0-py3-none-manylinux1_x86_64.whl |
|---|---|
| Size | 10.5 MB |
| Tags | Linux glibc 2.5+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
5dddb5bbd274ab25b0e1127294f453a033ceced0b80355f9db3741fc091d124b
|
|
BLAKE2b-256 checksum How to use checksums |
17308072e88b8683d1bc4bff9b43ad00a1969dcef675efe72168de59863952ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / rapidly-1.2.0-py3-none-macosx_11_0_arm64.whl
| Download URL | rapidly-1.2.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.0 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
35fb391929b380e7e5c63deb5b050e743c28cfeb00f8574e7b1ffdf754926266
|
|
BLAKE2b-256 checksum How to use checksums |
6bcc97f555011a8a45b4fec669a79785cd8ac48991b6aa4d90738fb9f04288dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / rapidly-1.2.0-py3-none-macosx_10_9_x86_64.whl
| Download URL | rapidly-1.2.0-py3-none-macosx_10_9_x86_64.whl |
|---|---|
| Size | 10.0 MB |
| Tags | Python 3 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
d6170fe39f3be7f72432f3c5af682ebf3a66aacbfa0c9fca9f71a05ce3fd03f2
|
|
BLAKE2b-256 checksum How to use checksums |
8d12b1a0460e4c813eafb5261972e30fdb9f584a9a5db2fc800a8357a40c747e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Security for rapidly 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.