Inspiration

Mothers, the single most important part of our lives. From carrying us in their womb for 9 months, to shedding tears as we leave for college, some claim that mothers have a third eye.

In college, amidst our busy schedules, we don't talk to our family as much. Things like mental health, sentiment, eating patterns, and other important facets of our lives lose importance as there's no one to guide us and tell us right from wrong. Instead, the rush of grades, social relationships, classes, and more start to take precedence.

Personally, my team and I miss talking to our mothers' a lot, and talking to my mom made me realize that I wasn't as happy as I thought I was. We struggled with mental health burnout with COVID, and getting Counseling and Psychological Services appointments became harder.

To tackle this problem, we built SafeSpace. SafeSpace calls users once every day for ONLY 60 seconds, asks them how their day was, and records/transcribes their response. It takes this transcription, feeds it into state-of-the-art NLP models developed by our team's AI expert, and determines your sentiment and emotions just based off your everyday conversation. It plots these results on a dashboard for you, offers you transcriptions/access to your daily recordings, and uses AI and machine learning to find anomalies in your day-to-day social and mental health.

What it does

Utilizing Twilio and our software design, SafeSpace calls you at a scheduled time every day. In this time period, you can detail your day and experiences (positive/negative) for 60-seconds, during which our software records and analyzes your tone, diction, and sentence structure in order to draw insights about your mental health state. Next, these reports are displayed on our dashboard in real time in order for you to get a better understanding of your current health. On the 'Call' page, one can even request to be called in order to have an extra meeting on the spot, while the Dashboard drop-down menus give you flexibility to schedule your next meeting for a different day. Lastly, we integrated Twitter and Facebook social media accounts and use NLP to parse the contents of your feed and provide insights, which can be displayed in the 'Reports' page containing graphs and time-series trends on your mental health. We hope that the app can help increase awareness about mental health especially for college students, and in addition help each individual gain a greater understanding of their own mental state and seek resources accordingly.

How we built it

Front-end Specifics: We utilized HTML for the website pages along with CSS for styling each page. Additionally, we used Bootstrap for the templating as well as Jinja2 for connecting with the server-side. Lastly, we utilized Twitter and Facebook extensions to integrate the social media posts into our HTML framework.

Back-end Specifics: We utilized Twilio, XML, and Google Cloud (Firebase Realtime database). Twilio's functionality meant sending post and get requests to the Twilio account to make real calls to the user to our phone numbers. Additionally, Jinja2 framework was used to pass data to the HTML and CSS files. Lastly, Flask was used to host the server.

AI Specifics: Using state of the art natural language processing tools, we analyze the sentiment and emotion in their recording. We used character based LSTM neural networks as well as robust time series analysis to detect sudden changes in mood, warning-signs of depression, and other anomalies. Technologies used to accomplish this were Python NLTK, Text to Emotion, and Flair. We utilized numpy, pandas, and other data processing libraries along the way to handle the time-series analysis that quantized factors such as mood swings, etc.

Challenges we ran into

Accomplishments that we're proud of

We're incredibly happy with what we accomplished over the course of this weekend. Not only were we able to build a product that incorporates topics in math, cs, and design, but we also built a tool that we can use ourselves, tackles one of the most pressing problems for most college students, and also does so in an intelligent manner. We can't wait to hear the judges' feedback :)

What we learned

First and foremost, we definitely learned a lot about NLP. We read a lot of research papers published by MIT and Stanford about picking up tonal cues, inflection points, and other indicators of depressions, mental health, and sentiment. We trained models that accurately pick this up. Additionally, we spent a lot of time working on the mathematical models for our anomaly and pattern detection (detecting recurring signs of depressions, sadness, or general negative sentiment). To do this, we looked at metrics such as the running average, standard deviation, and variance in order to determine things like mood swings, anomalous results, and low average sentiment in general.

On the software engineering side, Twilio was difficult to work with at times. Calling users, recording the call, and importantly retrieving Speech-To-Text transcriptions became cumbersome. We also spent a lot of time working with Google Cloud's Realtime Database, designing the schema.

What's next for SafeSpace

We hope to offer this tool to Princeton students as beta-testers. Upon completion of our beta test, we hope to work with high schools, universities, independent therapists, and even retail this product as a daily diary. We hope that the insights and metrics we are able to intelligently generate become more advanced.

Share this project:

Updates