METHOD AND ARRANGEMENT IN A COMMUNICATION SYSTEM

Abstract: The present invention relates to the decoding/playback part of received sound data packets in systems for transmission of sound over packet switched networks. According to the invention, the lengths of received signal frames are manipulated by performing time expansion or time compression of one or more signal frames at time varying intervals and with time varying lengths of the expansion or the compression, said intervals and said lengths being determined so as to maintain a continuous flow of signal samples to be played back.

Description: METHOD AND ARRANGEMENT IN A COMMUNICATION SYSTEM Technical field of the invention The present invention is generally related to systems for transmission of sound over packet switched • networks, and more specifically to the decoding/playback part of received sound data packets in such systems. Technical background and prior art In packet switched data networks, such as the Internet, the arrival time of data packets is subject to significant delay jitter. Moreover, data packets can be lost in the transmission or deliberately discarded by the network in order to resolve congestion problems. For data transmissions without strict requirements on the trans- mission time, an error-free transmission can be established with a transmission protocol that uses hand shaking and retransmission. When sound signals such as speech or audio are transmitted over a packet switched network, signal frames, i.e. consecutive sets of signal samples, are encoded to result in data packets, each data packet corresponding to one or multiple signal frames. In, e.g., duplex communication systems, these signal frames are to be played back at the receiver side without excessive delay. In this case, a transmission protocol with hand shaking and retransmission is most often not a feasible solution to ensure signal frames to be available for continued playback. Furthermore, delay jitter is a source of problems for these signals: if the delay of a data packet results in it arriving too late for continued playback of consecutive signal frames, then problems arise that are Ω Hi 3 0 3 CD 3 CQ τi CO rt rt rt SD Q y rt •o IQ rt Pi 3 ι-3 μ- L - ϋ Ω tr CQ μ- - CD 0 0 CD CQ CD 3 μ- 0 ϋ rt tr t μ- ø Φ r y- 0 0 φ μ- tr ø μ- Φ Hi SD Ω 3 0 μ- 0 u rt Ω rt o 1 CQ tr 0 SD φ Φ 3 Pi D 0 CQ φ rt Pi <! - y • τi CQ 3 rf tr H- t 0 CQ CQ tr rt μ- 1 rt ■ ! i CQ SD φ rt rt 0 CQ φ ø o rt μ- H- 3 O h- 1 O P. μ- rt y- y CD CQ ø ii > tr 0 < < CJ. r Φ Ω •n • rt H, • y- y 0 CD H3 α I- 1 μ- 0 μ- Σ. CD 1 Φ 0 CQ Φ s! Φ ^ — . SD SD 0 ^ - y Φ tr μ- Φ ϋ Φ φ tr μ- rt d 9 H tr CU 3 ø rt tr 3 O Ω CD Hi φ Pi tr n Ω O D <; Pi Φ rt Pi φ Φ 0 ED SD ii H- CQ CD S rt 0 CD ø μ- CQ Hi 0 rt ϋ Φ "^^ * φ Φ ^- φ rt rt Ω tr Ω Φ ø ø Ω rt H- H- 0 H 0 0 rt h- 1 1 0 Φ ii ct tr ii .. TS s: φ 0 ø tr tr ø CQ rt V rt μ- 3 w l- J ϋ μ- rt Hi μ- CD rt Pi Hi Ω Φ φ S! H i 9i td SD Φ H H Hi ^ Φ Ω fD CQ Hi y- y Q O y- y - ø 1 H O rt ϋ •<: t Φ Φ rt 0 Ω Φ ii Hi •o rt SD rt CD 0 3 μ- rr CQ ø SD y- y CD 13 SD <! O 3 o 1 Ω μ- §; w ø tr Φ Φ 0 ι-3 ϋ 0 <τi rt 0 ■ Z tr 0 0 tr 0 i y- y 1 μ, 3 Φ ø rt Φ SD 0 φ 0 Ω ii CD H o τi rt tr H- H 0 CD . £-> CD ø μ- Pi SD o Φ ii 3 rt Pi μ- ; CQ i rt i Hi rt Φ SD ■ p rt (H ii 0 0 CD 0 ø ii r ii tr ■ ; Φ tr Pi < 0 CQ Φ Hi fi 0 tr μ- SD CQ CQ 3 CQ I- 1 CD Pi CD CD H - 3 rt Φ rt 0 φ £ Ω - φ 0 μ- 0 μ- CQ Φ Ω 0 φ rt 3 CD ø H- ^ 0 Ω CQ φ H 3 tr t P. t 0 ^ 1 ii ϋ ø Hi rt φ SD CQ tr 0 ct 3 • 0 Hi 0 CQ Pi 3 3 O φ 0 Hi φ ^ μ- 0 Φ -y ^ Si Ω μ- i ϋ rt 3 rt Φ 0 13- 3 CQ t! rt 0 μ- (ϋ CD tr rt Pi μ- Φ rt M Pi ø μ- Φ 0 SD O Φ μ- μ- tr rr O PJ ii 3 0" 0 ø CQ rt SD - tr CD H tr Ω φ μ- Ω 0 Q ϋ 3 ø μ- - 0 CQ SD CQ 0" α. ϋ Hi O SD CD CD CQ Ω tr CQ φ o E Q ø Pi O ct o ct Hi μ- CQ SD ø 9i ø CQ rt 0 H- CQ H- 0 13 K Ω μ> 0 3 α rt rt Hi 0 ' 3 μ- 0 tr Ω rt ø 0 - • ; μ- ø 0 N H 0 CD τi rt rt μ- i y- CQ tr Hi μ- 0 rt μ- ϋ 0 Ω CQ 1 y- y Ω Hi Ω 0 0 CQ 3 CD CQ CQ H μ- μ- tr CQ 0 SD • SD •P Φ $ SD ø ø μ- Q 0 Ω > Ω J- Ω ø Ω p. CD Pi rt CD CD 0 3 CD CQ ø rt ii H tr rt μ- CQ ø SD Hi rt •d SD 0 μ- H Ω 0 0 μ- Pi 0 CQ 0 μ- Pi Hi rt & s. O μ- Φ Φ 3 - ø CQ ^ μ- tr SD - 0 rt Ω 0 Hi Hi rr tr 3 CQ CD ø 0 φ SD r ø ø μ- 0 φ if CQ Φ Ω rt Φ rt τi Hi ii 0 H- CD CD Hi CD 0 ≤ CQ tr ϋ Hi H Pi - Q Hi 1S1 μ- 0 rt 91 0 φ tr Ω Φ 9 H CQ 0 y- y i 0 rt μ- CD H φ rt P φ SD 0 μ- • CQ rt Ω H Si Φ Pi φ rt ii Ω CQ $ KJ H- ø O CQ H 0 rt H - CQ SD Hi Φ • ii 3 i ii ' ø Φ μ- φ Φ rt μ- τi tr τi CQ CD ■ z Ω Hi μ- tr CD 0 0 3 Φ ϋ Φ φ Si cQ . * ; ø Pi Ω CQ l_l. ϋ O SD φ φ Φ y- y 0 a- SD SD - ø Ω £. φ ϋ 3 m .— ^ - D O CQ 91 0 μ- φ 0 ø rt φ ø 9> SD <! τi 0 <! CQ SD SD rt rt w 0 rt P. SD rt (- ■ i Ω •^ (-" SD H- Pi P ) CD D <! μ- CQ rt rt ^-^ > 1 SD tr tr Φ rt ϋ 0 φ H rt SD S CQ tr rt tr tr 0 μ- 0 0 Ω CD 0 0 0 tr rt ■ o ■ <! Φ 0 Φ tr H Φ Φ •<: μ- - Z tr PJ O 0 CQ Hi Pi rt ? ϋ CQ tr Φ ø J rt W tr $ • n Φ rt CQ ii rt 0 μ- 0 * Φ Ω CD <! Hi μ- CD << CQ 3 Φ tr SD SD SD ϋ tr μ- SD CQ _l. tr CQ rr SD ^ CQ CD 0 CD H 0 rt rt rt Φ CQ Φ Ω Ω 3 i rt Φ Φ <! 0 rt tr μ- rt Ω CQ fi 3 Hi H CD 0 S" ø" μ- rt φ Hi *" 0 0 tr φ ϋ 0 ø rt *ϋ tr SD CD CD CD Hi CQ 0 Φ rt tr Ω μ- rt Φ • 0 Φ SD ø ii Hi rt 91 13 Φ y- rt CD 0 CQ 0 μ- 3 P. ø 0 o ii μ- rt 0 s> ii 0 S T3 Φ HI Φ Ω SD Pi o SD H- rt- τi ts rt 0 0 μ- φ rt Pi ø CQ 3 rt Φ (_!- Φ _- ■ α Φ H ? Ω ø 13 CQ H CD i rt μ- CQ Pi rt μ- μ- μ- ' ø SD ii Φ ?? ø CQ τi Ω 0 CD V CQ Ω 0 rt 0 ø Q 0 φ rt rt φ CD ^ SD. *ϋ rt Φ Φ 9> fD n- ^ Ω H •> ii tr CQ $ ø rf SD CD ct 0 tr v • τi CQ Hi ø rt s: ii Φ ty 0 ϋ rt rt tr a 0 t O ii H CD Φ o Hi SD i H O Ct . φ CD rr tr 0 ) rt & 3 D 0 0 * 0 T5 0 ii 0 0 Ω 0 tr ii Ό o φ Φ yQ SD CD _- ■ ø tr Hi Pi Φ rt tr tr ii CQ 9 H Ό Hi y- y Ω ι-i CD 0 CD rt ϋ μ- rt _- ■ O rt Ω Φ tr ϋ X " Hi - y SD H ii 0 rt 0 <! Ω rt φ 0 0 W SD ,o T tr 3 rt ii ϋ SD Hi t SD Φ φ tr ? 0 0 - Ω Pi H tr 3 CQ tr CQ SD $. H- 0 H- t 3 Hi 0 Si 3 3 - y 0 φ CQ Hi σ 0 O Φ ■ Z Φ 3 0 SD & H- CQ CD SD ø CD φ Pi P. φ i rt tr HI CQ 3 <! 91 μ- μ- φ CQ 0 _P H 0 CQ H CQ ii , — . SD 3 CQ o Φ Φ rt • τi μ- ii CQ CQ 3 3 H P. 0 1 Φ φ σ CQ ii ii 3 H Ω Si CD C Q 0 H- CD 0 CQ rt CQ 0 φ Φ μ- CQ CQ CQ rt CQ μ- 1 P. o rt 1 ø ø similar techniques are employed by the present invention, techniques for merging or smoothing will be described below. I . Timing Recovery Methods A good compromise for the " configuration of the jitter buffer is a function of the statistics of the delay jitter. Since the jitter is time varying, the jitter buffer is often continuously configured during a transmission, e.g.-, using the first one or two data packets of every talk spurt, or from delay statistics estimated from the previous talk spurt . In a system that does not transmit data packets- during silence, the jitter-buffer will empty as a natural consequence, and a sufficient buffering delay needs to be introduced at the beginning of each new talk spurt. The introduction of a parity bit in each data packet and the change of its value from one talk spurt to the next, allows the immediate detection of the beginning of a talk spurt in the receiver. Thereby, the start of playback of this talk spurt can be delayed with an- interval called the retention delay. This allows the jitter buffer to recover from the underflow to good operating conditions. At a sudden increase of the transmission delay, there is the risk that an underflow of the jitter buffer occurs. That is, no data packets are available in the jitter buffer at the required time of decoding to yield the signal frame for continued playback. In this situation, a repeated playback of the signal frame encoded in the last data packet in the jitter buffer may allow the buffer to recover to good operating conditions. In systems with speech encoding and decoding, the repeated playback may be accomplished by holding some input parameters constant to the speech decoder. In simpler systems, the repeated playback will mean a simple repetition of the signal frame. US, 5 699 481, discloses a slightly more 1 advanced method, here the signal is repeated in units of constant length, the length being preset in the system design. A sudden decrease of the transmission delay may cause an overflow of the jitter buffer. Apart from implementation specific problems related to the device having sufficient capacity to store the additional packets, this situation is an indication that the system introduces excessive delay of the playback. Here, skipping the playback of certain signal frames, i.e. deleting or discarding these signal frames, can make the buffer recover to good operating conditions. Again, the method of US, 5 699 481 discards- signal parts in units of constant length, the length being preset in the system design. In systems for speech transmission that transmit excitation frames being input into a linear predictive coding (LPC) filter, the repetition or deletion of signal frames can advantageously take place in the excitation domain, for example as disclosed in US, 5 699 481. Furthermore, for speech specific applications, it is advantageous to let rules for deletion and repetition of signal frames be dependent of a classification of the non-silent signal frames as voiced or unvoiced. Since a repetition or deletion of sub-frames of fixed length can lead to severe degradation of the voiced speech, the implementation in US, 5 699 481 does modification only of unvoiced and silence speech frames. In addition to delay jitter in the transmission, also differences between clocks in the transmitting and receiving devices may cause buffer under- or overflow. A problem that is solved by the present invention, but also by the prior art. The present invention, however, providing a better quality of the resulting played back sound signal . II. Lost Frame Substitution Methods Methods have been developed for the situation in which data packets are lost, meaning that they were either discarded by the network, or reached the receiver later than required for the continued playback of the corresponding signal frame, despite a jitter buffer in good operating state. The methods used for this situation can, in general, be characterized as ways 'of substituting the lost signal frame with an estimate of this signal frame given signal frames earlier and, in some cases, later in the signal. The simplest of these methods is a direct repetition of the previous signal frame. A more advanced method is a method that estimates a linear long-term predictor, i.e., a pitch predictor on the previous signal frames, and lets a long-term pre- diction with same length as a signal frame constitute the estimate of the lost signal frame. A third method involves a target matching with the L last samples of the last signal frame being the target segment, where. L is an integer. The method then searches for the L-sample segment earlier in the signal that best matches this target and let the frame substitution be samples following this -sample segment (eventually scaled to give same summed-squared value as the latest signal f ame. Since, for a complete frame substitution, the same number of samples as the frame length needs to be estimated, some methods consider squared-error matching of the target only with L-sample segments that are at least one frame length back in the signal, i.e., segments in the second to last signal frame and back. The L-sample target matching can, at the cost of additional delay, be employed also for the estimation of the lost signal frame from signal frames later in the signal. A refined estimate for the lost signal frame may then result as a smooth interpolation between the estimate from previous signal frames and the estimate from later signal frames. Examples of the methods described above are disclosed in "The Effect of Waveform Substitution on the Quality of PCM Packet Communications", 0. J. Wasem et al . ; IEEE Trans. Signal Proc . , vol. SP-36, no. 3, pp. 432-448, 1988. III. Oscillator Model for Time-Scaling of Speech In "Time-Scale Modification of Speech Based on a Nonlinear Oscillator Model", G. Kubin and W. B. Kleijn, in Proc. Int . Conf . Acoust . Speech Sign . Process . , (Adelaide), pp. 1453-1456, 1994, which is hereby incorporated by reference, an oscillator model for time scaling is proposed. In the oscillator model, short fixed length segments of a signal are attached to a state vector of samples with fixed positive delays relative to the first sample in the segment . The oscillator model defines a codebook of short signal segments. To each signal segment in this codebook, a state vector is connected. If for a finite signal defined as the concatenation. of short segments, the codebook of the oscillator model contains all these short segments and their corresponding state vectors. Then, starting with the state of the first short signal segment, the oscillator model can for any real world signal without error regenerate the original • signal segment by repeated readout of a next short signal segment . For a signal of infinite length, the oscillator model can regenerate the original signal without error from the state of the first short segment. This is obtained by periodically updating the codebook to correspond to finite sub signals. Time-scaling follows when, without changing the size or content of the codebook, we alter the rate of update for the codebook. A faster update rate results in a time-scaling less than one, and'a slower update in a time-scaling larger than one. This was the application of the oscillator model proposed in the article referred to above. IV. Merging and Smoothing To improve the transitions from a signal frame to the substituted frame and from the substituted frame to the following signal frame, the article by O. J. Wasem et al . referred to above discloses the use of so-called merging, i.e., use of a smooth interpolation between the two signals in a short, but fixed (e.g. 8 samples), transition region. In the article "Time-Scale Modification of Speech Based on a Nonlinear Oscillator Model" referred to above, the authors propose the use of linear predictive smoothing in order to reduce similar transition regions . In that context, linear predictive smoothing is obtained as follows: the estimate of the signal continuation is filtered through an LPC analysis filter to result in a residual signal. The analysis filter is initialized with a filter state obtained from the state codebook of the oscillator .model . A refined estimate of the signal con- tinuation is obtained by LPC synthesis filtering of the residual signal, with the synthesis filter initialized with a state consisting of the last samples in the signal prior to the continuation. In the context of smoothing, it can be noted that the speech-specific timing recovery disclosed in US, 5 699 481, doing repetition or deletion of signal sub- frames with a fixed length in the excitation domain of- a CELP (Code Excited Linear Prediction) coder, exploits linear predictive smoothing to improve transitions between signal sub-frames. Thus, in short, state-of-the-art methods for timing recovery and lost frame substitution consist of: Methods, exclusively for timing recovery, which modify the timing by repetition or deletion of signal frames or sub-frames, which are a fixed, predetermined number of samples long. Linear predictive smoothing is > ω to to y- y H 1 Π o C1 o LΠ O LΠ oo deleted signal part is varied over time, i.e. the invention provides a time varying length of the time expansions or the time compressions. Consequently, the intervals with which time expansions or time compressions are performed are varied over time and related to lengths of the time expansions or the time compressions. Thus, the time expansions and the time compressions of signal frames are performed on an asynchronous basis, since the length of the expansions/compressions and the length between different expansions/compression vary over time. According to an embodiment of the invention, the lengths of the time expansions or time compressions are results of signal fitting, such as vector matching or correlation maximization, on the signal. As a result,- the time intervals at which time expansions or time compressions are performed will typically change over time in dependence on the resulting lengths of the time expanded or time compressed signal frames . Preferably, the length of a time expansion or a time compression is defined with a resolution of a sample or a fractional part of a time duration between two consecutive samples. This generally allows for very small or zero discontinuities at the boundary between a signal fr ' ame and its expansion. The fractional resolution is feasible to achieve by re- sampling the original, signal, at the same sampling rate but at new time instances, and thereby obtaining new samples that are fractionally delayed relative to the samples of the original signal, i.e. each sample is delayed with a time duration that is less than the time duration between two consecutive original samples. It is preferred to base the decisions to do time expansions and time compressions on real-time observations and statistics from the jitter buffer. These real- time observations and statistics, which are observed when monitoring the jitter buffer, contain, for example, the number of data packets in the buffer, the short and long term variation of packets in the buffer, and the short and long term percentage of lost packets. Preferably, whenever a number of consecutive signal frames are available at the decoder, where the number of frames is time dependent, and based on the real-time statistics from the jitter buffer, a compression of two or more frames is attempted. This may or may not lead to a compressed signal frame that is shorter than the sum of the lengths of the signal frames input to the com- pression. The difference in length may be a fractional number of samples and is dependent on signal fitting of the actual signal frames. If the signal fitting cannot produce a compressed signal frame with smooth transitions, as defined by a threshold in e.g. a correlation measure or a vector .matching, the signal frames are left ' unchanged. This threshold is advantageously adapted over time to allow for a less critical criterion for the compression the closer the jitter buffer is to overflow. Moreover, the threshold can vary in dependence on a -classification of the signal frames. For speech, signal classes with different thresholds for compression would typically be: voiced, unvoiced, transition, and silence. This setup allows for some signal classes to be compressed only when the jitter buffer is very close to overflow, whereas, other signal classes are compressed even at normal operation conditions for the jitter buffer leading to a reduction of the delay of playback. It is preferred to invoke the frame expansion in any one of the following situations: underflow of the jitter buffer, close-to underflow of the jitter buffer, late arrival of data packets in the jitter buffer, and lost data packet. At the invocation of the frame expansion, no explicit decision about the occurring situation needs to be made. The expansion is iterative as follows. At each iteration, the signal frame is expanded with a signal dependent, and possibly fractionally accurate, number of samples. These samples are a, sometimes gain-scaled, version of the trailing part of the last frame. Towards the end of the playback of these expanded samples, where the time is based on the decoder processing time, the jitter buffer is checked to see if good operating con- ditions have been restored, i.e., that the jitter buffer is no longer in underflow or that a late data packet has arrived . If good operating conditions have been restored, the playback can continue with no discontinuity at the boundary between the expanded signal frame and next signal frame. This holds since each iteration of the frame expansion produces a, sometimes gain-scaled, version of the trailing part of the last expanded frame; from there a transition to next signal frame can always be made without discontinuities by help of a smooth gain scaling of the next signal frame. Otherwise, if the late data packet still has not arrived to the jitter buffer, and if any data packet following the late data packet has arrived to the jitter buffer, the signal frame corresponding to said late, and absent, data packet can be declared lost. The frame expansion, which at this point already has been partly played back, will in this situation in fact be a lost frame substitution. The substitution for a lost signal frame is for the first part equal to a time expansion of the prior signal frame: a lost frame situation is not distinguished from a buffer underflow, close to buffer underflow, or late data packet situation, until a predefined number of signal frames, e.g. one, belonging to the future of the signal, with respect to the frame currently being played back, are (is) available at the receiver. The length of a substitution frame is not fixed to the length, of the signal frames in the transmission system. Instead, the length of the substitution frame is chosen such that a smooth transition to a following frame can be made. This choice is based on signal fitting, such as vector matching or > L t ISJ - y LΠ O LΠ O LΠ 0 LΠ segment of the signal from which the oscillator model was build. ■ The vector matching can advantageously exploit gain- scale matching. ■ Periodicity of the iterated frame expansion is avoided by only using the same segment once for the expansion of a frame . The inventive method is, according to another embodiment of the invention, compatible with both- merging and predictive smoothing to reduce discontinuities. The choice of which is a trade-off between quality and computational complexity. Furthermore, both merging and predictive smoothing may be used at the same time, e.g., by merging in the excitation domain of certain encoding- decoding schemes. With respect to merging, the present invention includes several different embodiments, each based on different inventive concepts: According to one embodiment, when merging two seg- ments by overlap-add, the segment latest in time is preferably time-shifted with a number, .or fractional number, of samples, thus optimising a correlation or a vector matching criterion for the overlapping part of the two segments. Alternatively, merging can be made by replacement of the codebook in an oscillator model. Both of these merging alternatives, when applied in a lost frame substitution situation, rely on the presence of an efficient timing recovery, which, as described previously, is included in the inventive method of the present invention. According to another embodiment, the merging can advantageously optimize a correlation or a vector matching criterion when the segment latest in time is multiplied by a gain, which gain is a free parameter in the optimization. From there, a smooth transition back to unity gain can be obtained over the remaining part of the trailing segment or over the following signal frames. According to the present invention, the method for manipulating the signal either operates on the decoded signal in time ' domain as a post-processing applicable to any encoding-decoding system, or on a time-domain signal that is intermediate in the decoding process of the signal, and specific to the encoding-decoding method applied. For some coding schemes, this operation on a intermediate time-domain signal enables smoothing across signal frames without additional computational complexi-- ty. Examples of intermediate time-domain signals, on which our method can be used, are the excitation signal in CELP decoders or those waveform-interpolation or sinusoidal coders that do synthesis filtering of an excitation signal. The method can be refined, using e.g. speech specific signal characteristics such as voicing, but the basic algorithm is developed without any source specific assumptions made about the signal; it may be any sound source, with speech and audio as examples. Brief description of the drawings Further features and advantages of the invention will become more readily apparent from the appended claims and the following detailed description of a number of exemplifying embodiments of the invention when taken in conjunction with the accompanying drawings in which like reference characters are used for like features, and wherein: FIGURE 1 shows an overview of the transmitting part of a system for transmission of sound over a packet switched network; FIGURE 2 shows an overview of the receiving part of a system for transmission of sound over a packet switched network in accordance with an embodiment of the present invention. The system employ combined timing recovery and lost frame substitution on the decoded signal frames; FIGURE 3 shows an overview of the receiving part of a system for transmission of sound over a packet switched network in accordance with another embodiment of the invention. The system employ combined timing recovery and lost frame substitution on time-domain signal frames that are intermediate in the sound decoding; FIGURE 4 is a flow chart illustrating the overall operation of the process for combined timing recovery and lost frame substitution in accordance with the embodiments referred to by FIGURES 2 and 3 ; FIGURE 5 is a flow chart of the sub-process for time compression of signal frames, referred to in FIGURE 4 as • the time compress sub-process; FIGURE 6 is a flow chart of the sub-process for output of signal frames with normal consecutive sequence, referred to in FIGURE 4 as the so called normal sub- process; FIGURE 7 is a flow chart of the sub-process for merging a signal frame expansion with a future, not consecutive, signal frame, referred to in FIGURE 4 as the .merge sub-process; FIGURE 8 is a flow chart of the sub-process for expansion of a signal frame and output of the obtained expansion, referred to in FIGURE 4 ' as the expand sub- process; FIGURE 9 is a flow chart of the sub-process for correcting the gain scaling .of signal frames following an expansion or merging, referred to in FIGURE 5 and FIGURE 6 as the correct gain scaling sub-process; FIGURES 10a and 10b are diagrams illustrating an exemplifying time expansion of a signal frame; . FIGURES 11a, lib and lie are exemplifying diagrams illustrating how a fractional resolution is obtained; and FIGURES 12a and 12b are diagrams illustrating an exemplifying time compression of two signal frames. Detailed description of preferred embodiments FIGURE 1 is a block diagram of the transmitting part of a system for transmission of sound over a packet switched network. The sound is picked up by a microphone 10 to produce an electric signal 15, which is sampled and quantized into digital format by an A/D converter 20. The sample rate of the sound signal is a rate that is adequate for the bandwidth of the signal and is typically 8, or 16 kHz for speech signals and 32, 44.1 or 48 kHz for audio signals. The quantization accuracy of the digital representation is an accuracy that is adequate for the desired quality of the transmission, and is typically 7 or 8 bit A- or //-law quantization, or, 13 or 16 bit uniform quantization. Alternatively, the A/D converter 20 is of the oversampled differential quantization type. The sampled signal 25 is input to a sound encoder 30. The sound encoder 30 produces data packets 35 with fixed or variable rate and with fixed or variable size. These data packets contain sufficient information for an adequate sound decoder to reproduce a sound signal that is a sufficient-quality reproduction of the original sound signal. The controller 40 adds sequencing and destination address information to these packets, resulting in new data packets 45 suitable for transmission over a packet switched network. In FIGURE 2 and FIGURE 3 , two different embodiments of the present invention are shown. Both embodiments show a receiving part of a system for transmission of sound over a packet switched network. The difference between the two embodiments of FIGURE 2 and 3 lies in the position of the combined method for timing recovery and lost frame substitution 80. In both systems a controller 50 receives data packets from the packet switched network, strips addressing information and places the data packets adequately in a jitter buffer 60. The jitter buffer 60 is a storage- medium, typically RAM, with a limited physical capacity. According to the invention, the receiving system keeps the number of data packets in the jitter buffer 60 low but nonzero, thereby reducing the delay in the system, by way of regulating the rate by which data packets 65 exit the jitter buffer 60. The amount of packets in the jitter buffer 60 will typically be one to four packets. This number is dependent on the parameterization of the invention, to be described later. In order to obtain good operation of the overall system, it is important that the physical capacity of the jitter buffer 60 is such that all incoming data packets 65 can be stored, i.e. so that overflow of the time regulated system never occurs. The timing recovery and lost frame substitution 80 outputs a regularly sampled sound signal 85, typically with the same sample rate as the sampled signal 25 in FIGURE 1, except for differences in transmitting and receiving clocks. In the embodiment illustrated in FIGURE 2, a sound decoder 70 decodes data packets 65 into signal frames 75, i.e., fixed length segments of the decoded sound signal. These signal frames 75 are input to the combined timing recovery and lost frame substitution 80. The sound decoder 70 works as a translator through which the timing recovery and lost frame substitution 80 can access data from the jitter buffer 60 in the form of a signal frame 75. That is, the timing recovery and lost frame substitution 80 makes a frame demand 76 from the sound decoder 70. This causes the sound decoder to make a packet demand 67 from the jitter buffer 60. The jitter buffer 60 extracts a data packet 65 and sends it to the sound decoder 70, which decodes it, and returns it as a signal frame 75. The decision by the timing recovery and lost frame substitution 80 to fetch a signal frame is based on additional buffer state information 66 in a way to be described later. In the embodiment illustrated in FIGURE 3, the sound decoder 70 of FIGURE 2 has been replaced by a partial sound decoder 130. The partial sound decoder decodes the data packets 65 into signal frames 135 of an intermediate time-domain signal 145. These signal frames 135 are specific to the type of encoding-decoding system used. Typical examples of the signal frames 135 received by the timing recovery and lost frame substitution 80 are the excitation signal in CELP decoders or those waveform- interpolation or sinusoidal coders that do synthesis filtering of an excitation signal . The timing recovery and lost frame substitution 80 operating on these signal frames 135 can be equivalent in structure to the one shown in FIGURE 2 operating on the signal frames 75 from the decoder 70 in FIGURE 2, however, the choice of advantageous sub methods for expansion, merging, and smoothing can be different for the two embodiments. In correspondence with the description with reference to FIGURE 2, the embodiment of FIGURE 3 employs frame demand 76, packet demand 67 and buffer state information 66 . The remaining part 150 of the sound decoding process is a mapping from the intermediate time-domain signal 145 to a regularly sampled sound signal 155, which compares to the sampled signal 85 of the embodiment described with reference to FIGURE 2. This remaining part B 150 concludes the decoding process with the aid of side information 136 ' received from the partial sound decoder 130, i.e. the initial part A of the decoding process. In both embodiments described above, with reference to FIGURE 2 and FIGURE 3 , respectively, a D/A converter 90 converts the regularly sampled sound- signal 85 and 155, respectively, to an analog electronic . signal 95, which drives a sound reproducing system 100, e.g. a loudspeaker, to produce received sound. An embodiment of the decision logic of the timing recovery and lost frame substitution 80 is described with reference to the flow charts of FIGURE 4, 5, 6, 7, 8, and 9. In the description below the notation N A (C) will be used, where N, depending on the context, indicates one of the following: a.number of signal frames; an index number of a particular signal frame; a number of expansions of a signal frame; or a number of signal samples. The inter- ' pretation of a specific N will be clear from the context in which the specific N appears. C denotes the type of class of the signal frame for which the number N is relevant. The index following the N (e.g. written as N A , N B , N C and so on) is merely used for distinguishing different N:s from each other, since the N in one context is not the same N as in another context, i.e., for example', N A and N B are not related to each other. In FIGURE 4, an overall flow chart of the decision logic in the timing recovery and lost frame substitution 80 of FIGURE 2 and FIGURE 3 is shown. As shown in the flow chart, the timing recovery and lost frame substitution is an iteration over a signal frame with index I . The iteration is started, 180, after a preset or adaptive number of frames are available in the jitter buffer, in the beginning of a communication or talk spurt. Frame (I) is first classified 200 into one class C out of a number of classes. The class C influences the behavior of the remaining part of the method towards the signal frame. The advantageous choice of possible classes depends on the nature of the sound signal . For speech signals classification into silence, unvoiced and voiced signal frames is advantageous. Often this classification can be directly extracted from the data packet, i.e. the encoded signal frame, in a way known to a person skilled in the art. If desired, assumptions about the sound signal can be avoided by letting all signal frames belong to one single class, i.e., omitting block 200. Then, in block 210, if a class and time dependent number of consecutive frames, in simple implementation two frames (N A (C)=1), are at the receiver, the time compression sub-process 240 is entered. The time dependency is based on the realtime statistics from the jitter buffer. Otherwise, it is checked, in block 220 whether at least the current frame, frame (I), is at the receiver. If this is the case, the normal sub-process 250 is entered. If this cannot be done, either the jitter buffer is in underflow, the packet is late, or it is lost. In the beginning, frame (I- 1) should be expanded a number of times to give the ω ω to to μ> o o o updated in block 320. An output operation implies that the decision logic waits for a time instant that depends on the number of samples output but is less than the time it takes for the D/A converter 90 to play these samples back. This is to ensure continued playback with nonzero processing times for the sound decoder 70 or 130, 150 and timing recovery and lost frame substitution 80. Block 330 indicates that the decision logic then continues with a new frame in FIGURE 4, i.e. the sub-process flow returns to block 200 of the overall process flow in -FIGURE 4. FIGURE 6 is a flow chart of the sub-process for output of signal frames with normal consecutive sequence, referred to in FIGURE 4 as the so called normal sub- process 250. This sub-process 250 starts with a smooth correction, using sub-process 350, of a gain that may have been introduced by expansion or merging operations on earlier frames. Always, when the normal sub-process is entered, frame (I) is at the receiver. This sub-process can by a choice of parameters be a simple output of frame (I) . However it can in some cases be advantageous to let the output depend on a second look in the jitter buffer as follows: In block 360 the class C, the number Nc of consecutive frames after frame (I) ready in the jitter buffer, and the jitter buffer statistics,, are ' checked. Thereafter, in dependence on the mentioned checked parameters, the number N D of time expansions to make on frame (I) is determined in block 370. Then it is checked, in block 380, if this number N D is larger than 0. If it is not, frame (I) is not expanded, but directly outputted by block 410. If it is, frame (I) is time expanded N D times in block 390, and in block 400 it is registered whether the end of frame (I) have a gain different from one. Subsequently the expanded frame is output in block 410. After block 410 the sub-process flow continues to block 420, in which block the frame index is incremented. Block 430 indicates that the decision logic then continues with a new frame in FIGURE 4, i.e. the sub-process flow returns to block 200 of the overall process flow in FIGURE 4. More details on the expansion ■ will be described later in the specification. FIGURE 7 is a flow chart of the sub-process for merging a signal frame expansion with a future, not consecutive, signal frame, referred to in FIGURE 4 as the merge sub-process 260. In block 450 the last frame out- putted is indexed with II, and then, in block 460, the next frame at the receiver is indexed with 12. Then, in block 470, the last frame (II) is time expanded using the same expansion process as in block 390 of FIGURE 6. Alternatively, both frame (II) and frame (12) are time expanded using the expansion process 390. The expanded frame (II) is then merged with frame (12) in block 480, frame (12) being either expanded or not expanded as indicated above. More details on merging will be described later. The merging of frame (II) and frame (12) leads to a merged, new frame (12), which can have a gain different from one. The gain of the new frame (12) is registered in block 490. The merged, new frame (12) is then outputted in block 500, after which index 12 is incremented in block 510. Block 520 indicates that the decision logic then continues with a new frame in FIGURE 4, i.e. the sub-process flow returns to block 200 of the overall process flow in FIGURE 4. FIGURE 8 is a flow chart of the sub-process for expansion of a signal frame and output of the obtained expansion, referred to in FIGURE 4 as the expand sub- process 270. First, in block 540, it is checked if we are waiting for the first signal frame (I) (expansion when index I equal one) . If I equals one, a number N of zero- valued samples are outputted in block 570, in order to let a signal frame arrive. If the frame number index I indicates that at least one frame has arrived, the following happens: frame (I-l) is time expanded in block 550, and then, in block 555, the gain at the end of frame (I-l), which gain can be different from one, is registered. In block 556, an attenuation window is introduced if consecutive expansions of the same frame has been done, the reason for this is to mute down the signal after some time if no new signal frames can be received from the jitter buffer 60. Then, in block 560, the expanded frame (I-l) is outputted. Finally, Block 580 indicates that the decision logic then continues with a new look in the jitter buffer 60, i.e. that the sub- process flow then returns to block 210 of the overall process flow in FIGURE 4. FIGURE 9 is a flow chart of the sub-process for correcting the gain scaling of signal frames following an expansion or merging, referred to in FIGURE 5 and FIGURE 6 as the correct gain scaling sub-process 300. First, in block 600, it is checked whether a gain different from the value 1.0 has been registered for frame (I-l) . If this is the case, samples of frame (I) are multiplied with a factor, which factor at the beginning of the frame (I) equates with the gain of the end of frame (I-l), and which factor at the end of frame (I) equates with 1.0. For intermediate samples of the frame (I), a smooth interpolation is performed between these factor values, i.e. beginning and end factor values. The described so called smooth gain scaling of frame (I) is performed in block 610. The sub-process then continues to block 620. If block 600 detects that no gain different from 1.0 has been registered for the frame, the sub-process continues directly to block 620. For long signal frames, e.g. 16 ms or more, the correct gain scaling sub-process is advan- tageously performed -in accordance with the description above. However, for shorter signal frames, it can be advantageous to have the gain return to 1.0 during a time span of more than one signal frame. This can be obtained by a modified smoothing function and by modifying the correct gain scaling sub-process of FIGURE 9 to also multiply samples at the end of frame (I) with a factor being different from 1.0. FIGURE 10a shows a diagram illustrating a trailing part of a signal frame to be time expanded. The last number of samples, within the region marked x, of the trailing part forms a state x, the so-called true state. In FIGURE 10b the trailing part of the frame of FIGURE 10a is shown after that time expansion has been performed. The true state x has been matched against different states in the frame to be expanded, and state y of the frame has been found to provide an acceptable level of signal fitting with the samples of the true state x. The segment associated with state y, denoted segment y in FIGURE 10b, has then been used as an expansion segment when time expanding the frame, i.e. the expansion segment of the frame is identical with segment y. Furthermore, the selected segment y has been chosen so as to have the samples of the true state x at the end. As a consequence, when using segment y as the expansion segment, there will be no discontinuities in the transition from the expansion segment to the following frame. FIGURES 11a-lie are diagrams illustrating the concept of fractional resolution used by the present invention. FIGURE 11a shows a true state for which a matching state is to be found, the signal levels for samples Ti - T 4 of this true state can be seen on the y axis, i.e. 1, 2, 1, 0. Assume now that the best matching state is the. state shown in FIGURE lib. The signal fitting when comparing the samples Ti - T 4 of the true state and the samples Mi - M 4 of the best matching state, having the signal levels V 2 l 1 , 1%, Vi, will be far from perfect, for example if a mean square error is used as a measure on the signal fitting. However, by performing a re-sampling, states with a fractional delay of % may be obtained. After such a re-sampling, the state of FIGURE lib results in a state having a sample -sequence as shown in FIGURE lie, i.e. samples MF X - MF 4 having signal levels 1, 2, 1, 0. Thus, the signal fitting of the true state in FIGURE 11a and the state in FIGURE lie having a fractional delay of y 2 will provide a perfect match. FIGURES 12a and 12b are diagrams illustrating an exemplifying time compression of two signal frames. In FIGURE 12a two consecutive uncompressed frames, frame (1) and frame (2), are shown, or rather, the trailing part of frame (1) and the heading part of frame (2) are shown. The criterions on which the decision is based to compress the two frames, and on which the length of the compression is decided, has been described above. FIGURE 12b shows the resulting com- pressed frame. As can be seen from FIGURES 12a and 12b, the length t l7 encompassing the trailing part of frame (1) from sample "a" and the heading part of frame (2) up to sample "b" , has been time compressed to the length t 2 , i.e. the length t 2 between sample "a" and "b" in FIGURE 12b is less than the length t ± in FIGURE 12a. Further details of the processing steps performed by the overall process and the sub-processes described above with reference to FIGURES 4 - 9, as well as details relating to the diagrams illustrated by FIGURES 10 - 12, will now be described below. According to the invention, the combined timing recovery and lost frame substitution relies, inter alia, on the time expansion of a signal frame. Time expansion of signal frames is performed by the decision logic in blocks 390, 470, and 550 in FIGURE 6, 7, and 8, respectively. Time expansion is also needed as a step in the time compression performed in block 290 of FIGURE 5 in a way that is specified in more detail later. The time expansion called for in these blocks is basically identical. At least two methods for time expansion can be used: expansion of a signal frame by use of a modified oscillator model, and expansion of a signal frame by use of pitch prediction. Common for these methods is that they result in a time expansion of the signal frame having a signal dependent number of samples. These samples are such that several, advantageously 10, samples at the end of the expanded frame will equate with ω CO t t - y - LΠ O LΠ 0 LΠ 0 LΠ state corresponds to an entry of the codebook. The state connected with the first segment consists of the N G +1 to N G +Nι last samples of the signal frame, and, generally, the state connected with the n'th segment consists of the N G +(n-l)+l to N G + (n-1) + ι last samples of the corresponding re-sampled signal frame. For speech signals Ni is advantageously 10. In a simple implementation, re-sampling can be limited to zero. However, by the use of a re-sampling scheme, segments with fractional delay can be obtained. To avoid discontinuity at the continuation into the next frame, future frames are fractionally re-sampled with the same fraction. At first it may seem an excessive computational burden to re-sample a large number of future frames as a result of a single expansion process. However, as will be explained later, fractional delays can also be exploited in the time compression and merging processes. The computational load of maintaining fractionally delayed sampling tracks is then justified from the improved performance of all three operations, and a fraction, such as 1/2, 1/3, or %, may in some applications result in an improvement in performance that justifies the increased computational complexity. An alternative to having the oscillator always select the segment whose state vector best matches the Ni last samples of the signal frame, using a squared error measure, is to apply a free gain factor to the states of the codebook before matching the N9 last samples of the signal frame with the states. If a match is achieved after such an operation, the segment of the matching state is read out from the oscillator codebook and multiplied with that gain. As previously described with reference to the sub-processes above, the gain factor of the time expanded part of the signal frame is registered. Advantageously, the two alternative methods for state matching described above are combined by selecting the matching method using the free gain factor whenever this LJ ω to t μ> H LΠ o LΠ o LΠ O LΠ rt>. ■ z 03 Hi 13 13 Φ SD rt rt 03 rt rt K Φ CQ Ω Hi Ω Hi 03 φ 0 φ 13 Ω φ Ω rt - ≥! μ- 3 - y 00 μ- rt fi fi Φ X ! => Ω Φ μ- μ- 03 X μ- <! Ω Hi SD Φ X SD < H Hi & fi tr φ • SD φ O rt Ω Φ fi 13 Ω μ- fi - y • <! Ω 13 13 CQ Φ Ω μ- y- y Φ Φ 13 μ- Φ SD φ rt SD tr rt 3 Pi Hi SD H- Ω Φ Φ 0 Φ SD ø ii rt rt Φ CQ ii fi rt SD LQ P i Ω fi Ω ø μ- Ω ø i φ μ- Ω SD Ω 0 SD y- y Ω tr 0 Ω rt • ; - μ- tr ø μ- 03 9i tr 03 Hi 91 rt > rt Ω fi i 03 rt τi rt y- μ- CQ h- 1 9 ≤. φ ϋ rt 03 Ω φ Pi ø μ- rt CQ μ] £ μ- μ- Ω tr rt 3 Φ fi μ- μ- fi 0 y- y SD μ- 13 φ 03 SD rt Φ SD CQ Ω rt tr μ- ø rt τ_l Hi Ω Ω Φ μ- Φ Pi φ ø 13 Ω Φ • < y- Ω SD 1 CQ Pi SD μ- Ω μ- fD Pi y- y ø Φ rt CQ Ω H ø 0 Ω Ω fi CQ fi 0 Hi y- y 0 ø SD μ- μ- μ- 03 3 Ω < fi ■ SD fϋ CQ tr Ω rt H CQ ø CD i SD Ω Φ μ- CQ < P. ϋ rt LQ 03 03 13 Ω Φ rt 13 CQ y- fD 3 3 SD ø μ- ϋ Ω •t μ- SD tr Ω fi 0 μ- 03 fi tr ø rt ■ t fi SD μ- 13 1 fD SD φ to fi CQ μ- Ω Z CQ ϋ i Hi SD Φ 3 μ- Φ rt Ω SD SD SD μ- φ P, D 3 fi CQ s; Φ rt rt Q M φ ø 13 rt ø SD Ω tr r SD 13 ø CQ tr rt 0 I- 1 rt fi μ- 3 φ rt ø μ- fi 1 — ' Ω Hi tr SD Hi CQ Φ rt tr SD rt =ξ μ- rt - y fi 3 Φ fi rt Ω Φ y- y ø Ω rt • SD Hi φ tr μ- 0 μ- -J 03 μ- tr μ- rt tr • > < Φ ' rt φ SD Hi SD Q Ω tr - y Φ 03 μ- X Pi ø μ- ø rt Ω Ω Ω Φ Φ - 13 fi tr 0 3 0 SD fi Ω < tr y- y rt Ω > Ω Ω ø φ LQ SD Ω Hi Hi 0 fi ti Φ ' rt SD 03 0 SD CQ Φ φ rt rt tr Pi CD Hi 3 rt CQ Pi £. Hi ø fi SD > tr Ω SD φ 3 rt μ- ■ <: 3 Φ Ω φ 0 CO. fi Ω Hi μ- fD rt SD μ- rt rt SD ω _-" fi Φ rt 03 Si Φ Φ Ω rt φ rt φ fi ti fi SD 03 g 3 o CQ rt Ω y- y 03 tr tr Ω 03 rt ø O Ω Ω μ- rt μ- tr μ- ϋ SD Ω X ø rt CQ Φ 3 rt SD rt Hi tr SD tr rt y- y φ Φ φ rt μ- Φ Φ fi μ- Ω Ω tr * rt μ- Ω μ- Hi 13 fi 13 SD tr μ- 03 φ rt μ- Ω Ω Φ Hi fi μ- Ω fi φ CD • 0 rt Ω Ω tr ø ø 03 fi 13 rt Φ rt rt Ω y- Ω Φ 03 ø 0 fi SD fi μ- μ- Ω SD 0 rt SD Φ y- y CQ μ- Pi P. o CQ Ω Ω fi JD μ- 0 fi SD μ- tr rt rt 03 SD tr ø i 0 SD Ω CQ 9i rt < μ- 0 tr Ω 3 Ω Φ μ- <! 13 μ- μ- 0 W 03 fD Ω I- 1 rt 3 ^ < φ SD rt Ω Φ rt fi φ 13 3 rt 03 φ ø X < ø φ i ii CQ tr fi Φ μ- rt Hi SD Φ φ φ SD 13 μ- μ- 0 Ω Ω SD fi φ rt rt rt μ- Φ φ Φ Φ φ y-i LQ Φ tr 3 0 rt H! P. 13 fi μ- ^ tr 0 0 CD rt 3 ø μ- < ø rt i μ- CQ Ω ø i i ^ μ- - y ■ <; CQ φ rt Ω 13 rt Φ rt Hi • • 0 3 < rt μ- rt Φ ø μ- SD rt Ω Φ ø fi rt Φ SD <! • 0 3 fi μ- Hi μ- Ω i Ω rt rt Ω μ- 03 Φ Φ 0 Ω rt ø μ- 0 Ω Φ SD 03 tr fi i — ' Φ o ø rt ι tr LQ Ω rt tr ^ Ω fi tr $. Ω ϋ Ω Ω 0 μ- tr μ- SD ø rt Φ < tr Φ Φ Ω 03 t °° 3 μ- μ- 0 rt Ω i Φ tr μ- rt φ Hi Ω < rt Ω - μ- Ω Ω Hi Hi rt Φ fD φ Ω ø - tr tr 13 0 rt Φ 03 tr 03 ø Φ rt • <: rt 0 μ- 1 rt ø μ- rt 0 <! Ω μ- Ω fi Ω Ω 0 rt tr LQ Φ fi rt Ω tr 03 ø μ- i rt Ω tr tr ■ <: tr φ ø tr ø Φ ø ø fi SD H rt Ω tr rt Φ Φ SD SD ø SD H μ- rt Φ Φ rt φ SD <5 μ- CQ rt rt Φ 3 03 tr Hi Ω μ- Ω tr 13 SD Pi 3 Pi CD 3 μ- 13 LQ 0 Ω ø Ω ω Ω ^ H φ 03 ^ μ- fi - φ Φ . Pi 03 Hi Φ fi CQ μ- φ φ rt 13 • α ø fi ≥! • <! Φ μ- Hi ø ^ tr ø Ω Ω H SD o 03 Φ Ω 13 Ω Φ y- SD to μ- X rt rt Ω 13 rt fi Φ ø Pi fD fi Hi 13 91 y- y C Q rt Φ Φ Ω CQ H μ- fi t rt 13 13 tr tr _- ■ ϋ μ- μ- ? ø SD ø Ω Hi Hi Φ ti 0 Φ 3 μ- X i ø Φ SD φ <! ■ : SD φ SD Φ I- 1 Φ Ω 03 ti rt Ω fi rt 03 fi SD Ω fi CQ ø μ- Ω 13 μ- 03 CQ rt fi SD ω SD fi 0 SD Ω fi 0 Ω 0 i μ- Φ μ- 0 tr φ Φ 0 fi Hi Φ rt rt rt ø SD Ω rt 3 Φ 0 μ- rt 03 Hi 03 ≥! ø $ μ- Ω φ Ω i CQ Ω Φ Φ fi Ω X tr 0 P. i φ fi Ω rt w i rt Ω μ- H μ- Ω ø 0 Hi ø Ω rt 3 i 13 Hi μ- Ω CQ μ- SD ø -> 0 SD rt SD H Ω Ω ø rt SD rt φ - tr Ω "" Ω LQ 03 φ 3 SD i 0 0 Ω Ω μ- rt LQ tr 9i 0 CQ ■ rt 3 ø 13 CQ μ- μ- rt H φ ø Ω SD Φ fi Φ 0 SD < rt fi 0 μ- ø rt Φ μ- Ω 03 SD μ- SD rt <! Ω ø Ω H μ- rt rt LQ Pi μ- Q . CQ 3 φ ø rt rt Hi tr tr o 03 Ω ø CQ CQ μ- φ o ø μ- • 3 μ- Φ φ . - μ- φ 0 ϋ 13 < Ω Φ Φ 0 Ω rt CQ tr rt 3 1-3 3 μ- ø ø φ Φ ø 0 ø φ μ tr Ω ø μ- Ω rt Φ μ- Ω μ- fi CQ Ω μ- 03 3 1— ' o μ- 0" 03 13 rt 03 LQ • Φ ø Φ Ω Hi rt Q ø 0 μ- 13 rt SD 0 03 Ω CQ Ω 13 Ω φ SD 0 CQ N Φ 3 ø ^ Φ 0 μ- fi 0 SD μ- 0 Ω fD Ω 0 Hi fi CQ φ SD 3 y- ø CQ y- SD Φ Ω rt rt μ- rt SD p-r Ω ø Ω tr 03 tr 0 fi tr rt Φ Ω LQ y- y 13 μ- CQ i ϋ o SD y- Ω rt rt h- 1 rt CQ SD Φ 1 rt tr rt Ω SD μ- 3 rt ø 03 rt Ω 3 rt rt W μ- CQ tr — y rt Ω 0 O CQ μ- Φ - fi y- y Φ Φ rt tr Ω Hi Ω t— ' LQ tr μ- 0 ø CQ Φ 0 0 fi rt Ω 3 ø Φ Ω 0 fi SD Φ Ω φ SD Ω ^ φ rt rt Hi * " tr tr - X" Φ CQ ø SD rt ø 1 fi rt rt rt 03 μ- ø 1 1 SD SD μ- rt Φ φ ø rt 1 SD ø" tr tr tr rt I Φ Φ ø LQ H rt 3 Φ φ Φ used: merging by overlap-add with max correlation fitting, or merging by oscillator modeling. Common for these methods is that they conduct a time alignment of the future signal frame with the expansion segment to minimize the discontinuity of the transition between the two. This time alignment can have a resolution that is a fraction of a sample. In the present invention, an overlap-add merging of two segments over m samples consists of the following: • multiplying the trailing m samples of the first segment with a smooth window that starts with the value 1.0 and ends with the value 0.0; • multiplying the m leading samples of the second segment with a smooth window that is defined as one minus the first window; and finally • overlapping the two segments by their windowed parts and adding them. Advantageously, the trailing and leading parts of a 2m samples Hanning window can be used for this purpose. The overlap-add merging uses max-correlation fitting. The max-correlation fitting vary the overlap m and allow a free gain parameter to be multiplied to the second segment, such that the average squared error distance between samples of the two overlapping segments is minimized prior to windowing. By use of the same resampling scheme as during the expansion procedure, the max-correlation fitting can be optimized even for overlaps with fractional accuracy. The use of a free gain factor in the optimized fitting is optional. If a free gain factor is utilized, it is registered in block 490, in order for enabling the following frame to be subject to an adequate gain scale correction. Alternatively, in an embodiment of the present invention, merging is performed with the use of an Oscillator model. This merging is performed in a manner equivalent to the time-scaling less than one as described in the above-mentioned article by G. Kubin and . B. Kleijn. When using an oscillator model for merging, the oscillator model replaces the codebook corresponding to the first signal frame with the codebook corresponding to the second signal frame. The result being a state fitted transition between segments. The oscillator model can also advantageously work with fractional pitch and gain scaled states and signal segments. Replacing the overlap- add max-correlation fitting with the oscillator model for performing the merging procedure, , is a possible alternative which does not depart from the scope of the idea of the present invention. According to the invention, the time compression of a sequence of signal frames is carried out iteratively: each iteration compresses two signal frames into one signal frame, with a length between the length of the shortest of the two signal frames and the sum of the length of the two signal frames, the resulting length depending on the success of the compression. The com- pression of two signal frames is obtained using the same processing steps as used when performing the described merging procedure, with the exception that the compressed signal frame undergoes a merging only if this merging meets a threshold, which threshold preferably is depen- dent on the classification of the signal frames. Otherwise, if this threshold cannot be met, the attempt to compress two signal frames results in a combined signal frame that is simply the concatenation of the two signal frames. The definition of the threshold depends on the merging method used. When oscillator modeling is used, the threshold is in terms of a maximum of the minimized error in the state-fitting. When the merging is accomplished with overlap-add max-correlation fitting, the threshold is in terms of a minimum of the maximized correlation coefficient. The max-correlation fitting is performed in accordance with what has been described above. Advantageously, OJ NJ t o LΠ o LΠ O LΠ Ω rt Ω tr fi fi μ- 03 13 13 μ- fi 0 tr rt SD Ω H N Hi Ω 13 3 SD 3 tr fD tr ϋ φ μ- φ ø μ- fi ti ø φ Φ <! SD tr <! Ω φ Φ fi Ω _- ■ Φ i φ φ SD φ μ- Ω Hi Hi - CQ Ω Ω <! fϋ Ω φ 0 fi Ω 3 0 fi fD Φ μ- 0 < ø rt rt μ- tr Ω Hi φ ø Ω Ω φ P. fi fi fi Φ μ- 13 rt Ω 3 Hi 03 rt SD rt g; tr 3 03 Φ 3 φ fi SD fD Φ Φ ø 03 φ 03 Pi fi • φ Hi tr 03 0 - 03 φ fi 03 Ω P. Φ i φ H 0 - m rt > SD <τ) SD rt tr •τi Φ Ω 03 μ- φ • rt φ Φ Ω Φ ø <5 fi 03 03 μ- 03 rt 03 fi 13 tr 0 3 i 03 23 Ω P. fD 0 CQ 13 φ SD ø Ω φ 03 Ω Ω < Ω Φ φ 91 S φ CQ SD 0" Ω μ- H CQ ►χ l tr φ |3 13 rt φ 0 H φ i ti Φ 0 fi Hi Ω rt i X Hi μ- 03 φ Ω φ tr 0 Φ Ω o o 5* 13 Φ CQ - 0 fD Φ Hi μ- Φ Ω 03 0 0 0 • ; Ω fi . Ω Ω SD SD rt rt rt 3 Ω 3 ϋ fi rt Ω 3 fi 0 rt rt rt ø -J Pi Hi fi ϋ o tr H φ 13 Φ φ φ Hi tr SD rt tr SD μ- SD fi rt fD SD tr 03 rt μ- Φ rt Ω μ- ø Φ • rt fi SD Φ tr tr φ 0 ISI tr μ- Φ μ- μ- SD Φ tr SD Hi rt 3 0 Φ CQ ø Φ rt fi CQ tr CQ 03 ø φ 0 SD y- y 03 13 3 ø tr rt rt φ 0 Ω tr φ rt i 13 CQ <! SD Ω rt rt >< rt Ω rt • ; Φ Φ μ- Ω tr fi Ω Pi fi Φ ø fϋ Φ tr φ ø rt i Ω φ rt - 03 tr rt μ- SD 0 ø <J fi φ 13 rt Hi rt Ω fi 03 Φ SD 0 fi tr Φ fi Ω h- 1 Pi Ω LQ φ Φ CQ fD Φ o rt μ- CQ Ω μ- μ- rt Φ CD μ- P. φ rt LQ φ tr ø rt sS Φ Ω CD Ω <! ii . ø- ø fi 0 Hi tr Hi fi α 03 fi tr 3 03 Φ tr SD 0 3 CQ Ω tr fi Ω Ω CD Φ <! SD ø μ- Φ fi Ω μ- tr Φ l_l- Φ φ tr μ- • rt 13 μ- 0 0 μ- μ- Φ φ ϋ rt CQ Ω Ω tr 0 CQ fi ^ fD μ- 0 Ω 3 tr 03 03 fi φ tr Pi 13 Ω 3 ø Φ tr • μ- 3 • μ- Φ fi rt rt rt Φ φ rt Φ φ fi φ rt fϋ SD rt Ω Φ 0 SD rt SD 13 Ω rt tr 03 P. rt ø rt rt tr CQ ø Hi fi rt μ- ø X μ- rt 03 3 X <J rt SD fi φ ø Φ fi • - tr tr fi CD Ω Ω Hi μ- Ω μ- Ω tr Φ Ω φ φ rt tr 3 μ- fi rt fi φ Ω μ- li Φ Φ μ- Φ ti Ω CQ 3 0 tr 3 0 Φ i 3 ø tr Φ Φ μ- 1 CQ 03 SD tr rt Φ 03 ø ϋ rt φ Φ fi 03 μ- 13 rt μ- 3 CQ ^ 0 Hi tr tr ø 0 03 tr LQ Ω rt fi Ω N Φ Hi μ- CQ μ- Ω μ- ti H ø Ω rt μ- tr SD Ω fϋ tr rt 0 Ω Hi 0 SD Hi μ- μ- μ- Ω 03 0 fi y- rt ro ø fi CQ μ- 03 Ω Hi y- y tr 0 Φ tr Ω Ω CQ fi ω 03 Ω Ω Hi ø 3 < ^ ø 3 3 HI fi Φ 9i _- ■ CQ fi 3 CD φ rt 3 rt Φ i SD ^ φ Φ » SD 13 CQ Φ y- y CQ fi Φ CD 0 tr Φ 0 13 tr fi Ω ϋ Φ φ rt μ- tr 3 ø r rt fi Hi 3 CQ μ- ii - φ 3 fi H Φ Ω Φ fi μ- ø SD Ω rt Φ Φ μ- tr Ω φ Ω < μ- CD 03 SD Φ Φ Hi fi Hi 0 0 CQ to fi μ- . • τ) 3 Φ SD fi rt Φ 03 Ω rt μ- LQ μ- X CQ CQ Ω fi μ- Ω μ- ø *< < LQ ti Φ 13 £, ø Hi tr LQ μ- CQ μ- rt CD 13 fi Φ 0 rt ø CQ φ tr Φ Ω ø Φ l_I. 13 Ω Φ tr Ω Φ ø < ø 3 tr μ- Φ φ 3 Φ Ω rt fi μ- li Ω <! Φ SD tr rt SD φ SD μ- Ω Φ <! SD . i μ- rt SD ϋ * Φ 3 SD Φ Φ rt Ω 3 Φ ø Hi Φ tr rt y- 1 ø N CQ ø Ω Ω rt ø tr 0 Ω ø φ 03 ϋ μ- rt SD 13 ø Ω Ω φ tr Φ tr μ- μ- tr rt Φ ■ ϋ i rt t 03 ø Φ Ω fi μ- fi fi Hi fϋ P. Ω Ω Ω Ω > Φ μ- Pi tr rμ Ω 0 ii tr Φ $ rt Φ Φ rt Φ fi ϋ fϋ Hi 03 φ 0 ø fD rt 3 Φ Ω ^ fi CD rt CQ μ- fi s: 03 SD rt SD Ω ø μ- i rt Pi H tr Φ CQ Pi - μ- tr tr 0 03 rt μ- T Ω tr 3 ø J 3 Ω 0 LQ Ω tr Φ rt Φ 0 Ω 3 ø φ • ø μ- ø- 03 91 μ- 0 Φ fi φ li tr 0 0 CQ Ω φ Pi « rt H SD φ $ CQ Hi φ Ω 0 ø rt 03 Φ CD ϋ Φ <! SD 13 Φ μ- 1 03 μ- H 3 tr SD Hi li ø Ω CQ fi tr p. 03 Φ Ω φ Hi SD rt H3 μ- - tr φ Ω μ- SD fi Φ Hi Ω μ- Ω ii Ω tr SD μ- -. φ Hi 13 Ω tr Φ ti Ω rt ii H 1 μ- 3 <i rt fi Φ Hi Hi 0 CQ SD Ω Ω Ω μ- 13 Φ φ 3 i 03 *< tr 3 - Ω 03 13 φ tr Pi CQ Ω i- 1 μ- rt Ω Φ μ- tr Ω Φ SD rt μ- ø SD φ tr H LQ μ- Ω Pi rt μ- ø μ- fi ■ Z 0 $ Ω 3 Ω rt φ rt fi Ω μ- 0 Ω 3 CD φ i 3 Φ *<_ μ- fi H μ- fi tr rt SD Hi Ω SD 0 03 μ- Φ ø Φ μ- CQ rt Φ tr Ω Ω Φ H3 Φ Hi rt rt Pi Hi Hi _- ■ Φ 03 CQ rt Pi rt y-> tr P. Φ fi tr Ω ø" O CQ φ CQ Ω μ- fi Φ 1 03 φ

Claims: OJ ω KJ to - y - y LΠ o LΠ o LΠ o LΠ tr ø Hi Hi φ fi 0 Φ Φ fi 03 rt Ω tr Φ fi Φ Ω Ω <! Φ fi Φ P. • 5. The method as claimed in claim 4, wherein the time expansion is performed for a trailing part of a currently played signal frame if the monitoring of the jitter buffer indicates a condition close to buffer underflow or an actual buffer underflow, such as late arrival of data packets or loss of one or more data packets, wherein, in addition and if appropriate, repeated time expansions are performed to restore the jitter buffer to its normal working condition. 6. The method as claimed in claim 5, wherein said time expansion of said trailing part will constitute a substitution frame if the monitoring of the jitter buffer indicates that a next signal frame, which under normal conditions should follow the currently played signal frame, is not available or deemed not to have been received in due time, thereby providing a lost frame substitution for said next signal frame, after which the time expanded currently played signal frame is merged with a received future signal frame, the length of the time expansion, and thus the length of the substitution . frame, being chosen in such way that a smooth transition to said future signal frame can be made . 7. The method as claimed in claim 6, wherein said time expansion includes time expanding a heading part of said future signal frame, in addition to time expanding said currently played signal frame, before merging the two frames, thereby improving the lost frame sub- stitution. 8. The method as claimed in claim 4, wherein the time compression is triggered by real-time statistics from the jitter buffer, and attempted to be performed when, e.g., two consecutive data packets are available in the jitter buffer, wherein a measure on a smooth transition between two consecutive frames, when merging the two frames, controls the length of a resulting compressed signal frame. 9. The method as claimed in claim 8, wherein said compressed signal frame, resulting from said merging of two frames, is merged with yet another consecutive signal frame in the same manner as said merging of said two frames . 10. The method as claimed in claim 8 or 9, wherein said merging of two signal frames involves merging two signal segments, a trailing segment of one frame with a heading' segment of the other frame, by overlap-add, wherein a time-shift of the frame with the heading segment is employed for optimizing the matching of the overlapping part of the two segments. 11. The method as claimed in claim 10, wherein said time-shift of the frame with the heading segment has a resolution of a fraction of a time between two samples. 12. The method as claimed in claim 11, wherein said heading segment is multiplied with a suitable gain to further optimize the matching with said trailing segment at the overlapping part, after which a smooth transition back to unity gain is performed in order to avoid sound signal discontinuities. 13. The method as claimed in any one of claims 1 - 12, wherein use is made of an oscillator model for extracting signal segments used when manipulating the lengths of said received signal frames, the oscillator model including a codebook in which vectors of samples forms different states, or entries, in the codebook, the- codebook storing a corresponding signal segment for each state. 14. The method as claimed in claim 13, wherein said time expansion of a signal frame is performed by matching a true state, i.e. the trailing part of the signal frame in question, with said states in said codebook, and reading out a signal segment from said codebook that corresponds to the state having been matched with said true state. 15. The method as claimed in claim 13 or 14, wherein said signal segments of said codebook have variable lengths, each signal segment forming, e.g., a trailing part of a signal frame, thereby enabling continuous transition from the time expanded signal frame to a consecutive signal frame. 16. The method as claimed in any one of claims 13 - 15, wherein time delays between said states in said codebook are incremental delays with a resolution of a fraction of a time between two samples. 17. The method as claimed in any one of claims 14 - 16, wherein the states and the corresponding segments of said codebook are scaled in order to improve the matching with said true state. 18. The method as claimed in any one of claims 14 - 17, wherein merging of said true state is performed with the matching state of said codebook. 19. The method as claimed in any one of claims 14 - 18, wherein said time expansion additionally involves performing the corresponding operations with respect to a heading part of a signal frame being consecutive to the time expanded signal frame. 20. The method as claimed in any one of claims 1 19, wherein said signal frame, which length is to be manipulated, is either a sound signal frame resulting from a complete decoding operation of a data packet, or an intermediate time-domain signal frame resulting from a partial -decoding operation of a data packet. 21. Use of an oscillator model, which oscillator model includes a codebook in which vectors of samples of a received digitized sound signal forms different states, or entries, in the codebook, the codebook storing a corresponding signal segment for each state, for implementing the method as claimed in any one of claims 1 - 20. 22. A program storage device containing a sequence of instructions for a microprocessor, such as a general purpose microprocessor, for performing the method as claimed in any one of claims 1 - 20. 23. An arrangement for receiving a digitized sound signal from a packet switched network, the arrangement including: memory means for storing vectors of samples of a received digitized sound signal together with corresponding signal segments; and processor means for performing the method as claimed in any one of claims 1 - 20.

Inventors: ANDERSEN SOREN VANG, KLEIJN BASTIAAN WILLEM, SOERQVIST PATRIK, ANDERSEN, SOREN, VANG, KLEIJN, BASTIAAN, WILLEM, SOERQVIST, PATRIK
Applicants: ANDERSEN SOREN VANG, GLOBAL IP SOUND AB, KLEIJN BASTIAAN WILLEM, SOERQVIST PATRIK, ANDERSEN, SOREN, VANG, KLEIJN, BASTIAAN, WILLEM, SOERQVIST, PATRIK
Application year: 2000
Main classification: G10L9
IPC codes: H04L12