HA capability to stream any audio to media players

I currently play multi-room music from Logitech Media Server to Squeezelite-esp32 players, and use HA to control volumes and player syncs. What I need in additional to this setup is making some live announcements through a microphone, pausing/muting/softening the music and resume after the live announcement. Is it even possible? What’s HA’s capability to stream live microphone voice or any voice stream (e.g. casting a PC sound card stream) to media players?

BTW I am able to build Squeezelite-ESP32 players from WROVER modules and also built ESPHome I2S-DAC players before. Those marketers please kindly do not spam this thread. Thank you all.

You already have one stream to you squeeze lite satellites, so either you need to make them able to merge several streams or you need to inject your extra announcements into the stream somewhere, preferable ta the start of the stream.
Ha can control the streams, but you need to somehow setup one of the solutions above, so there is something to control.

Assume I can mearge streams by hijacking a PC/Android soundcard (I already have Android AirMusic root app), how can I cast it to any HA media player?

Well, the idea is to have your music stream sending to your merge device and your speakers then getting their stream from the merge device.
When you have an announcement, then you make a stream with that announcement and add that to the merge device, which then mix the two input streams into the already established output stream for your speakers.

I just want to know how to send this stream from anywhere to HA…

HA is not a stream receiver and hardly even a stream transmitter.
HA is a controller to manage the parts in the streams.

1 Like

But how does Music Assistant play a stream to media any players?

Well, that is why I use the word “hardly”.
HA can stream that single source, but none else.
It can not receive streams and it can not mix streams.
You need MPD or similar for that and then HA is only used to control it.
I use a setup with MPD to play my music collection and different radio streams.
MPD can mix it and receive streams and I then output to a Icecast2 server for devices to receive that mixed stream and to a shoutcast server for sync playing on ShoutCast client connected speakers and devices.
HA is here not creating or setting up streams, but only control them.
MPD is the one handling the actual input, mix and somewhat output. ShoutCast server and Icecast2 server just converts to their format and stream on.
The issue here is that MPD is not running on HA, at least not in a way that can handle this, because I think the music assistant is actually a MPD service.
That means you need another place to run the MPD client, like a separate server or maybe the hostOS on a supervised HA installation (This require a good knowledge of how the different programs work together and it is not recommended by the HA developers!).

Thank you very much for mentioning MPD. Second time heard it and first time paying attention. Will dig into it!