6 Example solutions

06.213GPPHalf rate speechSubstitution and muting of lost frames for half rate speech traffic channelsTS

The C code of the following example solutions are given in GSM 06.06 [5].

6.1 Example solution for error detection in case of unreliable frames

With the parameter R0, the average signal energy is transmitted. Except at the beginning or the end of a talk spurt, this parameter shows a smooth behaviour from frame to frame. For error detection purposes, the difference of the R0‑value between the actual and the last good frame is computed. If this difference exceeds a level dependent threshold and the frame is marked as unreliable, it is declared unusable by setting the BFI flag equal to "1".

6.2 Example solution for output signal concealment in case of unreliable frames

In the speech decoder, the output signal is created by processing an excitation sequence through an LPC synthesis filter. The output signal energy of each subframe is calculated and compared to the output signal energy of the previous subframes. If the difference exceeds a level dependent threshold, the excitation sequence is attenuated such that the output signal energy corresponds to the output signal energy of the previous subframes.

6.3 Example solution for substitution and muting of lost speech frames

For the half rate speech decoder, a possible substitution and muting strategy is based on an 8‑state machine.

The state, with the exception of states 6 and 7, indicates how many consecutive frames were lost. For example, state 5 indicates that 5 consecutive frames (including the current frame) were lost. State 7 is the initial state of the system, so that if the first decoded frame is lost, the frame is muted. Usually, the system will operate in state 0. The state machine remains in this state unless a frame is lost. On each successive lost speech frame, the state machine moves to the next higher numbered state. As soon as a frame is not declared lost, the machine returns to state 0 (unless it is in state 6). The machine remains in state 6 in the case of additional lost speech frames. If the machine is in state 6, a single frame without detected errors moves the machine to state 7 (i.e., two successive frames with no detected errors are needed to return to state 0 from state 6). This provides additional protection during prolonged intervals of very poor channel conditions which might cause false indications of valid speech data. If the machine is in state 7 and a lost speech frame is received, the machine returns to state 6.

In each state, the following occurs:

State 0: No error is detected. The received decoded speech data is output. The current frame parameters are stored.

State 1: An error has been detected in the frame. If the last speech frame in state 0 is in the unvoiced mode, then the parameters R0, INT_LPC and the LPC coefficients in the current frame are replaced with the corresponding values from the last good frame. All GSP0 parameters are replaced with the GSP0_4 parameter from the last good frame. If the MODE bits for the current frame indicate unvoiced, the current frame of codevectors is used. If not, the codevectors from the last good frame are used. The frame’s remaining decoded bits are passed to the speech decoder without modification.

Alternatively, if the last speech frame in state 0 was in the voiced mode, the long term predictor lag from the last good frame is used for all subframes in the current frame. The parameters MODE, R0, INT_LPC and the LPC coefficients are replaced with those from the last good frame. All GSP0 parameters are replaced with the GSP0_4 parameter from the last good frame. If the MODE bits for the current frame indicate voiced (MODE = 1, 2 or 3), the current frame of codevectors is used. If not, the codevectors from the last good frame are used. The frame’s remaining decoded bits are passed to the speech decoder without modification.

State 2: Same action as in state 1.

State 3: As in state 1 and 2, a frame repetition is performed, but the frame energy R0 (coded on the interval from 0 to 31) is decreased by a value of 2.

State 4: Same action as in state 3.

State 5: Same action as in state 3.

State 6: Again a frame repetition is performed. The output speech signal is muted by setting R0 to zero.

State 7: The speech signal remains muted, R0 remains zero.

6.4 Example solution for substitution and muting of lost SID frames

The first and second lost SID frame is replaced by the last good SID frame.

For subsequent lost SID frames the last good SID frame is repeated, but the frame energy R0 (coded on the interval from 0 to 31) is decreased with a constant value of 2 in each frame down to R0 = 0. This value is maintained if additional lost SID frames occur.

Annex A (informative):
Change Request History

Change history

SMG No.

TDoc. No.

CR. No.

Clause affected

New version

Subject/Comments

SMG#15

4.0.2

ETSI Publication

SMG#20

5.0.1

Release 1996 version

SMG#27

6.0.0

Release 1997 version

SMG#29

7.0.0

Release 1998 version

SMG#31

8.0.0

Release 1999 version

8.0.1

Update to Version 8.0.1 for Publication