I can just add a detail to michaelpri's answer of using a Ziploc bag. This may be safer to use outside the shower without direct water influence but best is you test it with toilet paper, for example, or just something that is easy determined if it's got wet or not.
Pinch little tiny holes into the plastic bag with a small needle. Place the speaker membrane right behind those little holes and they hopefully will help the sound waves get through the plastic easier but will prevent water from getting inside the Ziploc bag. I've not tested this, so as I said, you may want to test this with something different than your speaker and also test it in a dry place to determine if tiny holes even help the airwaves get further and be less muffled (please tell me, I'm curious about it!).
A different solution without even taking your speaker into the shower would be placing it preferably in a sink next to the shower. As explained in various answers of this question a bowl (in this case we use the sink) amplifies your speakers and makes it easier for the sound waves to get into the shower. If you're worried about the high humidity you could place something over the electronics, best would be some kind of plastic. Water steam is usually hotter than the air in the bathroom so it will fill the room from top to bottom.
I personally just place my phone in my sink next to the shower. I don't protect it in any way since splashes don't get that far and if you're phone didn't break when using in rain it sure won't break when taking some splashes from the shower. Although you're right about high humidity potentially causing defects to your device it sure depends on the size of the bathroom, the temperature of the water (thus the production rate of steam) and the time you shower to fill the whole bathroom with steamy hot air.
Something else just popped into my mind - It will probably make it harder to press buttons on the speaker, but it is possible to achieve with a transparent fabric:
Build your own speaker-tipi! These tents, mostly used by Indians, are designed to let smoke out and no rain in. The wooden poles alone already prevent the interior from getting wet by letting rain drops follow the poles all the way to the ground. You can still add a
Rain Cap or Ozan to make sure the interior stays 100% dry.
Depending on the size of your speaker I would recommend using toothpicks or wooden skewers as poles and some kind of plastic foil or any other water-repellent material as canvas. This solution includes some tinkering but it sure is a creative one which can add a nice Indian touch to your shower.