Custom Component: OpenAI Music Companion

I’ve created a custom component that is designed to be a music listening companion for Home Assistant. It is not bound to any specific music service. All you need to feed it is a Song Title and Artist Name.

You can generate images based on a selected artistic profile (or use your own), such as Hyperrealism, Andy Warhol, Watercolor, Tim Burton, Psychedelic, Vintage, Anime, Gothic, etc. It will use a description of the lyrics, lyrical content and band style generated by OpenAI to create the image.

Additionally, there is a text component that can provide Song Info, Lyrical Interpretation, Recording and Songwriter info, General Trivia or Similar Song Info. These responses can be assigned personalities (or use your own) to keep it fun and interesting. Sample of available personalities: Grumpy Old Man, Clueless Person, Musician, Karen, Hipster, Pirate.

You will need an OpenAI API key and a pay-as-you-go Account. Please note that gpt-4 is available as an option in the Integration Optional Configuration but will generate an error if you have not been granted API access to gpt-4 yet.

The README has more info, including example pricing. The tool is designed to be highly customizable and the services are only called when you want them to be.

The Services Tab in Developer Tools is the best way to try it out and get familiar with the two services.

The component is HACS compatible. You can add it as a custom repository.

Have fun with it!

Hyperrealism Image:

General Song Info:
general-normal

A Clueless Response:
general-clueless