This bot was inspired by the numerous personality Buzzfeed quizzes I've taken. In this bot, users are given 4 questions that they need to respond to verbally. After they answer, the bot will respond with a picture that is a guess of the user's appearance. There were a total of 10 parameters that I thought would be fun to pass into the API:
model
hair-length
name
gender
age
emotion (which I didn't end up using)
ethnicity
eye-color
hair-color
confidence
Since, I didn't want to ask questions for each parameter, I thought it would be fun to have the computer make some assumptions about the user. For example, I called the Gender API to deduce the user's gender once they enter their name, deduced the hair-length on the month the user is interacting with the bot, and I randomized the model's version. For any unintelligible input, I randomized the parameter.
Once all the questions were asked, I requested the Generated Photos Api for a photo. Initially I ran into the problem of always returning the same picture that didn't even seem to be relevant to the parameters, so I ended up filtering out the results by gender and ethnicity since those are huge visual factors compared to the other parameters.
One huge technical difficulty was synchronizing the event listeners, and so my hacky solution was to use buttons to trigger starting/listening/stopping the speech.
Unfortunately since the API is really stingy (only 50 requests per month š”), I created a rudimentary password so that I don't run out of my monthly requests...
Generated Photos API: https://generated.photos/face-generator
Gender API: https://gender-api.com/en/
https://paulineoc.github.io/ITP-HelloComputer-HW2-Web/
If it doesn't work, it's probably