Automatic Local Smoothing for Spectral Density Estimation