Multiple solutions exist, and the choice depends on the battery voltage and speaker power rating.
Beau Schwabe has a useful simulation, but the Dickson charge pump design has some significant drawbacks due to impedance transformations when driving all the 3.3mF capacitors. One issue is the insufficient base current at hFE when saturated, which requires manual adjustments in Falstad. Additionally, the boost voltage drops by 50%.
The reason for adding a series resistor to the speaker is to reduce the DC current that offsets the coil into the weaker part of the magnet.
However, I opted to add a power diode instead to create a flyback effect and achieve a higher AC voltage and less DC across the coil. The acoustic power is determined by the resistor across the coil and the series resistance (DCR) which generates heat and varies with the power rating of the 8-ohm speaker. For larger power-rated speakers, the DCR decreases, resulting in increased acoustic power ranging from 4 to 6 ohms out of a total of 8 ohms.
To further clarify, measure the DCR using a digital multimeter (DMM) and compare it with the impedance rating of the speaker for educational purposes. You can use either an N-channel MOSFET (Nch FET) on the low side or the 2N3055, a popular NPN power transistor from the 1960s. When saturated at 4A, the 2N3055 has a worst-case specification of 1.5V maximum, which translates to an Rce value of 1.5/4 = 375 mΩ. This value is significantly higher than that of a good power N-channel MOSFET.
See my
simulated design using the flyback diode with 3 Li Ions for almost 12V or 4 if you prefer more power or 2 cells for less power.