Skip to content

ucsd-ml-arts/generative-audio-will-stock-2

Repository files navigation

Project 3 Generative Audio

Will Stock, wstock@ucsd.edu

Abstract

I built a box that performs a fairly simple function. It uses a button input on a raspberry pi to randomly play one of 9 .wav files. These .wav files are nuggets of "wisdom" generated by single_speaker.ipynb, which is itself reading text generated by an gpt2 model. This gpt2 model was trained on the book "Blink" by malcolm Gladwell, which I believe to be a popular source of contemporary wisdom. The box itself was designed and fabricated by myself at EnVision in SME.

Model/Data

Blink-The-Power-of-Thinking-Without-Thinking.txt - training data, .txt file of "Blink" by Malcolm Gladwell

Code

  • Python: button_final.py - code that recognizes button press from pin on raspberry pi as an input, then selects a random .wav file from the folder music and plays it.

  • Jupyter notebooks: gpt2-finetuning.ipynb - text generation single_speaker.ipynb - generation of speech from text selected from larger text file enclosure_

Results

text_selections.txt - showcase of process of selecting text: contains full text as well as shorter selections which were then futher shortened to fit in the under 10 second constraint in the .wav file generated by single_speaker.ipynb.

music - folder containing 9 .wav files to be played at random

Technical Notes

Any implementation details or notes we need to repeat your work.

  • Needs pygame and RPi.GPIO in order to run

Reference

References to any papers, techniques, repositories you used: http://razzpisampler.oreilly.com/ch07.html https://stackoverflow.com/questions/29289539/how-do-i-play-a-random-wav-sample-from-a-folder-in-python/29289595

Physical Designs

enclosure_v2.pdf is my design which I used to lasercut my box out of particle board

About

generative-audio-will-stock-2 created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published