Skip to content

addiaddiaddi/voice-twin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Final linalg project (senior yr hs)

Classifying voices with Fourier Transform and KNN.
Do not worry about code quality. This was a math class 🙂.

record.py

Upon running the program, it will prompt you for a name and number of samples to take. You can then press enter, and speak quickly. It will record your voice and perform the fourier transform on it. The transform will display, and the program will prompt you if you would like to keep that sample, or discard it.

knn.py

Upon running this, it will create a knn model with the provided data, segmenting out 30% for test cases. It will then create an adjacency matrix with the euclidean distance between all of the data points and then print it, with the red concentration of the value correlating with distance. It will then produce a 2D and 3D chart of the adjacency matrix using a spring algorithm (edges become "springs" with a spring constant inversely proportional to the distance), creating a mesh network of data points (nodes/voices) allowing humans to visualize the similarities between data points.

data

theclass.json and highlow.json are the data sets that I collected for my presentation. The former being one sample of most people in the class, the latter being 9 samples of me singing with a high voice, and 9 samples of me singing with a low voice (you probably don't want to reverse transform and listen to me 😩)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages