How can I keep bluetooth speaker from turning off

I’m using a bluetooth speaker with picroft and it turns off after a few minutes with no audio output. How can I stop this from happening?