Introduction
The objective of this project is to use machine learning methods to build a voice activation system. The system will use your voice to turn on a led, and read / display the current temperature. The following sensors are utilized: Raspberry Pi Pico, Analog Sound Sensor, RGB LED, LM35 Temperature, Button, and 4-Digit LED Display.

System Overview

Data Collection
An analog sound sensor works by converting sound waves into electrical signals through a vibrating diaphragm. The output of the sound sensor is an analog voltage that varies directly with the intensity of the sound.
Because of this my original approach for collecting sensor data was to take the sensor data signal over a period of time and sum it together. This way I was only working with a single numerical value to distinguish between words. However, this method did not provide much clustering and only had a max of 40% accuracy when training. Below is the histogram to show distribution.

Instead, to improve data collection I integrated a button that would trigger the collection of the signal values at a specified sample rate, storing the results in an array. This ensured uniform data collection for each word.
Initially, summing the entire dataset obscured any distinction between words. However, if I used an array of collected sound samples and evaluated the statistics of each signal, such as skew and standard deviation, notable features could be extracted! This is because while the sum of the volume for each word was the same, the spikes for the loudest or for syllable changes were different for each work if pronounced correctly.

Training
From this data the model was trained using skewness, kurtosis and standard deviation of each sound signal. Several models were tested but, overall the Gaussian model had the highest accuracy and was used for the rest of the project. This is probably because Gaussian is robust to noisy data and is less sensitive to irrelevant features.

Results
Code: https://github.com/hopeChambers2222/ML_Analog_Microphone.git
Demo: https://youtu.be/rLVGm9qQUQo?si=8Y5GkFYiu9FKWqPf