The application is a website composed of a front-end created in React, a very basic REST API created in Flask, and process_eeg function written in python. The website allows the user to upload a file containing raw eeg data that we can send through the REST API. The REST API uses POST to take the user’s file (containing raw eeg data) and send it to the python process_eeg function. The python process takes the user’s file and processes the raw eeg and returns an approximate number of decibels for each eeg band each second which we use to generate a soundscape, done in React, and also to increase the volume of the music when you are less focused, this is determined by your beta and gamma waves at the given second, and is also implemented in React. We generate client-side graphics using p5.js to generate soundscapes where the activity on the screen is affected by the brain-activity data of the user. We also utilized react state-management to update the components as needed.

The python script primarily uses the MNE library to process raw eeg data into power spectral density to be summed up according to the specific band the frequency corresponds to. This is done in 1 second interval for at most 60 seconds, this information is returned.

The REST API is created using FLASK restful. It accepts a POST request to call process_egg and return a JSON response of the processed data.

Built With

Share this project: