Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rapidly-1.0.5-py3-none-win_amd64.whl (8.5 MB view details)

Uploaded Python 3Windows x86-64

rapidly-1.0.5-py3-none-win32.whl (7.7 MB view details)

Uploaded Python 3Windows x86

rapidly-1.0.5-py3-none-manylinux2014_aarch64.whl (7.0 MB view details)

Uploaded Python 3

rapidly-1.0.5-py3-none-manylinux1_x86_64.whl (9.3 MB view details)

Uploaded Python 3

rapidly-1.0.5-py3-none-macosx_11_0_arm64.whl (9.6 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

rapidly-1.0.5-py3-none-macosx_10_9_x86_64.whl (9.6 MB view details)

Uploaded Python 3macOS 10.9+ x86-64

File details

Details for the file rapidly-1.0.5-py3-none-win_amd64.whl.

File metadata

  • Download URL: rapidly-1.0.5-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.13.0

File hashes

Hashes for rapidly-1.0.5-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 24a04fd76c5185e4ed189743912083df8725fd41071ae86206f328d503d4d27f
MD5 19cc4b7ee35035a1fcb952dbf08ce192
BLAKE2b-256 5e455005cc902076aaf5a9d6ae84679e3c108821b05058c59ed0048c909f4581

See more details on using hashes here.

File details

Details for the file rapidly-1.0.5-py3-none-win32.whl.

File metadata

  • Download URL: rapidly-1.0.5-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.13.0

File hashes

Hashes for rapidly-1.0.5-py3-none-win32.whl
Algorithm Hash digest
SHA256 da4b82b45d6cb9365376f58456c43579f1bd446049b40e867afd31dc33e8dcaa
MD5 91aea223068b969f149913df05b626b8
BLAKE2b-256 6f6f33946963ad4e361bdf236aa078047fb807037dfd3c92914007a6bc93a172

See more details on using hashes here.

File details

Details for the file rapidly-1.0.5-py3-none-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for rapidly-1.0.5-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 28a11b54f86b29df5606468508203e11190a54d9459b0684dcb0286c4fdba8b1
MD5 958db36742963440767502b5ed34f102
BLAKE2b-256 7bac9fc991c6ca05e61a6cf175800d76bd4a558cf4e0e950d6fa9a3aae49ca20

See more details on using hashes here.

File details

Details for the file rapidly-1.0.5-py3-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for rapidly-1.0.5-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 98765a9d47e6158757dc6c568503435615e625398950a3012bdc4c7b1f577b60
MD5 a871e3e1c1fe916817a295829d12f047
BLAKE2b-256 ecafa5f903799878fb4c250fd86ef9b40a7562fbe7d98e341d06ccd1dabc4fef

See more details on using hashes here.

File details

Details for the file rapidly-1.0.5-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rapidly-1.0.5-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d3644bb815d33fca85a259b74be0184c6b6a4100f3520ed3f9046c83fe8be190
MD5 2ba4fb4c9604dd6a22e3455e7ba7ecb8
BLAKE2b-256 891dd23ec121dc1bb65a269513f52e52ddde873276a54ce323ee67348563bbf3

See more details on using hashes here.

File details

Details for the file rapidly-1.0.5-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for rapidly-1.0.5-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e73593f2dcf1529870c2b06ea4ac0ef47158b115347d2229f1aaf6cdac2466ef
MD5 023d1f40069f801cdc4ba20a4d3a047f
BLAKE2b-256 d3a7d54d4240236c6e14103a5a8bde44f4325385dfc1df058a4bc493b2631a16

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page