Patent ID: 8335686

Claim:
A method, implemented by a speech-switching device connected to a communication network, for speech switching between multiple terminals, comprising steps of: (1) extracting, by the speech-switching device, a mute flag from encoded speech data transmitted by each of the terminals respectively, and determining one or more non-mute terminals; (2) non-fully decoding, by the speech-switching device, the encoded speech data of each non-mute terminal respectively; (3) calculating, by the speech-switching device, a speech energy value of each non-mute terminal according to the non-fully decoded speech data of each non-mute terminal; (4) comparing, by the speech-switching device, the speech energy values of the non-mute terminals with each other and selecting one or more terminals with a largest speech energy; (5) fully decoding, by the speech-switching device, the encoded speech data transmitted by each remaining selected terminal; and (6) performing, by the speech-switching device, a linear superposition of different combination modes to the decoded speech data of the selected terminals, encoding, by the speech-switching device, the decoded speech data obtained after the linear superposition of the different combination modes, and transmitting the encoded data to the corresponding terminals respectively; wherein when the terminals adopt speech coding/decoding protocol G.728, the non-fully decoding comprises: extracting corresponding code vectors from excitation codebooks according to codebook indexes contained in the encoded speech data transmitted by the terminals; performing a logarithmic gain prediction to the extracted code vectors; and performing a decoding synthesis filtering process to the code vectors after the logarithmic gain prediction in order to obtain the corresponding non-fully decoded speech data.