Musical Speech

A Transformer-based Composition Tool


Jason d'Eon1,2,*, Sri Harsha Dumpala1,2,*, Chandramouli Sastry1,2,*, Daniel Oore3, Mengyu Yang4, Sageev Oore1,2

1Dalhousie University, 2Vector Institute, 3IICSI, Memorial University of Newfoundland, 4University of Toronto
* equal contribution
{jason.n.deon,chandramouli.sastry,osageev} at gmail.


In this demo we propose a compositional tool that generates musical sequences based on prosody of speech recorded by the user. The tool allows any user–regardless of musical training-to use their own speech to generate musical melodies, while hearing the direct connection between their recorded speech and resulting music. This is achieved with a pipeline combining speech-based signal processing, musical heuristics, and a set of transformer models trained for new musical tasks. Importantly, the pipeline is designed to work with any kind of speech input and does not require a paired dataset for the training of the said transformer model. Our approach consists of the following steps:

  1. Estimate the F0 values and loudness envelope of the speech signal.
  2. Convert this into a sequence of musical constraints derived from the speech signal.
  3. Apply one or more transformer models—each trained on different musical tasks or datasets—to this constraint sequence to produce musical sequences that follow or accompany the speech patterns in a variety of ways.

The demo is self-explanatory: a user can interact with the system by either providing a live-recording using a web-based recording interface or by uploading a pre-recorded speech sample. The system then provides a visualization of the F0 contour extracted from the provided speech sample, the set of note constraints obtained from the speech, and the sequence of musical notes as generated by the transformers. The user can also listen to—and interactively mix the levels (volume) of—the input speech sample, initial note sequences, and the musical sequences as generated by the transformer models.




Try our Interactive Demo! [requires chrome-based browser]

(Send us your creations-- we'd love to hear what you made with our system!)

Listen to musical samples created using this system.
Have more questions? Check out the FAQ page.





 What is musical speech? 
 How can you use this tool?