On my last cruise we had the Kiss Cruise ship right next to us at dock. I assure you they had a lot of fans
on board and the cruise line did not mind.
Seriously, a "white noise" machine or one of the many small devices that will produce sounds of rain, surf, etc. would take up less room.
If you have a smart phone they will have apps for this. I use a bluetooth speaker with mine but you could probably just use the phones speaker if it went loud enough.