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.3-py3-none-win_amd64.whl (8.4 MB view details)

Uploaded Python 3Windows x86-64

rapidly-1.0.3-py3-none-win32.whl (7.6 MB view details)

Uploaded Python 3Windows x86

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

Uploaded Python 3

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: rapidly-1.0.3-py3-none-win_amd64.whl
  • Upload date:
  • Size: 8.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for rapidly-1.0.3-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 6c03fef73872eb9f61bde5893c1b9a5bbd9b51b4e84dde1731f63a91daa16065
MD5 6f19e55464b8a992f44e8d9af61cc66b
BLAKE2b-256 7d35944fa7af1ec44888ed6bea6c8da818071cc03fc28b2b2d0063ae5d41f75f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rapidly-1.0.3-py3-none-win32.whl
  • Upload date:
  • Size: 7.6 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for rapidly-1.0.3-py3-none-win32.whl
Algorithm Hash digest
SHA256 faa0374ba2becfe4124a8bcf94f9faf0892e2b406a31baa3fc1783a3c6255707
MD5 8dbd1ed9ad1dcbebf8a1413268b52ee9
BLAKE2b-256 5e36c2d264e203b20eda26875e1c0fb52355f20e487931e2f34213e66ebf6eb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rapidly-1.0.3-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 03f21e83c4dec1e9c81ed54586c4ab420ac574f5ee323acaa043466e3b1236ec
MD5 ddbb33359d9d846ee3bf2b878523bdcd
BLAKE2b-256 88de74d0b73cad983a894324a33937d552b0321aa8416072a5c8b45fcc47b1b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rapidly-1.0.3-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4a643eb782402be0a57a856a9d240afe71cc1820fe9f7f4e10e0a2e16cbb6ec9
MD5 86ae455283a530f219630831fa598b77
BLAKE2b-256 0ff51785f1555c7f68dea0ca8b355409a3b662cccbfac01909230e106f5bff12

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