SentiLux is a static web application that adjusts your LIFX connected lightbulbs to reflect the emotional sentiment of the room, measured through speech.
Why?SentiLux was produced for GE's Lights for Life challenge as an experiment exploring how lighting can be used to reflect - or even positively influence - emotion by analyzing speech. If you're talking with your friend about how bad your day has been, SentiLux can change your lights to a calming color.
How?SentiLux uses the Web Speech API to listen to and transcribe speech in your room, then uses the AFINN list of sentiment-weighted words to score speech based on relative emotional negativity or positivity.
After each chunk of speech is recognized and scored, the score is pushed into a buffer. The mean of the buffer is calculated and used to evaluate a "profile" function that determines how to change the lighting. There are two profiles currently available, and more can be added easily:
Moodlight: Adjusts color between red and green based on score.
Calming light: Changes from white to a calming light blue when the average score drops below 0.4.
Finally, the color calculated by the profile function is sent to the LIFX HTTP API, and your lights crossfade to the new color!
Comments