Difference between revisions of "Vybz"
Ithomas310 (talk | contribs) |
Ithomas310 (talk | contribs) |
||
Line 74: | Line 74: | ||
Twilio is a cloud | Twilio is a cloud | ||
+ | |||
+ | |||
'''Website''' | '''Website''' | ||
Revision as of 21:40, 1 May 2018
Contents
Overview
Our goal is to create a sound detection system that alerts its users in response to the amount of noise in the room. This is an efficient way for people to gauge the volume level of their environment and maintain the desired vibe or atmosphere in the room. A practical application for this system is for students in dorm rooms hosting social gatherings and parties, the system will alert the user when the sound level of the room has gotten too loud. This device will hopefully reduce the amount of noise complaints from neighbors and visits from RAs. This application will consist of three main components: A microphone to gauge the level of noise in the room, a Raspberry Pi to analyze data and send signals to the speaker, and a website to easily download the python file which runs the program. In addition, the Raspberry Pi will be primed with code gathered from our own knowledge and coding libraries which include an audio spectrum analyzer that works in real time. With music being a vital part of today's culture, the Vybz detection system would be useful for keeping the social atmosphere of social gatherings, uninterrupted by the need to check if the volume level is too loud.
Link to log: https://classes.engineering.wustl.edu/ese205/core/index.php?title=Vybz_Log
Link to Project Proposal: https://docs.google.com/presentation/d/1-aceL_Ulm3FMN4_c8DnqJogrqBLV7KN6ToSFz62DLEk/edit?usp=sharing
Proposal PDF: Media:Vybz_Project_Proposal.pdf
Link to Poster: https://docs.google.com/presentation/d/1XbHT7HDg9GSyXPq9Pz4P7c1x6OASOrVdHth8_D2qg-Q/edit?usp=sharing
Team Members
- Daniel Li
- Isaac Thomas-Markarian
- Benjamin van der Sman
- TA: Sam Chai
- Instructor: Dennis Mell
Objectives
- Gather resources (speaker, microphone(s), A/D converter, etc...)
- Configure the microphone with an A/D converter so the microphone's analog signal is transformed into a digital one
- The Raspberry Pi needs a digital signal to read
- Prime the Raspberry Pi to receive and analyze the digital signal using:
- Our own coding knowledge
- Newfound Python skills
- Libraries of code for the Fast Fourier Transform
- Use the Raspberry Pi internet capabilities to access music/songs to be played
- Code a running set of integers in real time to represent the volume level
- Connect the Raspberry Pi to the speaker in order to adjust the volume as a result of the input signal
- Create a visually appealing website that will print out notifications of the sound level
- Develop a plan for a demonstration that does not impede on other's project but effectively displays our project
Challenges
- Learn how to program the Raspberry Pi using Python and skills from the tutorial videos
- Access and dissect coding libraries that may hold code that is useful but lies outside of our skill level
- Find and apply the audio spectrum analyzer to create sound profiles of the ambient noise and the speaker's music
- Establish a communication between the Raspberry Pi and the microphone
- Develop website that will show notification
- Have a real time running set of integers displaying the sound level
- Work to develop an effective demo given the location, Lopata Gallery
Gantt Chart
Budget
- Raspberry Pi (Provided)
- Microphone ($9.99)
Total: $~10
Design and Solutions
Overall Setup:
We used a Raspberry Pi and a USB microphone to detect the sound level in the room. Using the analog signal from the music played, we translated the sound bytes into a series of integers that represents the volume of sound. We tested that when the level falls within the 70-80 range of the integers, the sound leaks through the walls in WashU campus dorms. In response, we programmed our Raspberry Pi to print out the statement “Turn the volume down” when the microphone when integers in this range are recognized. Because it is unrealistic of the Vybz user to be closely monitoring the program on their computer while they are preoccupied with listening to loud music or hosting a social event, we created an alert system so that the program will send an SMS message to the user when the volume in the room has surpassed the threshold for an elongated period of time. To make this system more visually appealing, we designed a website with information about Vybz and a link to download the Python file which contains our executable program.
Recognizing Audio
On of the earliest problems we ran into into was getting the Raspberry Pi to recognize the audio signal from the microphone. In order to analyze audio information with a computer like the the Pi, we had to convert the analog signal which is the type of signal received by a microphone, and convert it into a digital signal which can be analyzed or manipulated with a computer. This signal transformation can be done with an A/D converter (analog to digital), but instead of purchasing this device, we found a USB microphone with this converter built in. Even with this microphone, it was difficult to find where the signal was being recognized on the Raspberry Pi. One of our first successes in visualizing the digital audio signal was through a program called Audacity, where we used a built in Fast Fournier Transformer (FFT) to visualize the frequency of the signal. *insert audacity graph here*
While this was a hopeful step in analyzing the signal, we found that Audacity is only able to analyze the signal and create this visual representation after recording. This was a crucial limitation because in order for our device to function as we conceptualized it, the program needed to be able to analyze the audio data in real time. After extensive searches for real time audio analysis programs, we came to the conclusion that we would have to build an audio spectrum analyzer for the device to work as intended.
Audio Spectrum Analyzer
An audio spectrum analyzer is
Integer Conversion
- image of raw data if we have that
The raw data came out as zeros and ones when we ran our initial code for the audio spectrum analyzer. This was not optimal since our purpose for this data was to compare it to a threshold in an intuitive manner. We found that the best way to navigate this problem was to convert our raw data to integer values. We modified our code so that this transformation occurred in real time so that it didn't effect the speed at which the feedback loop of our program would run. Below is a visual of the array of of integers which refreshes itself at near real time speeds.
- video of integer array*
Twilio
Twilio is a cloud
Website
Results
The final results of the Vybz Detection was a device that:
- Incorporated an audio spectral analyzer
- Transformed individual sound bytes into a string of running integers that could easily be analyzed
- Used algorithm that alerted the Vybz user when the volume threshold was passed with a print statement on a GUI screen
- Was accompanied by a website we built with information about the company and a link to download the Python file with our code
- Incorporated an alert system that sent an SMS message to the Vybz user when the volume threshold had been exceeded for a specific duration of time
While we met all of the goals that we set for the Vybz detection system, with additional time to enhance the device, we would add settings so that the user could calibrate the threshold of the program depending on how far away from their neighbor or whoever else they are concerned about disrupting in a simple way. This would take Vybz to a wider market than just WashU campus dorms which is where we currently have the threshold based on. In the future, Vybz could be a sound detection system that logs the volume levels in any space to reduce noise complaints, and could serve as additional information about loudness for people investing in residential spaces while still holding its original purpose of maintaining the ambience of a party or social event.
Link to our GitHub: https://github.com/bvandersman/vybz/tree/master