Abstract:
A variable speed playback system exploits multiple-period similarities within a residual signal, and includes multiple-period template matching which may be applied to alter the excitation periodical structure, and thereby increase or decrease the rate of speech playback. Embodiments of the present invention enable accurate fast or slow speech playback for store and forward applications without changing the pitch period of the speech. A correlated multiple-period similarity measure is determined for an excitation signal within a compressor/expander. The multiple-period similarity enables overlap-and-add expansion or compression by a rational ratio. Energy variations at the onset and offset portions of the speech may be weighted by energy-based adaptive weight windows.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a combined speech coding and speech modification system. More particularly, the present invention relates to the manipulation of the periodical structure of speech signals. 
     2. Related Art 
     There is an increasing interest in providing digital store and retrieval systems in a variety of electronic products, particularly telephone products such as voice mall, voice annotation, answering machines, or any digital recording playback devices. More particularly, for example, voice compression allows electronic devices to store and playback digital incoming messages and outgoing messages. Enhanced features, such as slow and fast playback are desirable to control and vary the recorded speech playback. 
     Signal modeling and parameter estimation play increasingly important roles in data compression, decompression, and coding. To model basic speech sounds, speech signals must be sampled as a discrete waveform to be digitally processed. In one type of signal coding technique, called linear predictive coding (LPC), an estimate of the signal value at any particular time index is given as a linear function of previous values. Subsequent signals are thus linearly predictable according to earlier values. The estimation is performed by a filter, called LPC synthesis filter or linear prediction filter. 
     For example, LPC techniques may be reed for speech coding involving code excited linear prediction (CELP) speech coders. These conventional speech coders generally utilize at least two excitation codebooks. The outputs of the codebooks provide the input to the LPC synthesis filter. The output of the LPC synthesis filter can then be processed by an additional postfilter to produce decoded speech, or may circumvent the postfilter and be output directly. 
     Such coders has evolved significantly within the past few years, particularly with improvements made in the areas of speech quality and reduction of complexity. Variants of CELP coders have been generally accepted as industry standards. For example, CELP standards are described in Federal Standard 1016, Telecommunications: Analog to Digital Conversion of Radio Voice by 4,800 Bit/Second Code Excited Linear Prediction (CELP), National Communications System Office of Technology &amp; Standards, Feb. 14, 1991, at 1-2; National Communications System Technical Information Bulletin 92-1, Details to Assist in Implementation of Federal Standard 1016 CELP, January 1992, at 8; and Full-Rate Speech Coded Compatibility Standard PN-2972, EIA/TIA Interim Standards, 1990, at 3-4. 
     In typical store and retrieve operations, speech modification, such as fast and slow playback, has been achieved using a variety of time domain and frequency domain estimation and modification techniques, where several speech parameters are estimated, e.g., pitch frequency or lag, and the speech signal is accordingly modified. However, it has been found that greater modified speech quality can be obtained by incorporating the speech modification device or scheme into a decoder, rather than external to the decoder. In addition, by utilizing template matching instead of pitch estimation, simpler and more robust speech modification is achieved. Further, energy-based adaptive windowing provides smoother modified speech. 
     SUMMARY OF THE INVENTION 
     The present invention is directed to a variable speed playback system incorporating multiple-period template matching to alter the LPC excitation periodical structure, and thereby increase or decrease the rate of speech playback, while retaining the natural quality of the speech. Embodiments of the present invention enable accurate fast or slow speech playback for store and forward applications. 
     A multiple-period similarity measure is determined for a decoded LPC excitation signal. A multiple-period similarity, i.e., a normalized cross-correlation, is determined. Expansion or compression of the time domain LPC excitation signal may then be performed according to a rational factor, e.g., 1:2, 2:3, 3:4, 4:3, 3:2, and 2:1. The expansion and compression are performed on the LPC excitation signal, such that the periodicity is not obscured by the formant structure. Thus, fast playback is achieved by combining N templates to M templates (N&gt;M), and slow playback is obtained by expanding N templates to M templates (N&lt;M). 
     More particularly, a; least two templates of the LPC excitation signal are determined according to a maximal normalized cross-correlation. Depending upon the desired ratio of expansion or compression, the templates are defined by one or more segments within the LPC excitation signal. Based on the energy ratios of these segments, two complementary windows are constructed. The templates are then multiplied by the windows, overlapped, and summed. The resultant excitation signal represents modified excitation signal, which is input into an LPC synthesis filter, to be later output as modified speech. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of a decoder incorporating an embodiment of a speech modification and playback system of the present invention. 
     FIG. 2 illustrates speech compression and expansion according to the embodiment of FIG. 1. 
     FIG. 3 is a flow diagram of an embodiment of the speech modification scheme shown in FIGS. 1 and 2. 
     FIG. 4 shows an embodiment of window-overlap-and-add scheme of the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     The following description is of the best presently contemplated mode of carrying out the invention. In the accompanying drawings, like numerals designate like parts in the several figures. This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the accompanying claims. 
     According to embodiments of the invention, and as will be discussed in greater detail below, an adaptive window-overlap-and-add technique for maximally correlated LPC excitation templates is utilized. The preferred template matching scheme results in high quality fast or slow playback of digitally-stored signals, such as speech signals. 
     As indicated in FIGS. 1 and 2, a decoded excitation signal 102 is sequentially processed from the beginning of a stored message to its end by a multiple-period compressor/expander 106. In the compressor/expander, two templates X ML  and y ML  are identified within the excitation signal 102 (step 200 in FIG. 2). The templates are formed of M segments. Accordingly, fast or slow playback is achieved by compressing or expanding, respectively, the excitation signal 302 in rational ratios of values N-to-M, e.g., 2-to-1, 3-to-2, 2-to-3, where M represents the resultant number of segments. 
     Referring to FIGS. 3(a), 3(b), and 3(c), Tstart indicates a dividing marker between the past, previously-processed portion of an excitation signal 302 (indicated as 102 in FIG. 1) and the remaining unprocessed portion. Thus, Tstart marks the beginning of the X ML  template. At each stage, properly aligned templates X ML  and y ML  of the excitation signal 302 are correlated (step 202 in FIG. 2) for each possible integer value L between a minimum number Lmin to a maximum Lmax. The normalized correlation is given by: ##EQU1## 
     The value L *  =arg L  max(C ML ) can then be found by taking all possible values of L, e.g., Lmin=20 to Lmax=150, and calculating C ML . A maximum C ML  can then be determined for a particular value of L, indicated as L *  (step 202 in FIG. 2). Thus, L *  represents the periodical structure of the excitation signal, and in most cases coincides with the pitch period. It will be recognized, however, that the normalized correlation is not confined to the usual frame structure used in LPC/CELP coding, and L *  is not necessarily limited to the pitch period. 
     Referring to FIG. 2, two complementary adaptive windows of the size ML *  are determined (step 204), W x   ML*  for x ML*  and W 6   ML*  for y ML  ·. As described in more detail below, for complementary windows, the sum of the two windows equals 1 at every point. The adaptation is performed according to the energy ratio of each L *  segment of x ML*  and y ML* . The templates x ML*  and y ML*  are multiplied by the complementary adaptive windows of length ML * , overlapped, and then summed to yield the modified (fast or slow) excitation signal. (Step 206) The indicator Tstart is then moved to the right of Y ML*  (step 208), and points to the next part of the unprocessed excitation signal to be modified. The excitation signal can then be filtered by the LPC synthesis filter 104 (FIG. 1) to produce the decoded output speech 108. 
     1. The General Adaptive Windows Formulation 
     In this section, the general formulation of the adaptive windows is given. For any compression/expansion ratio of N-to-M, two complementary windows W x   ML*  and W y   ML*  are construction such that W x   ML*  (i)+W y   ML*  (i)=1 or 0≦i&lt;ML * . To improve the quality of the energy transitions in the modified speech, the windows are adapted according to the ratios of the energies between x ML*  and y ML*  on each L *  segment. 
     More particularly, energies E y   k! (k=0, . . . , M-1) are calculated according to the following equations. It should be noted that in the energy equations, i=0 represents the beginning of the corresponding x ML*  and y ML*  segments. ##EQU2## The energies E x   k! (k=0, . . . , M-1) are calculated as: ##EQU3## And the ratios r k! (k=0, . . . , M-1) are calculated by: ##EQU4## such that a weighting function w k! (k=0, . . . , M-1) is given as: ##EQU5## where w k!=0, for E x   k!*E y   k!=0. 
     Thus, for every k=0, . . . , M-1 and i=0, . . . , L *  -1, a window structure variable t can be defined as: ##EQU6## Accordingly, the windows are determined as: ##EQU7## 
     2. Fast Playback--Excitation Signal Compression 
     Referring to FIG. 3(a), data compression at a 2-to-1 ratio, for example, is achieved by combining the templates x L  and y L  into one template of length L. as can be seen in this example, M=1. Template x L  312 is defined by the L samples starting from Tstart, and y L  is defined by the next segment of L samples. For each L in the range Lmin to Lmax, the normalized correlation C L , is calculated according to Eqn. (1), where M=1, and L *  is chosen as the value of L which maximizes the normalized correlation. The adaptive windows are then calculated following the equations described above for M=1. 
     Accordingly, as illustrated generally in FIG. 4, x L*  is multiplied by W x   L*  (402) and y L*  is multiplied by W Y   L*  (404). The resulting signals are then overlapped (406) and summed (408), yielding the compressed excitation signal (410). As shown in FIG. 3(a), since two non-overlapped segments of L *  samples each are combined into one segment of L *  samples, 2-to-1 compression is achieved. Tstart can then be shifted to the end of y L*  (point 304 in FIG. 3(a)). The next template matching and combining loop can then be performed. 
     Referring to FIG. 3(b), data compression at a 3-to-2 ratio is achieved by combining templates x 2L  320 and y 2L  322 into one template of length 2L. Template x 2L  320 is defined by a segment of 2 L samples starting at Tstart, and y 2L  is defined by 2L samples starting L samples subsequent to Tstart (i.e., to the right of Tstart in the figure). For each L in the range Lmin to Lmax, the normalized correlation C 2L  is calculated. The normalized correlation C 2L  is calculated by Eqn. (1) using M=2. Again, L *  is chosen as the value of L which maximizes the normalized correlation. The adaptive windows are then calculated for M=2. 
     Again, as shown in FIG. 4, x 2L*  is multiplied by W x   2L*  (402) and y 2L*  is multiplied by W y   2L*  (404). The resultant signals are overlapped (406) and summed (408) to yield a 3-to-2 compressed excitation signal (410). In other words, the trailing end of the first segment x 2L  320 is overlapped by the leading end of the next segment y 2L  322, each having lengths of 2 L *  samples, such that the overlapped amount is L samples long. Thus, Tstart can be moved to the end of y 2L*  for the next template matching and combining loop. 
     3. Slow Playback--Excitation Signal Expansion 
     Referring to FIG. 3(c), data expansion at a 2-to-3 ratio is achieved by combining templates x 3L  330 and y 3L  332 into one template of length 3 L. The template x 3L  330 is defined by 3 L samples starting from Tstart, and yes is defined by 3 L samples beginning at point 334, L samples before Tstart, representing previous excitation signals in time (i.e., to the left of Tstart). For each L in the range Lmin to Lmax, the normalized correlation C 3L  is calculated. The normalized correlation is determined according to Eqn. (1) using M=3, where L *  is chosen to be the value of L which maximizes the normalized correlation. The adaptive windows are then calculated for M=3. 
     For the adaptive windowing, referring to the conceptual representation of FIG. 4, x 3L*  is multiplied by W x   3L*  (402) and y 3L*  is multiplied by W y   3L*  (404). The resultant signals are then overlapped (406) and summed (408), yielding the expanded excitation signal (410). As can be seen in FIG. 3(c), 2-to-3 expansion is achieved by overlapping in a reverse fashion. That is, the leading end of the x ML  template is overlapped with the trig end of the y ML  template such that the two segments, each of 3 L *  samples, are overlapped by 2 L *  samples, and combined into one segment of 3 L *  samples. Tstart is then moved to the right end of y 3L* , ready for the next template matching and combining loop. Thus, the excitation signal is expanded by selecting the particular placement of the y ML  segment, and shifting the start point Tstart. 
     This detailed description is set forth only for purposes of illustrating examples of the present invention and should not be considered to limit the scope thereof in any way. It will be understood that various modifications, additions, or substitutions may be made without departing from the scope of the invention. Accordingly, it is to be understood that the invention is not to be limited by the specific illustrated embodiments, but only by the scope of the appended claims and equivalents thereof.