# Spectral Envelope Transformation in Singing Voice for Advanced Pitch Shifting
## 2 Parametric Model of the Spectral Envelope
### Estimation of Spectral Envelope Parameters  
As has been mentioned before, a good estimation of the real envelope is important. The envelope estimation process can be done manually by visually modifying the parameters of the model to fit the envelope defined by the model to the spectral data [14]; however, this is a tedious and slow process that in the end relies on the judgment of the operator. Therefore, in order to perform the spectral estimation task, we have developed an algorithm to automatically find the parameters of the model by means of an iterative non-linear constrained optimization process. Very briefly, the process will adjust the parameters to selected spectral peaks used as the reference. This whole process is carried out in two steps.  
In the first step, a spectral envelope model with 10 resonators in parallel is considered. Each resonator implements a four-pole transfer function as described in Section 2.1. In this model, the parameters of five of the resonators are constrained as indicated in Table 1, whereas the location of the other five resonators is not restricted, and their allowed bandwidth range is very large, between 10 and 1500 Hz. With this model, an iterative optimization process is carried out to minimize the logarithm of the absolute difference between the spectrum and our 10 resonator model (see Figure 2) by tuning the parameters \((\mathcal{P}_{10})\) of this model:  
\[\mathcal{P}_{10}^{*}=\underset{\mathcal{P}_{10}}{\text{arg}}\,\underset{i=1} {\text{min}}\,\,\sum_{i=1}^{M}\,\,|\,\,E_{10}(f_{i})_{dB}-10 log_{10}\,\,|\,\,X( f_{i})\,\,|| \tag{6}\]  
with \(E_{10}(f)\) the spectral envelope (1) modeled with 10 resonators, \(X(f)\) stands for the Fourier transform of the audio excerpt and \(M\) is the number of samples of \(X(f)\). \(\mathcal{P}_{10}\) represents the complete set of parameters of our 10-resonator model: \(\mathcal{P}_{10}=\{Gait_{dB},SlopeDepth_{dB},\alpha,\rho_{i},\theta_{i}\,\,\, with\,\,\,i=1...10\}\).  
After the first stage described is complete, the second stage starts. In this stage, all of the local maxima over the 10 resonator spectral envelope defined by \(\mathcal{P}_{10}^{*}\) are selected, and a new iterative optimization process is carried out with these data. Now, the five-parallel resonator model described  
Figure 2: Estimation of the parameters of the spectral envelope. Harmonic component.  
in Section 2.1, with the constrains in Table 1, is used to fit the selected data using the same logarithmic error measure as in the previous stage, to obtain the envelope parameters:  
\[\mathcal{P}_{5}^{*}=\underset{\mathcal{P}_{5}}{\text{arg}}\,\underset{\mathcal{ P}_{5}}{\text{min}}\,\sum_{j\in\mathcal{C}}^{5}\mid E_{5}(f_{i})_{dB}-10 log_{10}\mid X(f_{i}) \mid\mid \tag{7}\]  
with \(\mathcal{C}\) the subset of local maxima among the samples of \(10 log_{10}\mid X(f_{i})\mid\) over \(E_{10}(f)_{dB}\), as defined by the output of the previous optimization stage. \(\mathcal{P}_{5}\) represents the complete set of parameters of our resonator model: \(\mathcal{P}_{5}=\{Gain_{dB},SlopeDepth_{dB},\alpha,\rho_{i},\theta_{i}\;\;with \;\;j=1...5\}\), as described in Section 2.1.  
The parameters \(\mathcal{P}_{5}^{*}\) that draw the envelope obtained after this stage (Figure 2) are used to define the location and bandwidth of the formants of the excerpt analyzed and will be used for the spectral envelope transformation process devised (Sections 3 and 4.2) and for the objective evaluation that will be described later (Section 5.1).  
As in other processes in the work, this step is carried out for both the harmonic and the residual component separately.