Update README.md
Browse files
README.md
CHANGED
@@ -10,5 +10,40 @@ library_name: transformers
|
|
10 |
---
|
11 |
|
12 |
# tasty-musicgen-small
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
---
|
11 |
|
12 |
# tasty-musicgen-small
|
13 |
+
|
14 |
+
[](https://creativecommons.org/licenses/by/4.0/)
|
15 |
+
[](https://arxiv.org/abs/2503.02823)
|
16 |
+
|
17 |
+
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/).
|
18 |
+
It generates music that's supposed to induce gustatory synesthesia perceptions based on multimodal research. It generates mono audio in 32khz.
|
19 |
+
|
20 |
+
## How to use
|
21 |
+
|
22 |
+
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
|
23 |
+
|
24 |
+
```python
|
25 |
+
from transformers import pipeline
|
26 |
+
import scipy
|
27 |
+
|
28 |
+
synthesiser = pipeline("text-to-audio", "csc-unipd/tasty-musicgen-small")
|
29 |
+
|
30 |
+
music = synthesiser("sweet music for fine restaurents", forward_params={"do_sample": True})
|
31 |
+
|
32 |
+
scipy.io.wavfile.write("musicgen_out.wav", rate=music["sampling_rate"], data=music["audio"])
|
33 |
+
```
|
34 |
+
|
35 |
+
## Citation
|
36 |
+
|
37 |
+
If you use this model, code or the data in your research, please cite the following article:
|
38 |
+
|
39 |
+
```
|
40 |
+
@misc{spanio2025multimodalsymphonyintegratingtaste,
|
41 |
+
title={A Multimodal Symphony: Integrating Taste and Sound through Generative AI},
|
42 |
+
author={Matteo Spanio and Massimiliano Zampini and Antonio Rodà and Franco Pierucci},
|
43 |
+
year={2025},
|
44 |
+
eprint={2503.02823},
|
45 |
+
archivePrefix={arXiv},
|
46 |
+
primaryClass={cs.SD},
|
47 |
+
url={https://arxiv.org/abs/2503.02823},
|
48 |
+
}
|
49 |
+
```
|