Metadata-Version: 2.4
Name: rapidly
Version: 1.0.5
Summary: The Python API to the Rapidly engine — realtime audio enhancement powered by Rapidly Labs AS.
Home-page: https://rapidly.io
Author: Rapidly Labs AS
Author-email: Rapidly Labs AS <support@rapidly.io>
License: Proprietary — see LICENSE
Project-URL: Homepage, https://rapidly.io
Keywords: rapidly,audio enhancement,noise reduction,speech denoise
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: !=2.*,>=3.0
Description-Content-Type: text/markdown
Requires-Dist: setuptools>=41.2.0
Requires-Dist: numpy
Requires-Dist: soundfile
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# 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](https://rapidly.io).


## 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](https://rapidly.io).

`process_file` uses [PySoundFile](https://pysoundfile.readthedocs.io/) to read and write audio files. WAV, FLAC, OGG, and MAT formats are supported natively; other formats require [ffmpeg](https://ffmpeg.org/) to be installed.

For more information, see the [Rapidly documentation](https://rapidly.io/docs/welcome).
