Solution for smart speaker integration of selfhosted music library
I've been using a google home smart speaker to play music from spotify for a while now, and my family really enjoys this (especially the kids who are young enough that they don't use smartphones or computers like that they can just ask google to play their favorite songs). But I've got a lot of music in my own library that isn't on Spotify or other cloud services, that I want to get the same functionality with. Specifically, I want to be able to give voice commands to have a smart speaker play music from a selfhosted library. At the bare minimum I want to be able to give a specific voice command to start playback on a pre-set speaker of a pre-set album or song. Ideally, I'd like it to be flexible enough to be able to accept voice commands for starting playback on any speaker of any song / album in my library, along with things like pausing and skipping songs via voice command.
I currently have google home smart speakers and a plex server for my music library, and I can manually select music from my plex library on my phone or a computer with a plex client and choose to cast playback to my google speaker, but I want to add voice command functionality. So I started setting up a home assistant server with plex integration using this https://github.com/maykar/plex_assistant. But when I got partway through, I found that google assistant has recently disabled the "text ingredient" commands that made this method possible, and my searching hasn't found any work around to get that functionality back. It looks like home assistant has a subscription service called Nabu Casa that may add this functionality, but I'm not interested in paying for a subscription. If there is a way to integrate google home with a plex music library that would be great, but I'm open to different solutions as well, I just want to avoid Alexa. I found these instructions to build your own voice remote https://www.home-assistant.io/voice_control/thirteen-usd-voice-remote/ which I will probably try next if I can't find any way to integrate google assistant on my existing google speakers, but that would be a last resort.
I have all my music on a NAS and two BlueSound speakers that are indexing the NAS.
For the voice command part I have a raspberry Pi with a microphone hat and running Rhasspy Voice Assistant (bonus: it's purely offline).
That interacts over MQTT and is processed by a rather complicated Node-RED flow that handles all the play/pause actions. Voice commands include "Volume Up|Down, Play next track, Skip Album, Skip Artist."
All this assumes that you have a playlist loaded and ready to go. It doesn't look up a track and play it. You can't say "Play Never Gonna Give You Up By Rick Ashley", it will just ignore you.
You could do it with a massive amount of work. You would need to index your music library (track names, artists, albums) and import it into Rhasspy as data for it to learn. It would take a huge amount of processing for that, and it would need to be done every time new tracks are added or removed - which is why I never bothered.
If there is a way to replicate the google/alexa experience by using locally stored music, I would love to know.