Microsoft Emotion and Spotify “Mood Music” Project [API Smash]
Blog post from Rapid
In an innovative project that combines Microsoft’s Emotion API and Spotify’s Public API, a script was developed to identify emotions from images and recommend corresponding musical playlists. The Microsoft Emotion API analyzes facial expressions in images, providing confidence scores for emotions such as happiness, sadness, surprise, and others. Using RapidAPI to facilitate API calls, the strongest detected emotion is determined and then used as a query in Spotify’s API to find matching playlists. This process, dubbed "Mood Music," was created by acquiring a subscription key for the Microsoft API and utilizing RapidAPI for seamless interaction with both APIs. The Spotify Public API, which does not require a subscription key, allows the script to search for playlists based on the identified emotion, and the top playlist result is automatically opened in a browser. This integration demonstrates the creative potential of combining different APIs to deliver personalized user experiences, with the entire project available for reference on GitHub.