MSPRIOR: A multiscale prior model for realtime temporal learning
Project description
MSPrior
A multi(scale/stream) prior model for realtime temporal learning
Disclaimer
This is an experimental project that will be subject to lots of changes.
Installation
pip install acids-msprior
Usage
MSPrior assumes you have
- A pretrained RAVE model exported without streaming as a torchscript
.ts
file - The dataset on which RAVE has been trained (a folder of audio files).
1. Preprocessing
MSPrior operates on the latent representation yielded by RAVE. Therefore, we start by encoding the entirety of the audio dataset into a latent dataset.
msprior preprocess --audio /path/to/audio/folder --out_path /path/to/output/folder --rave /path/to/pretrained/rave.ts
2. Training
MSPrior has several possible configurations. The default is a ALiBi-Transformer with a skip prediction backend, which can run in realtime on powerful computers (e.g. Apple M1-2 chips, GPU enabled Linux stations). A less demanding configuration is a large GRU. Both configurations can launched be using
msprior train --config configuration --db_path /path/to/preprocessed/dataset --name training_name --pretrained_embedding /path/to/pretrained/rave.ts
Here are the different configurations available
Name | Description |
---|---|
decoder_only | Unconditional autoregressive models, relying solely on previous samples to produce a prediction. The recurrent mode uses a Gated Recurrent Unit instead of a Transformer, suitable for small datasets and lower computational requirements. |
recurrent | |
encoder_decoder | Encoder / decoder autoregressive mode, where the generation process is conditioned by an external input (aka seq2seq). The continuous version is based on continuous features instead of a discrete token sequence. |
encoder_decoder_continuous |
The configurations decoder_only
and recurrent
are readily usable, the seq2seq variants depends on another project called rave2vec
that will be open sourced in the near future.
3. Export
Export your model to a .ts
file that you can load inside the nn~ external for Max/MSP and PureData.
msprior export --run /path/to/your/run
WARNING
If you are training on top of a continuous rave (i.e. anything but the discrete
configuration), you shoud pass the --continuous
flag during export
msprior export --run /path/to/your/run --continuous
4. Realtime usage
Once exported, you can load the model inside MaxMSP following the image below.
Note that additional inputs (e.g. semantic) are only available when using seq2seq models. The last output yields the perplexity of the model.
Funding
This work is funded by the DAFNE+ N° 101061548 project, and is led at IRCAM in the STMS lab.
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 Distribution
Built Distribution
File details
Details for the file acids-msprior-1.1.3.tar.gz
.
File metadata
- Download URL: acids-msprior-1.1.3.tar.gz
- Upload date:
- Size: 27.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09d0ab9e426f96a5400535effa2a47484b039f37e150128795be2d56ad00b3ce |
|
MD5 | de5bf1f7d74dd76e0e7ed3ede3015ee2 |
|
BLAKE2b-256 | e7314a29de4eb2c459ca8516627a48b171e7dd4e2eb37f293445b06796a3eb79 |
File details
Details for the file acids_msprior-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: acids_msprior-1.1.3-py3-none-any.whl
- Upload date:
- Size: 35.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ab4cf3d112c0ef82396a2a4d017781e119e5accfd17e1ca28416fa9d80a1a81 |
|
MD5 | f98de0c54e6b212cb29e194eda09028d |
|
BLAKE2b-256 | 8b23e492b943bd46dcb33cff49b5e90a8af3d74b778776b19dcc0fb4eb19e476 |