How can i make a program which can recognise feelings ?

Hello, I want to make a project which can recognise emotions from words that i said. Where should i start ?


  • Answer ✓


    Sounds Interesting!

    You mean you enter a text by typing and the program estimates the emotions?

    First idea: Microsoft has within its azure program a branch of cognitive services (via api).

    There is one as a preview that could suit you. Learning curve is probably pretty steep:

    An api is a service that you can use from within your sketch

    Chrisir ;-)

  • edited August 2017 Answer ✓

    You should get some texts that are test cases for the emotions you want to detect. Eg unhappy / angry customers or suicidal people.

    Without texts you cannot test.

    Beside the api I mentioned a naive approach would be to search the text for keywords like frustrated sad angry anger tears dark sunny afraid fear etc. and count them. With a certain threshold or probability the emotion with the most words (that belong to this emotion) in the text wins against the other emotion.

    When 2 or more emotions have the same word count both apply.

    The approach is naive because a sentence like I am not angry just sad would mislead the program...

  • Ok, thank you. But i want to recognise emotions from speech. I think i should record the voice first and i though i can use minim library for this. Then should i make the program write those speech to a file ? I don't know how to do it.

  • Answer ✓

    In the azure site there are also speech emotions api and speech recognition api. Both is not trivial.

    Do you mean you convert the speech to text first and then recognize the emotion in the text or do you mean you recognize the emotion in the speech (its sound)?

    Maybe look at the libraries of processing (extra menu point on the website) or search speech to text here in the forum

  • Answer ✓

    But yes, for the basics like recording I guess minim is a good starting points.

    It has great examples

  • Thank you for your helps. :)

  • Emotions from speech is a very hard problem. If you are looking for articles and software tools the phrase you are looking for is "speech sentiment analysis."

  • Also note that:

    "I hate you so much!" (said in a joking / happy / loving tone of voice)

    If you run speech sentiment analysis, it will focus on the tone (love).

    If you use speech recognition to text and then use sentiment analysis on text, it will focus on the words content (hate).

  • Yes, you are right. Speech sentiment analysis is important here. I will consider it. Thank you.

Sign In or Register to comment.