File size: 2,037 Bytes
3c00185
 
 
496643f
 
3c00185
 
 
 
 
 
 
57e0fbc
 
 
 
 
 
 
496643f
 
 
 
57e0fbc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
base_model:
- facebook/musicgen-small
library_name: transformers
license: cc-by-4.0
pipeline_tag: text-to-audio
tags:
- music
- art
---

# tasty-musicgen-small

[![License: CC BY 4.0](https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/)
[![arXiv](https://img.shields.io/badge/arXiv-2503.02823-b31b1b.svg)](https://arxiv.org/abs/2503.02823)

tasty-musicgen-small is a [musicgen-small](https://huggingface.co/facebook/musicgen-small) fine-tuned on a [patched version](https://github.com/matteospanio/taste-music-dataset) of the [Taste & Affect Music Database](https://osf.io/2cqa5/).
It generates music that's supposed to induce gustatory synesthesia perceptions based on multimodal research. It generates mono audio in 32khz.

## Code and Dataset

Code and the dataset used to train this model are available at: https://osf.io/xs5jy/.

## How to use

Here is a showcase on how to use the model with the transformer library, it is also possible to make inference with the audiocraft library, for a detailed explanation we suggest to read the [official MusicGEN guide](https://huggingface.co/docs/transformers/main/model_doc/musicgen) by Hugging Face

```python
from transformers import pipeline
import scipy

synthesiser = pipeline("text-to-audio", "csc-unipd/tasty-musicgen-small")

music = synthesiser("sweet music for fine restaurents", forward_params={"do_sample": True})

scipy.io.wavfile.write("musicgen_out.wav", rate=music["sampling_rate"], data=music["audio"])
```

## Citation

If you use this model, code or the data in your research, please cite the following article:

```
@misc{spanio2025multimodalsymphonyintegratingtaste,
      title={A Multimodal Symphony: Integrating Taste and Sound through Generative AI}, 
      author={Matteo Spanio and Massimiliano Zampini and Antonio Rodà and Franco Pierucci},
      year={2025},
      eprint={2503.02823},
      archivePrefix={arXiv},
      primaryClass={cs.SD},
      url={https://arxiv.org/abs/2503.02823}, 
}
```