Voice to Image Commands: Done Before You Can Say 3

Trever C
Tribe Bytes
Published in
2 min readSep 29, 2019

Our most recent coding project required us to code a project using an ml5 format as input and p5 output. Currently, it is the seventh week and our third project in coding. As a team, my partner and I decided to use a sound classifier to display images onto a canvas. This project required a bit of looking back to my skills of using HTML because I had not been required to use it in a year. However, with enough focus, we were able to finish it in a week’s time.

The first thing my partner and I needed to do was wrap our heads around sound classifier. This alone took up an hour of our very limited time. After watching a detailed tutorial on the sound classifier, we went to work. We first had to set up the preload function into our code which didn't take too long. After that we had to set up the minimum commands which were the numbers 0–9, yes, no, up, down, left, right, stop and go. After we mapped these commands we struggled even more so to find a way to allow the webpage to accept microphone inputs. When this setup process was finished we finally got to work on the real project.

Our first choice was to find a way to call the images so that when one of the commands is called an image would be displayed. This required the images to be called from the file which I did not know at the time. After we got this working there was another dilemma we had to face. The images that were being shown were not big enough to fit onto the webpage. We had to resize both the canvas and the images to have them fit onto the webpage. This took us a decent amount of time to change because even though we resized the images, they continued to display at a larger size than the canvas. We also noticed that some of the images were not displaying at all and then we realized that we had missed a few. In turn, we had to go back and code in the images once again.

Throughout this process, I learned a bit about computer programs. One of them being that you can be limited to a few inputs but once a program has been set up it opens up thousands of possibilities. I also learned that working with a partner is very convenient, especially if they can help areas out of your expertise. In summary, our finished product wasn’t amazing but we were able to wrap our heads around the format and finish the project on time.

--

--