The method of speech processing of multichannel vocoder
Technical field
The present invention relates to move or the fixed communication field, more particularly, relate to a kind of method of speech processing that is used for mobile or fixed communication network multichannel vocoder.
Background technology
In communication network, usually need the voice signal of coded format (64kbps) is G.711 carried out compressed encoding, to extract voice characteristic parameter (being generally less than 16kbps), reduce message transmission rate, and being reduced into voice signal by portable terminal or fixed terminal, above-mentioned work is finished by vocoder usually.Because the complicacy that vocoder is handled, make the voice signal increase of delaying time end to end.And in communication network, in order to increase power system capacity, usually be that the vocoder of a plurality of passages is handled simultaneously, hyperchannel is handled and has further been increased time-delay, and excessive time-delay will reduce the quality of voice signal.To specifically introduce the principle that produces time-delay below.
The coding staff of existing vocoder to processing procedure as shown in Figure 1.Wherein, TDM (TimeDivision Multiplex, be that the time-division is multiplexing) temporary PCM (pulse code modulation (PCM)) data of from multichannel serial (being the McBSP serial ports the figure), gathering of mailbox, the vocoder of each passage obtains frame PCM data from the respective channel of TDM mailbox, successively the data that it obtained are carried out encoding process then.Wherein, TDM mailbox 1 and 2 adopts ping-pong, gathered frame data in each passage of mailbox shown in the figure 1, and mailbox 2 is being collected new data.In Fig. 1, at first from each passage of TDM mailbox 1, obtain the data that a frame has been gathered respectively simultaneously by multichannel vocoder, by multichannel vocoder each passage is handled successively then.After finishing dealing with, externally switch under the driving of incident (being generally interruption) between mailbox 1 and the mailbox 2.In the whole process, the vocoder or the data of processing TDM mailbox 1, or the data of processing TDM mailbox 2 can not handled the data in mailbox 1 and the mailbox 2 simultaneously.
The data acquisition time of supposing multichannel vocoder is the M millisecond, and promptly first PCM sampling point of a certain passage begins to having gathered the required time of last PCM sampling point from the TDM mailbox, because of collection is carried out simultaneously, so total data acquisition time is M; Because of multichannel vocoder is handled successively to each passage, and need in an acquisition time, finish and handle action, so the maximum time that single passage is handled is the M/N millisecond; In addition, (look-ahead) time is the Δ millisecond to establish " forward sight " of vocoder.According to above-mentioned hypothesis, then the vocoder of passage 1 is handled always to delay time and is: the M+M/N+ Δ, time-delay is: M+N*M/N+ Δ=2M+ Δ and the vocoder of last passage N is always handled.Here said vocoder is handled total time-delay, and the vocoder that is meant a certain passage receives this passage from the TDM mailbox first PCM sampling point begins to export the required time till the data of this passage to vocoder.
What introduce above is that coding staff is to processing, for the decoding direction, the vocoder of each passage receives the data that transmitted by portable terminal or fixed terminal, successively its each frame data of receiving are carried out sending in the respective channel of TDM mailbox after the decoding processing, be sent to multichannel serial by the TDM mailbox again.Though its processing procedure is opposite with cataloged procedure, the reason that produces time-delay is similar.Through above similar analytic process, the maximum delay of the direction of being not difficult to obtain to decode, the required time till promptly the multichannel vocoder compressed voice data that receive passage N begin to send to first PCM sampling point, for: M+N*M/N=2M.
From above-mentioned analysis as can be known, the moment difference that multichannel vocoder is handled different passages, it all is that time with passage 1 is benchmark that but all channel vocoders obtain or send data time, like this when vocoder is handled single passage successively, respective channel data (I-1) * M/N that in fact delayed time, wherein I is the port number when pre-treatment, and 1<I<N.This shows that the speech data of last passage N is the oldest, time-delay is maximum.This will reduce the quality of voice signal greatly.
Summary of the invention
The technical problem to be solved in the present invention is, can reduce the defective of quality of speech signal at time-delay excessive in the prior art, a kind of method of speech processing of multichannel vocoder is provided,, improves quality of speech signal to reduce the speech processes time-delay of multichannel vocoder.
Technical solution of the present invention is, adopt the method for dynamically obtaining or send data, according to the moment that the vocoder of each passage is handled successively, dynamically the phase point of data is obtained or sends in adjustment accordingly, makes the vocoder of each passage can obtain or send up-to-date data.
One, for the vocoder of arbitrary passage of the encoding process direction of multichannel vocoder:
From just the respective channel of the TDM of image data mailbox, obtaining those a part of data of having gathered before beginning to encode constantly, with it as the second portion data;
And from the respective channel of another TDM mailbox of having gathered data, obtain at last and enter, and can form those a part of data of a frame partial data with described second portion data, with it as first's data;
Add the above second portion data with described first data and form the complete data of a frame, by described vocoder it is carried out encoding process again.
Two, for the vocoder of arbitrary passage of the decoding processing direction of multichannel vocoder:
Its frame partial data that will send is divided into first's data that need formerly send and the second portion data that send in the back;
First's data are sent to the afterbody of respective channel that transmits the TDM mailbox of data to multichannel serial, to replace the data that wherein do not transmit as yet in the moment of finishing decoding processing;
The second portion data are sent to the stem of the respective channel of another TDM mailbox;
Described two TDM mailboxes are sent to described first data and second portion data the respective channel of multichannel serial successively.
By such scheme, the vocoder of each passage finish its coding staff to the required total time-delay of processing procedure comprise: from the respective channel of two TDM mailboxes, obtain a part of data respectively to form the required acquisition time M of a frame partial data; The data of being gathered are carried out the required maximum processing time M/N of encoding process, and N is the largest passages number of multichannel vocoder; And the look-ahead time Δ of vocoder.And the vocoder of each passage is finished required total time-delay of processing procedure of its decoding direction and is comprised the data of being received are carried out the required maximum processing time M/N of decoding processing and a frame partial data is divided into the required transmitting time M of respective channel that two parts send to two TDM mailboxes respectively.As seen, compare with the maximum delay of prior art, coding staff to decoding time-delay that direction reduced all be M-M/N, for example work as M=20, during N=20, M-M/N=19, each direction can reduce by 19 milliseconds time-delay, and this will improve the quality of voice signal greatly under the situation of many vocoders cascade.
Description of drawings
The invention will be further described below in conjunction with drawings and Examples, in the accompanying drawing:
Fig. 1 is the synoptic diagram of existing vocoder collecting method commonly used;
Fig. 2 is that the vocoder of one of them passage after the employing method of the present invention is carrying out the synoptic diagram of coding staff when handling;
Fig. 3 is the synoptic diagram of vocoder when the direction of decoding is handled of one of them passage after the employing method of the present invention.
Embodiment
In order to reduce the speech processes time of multichannel vocoder data, the present invention adopts multichannel vocoder Dynamic Data Acquiring method, processing time difference according to different channel vocoders, dynamically adjust the corresponding data acquisition time, make each passage can collect the current up-to-date data of this passage.
Below in conjunction with Fig. 2 with coding staff to be treated to example analysis, in Fig. 2, the passage of TDM mailbox 1 has been gathered frame PCM data, TDM mailbox 2 is gathered the PCM data from multichannel serial.For the ease of analyzing, suppose that all channel vocoders are that to obtain a part of data from the respective channel of two TDM mailboxes respectively be that look-ahead time of M/N, vocoder is Δ to form the required acquisition time M of a frame partial data, the data of being gathered are carried out the required maximum processing time of encoding process to vocoder, the type vocoder of the same type.Below be coding staff to the detailed step of processing procedure:
At first, the processing time of multichannel vocoder is carried out unified planning, the processing time of each channel vocoder is divided according to timeslice, the timeslice size is M/N, and then the processing of each channel vocoder is followed successively by constantly:
Passage 1 vocoder is handled constantly: Codec1_Time=0,
Passage 2 vocoders are handled constantly: Codec2_Time=M/N,
...
Passage I vocoder is handled constantly: CodecI_Time=(I-1) * M/N, wherein 1≤I≤N.
Then, as shown in Figure 2, successively the data that it obtained are begun moment of encoding process, adjust it obtains data from the TDM mailbox phase point according to the vocoder of each passage, for example for the vocoder of wherein passage 3:
Begin coding constantly from just the passage 3 of the TDM of image data mailbox 2, obtaining above-mentioned, i.e. (3-1) * M/N=2M/N that a part of data of having gathered constantly, the dash area in passage 3 left sides of TDM mailbox 2 among Fig. 2 just, with it as the second portion data;
And from the passage 3 of the TDM mailbox 1 of having gathered data, obtain and enter at last wherein, and can form those a part of data of a frame partial data with above-mentioned second portion data, the dash area on passage 3 right sides of TDM mailbox 1 among Fig. 2 just, with it as first's data;
The vocoder of passage 3 adds the second portion data with first's data after having obtained above-mentioned first data and second portion data, and just the passage 3 left side shades of vocoder add right shade among Fig. 2, form the complete data of a frame;
Then, the complete data of this frame are carried out encoding process, send portable terminal or fixed terminal again to by the vocoder of passage 3.
Adopting above-mentioned steps dynamically to adjust obtains after the phase point of data, the vocoder of passage 3 finish its coding staff to the required total time-delay of processing procedure comprise and from the respective channel of two TDM mailboxes, obtain a part of data respectively to form the required acquisition time M of a frame partial data, the data of being gathered are carried out the required maximum processing time M/N of encoding process, and the look-ahead time Δ of vocoder, total time-delay is: the M+M/N+ Δ.Said process all is the same to arbitrary passage, the vocoder that is to say each passage finish its coding staff to the required total time-delay of processing procedure all be the M+M/N+ Δ.
In the prior art, total time-delay of having only the vocoder of passage 1 is the M+M/N+ Δ, and total time-delay of other channel vocoder then increases successively, and total time-delay of the vocoder of passage N is increased to the 2M+ Δ.As seen, the maximum diminishbb time-delay of the present invention is: (2M+ Δ)-(M+M/N+ Δ)=M-M/N.Work as M=20, during N=20, M-M/N=19 can reduce by 19 milliseconds time-delay, in the situation of many vocoders cascade, will improve the quality of voice signal greatly.
What more than analyze is the processing procedure of vocoder coding direction.For the processing procedure of decoding direction in contrast, the moment that can finish decoding processing to its data of receiving successively according to the vocoder of each passage equally wherein, adjust it and send the phase point of data to the TDM mailbox, as shown in Figure 3, to the vocoder of passage 3:
Earlier its frame partial data that will send is divided into first's data that need formerly send and the second portion data that send in the back, corresponds respectively to the right shade part and the left side dash area of the passage 3 of vocoder among Fig. 3;
Then first's data are sent to the afterbody of respective channel that transmits the TDM mailbox 2 of data to multichannel serial, the dash area in passage 3 left sides of TDM mailbox 2 among Fig. 3 just is to replace the data that wherein do not transmit as yet in the moment of finishing decoding processing;
Again the second portion data are sent to the stem of the respective channel of another TDM mailbox, just the dash area on passage 3 right sides of TDM mailbox 1 among Fig. 3;
TDM mailbox 2 is sent to multichannel serial by TDM mailbox 1 with above-mentioned second portion data after above-mentioned first data are sent to the respective channel of multichannel serial again.
According to above analysis as can be known, the required total time-delay of processing procedure of finishing its decoding direction of the vocoder of each passage comprises the data of being received is carried out the required maximum processing time M/N of decoding processing and a frame partial data is divided into the required transmitting time M of respective channel that two parts send to two TDM mailboxes respectively.Total time-delay is: M+M/N.Said process all is the same to arbitrary passage, and required total time-delay of processing procedure that the vocoder that is to say each passage is finished its decoding direction all is M+M/N.Compared with prior art, maximum diminishbb time-delay is: 2M-(M+M/N)=M-M/N.As seen it has the minimizing delay effect identical with the encoding process direction.