Temperature dependence of the spectral function through the Peierls transition in quasi-one-dimensional compounds