You can switch off in Basic with SHIFT+F7.
But lot of program which write directly the Fix BIAS register don't keep thee current state, and switch on it
Then the first hardware hack what the Enterprise owners do: remove the internal speaker, or add a hardware switch to it.
For a software: write BIAS via EXOS variable. If don't possible (need a fast BIAS cahenge) then read the Speaker state at the startup and combine with the BIAS values which are will be used. Adding Speaker option are also good idea.
If I remember right the Eat it Up game and few others have a Speaker option.
One trick: if you connect the audio wires from the Tape output instead the Monitor connector you get a louder sound, and without Tape loading sound.