If I were doing this, I'd consider using the same method I use for attaching my smartphone to my bikes:
Order a Topeak F66 Fixer from your vendor of choice. It looks like this:
Buy a Topeak "Handy E Pack." It's the least expensive of the packs. It's shape does not matter. The goal is to use a razor blade to cut off the mounting on the back. Then glue said mounting to your speaker. Now your speaker has a quick-release mount to the stem. Try an F55 Fixer if you prefer to mount to your handlebar instead.
Unfortunately, I don't have a good photo to share of my glued mount. I only have this one which features a battery pack:
Have Fun!
Scott