The Python API to the Rapidly engine — realtime audio enhancement powered by Rapidly Labs AS.
Project description
Audio enhancement in Python with the Rapidly engine
The Rapidly Engine is a model inference library built with audio in mind. Pre-trained models for speech noise suppression and de-reverberation 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 enhancement applications. The models are designed to be small and resource-efficient, with model file sizes down to 242 KB for the smallest noise suppression model.
The Rapidly engine 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.
)
Some models support multiple output buses — for example, separate buses for noise reduction and de-reverberation. You can inspect available buses like this:
rapidly_engine = rapidly.RapidlyEngine()
processor = rapidly_engine.create_processor(models[0], 2, 44100)
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.0.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.0.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.0.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.
For more information, see the Rapidly documentation.
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 Distributions
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 rapidly-1.0.4-py3-none-win_amd64.whl.
File metadata
- Download URL: rapidly-1.0.4-py3-none-win_amd64.whl
- Upload date:
- Size: 8.5 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d5baac7fcb673d0370c8f3dd4c2d4318f63efb4e17bb4687c7688e3c71c71ba
|
|
| MD5 |
541a347036501451d0ae507ffd31b492
|
|
| BLAKE2b-256 |
7d82a4c9e34fe939a04a30c235683808c50417f91e9c1a200c42212ab9fb3de4
|
File details
Details for the file rapidly-1.0.4-py3-none-win32.whl.
File metadata
- Download URL: rapidly-1.0.4-py3-none-win32.whl
- Upload date:
- Size: 7.7 MB
- Tags: Python 3, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
004b3518d695018dd453f9dd78eb4ea7c37a15c054b9bfc13a3824bdcfdebdcb
|
|
| MD5 |
4b2b180371e1a0d46d6ea194c269dc46
|
|
| BLAKE2b-256 |
594c1b787ce10800bf0281a9ad5ff7a77a5f8f303011183d77b2adc05f09bc6c
|
File details
Details for the file rapidly-1.0.4-py3-none-manylinux2014_aarch64.whl.
File metadata
- Download URL: rapidly-1.0.4-py3-none-manylinux2014_aarch64.whl
- Upload date:
- Size: 7.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa52aa91abcddffa70b4ce5267542e182e9ba4035f281dbd4f07d222f2eecb38
|
|
| MD5 |
b065943dd7df34b2dfe29d7f97ef08d5
|
|
| BLAKE2b-256 |
b15967e930985d944ed9b68b574dd946edac75bd6d8a47b7b8f2c29d9630c5f8
|
File details
Details for the file rapidly-1.0.4-py3-none-manylinux1_x86_64.whl.
File metadata
- Download URL: rapidly-1.0.4-py3-none-manylinux1_x86_64.whl
- Upload date:
- Size: 9.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c3799ec2c3e59e44fe7ece9dd8f5d323d250b80ed34a2b22e1dd0867aaa082d
|
|
| MD5 |
b155140a288ea9acf8ce2d19d0f43bb7
|
|
| BLAKE2b-256 |
7a2065edd2382a5ee1becaf265a63b9066c25508f3d604be3cb507fdac496c24
|