HomeKit doesn’t really support these types of devices. HomeKit has a so called “SpeakerService” but it is meant for doorbells where you can “speak” to. You would get a “device not supported” tile if I would try to expose them.
There are 3rd party apps that work with HomeKit that could do it (e.g. Eve App), but you would still not be able to control these devices in the Home app or via siri.
Some people wrote plugins to expose speakers as a dimmer. Being able to turn it on or off and set the volume. But that has the side effect of turning on the speaker if you ask Siri to turn on the lights.
Bottom line, there is no clean way to do it until HomeKit adds a service that can be used for these types of devices.
And yes, Apple does it for the HomePod, however, they have not added that service for 3rd party integrations....