Skip to main content

RAVE: a Realtime Audio Variatione autoEncoder

Project description

rave_logo

RAVE: Realtime Audio Variational autoEncoder

Official implementation of RAVE: A variational autoencoder for fast and high-quality neural audio synthesis (article link) by Antoine Caillon and Philippe Esling.

If you use RAVE as a part of a music performance or installation, be sure to cite either this repository or the article !

If you want to share / discuss / ask things about RAVE you can do so in our discord server !

Previous versions

The original implementation of the RAVE model can be restored using

git checkout v1

Installation

Install RAVE using

pip install acids-rave

You will need ffmpeg on your computer. You can install it locally inside your virtual environment using

conda install ffmpeg

Colab

A colab to train RAVEv2 is now available thanks to hexorcismos ! colab_badge

Usage

Training a RAVE model usually involves 3 separate steps, namely dataset preparation, training and export.

Dataset preparation

You can know prepare a dataset using two methods: regular and lazy. Lazy preprocessing allows RAVE to be trained directly on the raw files (i.e. mp3, ogg), without converting them first. Warning: lazy dataset loading will increase your CPU load by a large margin during training, especially on Windows. This can however be useful when training on large audio corpus which would not fit on a hard drive when uncompressed. In any case, prepare your dataset using

rave preprocess --input_path /audio/folder --output_path /dataset/path (--lazy)

Training

RAVEv2 has many different configurations. The improved version of the v1 is called v2, and can therefore be trained with

rave train --config v2 --db_path /dataset/path --name give_a_name

We also provide a discrete configuration, similar to SoundStream or EnCodec

rave train --config discrete ...

By default, RAVE is built with non-causal convolutions. If you want to make the model causal (hence lowering the overall latency of the model), you can use the causal mode

rave train --config discrete --config causal ...

Many other configuration files are available in rave/configs and can be combined. Here is a list of all the available configurations

Type Name Description
Architecture v1 Original continuous model
v2 Improved continuous model (faster, higher quality)
discrete Discrete model (similar to SoundStream or EnCodec)
onnx Noiseless v1 configuration for onnx usage
raspberry Lightweight configuration compatible with realtime RaspberryPi 4 inference
Regularization (v2 only) default Variational Auto Encoder objective (ELBO)
wasserstein Wasserstein Auto Encoder objective (MMD)
spherical Spherical Auto Encoder objective
Discriminator spectral_discriminator Use the MultiScale discriminator from EnCodec.
Others causal Use causal convolutions

Export

Once trained, export your model to a torchscript file using

rave export --run /path/to/your/run (--streaming)

Setting the --streaming flag will enable cached convolutions, making the model compatible with realtime processing. If you forget to use the streaming mode and try to load the model in Max, you will hear clicking artifacts.

Pretrained models

Several pretrained streaming models are available here. We'll keep the list updated with new models.

Where is the prior ?

The prior model was an experimental feature from RAVEv1 and has been removed from this repository. However, we will release a new improved version of the prior soon (very soon in fact).

Discussion

If you have questions, want to share your experience with RAVE or share musical pieces done with the model, you can use the Discussion tab !

Demonstration

RAVE x nn~

Demonstration of what you can do with RAVE and the nn~ external for maxmsp !

RAVE x nn~

embedded RAVE

Using nn~ for puredata, RAVE can be used in realtime on embedded platforms !

RAVE x nn~

Project details


Download files

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

Source Distribution

acids-rave-2.1.18.tar.gz (41.0 kB view details)

Uploaded Source

Built Distribution

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

acids_rave-2.1.18-py3-none-any.whl (50.5 kB view details)

Uploaded Python 3

File details

Details for the file acids-rave-2.1.18.tar.gz.

File metadata

  • Download URL: acids-rave-2.1.18.tar.gz
  • Upload date:
  • Size: 41.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for acids-rave-2.1.18.tar.gz
Algorithm Hash digest
SHA256 09e9285cf30da13807cdca9cd821c84380adf1122d045491ac6409b8c6ec4218
MD5 35019afc65c8746ee3bef182154782fa
BLAKE2b-256 8890d94a74a804a62298dba0df0ff2b18a87a9e7c0e9b42102d1f29112eedc21

See more details on using hashes here.

File details

Details for the file acids_rave-2.1.18-py3-none-any.whl.

File metadata

  • Download URL: acids_rave-2.1.18-py3-none-any.whl
  • Upload date:
  • Size: 50.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for acids_rave-2.1.18-py3-none-any.whl
Algorithm Hash digest
SHA256 d191f90026bff3a44e694f6d27f6232061ec15f41b2a218fafd05b9638748a85
MD5 ca1af64eb12d5169a20e095362648644
BLAKE2b-256 913465e503d955b832e4db91bee0da32bef866e8d841fa9da8571c4552fc359c

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