Can I use a hotspot without data to connect to a wifi speaker?
No. Your iPhone can only join or create a Wi-Fi network at any one time. It can't do both simultaneously.

But you can buy a small travel router to do what you want. Both your speaker and iPhone would connect to it.