Watching original Star Trek, the ships seem to be shooting in slow motion not much faster than a muzzleloader, yet the modern version shows them engaging enemy ships with extreme rapid fire of both beam and torpedoes. The rapid fire seems more 'realistic' to me but got me wondering how fast they could run out of ammo in a firefight. How fast can they deplete their ammo supply?
I will base my answer on the performance of phaser and photon torpedo delivery systems on the Enterprise D, as according to the Star Trek: The Next Generation Technical Manual, written and compiled by Michael Okuda and Rick Sternbach, production designers for the actual show.
According to Section 11.2 "Phaser Operations":
Recharge times are kept to <=0.5 seconds. Full power firing endurance is rated at 45 minutes.
It then goes on to describe some less than ideal conditions in which these performances are reduced, but the point is that under good conditions it takes less than half a second to recharge phasers (from the impulse array, as explained earlier in the same chapter) and full-power firing at this recharge rate can be maintained for as long as 45 minutes before a longer recharge window must be initiated.
According to Section 11.3 "Photon Torpedoes", the torpedoes are injected with matter-antimatter fuel prior to priming in batches of four. Under ideal circumstances, the minimum time for injection is 1.02 seconds.
Each of the forward and aft launchers can be loaded with up to 10 torpedoes at a time. These torpedoes can be launched in one batch, and batches of up to 10 each can be fired until the total supply is exhausted.
While a batch is launched, the next batch can be primed, and so the Enterprise D can fire spreads of 20 torpedoes (using both the forward and aft launchers) at roughly 2.55 seconds apart.