Patent Publication Number: US-6336092-B1

Title: Targeted vocal transformation

Description:
FIELD OF THE INVENTION 
     This invention relates to the transformation of a person&#39;s voice according to a target voice. More particularly, this invention relates to a transformation system where recorded information of the target voice can be used to guide the transformation process. It further relates to the transformation of a singer&#39;s voice to adopt certain characteristics of a target singer&#39;s voice, such as pitch and other prosodic factors. 
     BACKGROUND OF THE INVENTION 
     There are a number of applications where it may be desirable to transform a person&#39;s voice (the source vocal signal) into a different person&#39;s voice (the target vocal signal). This invention performs such a transformation and is suited to applications where a recording of the target voice is available for use in the transformation process. Such applications include Automatic Dialogue Replacement (ADR) and Karaoke. We have chosen to describe the karaoke application because of the additional demands for accurate pitch processing in such a system but the same principles apply for a spoken-word system. 
     Karaoke allows the participants to sing songs made popular by other artists. The songs produced for karaoke have the vocal track removed leaving behind only the musical accompaniment. In Japan, karaoke is the second largest leisure activity, after dining out. Some people, however, cannot participate in the karaoke experience because they are unable to sing in the correct pitch. 
     Often, as part of the karaoke experience, the singer tries to mimic the style and sound of the artist who originally made the recording. This desire for voice transformation is not limited to karaoke but is also important for impersonators who might mimic, for example, Elvis Presley performing one of his songs. 
     Most of the research in voice transformation has related to the spoken voice as opposed to the sung voice. H. Kuwabara and Y. Sagisaka, Acoustic characteristics of speaker individuality: Control and conversion,  Speech Communication,  vol. 16, 1995 separated the factors responsible for voice individuality into two categories: 
     physiological factors (e.g. length of the vocal tract, glottal pulse shape, and position and bandwidth of the formants), and 
     socio-linguistic and psychological factors, or prosodic factors (e.g. pitch contour, duration of words, timing and rhythm) 
     The bulk of the research into voice transformation has focused on the direct conversion of the physiological factors, particularly vocal tract length compensation and formant position/bandwidth transformation. Although it appears to be recognized that the most important factors for voice individuality are the prosodic factors, current speech technologies have not allowed useful extraction and manipulation of the prosodic features and have instead focused on direct mapping of vocal characteristics. 
     The inventors have found that the important characterizing parameters for successful voice conversion to a specified target depend on the target singer. For some singers, the pitch contour at the onset of notes (for example the “scooping” style of Elvis Presley) is critical. Other singers may be recognized more for the “growl” in their voice (e.g. Louis Armstrong). The style of vibrato is another important factor of voice individuality. These examples all involve prosodic factors as the key characterizing features. While physiological factors are also important, we have found that the transformation of physiological parameters need not be exact in order to achieve a convincing identity transformation. For example it may be enough to transform the perceived vocal-tract length without having to transform the individual formant locations and bandwidths. 
     SUMMARY OF THE INVENTION 
     The present invention provides a method and apparatus for transforming the vocal characteristics of a source singer into those of a target singer. The invention relies on the decomposition of a signal from a source singer into excitation and vocal tract resonance components. It further relies on the replacement of the excitation signal of the source singer with an excitation signal derived from a target singer. This disclosure also presents methods of shifting the timbre of the source singer into that of the target singer by modifying the vocal tract resonance model. Additionally, pitch-shifting methods may be used to modify the pitch contour to better track the pitch of the source singer. 
     According to the invention, the excitation component and pitch contour of the vocal signal of the target singer are first obtained. This is done by essentially extracting the excitation signal and pitch data from the target singer&#39;s voice and storing them for use in the vocal transformer. 
     The invention allows the transformation of voice either with or without pitch correction to match the pitch of the target singer. When used to transform voice with pitch correction, the source singer&#39;s vocal signal is converted from analog to digital data, and then separated into segments. For each segment, a voicing detector is used to determine whether the signal contains voiced or unvoiced data. If the signal contains unvoiced data, the signal is sent to the digital to analog converter to be played on the speaker. If the segment contains voiced data, the signal is analyzed to determine the shape of the spectral envelope which is then used to produce a time-varying synthesis filter. If timbre and/or gender shifting or other vocal transformations are also desired, or in cases where doing so will improve the results (e.g., where the spectral shapes of the source and target voices are very different) the spectral envelope may first be transformed, then used to create the time-varying synthesis filter. The transformed vocal signal is then created by passing the target excitation signal through the synthesis filter. Finally, the amplitude envelope of the untransformed source vocal signal is used to shape the amplitude envelope of the transformed source vocal. 
     When used as a voice transformer without pitch correction, two extra steps are performed. First the pitch of the source vocal is extracted. Then the pitch of the target excitation is shifted using a pitch shifting algorithm so that the target excitation pitch is made to track the pitch of the source vocal. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The invention may be more fully appreciated by reference to the following description of the preferred embodiments thereof in conjunction with the drawings wherein: 
     FIG. 1 is a block diagram of a processor used to create a target excitation signal. 
     FIG. 2 is a block diagram of a processor used to create an enhanced target excitation signal. 
     FIG. 3 is a block diagram of a vocal transformer with pitch correction. 
     FIG. 4 is a block diagram of a vocal transformer without pitch correction (i.e. the pitch is controlled by the source singer). 
     FIG. 5 is a graph illustrating the effect of conformal mapping on a spectral envelope. 
     FIG. 6 is a graph illustrating the different spectral envelopes for voicing at different pitches. 
     FIG. 7 is a block diagram illustrating separate modifications of the low frequency and high frequency components of the spectral envelope. 
     FIG. 8 is a block diagram illustrating the processing of only the voice-band portion of a signal having a high sampling rate. 
    
    
     DETAILED DESCRIPTION OF THE BEST MODE AND THE PREFERRED EMBODIMENTS 
     Referring to the block diagram of FIG. 1, a target vocal signal is first converted to digital data. This step is, of course, not required if the input signal is already presented in digital format. 
     The first step is to perform spectral analysis on the target vocal signal. The spectral envelope is determined and used to create a time-varying filter for the purpose of flattening the spectral envelope of the target vocal signal. The method used for performing spectral analysis could employ various techniques from the prior art for generating a spectral model. These spectral analysis techniques include all-pole modeling methods such as linear prediction (see for example, P. Strobach, “ Linear Prediction Theory ”, Springer-Verlag, 1990), adaptive filtering (see J. I. Makhoul and L. K. Cosell, “Adaptive Lattice Analysis of Speech,” IEEE Trans. Acoustics, Speech, Signal Processing, vol. 29, pp. 654-659, June 1981), methods for pole-zero modeling such as the Steiglitz-McBride algorithm (see K. Steiglitz and L. McBride, “A technique for the identification of linear systems”, IEEE Trans. Automatic Control, vol. AC-10, pp. 461-464, 1965), or transform-based methods including multi-band excitation (D. Griffin and J. Lim, “Multiband excitation vocoder”, IEEE Trans. Acoustics, Speech, Signal Process., vol. 36, pp. 1223-1235, August 1988) and cepstral-based methods (A. Oppenheim and R. Schafer, “Homomorphic analysis of speech”, IEEE Trans. Audio Electroacoust., vol. 16, June 1968). The all-pole or pole-zero models are typically used to generate either lattice or direct-form digital filters. The amplitude of the frequency spectrum of the digital filter is chosen to match the amplitude of the spectral envelope obtained from the analysis. 
     The preferred embodiment uses the autocorrelation method of linear prediction because of its computational simplicity and stability properties. The target voice signal is first separated into analysis segments. The autocorrelation method generates P reflection coefficients k i . These reflection coefficients can be used directly in either an all-pole synthesis digital lattice filter or an all-zero analysis digital lattice filter. The order of the spectral analysis P depends on the sample rate and other parameters as described in J. Markel and A. H. Gray Jr.,  Linear Prediction of Speech.  Springer-Verlag, 1976. 
     The alternative direct-form implementation for this all-pole method has a time-domain difference equation of the form:                y        (   k   )       =       x        (   k   )       -       ∑     i   =   1     P            a        (   i   )            y        (     k   -   i     )                     (   1   )                         
     where y(k) is the current filter output sample value, x(k) is the current input sample value, and the a(i)&#39;s are the coefficients of the direct-form filter. These coefficients a(i) are computed from the values of the reflection coefficients k i . The corresponding z-domain transfer function for the all-pole synthesis is:                H        (   z   )       =     1     1   +       ∑     i   =   1     P            a        (   i   )            z     -   i                       (   2   )                         
     The complementary all-zero analysis filter has a difference equation given by:                y        (   k   )       =       x        (   k   )       -       ∑     i   =   1     P            a        (   i   )            x        (     k   -   i     )                     (   3   )                         
     and a z-domain transfer function given by:                H        (   z   )       =     1   +       ∑     i   =   1     P            a        (   i   )            z     -   i                     (   4   )                         
     Whether using a lattice, direct-form, or other digital filter implementation, the target vocal signal is processed by an analysis filter to compute an excitation signal having a flattened spectrum which is suitable for vocal transformation applications. For use by a vocal transformer, this excitation signal can either be computed in real time or it can be computed beforehand and stored for later use. The excitation signal derived from the target may be stored in a compressed form where only the information essential to reproducing the character of the target singer are stored. 
     As an enhancement to the vocal transformer, it is possible to further process the target excitation signal in order to make the system more forgiving of timing errors made by the source singer. For example, when the source singer sings a particular song his phrasing may be slightly different from the target singer&#39;s phrasing of that song. If the source singer begins singing a word slightly before the target singer did in his recording of the song there would be no excitation signal available to generate the output until the point where the target singer began the word. The source singer would perceive that the system is unresponsive and would find the delay annoying. Even if the alignment of the words is accurate it is unlikely that the unvoiced segments from the source singer will line up exactly with the unvoiced segments for the target singer. In this case the output would sound quite unnatural if the excitation from an unvoiced portion of the target singer&#39;s signal was applied to generate a voiced segment in the output. The goal of this enhanced processing is to extend the excitation signal into the silent region before and after each word in the song and to identify unvoiced regions within the words and provide voiced excitation for those segments. 
     The enhanced excitation processing system is shown in FIG.  2 . The target excitation signal is separated into segments which are classified as being either voiced or unvoiced. In the preferred embodiment, voicing detection is accomplished by examining the following parameters: average segment power, average low-band segment power, and zero crossings per segment. If the total average power for a segment is less than a 60 db below the recent maximum average power level, the segment is declared silent. If the number of zero crossings exceeds 8/ms, the segment is declared unvoiced. If the number of zero crossings are less than 5/ms, the segment is declared voiced. Finally, if the ratio of low-band average power to total band average power is less than 0.25, the segment is declared unvoiced. Otherwise it is declared voiced. 
     For voiced segments, the pitch is extracted. For unvoiced or silent segments, the pitch is set to 0 and the unvoiced data is replaced with silence. The target excitation signal is then analyzed for gaps which are left due to non-voiced regions. The gaps are then filled in with interpolated voiced data from previous and subsequent voiced regions. 
     There are several ways in which the interpolation can be accomplished. In all cases, the goal is to create an interpolated voiced signal having a pitch contour which blends with the bounding pitch contour in a meaningful way (for example, for singing, the interpolated notes should sound good with the background music). For some applications, the interpolated pitch contour may be calculated automatically, using, for example, cubic spline interpolation. In the preferred embodiment, the pitch contour is first computed using spline interpolation, and then any portions which are deemed unsatisfactory are fixed manually by an operator. 
     Once a suitable pitch contour is obtained, the gaps in the waveform left due to removal of unvoiced regions must be filled in at the interpolated pitch value. There are several methods for doing this. In one method, the samples from voiced segments prior to the gap are copied across the gap and then pitch shifted using the interpolated pitch contour. In the preferred embodiment, sinusoidal synthesis is used to morph between the waveforms on either side of the gap. Sinusoidal synthesis has been used extensively in fields such as speech compression (see, for example, D. W. Griffin and J. S. Lim, “Multiband excitation vocoder,” IEEE Trans. Acoustics, Speech, and Signal Processing, vol. 36, pp. 1223-1235, August, 1988). In speech compression, sinusoidal synthesis is used to reduce the number of bits required to represent a signal segment. For these applications, the pitch contour over a segment is usually interpolated using quadratic or cubic interpolation. For our application, however, the goal is not one of compression, but rather the “morphing” of one sound into another following a pitch contour which is pre-defined (possibly even manually generated by an operator), therefore a new technique has been developed for the preferred embodiment (note that the equations are shown in the continuous time domain for simplicity) as set out below. 
     Assume that a gap between times t 1  and t 2  must be filled in via sinusoidal interpolation. First, the pitch contour, w(n), is determined (automatically or manually by an operator). Then spectral analysis using the Fast Fourier Transform (FFT) with peak picking (see, for example, R. J. McAulay and T. F. Quatieri, “Sinusoidal Coding”, in Speech Coding and Synthesis, Elsevier Science B.V, 1995) is performed at t 1  and t 2  to obtain the spectral magnitudes A k (t 1 ) and A k (t 2 ), and phases φ k (t 1 ) and φ k (t 2 ), where the subscript k refers to the harmonic number. The synthesized signal segment, y(t), can then be computed as:                y        (   t   )       =       ∑     k   =   1     K              A   k          (   t   )            cos        [       θ   k          (   t   )       ]                   (   5   )                         
     where K is the number of harmonics in the segment (set to half the length of the number of samples in the longest pitch period of the segment). The model we use for the time varying phase for t 1 ≦t≦t 2  is given by:                  θ   k          (   t   )       =         θ   k          (     t   1     )       +     k          ∫     t   =     t   1       t            [       w        (   t   )       +       r   k          (   t   )         ]             t           +       d   k        t               (   6   )                         
     where r k (t) is a random pitch component used to reduce the correlation between harmonic phases and thus reduce perceived buzziness, and d k  is a linear pitch correction term used to match the phases at the start and end of the synthesis segment. Using the fact that we want θ k (t 1 )=φ(t 1 ) and θ k (t 2 )=φ(t 2 ) in order to avoid discontinuous phase at the segment boundaries, it can be shown that the smallest possible value for d k  which satisfies this constraint is given by:                d   k     =       [         v   k        T     -     2      π        ⌊         2      π                   v   k        T     +   π       2      π       ⌋         ]          1   T               (   7   )                         
     where T=(t 2 −t 1 ), and                v   k     =       [         φ   k          (     t   2     )       -       φ   k          (     t   1     )       -       ∫     t   =     t   1       t            (       w        (   t   )       +       r   k          (   t   )         )             t           ]          1   T               (   8   )                         
     The random pitch component, r k (t), is obtained by sampling a random variable having a variance which is determined for each harmonic by computing the difference between the predicted phase and measured phase for signal segments adjacent to the gap to be synthesized, and setting the variance proportional to this value. 
     Finally as with the unenhanced excitation extraction described earlier, the amplitude envelope of the target excitation signal is flattened using automatic gain compensation. 
     The excitation signal can also be a composite signal which is generated from a plurality of target vocal signals. In this manner, the excitation signal could contain harmony, duet, or accompaniment parts. For example, excitation signals from a male singer and a female singer singing a duet in harmony could each be processed as described above. The excitation signal which is used by the apparatus would then be the sum of these excitation signals. The transformed vocal signal which is generated by the apparatus would therefore contain both harmony parts with each part having characteristics (e.g., pitch, vibrato, and breathiness) derived from the respective target vocal signals. 
     The resulting basic or enhanced target excitation signal and pitch data are then typically stored, usually for later use in a vocal transformer. Alternatively, the unprocessed target vocal signal may be stored and the target excitation signal generated when needed. The enhancement of the excitation could be entirely rule-based or the pitch contour and other controls for generating the excitation signal during silent and unvoiced segments could be stored along with the unprocessed target vocal signal. 
     The block diagram of FIG. 3 will now be described. 
     A block of source vocal signal samples is analyzed to determine whether they are voiced or unvoiced. The number of samples contained in this block would typically correspond to a time span of approximately 20 milliseconds. e.g., for a sample rate of 40 kHz, a 20 ms block would contain 800 samples. This analysis is repeated on a periodic or pitch-synchronous basis to obtain a current estimate of the time-varying spectral envelope. This repetition period may be of lesser time duration than the temporal extent of the block of samples, implying that successive analyses would use overlapping blocks of vocal samples. 
     If the block of samples are determined to represent unvoiced input, the block is not further processed and is presented to the digital to analog converter for presentation to the output speaker. If the block of samples is determined to represent voiced input, a spectral analysis is performed to obtain an estimate of the envelope of the frequency spectrum of the vocal signal. 
     It may be desirable or even necessary to modify the shape of the spectral envelope in some voice conversions. For example where the source and target vocal signals are of different genders, it may be desirable to shift the timbre of the source&#39;s voice by scaling the spectral envelope to more closely match the timbre of the target vocal signal. In the preferred embodiment, the optional section for modification of the spectral envelope (entitled “Modify Spectral Envelope” in FIG. 3) alters the frequency spectrum of the envelope obtained from the Spectral Analysis block. Five methods for spectral modification are contemplated. 
     A first method is to modify the original spectral envelope by applying a conformal mapping to the z-domain transfer function in equation (2). Conformal mapping modifies the transfer function, resulting in a new transfer function of the form:                H        (   z   )       =         ∑     i   =   0     P            b        (   i   )            z     -   i             1   +       ∑     i   =   1     P            a        (   i   )            z     -   i                       (   9   )                         
     Applying conformal mapping results in a modified spectral envelope, as shown in FIG.  5 . Details of the technique of applying a conformal mapping to a digital filter can be found in A. Constantinides, “Spectral transformations for digital filters,” Proceedings of the IEEE, vol. 117, pp. 1585-1590, August 1970. The advantage of this method is that it is unnecessary to compute the singularities of the transfer function. 
     A second method is to find the singularities (i.e., poles and zeros) of the digital filter transfer function, to then modify the location of any or all of these singularities, and then to use these new singularities to generate a new digital filter having the desired spectral characteristics. This second method applied to vocal signal modifications is known in the prior art. 
     A third method for modifying the spectral envelope, which obviates the need for a separate Modify Spectral Envelope step, is to modify the temporal extent of the blocks of vocal signals prior to the spectral analysis. This results in the spectral envelope obtained as a result of the spectral analysis being a frequency-scaled version of the unmodified spectral envelope. The relationship between time scaling and frequency scaling is described mathematically by the following property of the Fourier transform:                f        (   at   )       ↔       1        a               F        (     jw   a     )                 (   10   )                         
     where the left side of the equation is the time-scaled signal and the right side of the equation is the resulting frequency-scaled spectrum. For example, if the existing analysis block is 800 samples in length (representing 20 ms of the signal), an interpolation method could be used to generate 880 samples from these samples. Since the sampling rate is unchanged, this time-scales the block such that it now represents a longer time period (22 ms). By making the temporal extent longer by 10 percent, the features in the resulting spectral envelope will be reduced in frequency by 10 percent. Of the methods for modifying the spectral envelope, this method requires the least amount of computation. 
     A fourth method would involve manipulating a frequency-transformed representation of the signal as described in S. Seneff, System to independently modify excitation and/or spectrum of speech waveform without explicit pitch extractions, IEEE Trans. Acoustics, Speech, Signal Processing, Vol. 30, August 1982. 
     A fifth method is to decompose the digital filter transfer function (which may have a high order) into a number of lower-order sections. Any of these lower-order sections could then be modified using the previously-described methods. 
     A particular problem arises when the pitch of the target singer and the source singer differ by an appreciable amount, e.g. an octave, in that their respective spectral envelopes will have significant differences, especially in the low-frequency region below about 1 kHz. For example, in FIG. 6, low-pitched voicing results in a low-frequency resonance near 200 Hz whereas high-pitched voicing results in a higher-frequency resonance near 400 Hz. These differences can cause two problems: 
     a reduction in low-frequency power in the transformed vocal signal; and 
     amplification of system noise by a spectral peak that does not have a frequency near a harmonic of the output pitch. 
     These problems can be alleviated by modifying the low-frequency portion of the spectral envelope which can be accomplished by employing the aforementioned methods for modifying the spectral envelope. The low-frequency portion of the spectral envelope can be modified directly by using methods two or four. 
     Methods one and three can also be used for this purpose if the target vocal signal is split into a low-frequency component (e.g., less than or equal to 1.5 kHz) and a high-frequency component (e.g., greater than 1.5 kHz). A separate spectral analysis can then be undertaken for both components as shown in FIG.  7 . The spectral envelope from the lower-frequency analysis would then be modified in accordance to the difference in pitches or difference in the location of the spectral peaks. For example, if the target singer&#39;s pitch was 200 Hz and the source singer&#39;s pitch was 400 Hz, the unmodified source spectral envelope may have a peak near 400 Hz and, without a peak near 200 Hz, there would be a smaller gain near 200 Hz, resulting in the first problem noted above. We would therefore modify the lower-frequency envelope to move the spectral peak from 400 Hz toward 200 Hz. 
     The preferred embodiment modifies the low-frequency portion of the spectral envelope in the following manner: 
     1. The source vocal signal S(t) is lowpass filtered to create a bandlimited signal S L (t) containing only frequencies below about 1.5 kHz. 
     2. This bandlimited signal S L (t) is then re-sampled at about 3 kHz to create a lower-rate signal S D (t) 
      A low-order spectral analysis (e.g., P=4) is performed on S D (t) and the direct-form filter coefficients a D (i) are computed. 
     3. These coefficients are modified using the conformal-mapping method to scale the spectrum in proportion to the ratio between the pitch of the target vocal signal and pitch of the source vocal signal. 
     4. The resulting filter is applied to the signal S L (t) (having the original sampling rate) using the technique of interpolated filtering. 
     Using this technique, the low-frequency and high-frequency portions of the signal are processed separately and then summed to form the output signal, as shown in FIG.  7 . With reference to FIG. 7, the apparatus can be used to modify only the low-frequency spectral envelope or only the high-frequency spectral envelope. In this way, it can modify the low-frequency resonances without affecting the timbre of the high-frequency resonances or it can change only the timbre of the high-frequency resonances. It is also possible to modify both of these spectral envelopes concurrently. 
     Another method which can be used to alleviate the aforementioned problems regarding the low-frequency region of the spectral envelope is to increase the bandwidth of the spectral peaks. This can be accomplished by applying techniques from prior art such as: 
     bandwidth expansion 
     modifying the radius of selected poles 
     windowing the autocorrelation vector prior to computing the filter coefficients 
     High-fidelity digital audio systems typically employ higher sampling rates than are used in speech analysis or coding systems. This is because, with speech, most of the dominant spectral components have frequencies less than 10 kHz. When using a high sampling rate with a high-fidelity system, the aforementioned order of the spectral analysis P can be reduced if the signal is split into high-frequency (e.g., greater than 10 kHz) and low-frequency (e.g. less than or equal to 10 kHz) signals by using digital filters. This low-frequency signal can then be down-sampled to a lower sampling rate before the spectral analysis and will therefore require a lower order of analysis. 
     The lower sampling rate and the lower order of analysis both result in reduced computational requirements. In the preferred embodiment, the input vocal signal is sampled at a high rate of over 40 kHz. The signal is then split into two equal-width frequency bands, as shown in FIG.  8 . The low-frequency portion is decimated and then analyzed in order to generate the reflection coefficients k i . The excitation signal is also sampled at this high rate and then filtered using an interpolated lattice filter (i.e., a lattice filter where the unit delays are replaced by two unit delays). This signal is then post-filtered by a lowpass filter to remove the spectral image of the interpolated lattice filter and gain compensation is applied. The resulting signal is the low-frequency component of the transformed vocal signal. The interpolated filtering technique is used rather than the more conventional downsample-filter-upsample method since it completely eliminates distortion due to aliasing in the resampling process. The need for an interpolated lattice filter would be obviated if the excitation signal was sampled at a lower rate matching the decimated rate. Preferably, the invention would use two different sampling rates concurrently thereby reducing the computational demands. 
     The final output signal is obtained by summing a gain-compensated high-frequency signal and the transformed low-frequency component. This method can be applied in conjunction with the method illustrated in FIG.  7 . 
     The spectral envelope can therefore be modified by a plurality of methods and also through combinations of these methods. The modified spectral envelope is then used to generate a time-varying synthesis digital filter having the corresponding frequency response. In the block entitled Apply Spectral Envelope, this digital filter is applied to the target excitation signal which was generated as a result of the excitation signal extraction processing step. The preferred embodiment implements this filter using a lattice digital filter. The output of this filter is the discrete-time representation of the desired transformed vocal signal. 
     The purpose of the block in FIG. 3 entitled Apply Amplitude Envelope is to make the amplitude of the transformed vocal signal track the amplitude of the source vocal. This block requires a number of subsidiary computations: 
     The level of the digitized source vocal signal L s . 
     The level of the digitized target excitation signal L e . 
     The level of the signal after applying the spectral envelope L t . 
     These levels are used to compute an output amplitude level which is applied to the original signal after it has passed through the synthesis filter. 
     In the preferred embodiment, each level is computed using the following recursive algorithm: 
     The frame level L f (i) for the ith frame of 32 samples is computed as the maximum of the absolute values of the samples within the frame. 
     A decayed previous level is computed as L d (i)=0.99 L(i−1). 
     The level is computed as L(i)=max { L f (i),L d (i)}. 
     The amplitude envelope to be applied to the current output frame is also computed using a recursive algorithm: 
     Compute the unsmoothed amplitude correction A r (i)=L s L e /L t . 
     Compute the smoothed amplitude correction A s (i)=0.9A s (i−1)+0.1A r (i) 
     This algorithm uses delayed values of L s  and L e  to compensate for processing delays within the system. 
     The frame-to-frame values of A s  are linearly interpolated across the frames to generate a smoothly-varying amplitude envelope. Each sample from the Apply Spectral Envelope block is multiplied by this time-varying envelope. 
     FIG. 4 illustrates the case where the pitch of the source vocal signal is to be retained. In such a case, the pitch of the source vocal signal is determined. A method for doing so is disclosed in Gibson, et al., U.S. Pat. No. 4,688,464, the contents of which are incorporated herein by reference. The target excitation signal is then pitch shifted by the amount required to track the pitch of the source vocal signal before applying the modified or unmodified source spectral envelope to the excitation signal. A method of pitch shifting suitable for this purpose is disclosed in Gibson et al., U.S. Pat. No. 5,567,901, the contents of which are incorporated herein by reference. Note that while this mode of operation gives the source singer more control over the output, it can also significantly reduce the effectiveness of the transformation in cases where the character of the target singer is identified by fast varying pitch changes such as vibrato or pitch scooping. To prevent the loss of characteristic rapid pitch changes, the pitch detection process may also use long-term averaging when computing pitch shift amounts. Pitch data is averaged over ranges between 50 ms and 500 ms depending on the characteristics of the target singer. The averaging calculation is reset whenever a new note is detected. In some applications the pitch of the target excitation is shifted by a fixed amount, to accomplish a key change, and the pitch of the source singer is ignored. 
     It will be appreciated by those skilled in the art that variations of the preferred embodiment may also be practised without departing from the scope of the invention. It will also be appreciated that the approaches of the invention are not limited to singing voices but may equally be applied to speech.