The Tone Analyzer service from the organisation IBM Watson uses language analysis to detect emotions in written text.

The service can analyse the tone of messages - angry, happy, confident or sad - both at document and sentence level. Organisations can utilize the service in order to understand how their own written communication is interpreted, in order to improve its communication. At the same time they can also use the Tone Analyzer to get to know the emotions behind the communication of their customers, in order to be able to respond adequately.   Since recently the Tone Analyzer has been used in call centres: during telephone conversations the Tone Analyzer analyses both the mood of the customer on the phone and the operator.

Read more on the IBM website.