Mental health is an important part of our life. It impacts our thoughts and our lifestyle. We decided to do something good for society by making a small effort in improving people's moods. As Mother Teresa said "We ourselves feel that what we are doing is just a drop in the ocean. But the ocean would be less because of that missing drop", we believe this small effort will make an impact on people's lives. About 900,000 people die due to suicide every year worldwide. Mood swings are the prime cause for a person to attempt suicide. This has pushed us to ponder over this issue deeply. Here is our small effort to analyze a person's mood based on their daily activities and soothe it in case of a disturbed mind.
What it does
Our application asks users to describe their daily activities using which we detect their mood. With their mood known, we ask them to read quotes and watch videos that have been specially catered for uplifting their mood.
How we built it
We built this application using the wit.ai NLP framework and Flask. We trained the wit.ai application for 8 different moods using several hundreds of utterances in order to detect the mood based on the given phrase describing a person's activity. Then, we developed a website using Flask and Python which takes the user input (which offers both textual and speech-to-text recognition) and connects to the wit.ai using REST APIs. Based on the mood output, it displays the detected mood and illustrates a set of 4 quotes from our pre-defined collection of quotes catered for each mood. Additionally, it selects a video from a collection of video URLs for further impact. In case, a person provides some irrelevant input, the application automatically handles and displays an error requesting another input.
Challenges we ran into
We had to learn the wit.ai framework and its integration with our Flask application which took a while initially as the quick start guide offers limited information. Additionally, integrating the speech-to-text recognition system posed a challenge while integrating it into the core application. Apart from the challenges faced in the web development, it was very cumbersome to train the wit.ai app manually with several hundreds of utterances as it offers no easy way of providing a file input containing a dataset. We performed this tedious operation for training each of the eight trait values associated with the moods, apart from collecting a library of quotes and videos for each mood individually.
Accomplishments that we're proud of
We are proud to help society by providing a platform that can uplift people's moods in times when the world is dealing with the ongoing Covid-19 global pandemic leading to the prevalence of discouraging moods among people.
What we learned
We learned how to use the wit.ai NLP framework, how to build an application using Flask, how to deal with REST APIs, and speech-to-text recognition functionality. We also learned how Precision/Recall confidence scores change as we train a model for multiple traits. Last but not least, we learned how to collaborate with team members, work together through virtual platforms, and test our leadership skills.
What's next for Mood Analyzer
We would like to expand our domain by exploring more varieties of moods (apart from the existing eight) and also plan to train the wit.ai with more examples. Additionally, we would like to explore further possibilities of detecting moods beyond the recordings of daily activities and also provide more support apart from displaying quotes and videos.