If you want straight or flat ends on each end of the wave form, put the Audio Spectrum on masks, three masks to be exact, one in the middle for the waveform, one on each end of the waveform. Three instances of Audio Spectrum on the solid layer, each referencing a different mask, the middle have the audio file as the Audio Layer, the outside flatliners having Audio layer set to None.
You can simply duplicate the middle mask three times, then double click one and move it horizontally while holding the shift key to keep it perfectly horizontal. YOu can move vertices (the ends) in the same way.
Now this sounds like a bit of a pain, but it should just be a onetime setup, if you choose to make an animation preset.
Hit U on the keyboard, then select the three masks and the three instances of Audio Spectrum, then Save Animation Preset and name it accordingly.
Now in a new comp, Add the audio file, add a New Solid, select the solid, Animation>Recent Animation Preset>Choose the Audio Spectrum (or whatever you named it). Then in the middle Audio spectrum, choose the Audio File as the “Audio Layer”. Done. Faster than it sounds.