How to pad a array representing music to pad the stft of this array?
After some reading, I found the solution to my problem. In the default mode, windows overlap on half their size. Scipy starts by adding zeroes at the boundaries on the left and on the right so that the first and last window are centered on the first and last point of data. Then it pads the end with zeroes so that the last windows on the right is full of point. So, in order to add a window on the left/right, you have to add nperseg/2(127 in my case) points of data. So to add 127 windows on the right and on the left, you just need to add 127^2 = 16129 points on the right and of the left of the original data.

Edit : Based on how the stft is computed, if the original signal is zero-padded on the right and left, any new window created will be on data points with value 0, and as a result will have a value of 0. This means that it is exactly equivalent to 0-pad the original signal of 127*n points or to 0-pad the stft of n points.