Spotting Depression in the Covid-19 era

Giannis Karavasilis
Behavioral Signals - Emotion AI
4 min readJun 2, 2020

The new era

The new reality that emerged in the early 2020s due to the coronavirus brought about changes in the way we work. Work from home has become the new standard for many employees.
In a short period of time, people were forced to learn to work in new conditions, from their homes, in a quarantine environment, which led to isolation and alienation.
Uncertainty and job insecurity have peaked and the future seems difficult for not only the many employees out there but also for far more people.
All of this raises our distress levels and is capable of causing depression which is an increasing phenomenon during recent years. [1][2]

Spotting the medical condition

All these new conditions and changes in our daily lives have brought about changes in the way we can now identify some medical conditions such as depression.
A simple, basic diagnosis of depression could also be made from our home computer.
With a 21-question online test, based on the Beck Depression Inventory (BDI) and enhanced by Behavioral Signals technology and research, which apart from its automatic speech recognition (ASR+) capabilities can also find and analyze emotions (Emotion Recognition), it is possible to detect depression. [3]

Photo by Radek Grzybowski on Unsplash

How it works

To begin with, all you need is a computer with a microphone.
The user takes the online test, 21 questions, one at a time.
Each question has 4 possible answers, to which there is no right or wrong.
The user is free to express any response he deems appropriate to him or her.
As soon as she pronounces the answer, the test proceeds to the next question, and so on.
By using Emotion Recognition technology, the user’s responses are analyzed for the tone in their voice.

Extracted results

The outcomes of this data analysis is a range of emotional and behavioral metrics that vary for every person during their day. Although it is not an exact science by tracking the range of exhibited emotions, over a period of time, we could deduce the levels of distress.
In addition, the report includes the emotional state of the user and its possible fluctuations apparent during the test.

Implementing a depression detection application

At a high level, we need the following “ingredients” to make it work:

  • Access to a microphone, either using the microphone of our computer (desktop/laptop) or the microphone of our mobile device (phone, tablet, etc.)
  • Access to a web service that provides emotion and speech recognition support
  • Our favorite programming language

Access to a microphone and programming language are the easy parts of this DIY project. But what about the design approach? How can someone design and implement such an application? Will we use a framework? Or maybe we can combine more programming languages?

As in many cases, this problem can be approached in many ways and depending on our preferred final result in terms of speed, simplicity, even aesthetics we can use various frameworks or even a combination of programming languages.

Having said that, in this guide, I will not show you an example with code. Instead, I will provide a schema about how this project can be designed. Implementation is up to anyone who wants to try, based on his knowledge of languages and frameworks.

Schema

Our schema includes the following components:

Index Page: this is the landing page of the web app. This is where it all begins for our users

Question Fetcher: this component is responsible for fetching the question set from our database (DB)

Audio Recorder: this component is recording the answers of our users and saves the recording to an audio file in our database for later process

Audio Reporter: the recording is pulled from the database by this component which is also responsible for the communication with an external service. This external service provides us the emotional and behavioral metrics of the user during the test

Report generator: finally the outcome of the process is presented to the user by the report generator

Sources
[1] World Health Organization: https://www.who.int/news-room/fact-sheets/detail/depression
[2] Centers for Disease Control and Prevention: https://www.cdc.gov/coronavirus/2019-ncov/daily-life-coping/managing-stress-anxiety.html
[3] American Psychological Association: https://www.apa.org/pi/about/publications/caregivers/practice-settings/assessment/tools/beck-depression

--

--

Giannis Karavasilis
Behavioral Signals - Emotion AI

Software Engineer / Analyst with a keen interest in new and emerging technologies. Github: https://github.com/kgiannis