Description of project
Never Stop Learning
Our project is based upon an extraterrestrial flower named Glitchi who is an intelligent being, originally from a galaxy 27 million light years from earth called Sunflower Galaxy. He resided on the planet called HelianthusX, where all the entities (highly intelligent plant beings) on the planet expressed only one emotion, happiness. Negative emotions such as sadness and anger have not existed on the planet for the past millennium. It is a world where all of the beings were programmed/created in a way that they would maintain “perfect” social structures. This was all true except for Glitchi, who was quite different from the rest. He expressed an array of human-like emotions which was out of the perfect societal norm of the planet, since human emotions are known to be quite unpredictable sometimes, no one understood him, and were afraid of him. He himself did not really understand these different emotions or how to manage them. As a result, Glitchi is a wanderer who wants to form a connection with planet Earth’s humans. He learns that expressing different emotions is normal on Earth by listening to the stories and questions of humans. Glitchi first “awakens” when the user says “hello” to him through the microphone and then he would randomly choose from a list of audio files whether to say “hi,” “hello” or “hey.” Glitchi then asks the user what his/her name is, once the user tells Glitchi his/her name, Glitchi would respond by saying “Hello (name).”
The user then has the freedom to either ask some pre-set questions exclusive to Glitchi or any random question that would be responded through tweets through speech and on an HDMI screen. Some of the pre-set questions include “What is your favourite song?”, “What is your favourite movie?”, “What do you think about Politics?” and “What is your favourite colour”. Glitchi can also be set to ask these same questions to the user randomly. We put a small touch to Glitchi, where the user would say their favourite colour is yellow, Glitchi would say “me too,” and his lights would change to yellow. If the user says any other colour he would give a pre-set response by saying “That is a nice colour.” If the user says blue (Glitchi’s least favourite colour), Glitchi would say “I don’t like that colour.” For the favourite song, movie and politic type questions he would search on Twitter for posts related to those questions, display a random one on the screen and then read the tweet back to the user. If the tweet has a sentiment value above 0 but less than or equal to one, that means that Glitchi is happy and his petals would bloom (open outwards), his leaves would give a clapping simulation and his lights would turn green. If the tweet has a sentiment value less than 0, but greater than or equal to -0.5, then that means Glitchi is sad and his petals would slowly close in but not fully and his lights would turn blue. Lastly, if the tweet sentiment value is less than -0.5, but less than or equal to -1, this means that Glitchi is angry and his petals would close rapidly inwards, his leaves would give simulation to the user to leave by moving left and right repeatedly and his light would turn red.
Additionally, when the user says something to Glitchi, his/her conversation is also displayed on the HDMI screen at the base so he/she can see if Glitchi has understood what he/she has said or if Glitchi has completely misinterpreted the question and hence the type of response. It also creates that interesting dynamic to compare the question and the tweet. There is also a form of anxiousness that the user can experience in waiting for the tweet that Glitchi is going to select if the tweet makes sense or its nonsensical as demonstrated in the final presentation (Glitchi’s dry sense of humor).
Glitchi’s glitch: Glitchi like his name, is meant to be imperfect. He is different from the others on his planet and has traveled to earth to understand why he is different. As well as, to find people who can accept him the way he is.
Glitchi is still learning to speak English, therefore, sometimes he doesn't fully understand what people are saying to him.
Glitchi uses Twitter to communicate with and learn from people on Earth. Due to this fact, Glitchi will often say the random things he learned from Twitter.
Glitchi is feeling emotions that are not familiar to him, and he is sometimes unable to control them. Therefore sometimes Glitchi will randomly change emotions.
Sometimes when Glitchi gets angry or sad he will close his petals and stop talking to the user until he becomes happy again.
There are many different parts to the code in order for Glitchi to process all of the information that he is receiving through speech recognition. Here is part of how speech recognition is transferred to Twitter:
The Google Speech Recognition is activated from Max and sent to the Python code. After being processed by Python the speech recognition is then sent back to Max and received here. Once the speech recognition is received, it is then sent from Max to another Python code in order to extract any keywords that were said.
The keywords are then sent to the Twitter Python code. Which Searches for Twitter posts containing those specific keywords. Once found, those posts are then sent back to Max. Usually around 15 posts will be sent to Max. Therefore, Max will then randomly select one of the posts and send it to the Google Text to Speech code to have Glitchi output the text in his voice.
The screen will then display what the user said (on the first line) and then what Glitchi said (on the second line) in response depending on what he receives from Twitter.
After selecting a Twitter post the text is then sent to the Sentiment Analysis Python code. This will determine how positive or negative the Twitter post is. Then based on the sentiment found in the text, Glitchi will output an emotion that matches the sentiment.
After selecting a Twitter post the text is then sent to the Sentiment Analysis Python code. This will determine how positive or negative the Twitter post is. Then based on the sentiment found in the text, Glitchi will output an emotion that matches the sentiment.