The present invention relates generally to processing and generation of speech signals, and specifically to methods and systems for efficient, high-quality text-to-speech conversion.
Effective text-to-speech (TTS) conversion requires not only that the acoustic TTS output be phonetically correct, but also that it faithfully reproduce the sound and prosody of human speech. When the range of phrases and sentences to be reproduced is fixed, and the TTS converter has sufficient memory resources, it is possible simply to record a collection of all of the phrases and sentences that will be used, and to recall them as required. This approach is not practical, however, when the text input is arbitrarily variable, or when speech is to be synthesized by a device having only limited memory resources, such as an embedded speech synthesizer in a mobile computing or communication device, for example.
Concatenative TTS synthesis has been developed in order to synthesize high-quality speech from an arbitrary text input. For this purpose, a large database is created, containing speech segments in a variety of different phonetic contexts. For any given text input, the synthesizer then selects the optimal segments from the database. The “optimal” segments are generally those that, when concatenated with the previous segments, provide the appropriate phonetic output with the least discontinuity and best match the required prosody. For example, U.S. Pat. No. 5,740,320, whose disclosure is incorporated herein by reference, describes a method of text-to-speech synthesis by concatenation of representative phoneme waveforms selected from a memory. The representative waveforms are chosen by clustering phoneme waveforms recorded in natural speech, and selecting the waveform closest to the centroid of each cluster as the representative waveform for the cluster.
In some systems, the encoding of speech segments in the database and the selection of segments for concatenation are based on a feature representation of the speech, such as mel-frequency cepstral coefficients (MFCCs). (These coefficients are computed by integration of the spectrum of the recorded speech segments over triangular bins on a mel-frequency axis, followed by log and discrete cosine transform operations.) Methods of feature-based concatenative speech synthesis are described, for example, in U.S. Pat. No. 6,725,190 and in U.S. patent application Publication US 2001/0056347 A1, whose disclosures are incorporated herein by reference. Further aspects of concatenative speech synthesis are described in U.S. Pat. Nos. 4,896,359, 5,165,008, 5,751,907, 5,913,193, and 6,041,300, whose disclosures are also incorporated herein by reference.
A number of TTS products using concatenative speech generation methods are now commercially available. These products generally use a large speech database (typically 100 MB-1 GB) in order to avoid auditory discontinuities and produce pleasant-sounding speech with widely-variable pitch. For some applications, however, this memory requirement is excessive, and new TTS techniques are needed in order to reduce the database size without compromising the quality of synthesized speech. Chazan et al. describe work directed toward this objective in a paper entitled “Reducing the Footprint of the IBM Trainable Speech Synthesis System,” in ICSLP—2002 Conference Proceedings (Denver, Colo.), pages 2381-2384, which is incorporated herein by reference.
Embodiments of the present invention provide improved methods and systems for spectral modeling and synthesis of speech signals. These methods provide faithful parametric models of input speech segments by encoding a richer range of spectral information than in methods known in the art. Specifically, in some embodiments of the present invention, the speech database contains not only amplitude information, but also phase spectral information regarding encoded segments. The combination of amplitude and phase information permits TTS systems to generate high-quality output speech even when the size of the segment database is substantially reduced relative to systems known in the art. The methods of the present invention may also be used in low-bit-rate speech encoding.
In some embodiments of the present invention, a frequency-domain speech encoder divides an input speech stream into time windows, referred to herein as “frames.” The encoder processes each frame in the frequency domain in order to compute a vector of model parameters, based on the spectral characteristics of the frame. The encoder distinguishes between voiced and unvoiced frames and applies different analysis techniques to these two types of frames. For voiced frames, the encoder determines the pitch frequency of the frame, and then determines the model parameters based on the harmonics of the pitch frequency. While the model parameters for unvoiced frames may be based solely on analyzing the amplitude spectrum of these frames, for voiced frames the encoder analyzes both the amplitude spectrum and the phase spectrum.
In some of these embodiments, the model vectors are stored in a segment database for use by a speech synthesizer. The speech synthesizer applies the phase model parameters in computing and aligning the phases of at least some of the frequency components of voiced frames. Optionally, the speech synthesizer introduces harmonic frequency jittering of the higher-frequency components in order to avoid “buzz” and to generate more pleasant, natural-sounding speech. Unvoiced frames are typically generated with random phase. Further aspects of the use of phase information to improve sound quality in encoding and decoding of speech are described in the above-mentioned U.S. Patent Application Publication US 2004/0054526 A1.
In some embodiments of the present invention, phase information is extracted and used not only for voiced frames, but also for unvoiced frames that contain “clicks.” Clicks are identified by non-Gaussian behavior of the speech signal amplitude in a given frame, which is typically (but not exclusively) caused by a stop consonant (such as P, T, K, B, D and G) in the frame. The speech encoder distinguishes clicks from other unvoiced frames and computes phase spectral model parameters for click frames, in a manner similar to the processing of voiced frames. The phase information may then be used by the speech synthesizer in more faithfully reproducing the clicks in synthesized speech, so as to produce sharper, clearer auditory quality.
There is therefore provided, in accordance with an embodiment of the present invention, a method for processing a speech signal, including:
In some embodiments, encoding the speech signal includes creating a database of speech segments, and the method includes synthesizing a speech output using the database. Typically, synthesizing the speech output includes aligning a phase of the click frames in the speech output using the phase information.
In a disclosed embodiment, identifying the one or more of the frames as click frames includes analyzing a probability distribution of the frames, and identifying the click frames based on a property of the probability distribution. In one embodiment, analyzing the probability distribution includes computing an entropy of the frames.
There is also provided, in accordance with an embodiment of the present invention, a method for processing a speech signal, including:
Typically, the first modeling method includes extracting phase information from the click frames.
There is additionally provided, in accordance with an embodiment of the present invention, a method for processing a speech signal, including:
Typically, the method also includes modeling an amplitude spectrum of each of the at least some of the voiced frames, wherein encoding the speech signal includes encoding the modeled phase and amplitude spectra. In disclosed embodiments, the method includes identifying other frames as unvoiced frames, and modeling the amplitude spectrum of each of at least some of the unvoiced frames, wherein encoding the speech signal includes encoding the modeled amplitude spectra of the at least some of the unvoiced frames. In one embodiment, identifying the other frames as unvoiced frames includes identifying a subset of the unvoiced frames as click frames, and the method includes modeling the phase spectrum of each of at least some of the click frames, wherein encoding the speech signal includes encoding the modeled phase spectra of the at least some of the click frames.
In one embodiment, modeling the phase spectrum includes differentially adjusting the respective frequency channels of the basis functions responsively to an amplitude spectrum of the at least some of the voiced frames. Additionally or alternatively, modeling the phase spectrum includes aligning and unwrapping respective phases of frequency components of the phase spectrum before computing the model parameters.
In some embodiments, encoding the speech signal includes creating a database of speech segments, and including synthesizing a speech output using the database, wherein generating the speech output includes aligning phases of the voiced frames in the speech output using the modeled phase spectrum.
There is further provided, in accordance with an embodiment of the present invention, a method for processing a speech signal, including:
In a disclosed embodiment, computing the time-domain model includes computing a vector of model parameters representing time-domain components of the phase spectrum of a first voiced frame in a segment of the speech signal, and determining one or more elements of the vector to update so as to represent the phase spectrum of at least a second voiced frame, subsequent to the first voiced frame in the segment.
There is moreover provided, in accordance with an embodiment of the present invention, a method for synthesizing speech, including:
There is furthermore provided, in accordance with an embodiment of the present invention, apparatus for processing a speech signal, including a speech processor, which is arranged to divide the speech signal into a succession of frames, to identify one or more of the frames as click frames, to extract phase information from the click frames, and to encode the speech signal using the phase information.
There is also provided, in accordance with an embodiment of the present invention, apparatus for synthesizing a speech signal, including:
There is additionally provided, in accordance with an embodiment of the present invention, apparatus for processing a speech signal, including a speech processor, which is arranged to divide the speech signal into a succession of frames, to identify some of the frames as unvoiced frames, to process the unvoiced frames in order to identify one or more click frames among the unvoiced frames, and to encode the speech signal by applying a first modeling method to the click frames and a second modeling method, different from the first modeling method, to the unvoiced frames that are not click frames.
There is further provided, in accordance with an embodiment of the present invention, apparatus for processing a speech signal, including a speech processor, which is arranged to divide the speech signal into a succession of frames, to identify some of the frames as voiced frames, to model a phase spectrum of each of at least some of the voiced frames as a linear combination of basis functions covering different, respective frequency channels, wherein the model parameters correspond to respective coefficients of the basis functions, and to encode the speech signal using the modeled phase spectrum.
There is moreover provided, in accordance with an embodiment of the present invention, apparatus for processing a speech signal, including a speech processor, which is arranged to divide the speech signal into a succession of frames, to identify some of the frames as voiced frames, to compute a time-domain model of a phase spectrum of each of at least some of the voiced frames, and to encode the speech signal using the modeled phase spectrum.
There is furthermore provided, in accordance with an embodiment of the present invention, apparatus for synthesizing a speech signal, including:
There is also provided, in accordance with an embodiment of the present invention, apparatus for synthesizing speech, including:
There is additionally provided, in accordance with an embodiment of the present invention, a computer software product for processing a speech signal, the product including a computer-readable medium in which program instructions are stored, which instructions, when read by a computer, cause the computer to divide the speech signal into a succession of frames, to identify one or more of the frames as click frames, to extract phase information from the click frames, and to encode the speech signal using the phase information.
There is further provided, in accordance with an embodiment of the present invention, a computer software product for synthesizing a speech signal, the product including a computer-readable medium in which program instructions are stored, which instructions, when read by a computer, cause the computer to access a database of speech segments, each segment including a succession of frames, such that at least some of the frames are identified as click frames, and the database includes encoded phase information with respect to the click frames, and to synthesize a speech output including one or more of the click frames using the encoded phase information in the database.
There is moreover provided, in accordance with an embodiment of the present invention, a computer software product for processing a speech signal, the product including a computer-readable medium in which program instructions are stored, which instructions, when read by a computer, cause the computer to divide the speech signal into a succession of frames, to identify some of the frames as unvoiced frames, to process the unvoiced frames in order to identify one or more click frames among the unvoiced frames, and to encode the speech signal by applying a first modeling method to the click frames and a second modeling method, different from the first modeling apparatus, to the unvoiced frames that are not click frames.
There is furthermore provided, in accordance with an embodiment of the present invention, a computer software product for processing a speech signal, the product including a computer-readable medium in which program instructions are stored, which instructions, when read by a computer, cause the computer to divide the speech signal into a succession of frames, to identify some of the frames as voiced frames, to model a phase spectrum of each of at least some of the voiced frames as a linear combination of basis functions covering different, respective frequency channels, wherein the model parameters correspond to respective coefficients of the basis functions, and to encode the speech signal using the modeled phase spectrum.
There is also provided, in accordance with an embodiment of the present invention, a computer software product for processing a speech signal, the product including a computer-readable medium in which program instructions are stored, which instructions, when read by a computer, cause the computer to divide the speech signal into a succession of frames, to identify some of the frames as voiced frames, to compute a time-domain model of a phase spectrum of each of at least some of the voiced frames, and to encode the speech signal using the modeled phase spectrum.
There is additionally provided, in accordance with an embodiment of the present invention, a computer software product for synthesizing a speech signal, the product including a computer-readable medium in which program instructions are stored, which instructions, when read by a computer, cause the computer to access a database of speech segments, each segment including a succession of frames, such that at least some of the frames are identified as voiced frames, and the database includes an encoded model of a phase spectrum of each of at least some of the voiced frames, and to synthesize a speech output including one or more of the voiced frames using the encoded model of the phase spectrum in the database.
There is further provided, in accordance with an embodiment of the present invention, a computer software product for synthesizing speech, the product including a computer-readable medium in which program instructions are stored, which instructions, when read by a computer, cause the computer to read spectral model parameters with respect to a voiced frame of the speech to be synthesized, the parameters including high-frequency parameters and low-frequency parameters, and to determine a pitch frequency of the voiced frame, to apply the low-frequency parameters to one or more low harmonics of the pitch frequency in order to generate a low-frequency speech component, to apply the high-frequency parameters to one or more high harmonics of the pitch frequency while applying a frequency jitter to the high harmonics in order to generate a high-frequency speech component, and to combine the low- and high-frequency components of the voiced frame into a sequence of frames of the speech in order to generate an output speech signal.
The present invention will be more fully understood from the following detailed description of the embodiments thereof, taken together with the drawings in which:
Encoding unit 22 comprises an audio input device 30, such as a microphone, which is coupled to an audio processor 32. Alternatively, the audio input to the processor may be provided over a communication line or recalled from a storage device, in either analog or digital form. Processor 32 typically comprises a general-purpose computer programmed with suitable software for carrying out the analysis functions described hereinbelow. The software may be provided to the processor in electronic form, for example, over a network, or it may be furnished on tangible media, such as CD-ROM or non-volatile memory. Alternatively or additionally, processor 32 may comprise a digital signal processor (DSP) or hard-wired logic. Processor 32 analyzes speech input in order to generate a database 34 of speech segments, which are recorded in the database in terms of vectors of spectral parameters. Methods used by processor 32 in computing these vectors are described hereinbelow.
Synthesis unit 24 comprises a text-to-speech (TTS) synthesizer 36, which generates an audio signal to drive an audio output device 38, such as an audio speaker. Synthesizer 36 typically comprises a general-purpose microprocessor or a digital signal processor (DSP), or a combination of such components, which is programmed with suitable software and/or firmware for carrying out the synthesis functions described hereinbelow. As in the case of processor 32, this software and/or firmware may be furnished on tangible media or downloaded to synthesizer 36 in electronic form. Synthesis unit 24 also comprises a stored copy of database 34, which was generated by encoding unit 22. Synthesizer 36 receives an input text stream and processes the text to determine which segment data to read from database 34. The synthesizer concatenates the segment data to generate the audio signal for driving output device 38, as described in detail hereinbelow.
For computational convenience in the description that follows, the frequency f is normalized to the sampling frequency (so that the Nyquist frequency is mapped to 0.5, and 0≦f≦0.5). The complex spectrum is represented in polar form as:
S(f)=A(f)·ej·φ(f) (1)
wherein A(f)=|S(f)| and φ(f)=arg (S(f)) represent the amplitude spectrum and the phase spectrum, respectively.
The method of
At a voicing classification step 44, processor 32 determines whether the current frame is voiced or unvoiced and computes pitch values for frames that are classified as voiced. Alternatively, voicing may be classified on a continuous scale, between 0 and 1, for example. Methods of pitch estimation and voicing determination are described, for example, in U.S. Pat. No. 6,587,816, whose disclosure is incorporated herein by reference. Voiced and unvoiced frames are treated differently in subsequent processing, as described hereinbelow. In addition, unvoiced frames may typically be classified as either click frames or regular unvoiced frames, as described hereinbelow. Click frames are processed similarly to voiced frames, in that processor 32 extracts both amplitude and phase parameters from the spectrum of each click frame.
Processor 32 next computes the line spectrum of the frame. The line spectrum LS is given by a vector of harmonic frequencies fk and associated complex spectrum values (harmonic complex amplitudes) Hk:
LS={fk, Hk}, k=0, 1, . . . , N−1 (2)
In this equation, N is the number of harmonics located inside the full frequency band determined by the sampling frequency (for example, in the band 0-11 kHz for a 22 kHz sampling rate); Hk are the harmonic complex amplitudes (line spectrum values); and fk are the normalized harmonic frequencies, fk≦0.5.
The line spectrum is computed differently for voiced frames and unvoiced frames. Therefore, at a voicing decision step 46, the processing flow branches depending on whether the current frame is voiced or unvoiced.
For unvoiced frames, processor 32 computes the line spectrum at an unvoiced spectrum computation step 48. The line spectrum of an unvoiced frame is typically computed by applying a Short Time Fourier Transform (STFT) to the frame. (The STFT is computed by windowing in the time domain followed by Fast Fourier Transform (FFT).) Thus for an unvoiced frame, the harmonic frequencies are defined as
and N=LFFT/2, wherein LFFT is the FFT length (for example, N=512 for a typical 22 kHz sampling rate).
For voiced frames, processor 32 computes the line spectrum at a voiced spectrum computation step 50. The harmonic frequencies that are used in computing the line spectrum typically comprise the fundamental (pitch) frequency of the frame and multiples of the pitch frequency. The line spectrum of a voiced frame can be computed by applying a Discrete Fourier Transform (DFT) to a single pitch cycle extracted from the frame window.
In one embodiment, processor 32 computes the line spectrum by deconvolution in the frequency domain. First, processor 32 applies a STFT to the frame, as described above. The processor then computes a vector of complex harmonic amplitudes associated with a set of predefined harmonic frequencies. The processor determines these complex harmonic amplitudes such that the convolution of the vector with the Fourier transform of the windowing function best approximates the STFT in the least-squares sense. The processor may perform this computation, for example, by solving a set of linear equations with a positively-determined sparse matrix. Typically the harmonic frequencies are the multiples of the pitch frequency. In another embodiment, the harmonic frequencies coincide with the local maxima of the STFT amplitudes found in the vicinity of the pitch frequency multiples.
Processor 32 computes amplitude spectral parameters, at an amplitude computation step 52. The underlying parametric model represents a log-amplitude spectrum by a linear combination of basis functions Bn(f), n=1, 2, . . . L:
Each basis function has a finite support, i.e., it extends over a certain, specific frequency channel. A useful set of basis functions for this purpose is defined, for example, in the above-mentioned U.S. Pat. No. 6,725,190. To generate these basis functions, a monotonic frequency scaling transform {tilde over (f)}=F(f) is defined, such as the well-known mel-frequency scale. Typically the basis functions are defined so that all the frequency channels have the same width along the {tilde over (f)} axis, and the adjoining channels corresponding to Bn and Bn+1 half overlap each other on the {tilde over (f)} scale. The basis functions may have any suitable shape, such as a triangular shape or a truncated Gaussian shape. In one embodiment, 24 basis functions are used in modeling speech sampled at 11 kHz, and 32 basis functions are used for 22 kHz speech modeling.
The model parameters cn in equation (3) are determined by minimizing the expression:
The number of parameters (i.e., the number of basis functions, also referred to as the model order) is chosen so that even for high-pitched female voices (characterized by a small number of voiced harmonics), the number of harmonics is greater than the number of parameters. Therefore expression (4) may be solved by applying a least-squares approximation to an overdetermined set of linear equations based on the measured line spectrum {Hk}.
In some cases, however, the equation matrix computed for a voiced frame may still be nearly singular because the centers of the frequency channels and the pitch frequency multiples are spaced differently along the transformed frequency axis. In order to overcome this problem, processor 32 may resample log|Hk| evenly on the transformed frequency scale (such as the mel-scale), while interpolating linearly between the original harmonics. The number of the new harmonics thus generated can be adjusted to maintain a predefined level of redundancy in the results. For example, 3L new harmonics, evenly spaced on the mel-frequency scale, may be used in equation (4) instead of the original harmonics.
After processor 32 has computed the model parameters, it determines the energy
of the frame and uses the energy in computing a normalized set of amplitude spectral parameters:
Thus, the energy itself is encoded by the sum of the amplitude parameters:
Subsequently, synthesis unit 24 may use the amplitude spectral parameters given by equation (5) not only in the actual speech synthesis, as shown in
Unvoiced frames may typically be classified as either click frames or regular unvoiced frames, at a click detection step 56. Details of this step are described hereinbelow with reference to
For each voiced frame, and typically for each unvoiced click frame, as well, processor 32 computes phase model parameters, at a phase computation step 58. Two alternative techniques for this purpose are described hereinbelow:
When the amplitude and phase model parameters found at steps 52 and 58 are to be used in a low-footprint system, processor 32 compresses the parameters at a compression step 60. In one embodiment, the processor uses a split vector quantization technique, as described, for example, by Gray, in “Vector Quantization,” IEEE ASSP Magazine (April, 1984), pages 4-29, which is incorporated herein by reference. This sort of compression, combined with the methods for extraction of amplitude and phase model parameters described herein, permits speech to be encoded faithfully at low bit-rates. The inventors have used these methods to encode speech sampled at 22 kHz at a rate of 11 kbps, and to encode speech sampled at 11 kHz at a rate of 8 kbps.
Processor 32 applies the method of
Processor 32 analyzes the probability distribution of the frame in order to determine how different it is from a Gaussian distribution, at a deviation detection step 72. For example, in one embodiment, the processor estimates the probability distribution Excess defined as M4/M22, wherein Mn is the n-th order centered moment. In another embodiment, the processor uses the entropy of the probability distribution as a measure of non-Gaussian behavior. It is well known that among all possible distributions with a given variance, the Gaussian distribution has the highest entropy. The entropy of the frame, based on the normalized histogram, is given approximately by:
This entropy estimate is compared to a predefined threshold. If the entropy estimate value is less than the threshold, processor 32 marks the current frame as a click, at a click identification step 74.
Referring back to FIGS. 3A-C, the following entropy values were calculated:
The inventors have found that a threshold value of 2.9 distinguishes well between clicks and regular unvoiced frames.
As noted earlier, each frame defined at step 42 (
Phase alignment is followed by phase unwrapping, at an unwrapping step 82. At this step, processor 32 scans the sequence of harmonic phases given by arg (Hk), k=0, 1, . . . , N−1, computed within the interval (−π, π], and adds to the harmonic phases multiples of 2π chosen so that the difference between the current and previous unwrapped phase values in the sequence is minimal. If the DC phase arg H0 is equal to π, then processor 32 subtracts π from all the harmonic phases. This subtraction corresponds to inversion of the signal polarity. Finally, processor 32 computes a phase term that is linear in frequency, l(fk)=τ2·fk, by a least-squares fit to the harmonic phases, and subtracts this term from all the harmonic phases. This unwrapping process results in a set of harmonic phases,
φk, k=0, 1, . . . , N−1 (7)
which is used for the phase model parameters computation.
Processor 32 models the continuous phase spectrum using a linear combination of basis functions Pn({tilde over (f)}), n=1, 2, . . . , M, at a phase modeling step 84. This modeling process is similar to the method of amplitude modeling used at step 56. The basis functions are defined over a scaled frequency axis {tilde over (f)}=F(f), wherein F is a positive monotonic frequency transform. The phase spectrum is then expressed as follows in terms of these scaled-frequency basis functions and corresponding phase spectral parameters dn:
Typically, different basis function sets are used for different types of frames. For voiced frames, the basis functions may comprise triangular functions defined over equal and half-overlapping channels along the scaled frequency axis, like those used for amplitude spectrum modeling. Alternatively, the basis functions may comprise sinusoidal functions, such as Pn=sin(2πn·{tilde over (f)}). In an exemplary embodiment, the number of basis functions is M=32 for a 22 kHz sampling rate and M=24 for 11 kHz. The scaling transform F(f) that is used in determining the frequency scale of the basis functions for voiced frames may be a unit transform ({tilde over (f)}=f, no frequency scaling), for example, or a normalized mel transform, such as {tilde over (f)}=0.5·log1+0.5·s(1+sf) wherein s=SamplingFreq/700. Alternatively or additionally, processor 32 may apply dynamic scaling, as described hereinbelow with reference to
For unvoiced click frames, processor 32 may, for example, use the same triangular basis functions as for voiced frames. Because the click frames generally have a flat amplitude spectrum with complex, rapidly-varying phase, however, it is desirable to enlarge the order of the phase model. In one embodiment, the number of basis functions used in modeling click frames is M=64 for a 22 kHz sampling rate and M=32 for 11 kHz. Typically, no frequency scaling is applied in modeling the click frames.
Processor 32 may also accumulate the tangent of the phase angle τ=τ1+τ2, which is given by the linear term l(fk) that is subtracted from the harmonic phases at step 82. This additional phase parameter is stored in database 34 together with the basis function coefficients dn for use in the speech reconstruction process. Use of this additional linear phase term prevents uncontrolled cyclical shifts of the click segments in synthesized speech. This sort of cyclical shift is acceptable for voiced segments, in which the audio signals are periodic, but will cause incorrect waveform evolution in time if it is permitted to occur in click segments. If a constant phase component of π was subtracted from the harmonic phases at step 82, then processor 32 may add this component back into the coefficients of the triangular basis functions in order to preserve the original mutual polarity of successive click frames.
In dynamic frequency scaling, the basis functions used in phase modeling are defined dynamically for each frame according to the amplitude spectrum of the frame.
Formally, the dynamic frequency scale may be defined as follows:
Here A(f) is the continuous amplitude spectrum given by the parametric model described above: A(f)=exp (ΣCk·Bk(f)). W(.) is a positive monotonic function, such as W(A)=Aλ, wherein λ>0 is a predefined parameter, for example, λ=0.5.
Thus, when dynamic frequency scaling is used, the frequency scale used in phase modeling may vary from frame to frame. The same variable scaling is then used by synthesizer 36 (
To estimate the phase model parameters {dn, n=1, . . . , M} for a given frame, the appropriate frequency scaling is applied to the harmonic frequencies of the frame {tilde over (f)}k=F(fk), k=0, 1, . . . , N−1. The harmonic log-amplitudes log|Hk| and unwrapped phases φk are then re-sampled evenly over the transformed frequency scale by linear interpolation between their original values to give K modified harmonics. Typically, K>>M, for example, K=3M. The purpose of this re-sampling is to guarantee the stability of the parameter estimation. Thus, re-sampling is not necessary if no frequency scaling is applied (in which case the original harmonics are used in the phase model).
The phase model parameters are obtained by minimization of the expression:
Here |Hk|=exp(log|Hk|) are the re-sampled harmonic amplitudes, and φk are the re-sampled harmonic phases; and α>0 is a parameter controlling the additional influence of the spectral amplitude level on the phase approximation accuracy. In an exemplary embodiment, α=0.25. The solution to the minimization problem of expression (10) may be found by solving a set of linear equations with a symmetric positively-determined matrix.
The time-domain phase modeling technique may be used at step 58 (
The time-domain approach has the advantages of not requiring phase unwrapping and of modeling voiced and unvoiced clicks frames identically using the same number of parameters.
To carry out the method of
Mr≈R (11)
by minimizing Re((Mr−R)* W(Mr−R)), wherein M is the DFT transform matrix (not necessarily square) with elements
0≦k<K, 0≦n<N; and W is a diagonal weighting matrix containing the amplitude spectral values |R(k)|α on its diagonal, wherein 0<α<1 is a spectrum compression factor. This minimization is equivalent to finding the least-squares solution of Re(M*WM)r=Re(M*WR), which may be rewritten in cyclic convolution form as:
Re(M*W){circle over (x)}r=Re(M*WR) (12)
The complex phase spectrum for each frame is calculated by rearranging equation (12) and transforming to the frequency domain:
{circumflex over (R)}=FFT{Re(M*WR)}/FFT{Re(M*W)} (13)
Using the notation { }N to represent a cyclic wrapping operation
equation (13) can be rewritten:
The solution to this equation may be calculated efficiently by noting that N×FFT{Re(IFFT{y(k)})}=N/2(y(k)+y((N−k) mod N)). The time domain solution is then found by performing the inverse Fourier transform of {circumflex over (R)}.
For each successive frame after the first frame, processor 32 finds an optimal update of the vector r relative to the previous frame vector rp in order to minimize the error in phase estimation of the current frame, at an update step 102. The processor iterates in this manner through all the frames in a voiced segment, at an iteration step 104. For this purpose, the phase estimation error for the current frame can be written as:
ε=Re((Mrp−R)*W(Mrp−R)) (15)
At step 102, processor 32 attempts to find the element r(k) (0≦k≦N) in r that when updated by a corresponding factor αk will result in a maximal reduction of ε. In other words, the processor seeks αk that will minimize the residual error:
εk=Re((Mrp+mkαk−R)*W(Mrp+mkαk−R) (16)
wherein mk is the k-th column of the M matrix.
The optimal update for any given element r(k) can be written as:
Therefore, the vector of optimal updates α□{αkopt, 0≦k<N} for all the elements of r, can be calculated as:
This calculation can be performed efficiently using Fourier transforms, as described above. The error improvement for each choice of k is then given by Δεk=−(αkopt)2 tr(W). Therefore, the optimal element to update is:
After finding the first update factor αk, processor 32 repeats the computation of equations (18) and (19) to find the next element of r to update in the current frame, continuing iteratively in this fashion until either it has computed a predetermined maximum number of updates or the error (equation (15)) drops below a predefined threshold. The processor then goes on to compute the update factors for the next frame in the segment. Upon conclusion of the process, the elements of the time-domain phase vector r for the first frame and the full vector or update factors for the succeeding frames in the segment are compressed and stored in database 34, where they may be used in subsequent speech synthesis.
In an alternative embodiment, processor 32 computes L best updates at each iteration. Together with the preceding iteration, these L updates give L*L possible tracks, which the processor then prunes to find the L best tracks after each iteration. One of the L best update tracks is chosen at the final iteration.
Scalar quantization of the update values may be incorporated in the above solution for purposes of compression (step 60). Let αkQ=αkopt+Δαk be the result of a scalar quantization of a given update. The error improvement then becomes:
The optimal choices of elements to update are then determined using ΔεkQ, in the manner of equation (19), as described above.
In an alternative embodiment, the time-domain phase vector r is found by full parameterization of the signal in each individual frame, in the manner described above at step 100.
Synthesizer 36 receives a text input, at an input step 110. The synthesizer analyzes the text to determine a sequence of speech segments that are to be synthesized and the pitch to be applied to each of the voiced segments, at a text analysis step 112. The pitch for the voiced segments is chosen by the synthesizer and is generally not the same pitch as that at which the segments were recorded by encoding unit 22. The synthesizer looks up the segments in database 34 in order to choose the appropriate sequences of amplitude and phase spectral parameters to use in generating the desired speech stream. Any suitable methods of concatenative speech synthesis may be used in choosing the segments and the corresponding parameters, such as the methods described, for example, in the above-mentioned in U.S. Pat. No. 6,725,190 and U.S. Patent Application Publication US 2001/0056347 A1.
Each segment in the speech stream typically comprises a number of frames. For each frame, synthesizer 36 determines the set of harmonic frequencies to use in reconstructing the amplitude and phase spectra of the frame, at a frequency selection step 114. Typically, for unvoiced frames, the harmonic frequencies are the same frequencies as are used in subsequent DFT computation, with one harmonic frequency for each DFT frequency point. For voiced frames, the harmonic frequencies are chosen as multiples of the pitch frequency. The synthesis process then branches at a voicing determination step 116, after which different synthesis techniques are applied to voiced and unvoiced frames.
For unvoiced frames, synthesizer 36 determines the DFT frequency component amplitudes, at an unvoiced amplitude computation step 118. For this purpose, the synthesizer reads the amplitude spectral parameters for the current frame from database 34 and then computes the amplitude spectrum in accordance with equation (3). The synthesizer scales the amplitude to the energy level that is indicated by the stored parameters. The synthesis process branches again between click frames and regular unvoiced frames, at a click determination step 120. For regular (non-click) unvoiced frames, the synthesizer applies random phases to the DFT frequency components, at a random phase generation step 122.
For click frames, synthesizer 36 reads the corresponding phase spectral parameters from database 34 and applies the corresponding phases to the DFT frequency components, at a click phase computation step 124. Either the frequency-domain (
For voiced frames, synthesizer 36 applies an intentional frequency jitter to the high harmonics, at a jittering step 130. The purpose of this jitter is to avoid high-frequency buzz that can otherwise occur in synthesis of voiced frames. The added jitter generally gives the synthesized speech a more natural and pleasant-sounding tone. For this purpose, the synthesizer shifts each of the high-frequency harmonics by a randomly-generated frequency offset. In one embodiment, the shifts have a normal distribution with zero mean and with variance increasing with frequency. Alternatively, when a continuous voicing scale is used in encoding frames, the voicing value may be recorded in database 34 for each frame, and the amount of jitter may then be determined as a function of the degree of voicing. Typically, the jitter decreases with the degree of voicing.
Synthesizer 36 reads the amplitude spectral parameters for each voiced frame from database 34 and computes the amplitudes of the frequency components of the frame, at a voiced amplitude computation step 132. The synthesizer then reads the phase spectral parameters from the database and computes the phases of the frame frequency components, at a voiced phase computation step 134. Steps 132 and 134 proceed in similar fashion to steps 118 and 124, using equations (3) and (8). For voiced frames, however, rather than adding a predetermined linear phase shift to the frequency components as for click frames, synthesizer 36 typically chooses a linear phase shift so as to align the phase of the current frame with that of the preceding voiced frame (assuming the previous frame was voiced). This technique is described in detail in the above-mentioned U.S. Patent Application Publication US 2004/0054526 A1. The synthesizer computes for each voiced frame an additional linear phase term corresponding to the time shift of the present frame relative to the preceding frame. The synthesizer applies both of these linear phase terms to the frequency components of the current frame.
After computing the amplitudes and phases of the spectral components of each frame, synthesizer 36 convolves the spectrum of the frame with the spectrum of a window function, at a windowing step 140. For example, the synthesizer may use a Hanning window or any other suitable window function known in the art. The synthesizer transforms the frame to the time domain using an inverse Fast Fourier Transform (IFFT), at a time domain transformation step 142. It then blends successive frames using overlap/add and delay steps 144 and 146, as are known in the art, in order to generate the output speech signal.
It will be appreciated that the embodiments described above are cited by way of example, and that the present invention is not limited to what has been particularly shown and described hereinabove. Rather, the scope of the present invention includes both combinations and subcombinations of the various features described hereinabove, as well as variations and modifications thereof which would occur to persons skilled in the art upon reading the foregoing description and which are not disclosed in the prior art.
This application is a continuation-in-part of U.S. patent application 10/243,580, filed Sep. 13, 2002, and published as U.S. patent application Publication US 2004/0054526 A1, whose disclosure is incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
Parent | 10243580 | Sep 2002 | US |
Child | 11046911 | Jan 2005 | US |