We live in a world of mobile phones. A world where no atom bomb can do the destruction one social media post can. Communication industry has taken a drastic turn in the way it functions. From Millennials to Gen-Zs, grandparents to grandchildren, everyone is using a mobile phone for communication. According to a recent survey conducted by MBA online, around 4.2 billion people are using texting as one of the primary forms of communication. However, all forms of written conversations, especially texting, create a major risk of miscommunication, especially among those currently in their mid-40s and above. If anyone has ever received texts from their grandparents or parents, they would relate with how the text is often very dry and formal, especially to us younger folks. Moreover, it can also lead to miscommunication in the workplace, which could have a serious impact on our work-life. To resolve this issue, we need a better way of communicating our feelings and emotions through texts, a chatting platform that would allow us to properly portray our feelings to the receiver, reducing misunderstandings and making life easier for the ever-expanding community of texters.

What it does

Tonality, is a chatting app allowing its users to express and communicate their feelings in a better way. Any user using Tonality for texting would enjoy the ability to portray their emotions through messages using not only texts, but a combination of texts, colours and much more, immersing themselves in a complete and wholesome communication experience. Major features include

  • Adding tone by way of a background hue to better portray an underlying emotion or tone in which the sentence would have been spoken
  • Text Modification to turn dry formal english texts into a more modern texting-friendly format to reduce generational gap between texters
  • Predictive Tone Analysis to give hints to the sender as to how that text might be perceived by the receiver, to reduce chances of miscommunication
  • Finally, as an added bonus, we can create multiple chat rooms :)

How we built it

We primarily used Java to build the client and server applications using Servlet technology, utilising both TCP/IP and UDP protocol. We used swing to build the frontend of the application. For the predictive tone analysis, we used IBM Watson Tone Analysis API endpoints. We also had to use some amount of multithreading in order to make sure our app remained responsive even after the expensive API calls.

Challenges we ran into

A big challenge was writing the client-server and the implicit chatting app first even before we could start implementing the tonality features. We also had to make tone addition possible in a user friendly way, and had to devise ways in which we can modify the text to make it sound more modern internet era friendly. Lastly, a big challenge was to make the IBM Watson APIs work correctly as there was not enough proper material online for it to be an easy task.

Accomplishments that we're proud of

Our biggest accomplishment here is managing to port all three ways in which tonality can be usefully applied in a chatting application, ie, the exact tone, sentence restructuring, as well as predictive analysis from the receivers perspective. A technical challenge we are proud of is to integrate with our code the ibm_watson API, all within a very short timespan.

What we learned

We learnt how to handle different swing widgets, how to write client-server apps, how to ensure that client and server find each other by first broadcasting a UDP signal and then proceeding onto a TCP/IP handshake so that we don't need to hardcode an ip address. We learnt about using layout managers, about tone analysis, and most importantly, we learnt how to very effectively divide the research work and coding work amongst ourselves, which has made this entire venture possible.

What's next for Tonality

Going forward, we plan on improving all the three features of our chat application.

  • For setting the tones, we plan on making a much better UI so that we don’t have to use text tags anymore
  • For the text transformation, we plan on using pretrained NLP models to help us transform texts into a more modern format
  • We also plan on fine-tuning the IBM_Watson tone analyser further to server our purpose.
  • We plan on crowdsourcing more examples of what is the modern-text equivalent of a somewhat formal text a person of the older generation might write, and use that data to fine-tune our NLP models.
  • Lastly, we plan on releasing a webclient instead of a Java desktop app.

How to Run?

  • Clone the github repo on intellij
  • build using gradle (it should automatically appear as a gradle project)
  • go to the class Server in servers package, and run its main method. This starts the server.
  • Go the class LoginWindow in client, and start its main method. This starts a client.
  • First sign up using a username and password. The age field needs to be filled, but can be filled with any number. The picture url field can be left blank. Register more than one users. Then go to log in, and login with a username/password.
  • You can do this with more usernames and passwords also.
  • Now, click on the default chatroom and press start chatting.
  • type in the upper text box, and click send to send the text.
  • click on the “check” button to get a prediction as to in what tone your receiver might perceive the text.
  • To convey a tone yourself, you can use commands like /ex for excited and /sr for sarcasm (find more details in the “Tone” class under resources package.
  • you can also create new chatrooms, which should appear once you hit the refresh button on top of the MainWindow

Video Demo Link

Built With

Share this project: