Olivia Kukar, Ariyan Kalami, Brian Nguyen, Rishi Chandra
Audio file compression standards are relatively consistent across different platforms, regardless of what a given audio file actually contains. We are analyzing differences in sound between audio files of different levels of compression and comparing the noticeability of these differences across different types of audio, namely different genres of music. We hope to identify certain types of audio that can be compressed at different levels than others in order to propose more efficient compression schemes for those subgenres.
Compressing audio files is essential to efficiently streaming and storing music. Audio codecs are the languages used to compress audio files. The encoding process takes analog signal inputs and converts them into a digital form. Then, the codec decodes it back into analog signals for your device to play the music. The codec can either be classified as lossy or lossless. Lossy compression slightly changes the audio after the decoding process and lossless compression maintains the audio quality after decoding.
2. Methods and Materials
Audio files were collected from a variety of music genres. The goal of the project is to determine which genre of music sounded the most similar to the original audio. Using Logic Pro X, the sampling rate of a specific audio file was modified to various frequencies. The variables used ranged from 64000 kHz to 11025 kHz. The next step required human reviewers to process the compressed audio files and compare them to the original. A value was assigned to the individual file containing the reviewer’s opinion of how satisfied they are with the compressed audio file. The value assigned to the file was a rating from 1 to 10. The data collected was logged into a spreadsheet on Google Sheets. There were a total of 100 audio files that were rated by three individual reviewers. Then, the three scores for each compressed file were averaged to determine the aggregate score.
We found that some genres, such as classical music, are much easier to compress in terms of lossless compression. The difference between different compressed versions of such songs were very minimal, and even nonexistent at times. This is the case with genres such as classical because there aren’t as many instruments or vast ranges between sounds at different frequencies. In this sense, our study did work. In the future, we could try testing and research on even more types of genres to see if any respond the same way that classical did.
Thank you to professor Tsachy Weissman and to all of the Stanford staff who made this research experience possible through sharing their time, efforts and equipment.
Stephens, C. (2018, September 10). After MP3: The Past, Present, and Future of Audio Codecs. Retrieved from https://www.premiumbeat.com/blog/past-present-future-audio-codecs/
Lee, J. (2019, February 26). The 10 Most Common Audio Formats: Which One Should You Use? Retrieved from https://www.makeuseof.com/tag/audio-file-format-right-needs/
The sense of smell is vital for humans and animals to execute everyday functions. We are in the process of building an electronic nose, referred to as an “e-nose,” that has the ability to perform artificial olfaction. By following the electronics layout from the article A Compact and Low Cost Electronic Nose for Aroma Detection, authored by faculty of the University of Extremadura, as the basis for our “e-nose,” we plan to create a machine that accurately ingests and differentiates between different odors. Through alterations such as linking our microcontroller to multiple new sensors like a volatile organic compound (VOC) sensor, ethylene sensor, and temperature and pressure sensors, we hope to gather a large enough data set to train it using principal component analysis (PCA), Machine Learning, and Arduino C algorithms so that our “e-nose” will successfully recognize and classify odors.
Olfaction, the process in which microscopic particles trigger olfactory receptors, has been adapted to mechanical use through a variety of sensors. The VOC (volatile organic compound) sensor, has been utilized to detect trace amounts of propane, butane, methyl chloride, formaldehyde, d-Limonene, toluene, acetone, ethanol (ethyl alcohol) 2-propanol (isopropyl alcohol), hexanal, pesticides (DDT, chlordane, plasticizers (phthalates), fire retardants (PCBs, PBB)). These VOC sensors works in concert with the humidity, temperature, and pressure sensors to create a library of what certain substances emit.
2. Methods and Materials
● Smell container or “smell box” ● Stanford University equivalent of Arduino Uno from lab64
In order for our e-nose to fully “sniff,” we let the odorant’s smell saturate the container by placing it inside to rest for one minute before gathering data. Afterwards, we would calibrate both parts of the nose and encapsulate it, along with the odorant, inside the plastic tupperware container.
● Temperature and Pressure Sensor ● Temperature and Humidity sensor
To retrieve accurate and comparable data from each of our sensors, we made sure to firstly run a data collection test with only the air inside the smell container. This ensured that we had a standard, dependent variable to compare the rest of our tests with.
Our e-nose utilizes 5 different MQ-VOC sensors that detect a combination of over 15 gasses. Each of these specific gas-sensitive sensors output a voltage that fluctuates depending on the measured detection of different gasses. In the Arduino C code, we have calibrated each sensor with a respective sensor-specific algorithm so that instead of reading the returned voltage, we are easily able to watch the change in the measure of ppm, or “parts per million.”
There was room for error in various parts of our process. One example is our design of the “smell box” shown in figure 3. In order to gather data from the sensors, we needed to use a physical cable to connect the arduino to the computer. This prevented us from closing the container completely, leaving a sizeable gap for airflow, altering our results. A solution for this issue would be to drill a hole through the plastic tupperware, feed the cable through, and add an airtight seal with hot glue. Another issue we faced was that the box trapped strong odors from odorants such as garlic and onion. Although we tried to air out the box with natural air from the window, the strong smell would not disperse. These lingering VOCs may have affected our results, and in hindsight, testing these items at the very end of our testing process would have prevented the contamination of our data.
In figure 1, the raw data is shown in a text file copied over from the arduino IDE. To process this data, this project utilizes Excel to import the text file shown in figure 2. From there, visual representations through box plots are used and compared with other substances to determine if there is any quantifiable difference.
We have successfully created a prototype for our electronic nose. Although at this point the nose does not specifically report what the odorant is, the code to display this information on the LCD is simple to integrate. Our e-nose is able to send data back to our database where it is manually processed in Microsoft Excel and averaged. Then the averages of the data are compared with previous averages in the database to check for similarities and possible odorant matches. One a match within margins is determined, that is what the odorant is classified as. Ultimately, our electronic nose serves as an artificial olfactory receptor and available for a multitude of applications.
5. Future Directions
In the future, we plan to continue developing our e-nose so that it includes a bluetooth module on the board that sends the data directly from the arduino to the computer instead of using a physical cord. This way, our smell container will become completely airtight, increasing the concentration of the odor, as well as preventing external, airborne contaminants from disrupting our results. We also plan to move from a wireless breadboard to a perf board with either a wire wrapping or soldering method to increase portability and for a more professional professional aesthetic. Lastly, we hope to utilize our LCD (Liquid Crystal Display) screen so that it displays the detected odorant and easily read by the user.
Other possible applications of our electronic nose includes detecting if fruit is fresh or if it has spoiled by targeting the data from one of the MQ-VOC sensors sensitive to ethylene. After finding the threshold of ethylene gas emission from ripened fruits, we could easily use the nose for freshness evaluation. Another direction would be to use this nose as a medical device to help those with chronic sinus infections to sense the odors around them through visual output (LCD).
We would like to acknowledge Professor Tsachy Weissman, Professor of Electrical Engineering, for his guidance and assistance to access the resources available in the David Packard Electrical Engineering building. We would also like to thank Steve Clark, head of lab64, for his willingness to teach us soldering, wire wrapping, and advice regarding our e-nose. Special thanks to Chris Metzler, our postdoctoral mentor, for his time, support and effort to guide us through the entire process of creating this product. Another special thank you to Devon Baur for connecting us with the other olfactory-related project groups and organizing the informative field trip to Aromyx. Last but not least, thank you to Cindy Nguyen for running the Stanford Compression Internship and giving us the opportunity to explore new subjects and invent this summer.