CN102543089B - Conversion device for converting narrowband code streams into broadband code streams - Google Patents

Conversion device for converting narrowband code streams into broadband code streams Download PDF

Info

Publication number
CN102543089B
CN102543089B CN2012100141176A CN201210014117A CN102543089B CN 102543089 B CN102543089 B CN 102543089B CN 2012100141176 A CN2012100141176 A CN 2012100141176A CN 201210014117 A CN201210014117 A CN 201210014117A CN 102543089 B CN102543089 B CN 102543089B
Authority
CN
China
Prior art keywords
unit
input end
output terminal
code stream
links
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN2012100141176A
Other languages
Chinese (zh)
Other versions
CN102543089A (en
Inventor
陈喆
殷福亮
李文月
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dalian University of Technology
Original Assignee
Dalian University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dalian University of Technology filed Critical Dalian University of Technology
Priority to CN2012100141176A priority Critical patent/CN102543089B/en
Publication of CN102543089A publication Critical patent/CN102543089A/en
Application granted granted Critical
Publication of CN102543089B publication Critical patent/CN102543089B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a conversion device for converting narrowband code streams into broadband code streams and a conversion method for the conversion device; the device comprises an expansion unit and an training unit; wherein the expansion unit comprises a narrowband code stream separation unit, a narrowband code stream analysis unit, a narrowband energy computation unit, a codebook mapping unit, a function mapping unit, a high-frequency time domain envelope and frequency domain envelope coding unit, a high-frequency energy coding unit, a code stream synthesis unit and a high-frequency energy decoding unit. The method comprises the following steps of: narrowband code stream analysis, codebook mapping, narrowband energy computation, function mapping, and coding and code stream synthesis. According to the invention, narrowband code streams obtained by G.729 coding can be expanded into broadband code streams which can be input by a G.729.1 decoder for the first time, narrowband code streams transmitted by the existing telephone communication networks can be directly output through G.729.1decoding to obtain broadband voices, and the compact of narrowband terminals by broadband terminals can be realized.

Description

A kind of arrowband code stream is converted to the conversion equipment of broadband code stream
Technical field
The present invention relates to a kind of communication technology, particularly a kind of arrowband code stream is converted to conversion equipment and the conversion method thereof of broadband code stream.
Background technology
Language is the main carriers that people exchange mutually, and voice are acoustics performances of language, so voice communication is the important component part of Research on Communication Technology always.In the process of construction that early stage communication network grows out of nothing, owing to many reasons such as technology, cost, system complexities, the speech bandwidth of supporting is designed to satisfy basic communicating requirement mostly.For example: public telephone network (PSTN) effective frequency range only is 0.3~3.4KHz.GSM digital cellular telephone effective bandwidth is no more than 4KHz.Ordinary amplitude modulation broadcasting effective bandwidth is no more than 5KHz.It is found that in the research process that improves communication quality narrower bandwidth has become the Main Bottleneck that speech quality promotes.Although there are some wideband audio coding standards directly to utilize, from reducing as far as possible code rate, reduce the aspect such as tonequality loss and consider, (0.05~7KHz) voice coding research remains focus mainly for the broadband of voice.Constantly release in recent years on the new wideband speech coding standard from standardization bodies such as the ITU of International Telecommunications Union (ITU), third generation partner program 3GPP, just be not difficult to find out this point.But these wideband speech coding standards change very large to code stream form, code rate etc., there is not consideration to the compatibility of existing communication network and agreement, therefore the terminal device of supporting these coding standards under the existing communication network condition, the broadband performance that can't obtain to expect.In other words, only all support to obtain the speech quality in broadband in the situation of broadband voice transmission standard at transmitting terminal, receiving terminal and communication network.The upgrading of communication network is a complexity, very long, progressive process, and the quality that how to obtain as early as possible broadband voice under the existing network transmission conditions just becomes a realistic problem that needs to be resolved hurrily.Artificial speech bandwidth expansion mode is undoubtedly an effective solution of this problem.So-called artificial speech bandwidth expansion is the process of only utilizing the information of narrowband speech to rebuild broadband voice.
Along with the raising of processor speed and the progress of wideband speech coding technology, since the 1980's Mos and nineteen ninety for the initial stage people bandwidth expanding method that begins one's study.Below in conjunction with several pieces of Chinese patents, bandwidth expansion technique of the prior art is briefly introduced.A plurality of schemes that are applied to bandwidth expansion technique and improve prior art have been proposed in the prior art:
1, in applying on October 30th, 2002, be disclosed in March 2, publication number in 2005 patent that is CN1589469A, proposes: a kind of bandwidth extension schemes based on spectrum folding and noise shaping technology.This scheme is carried out sound signal after spectrum folding produces spectrum folding at least a portion of narrowband audio signal first, in the noise signal of the sound signal at least a portion behind the spectrum folding being carried out after noise shaping produces shaping, at last by combiner after with shaping noise signal and the sound signal behind the spectrum folding merge into broadband signal.This programme is characterised in that by the noise signal after the shaping and the signal behind the spectrum folding are merged the metal sound that can shield by the spectrum folding introducing.
2, be in the patent of CN101140759A applying on September 8th, 2006, being disclosed in March 12, publication number in 2008, the applicant has proposed the bandwidth extension schemes of a kind of audio frequency or voice signal.This scheme is asked first the spectrum envelope of the high frequency component signal in analog voice or the sound signal, the low-frequency signal components that spectrum envelope is corresponding with high frequency component signal is synthesized in the frequency domain space again, the high frequency component signal that obtains rebuilding, the high-frequency signal of domain space when the high-frequency signal of frequency domain is transformed to.
3, be in the patent of CN1601990253A applying on July 31st, 2009, being disclosed in March 23, publication number in 2011, the applicant discloses a kind of bandwidth expanding method and device thereof.In this scheme, first one section time-domain signal is divided into HFS and low frequency part by pre-service, and transforms to frequency domain, calculate the bandwidth expansion desired parameters, and then realize bandwidth expansion.
Carry out again bandwidth expansion after the arrowband code stream complete decoding that such scheme all needs to transmit, and rear two technology have also related to time-frequency conversion, so the calculated amount of these schemes and Time Delay of Systems are all larger, processing cost rising, tonequality are descended, even can't use fully in dense process systems such as media gateway.
Summary of the invention
Be to solve the problems referred to above that prior art exists, the present invention will design conversion equipment and the conversion method that a kind of arrowband code stream that not only can improve the narrowband speech communication quality but also can reduce algorithm operation quantity and Time Delay of Systems is converted to the broadband code stream.
To achieve these goals, technical scheme of the present invention is as follows:
A kind of arrowband code stream is converted to the conversion equipment of broadband code stream, comprises expanding element and training unit, and described training unit provides expansion work required mapping relations for expanding element, only moves once before expanding element work " off-line ".
Described expanding element comprises arrowband code stream separative element, code stream analyzing unit, arrowband, arrowband energy calculation unit, codebook mapping unit, Function Mapping unit, high frequency temporal envelope and frequency domain envelope coding unit, high-frequency energy coding unit, code stream synthesis unit and high-frequency energy decoding unit, the input end of described arrowband code stream separative element is inputted G.729 arrowband code stream, and output terminal links to each other with the input end of code stream analyzing unit, arrowband.The input end of code stream analyzing unit, described arrowband links to each other with the output terminal of arrowband code stream separative element, its output terminal is connected with the arrowband energy calculation unit with the codebook mapping unit respectively.The input end of described codebook mapping unit links to each other with the output terminal of code stream analyzing unit, arrowband and receives the mapping code book that training unit provides, and its output terminal links to each other with the input end of high frequency temporal envelope and frequency domain envelope coding.Described arrowband energy calculation unit is connected with the code stream synthesis unit with the high-frequency energy coding unit through the Function Mapping unit.The input end of described Function Mapping unit and the mapping function that output terminal links to each other and the unit of undergoing training provides of arrowband energy calculation unit.One end of described high frequency temporal envelope and frequency domain envelope coding unit is connected with the codebook mapping unit, its other end is connected with the code stream synthesis unit.The output terminal of the input end function map unit of described high-frequency energy coding unit links to each other, and output terminal links to each other with the input end of code stream synthesis unit and high-frequency energy decoding unit respectively.The output terminal of described high-frequency energy decoding unit links to each other with high frequency temporal envelope and frequency domain envelope coding unit.The output terminal of described code stream synthesis unit is exported G.729.1 broadband code stream.
Code stream analyzing unit, described arrowband comprises LSP reconstruction unit, reflection coefficient reconstruction unit, residual energy reconstruction unit, and the input end of described LSP reconstruction unit links to each other with the output terminal of arrowband code stream separative element, output terminal links to each other with the input end of codebook mapping unit input end and reflection coefficient reconstruction unit.The output terminal of described reflection coefficient reconstruction unit links to each other with the input end of arrowband energy calculation unit, and the input end of described residual energy reconstruction unit links to each other with the output terminal of arrowband code stream separative element, its output terminal links to each other with the input end of arrowband energy calculation unit.Described LSP is the abbreviation of line spectrum pair Line spectrum paris;
Described LSP reconstruction unit comprises LSP quantization parameter reconstruction unit, LSP quantization parameter reset cell, present frame LSP quantization parameter reconstruction unit and present frame LSP quantization parameter filter unit, and the input end of described LSP quantization parameter reconstruction unit links to each other with the output terminal of broadband code stream separative element, its output terminal links to each other with the input end of LSP quantization parameter reset cell.The input end of described LSP quantization parameter reset cell links to each other with the output terminal of LSP quantization parameter reconstruction unit, its output terminal links to each other with the input end of present frame LSP quantization parameter reconstruction unit.The output terminal of described present frame LSP quantization parameter reconstruction unit links to each other with the input end of present frame LSP quantization parameter filter unit.The output terminal of described present frame LSP quantization parameter filter unit links to each other with the input end of the input end of codebook mapping unit and reflection coefficient reconstruction unit.
Described reflection coefficient reconstruction unit comprises that LSP converts linear predictor coefficient unit, linear predictor coefficient to the reflection coefficient converting unit.The input end that LSP converts the linear predictor coefficient unit to links to each other with the output terminal of LSP reconstruction unit, and output terminal links to each other with the input end of linear predictor coefficient to the reflection coefficient converting unit.Linear predictor coefficient links to each other with the output terminal that LSP converts the linear predictor coefficient unit to the input end of reflection coefficient converting unit, and output terminal links to each other with the arrowband energy calculation unit.
Described residual energy computing unit comprises fixed codebook gain resolution unit, self-adapting code book gain resolution unit, residual energy computing unit.The fixed codebook gain resolution unit all links to each other with the output terminal of broadband code stream separative element with the input end of self-adapting code book gain resolution unit, its output terminal all links to each other with the input end of residual energy computing unit.The output terminal of described residual energy computing unit links to each other with the input end of arrowband energy calculation unit.
Described high frequency temporal envelope and frequency domain envelope coding unit comprise that temporal envelope goes DC component unit, temporal envelope 2 division unit, frequency domain envelope to remove DC component unit, frequency domain envelope 3 division unit, temporal envelope coding unit and frequency domain envelope coding units.Described temporal envelope goes DC component unit and frequency domain envelope to go the input end of DC component unit all to link to each other with the codebook mapping unit, all link to each other with the high-frequency energy decoding unit again simultaneously, and its output terminal links to each other with the input end of temporal envelope 2 division unit and frequency domain envelope 3 division unit respectively.The output terminal of described temporal envelope 2 division unit and frequency domain envelope 3 division unit all links to each other with the code stream synthesis unit.
Described training unit comprises broadband code stream separative element, code stream analyzing unit, broadband, mapping code book training unit and energy mapping function training unit.The input end of described broadband code stream separative element is inputted G.729.1 broadband code stream sample, and its output terminal links to each other with the input end of code stream analyzing unit, broadband.The output terminal of code stream analyzing unit, described broadband links to each other with the input end of mapping code book training unit and the input end of energy mapping function training unit respectively.Described mapping code book training unit provides the mapping code book for expanding element, and energy mapping function training unit provides mapping function for expanding element.
Code stream analyzing unit, described broadband comprises low frequency code stream analyzing unit and high frequency code stream analyzing unit, the input end of described low frequency code stream analyzing unit links to each other with the output terminal of broadband code stream separative element, and its output terminal links to each other with the input end of mapping code book training unit and the input end of energy mapping function training unit respectively.The input end of described high frequency code stream analyzing unit links to each other with the output terminal of broadband code stream separative element, and its output terminal links to each other with the input end of mapping code book training unit and the input end of energy mapping function training unit respectively.
The composition of the low frequency code stream analyzing unit of described training unit and connected mode are with the code stream analyzing unit, arrowband of expanding element;
Described high frequency code stream analyzing unit comprises high frequency temporal envelope and frequency domain envelope resolution unit and high-frequency energy resolution unit, and the input end of described high frequency temporal envelope and frequency domain envelope resolution unit links to each other with the output terminal of the output terminal of broadband code stream separative element and high-frequency energy resolution unit, its output terminal links to each other with the input end of mapping code book training unit.The input end of described high-frequency energy resolution unit links to each other with the output terminal of broadband code stream separative element, its output terminal links to each other with the input end of high frequency temporal envelope and frequency domain envelope resolution unit and the input end of energy mapping function training unit respectively.
Described mapping code book training unit comprises low frequency LSP and high frequency temporal envelope and frequency domain envelope vectors assembled unit, vector taxon and code book generation unit, and the input end of described low frequency LSP and high frequency temporal envelope and frequency domain envelope vectors assembled unit links to each other with the output terminal of code stream analyzing unit, broadband, its output terminal links to each other with the input end of vector taxon.The output terminal of described vector taxon links to each other with the input end of code book generation unit.The output terminal output mapping code book of described code book generation unit.
Described code book generation unit comprises low frequency code book generation unit and high frequency code book generation unit, the input end of described low frequency code book generation unit and high frequency code book generation unit all links to each other with the vector taxon, and its output terminal is exported respectively mapping code book medium and low frequency code book and high frequency code book.
Described high frequency code book generation unit, comprise initial barycenter vector calculating/updating block, the computing unit of vector and its place class barycenter vector distance, new barycenter vector computing unit, new barycenter and initial barycenter vector 1 norm calculation unit and judging unit, when the input end of described initial barycenter vector calculating/updating block is inputted high frequency, the frequency domain envelope data also is connected with the output terminal of judging unit, the input end of the input end of the computing unit of its output terminal difference connected vector and its place class barycenter vector distance and new barycenter and initial barycenter vector 1 norm calculation unit, described vector is connected with the input end of new barycenter vector computing unit with the output terminal of the computing unit of its place class barycenter vector distance, the output terminal of described new barycenter vector computing unit and new barycenter and be connected barycenter vector 1 norm calculation unit and be connected, the input end of described judging unit and new barycenter be connected barycenter vector 1 norm calculation unit and be connected, its output terminal is exported high frequency code book and is connected with initial barycenter vector calculating/updating block.
A kind of arrowband code stream is converted to the conversion method of the device of broadband code stream, carrying out the arrowband code stream before the on-line conversion of broadband code stream, needed mapping relations when needing and only needing once " off-line " to set up conversion for the work languages are namely carried out the training of arrowband code stream required transformational relation when converting the broadband code stream to; After finishing training, carry out again the arrowband code stream and convert the broadband code stream to, specifically may further comprise the steps:
A, arrowband code stream analyzing
A1, arrowband code stream separate
Arrowband code stream separative element with the arrowband code stream that receives before 18bit separate, be L0, L1, L2, L3, wherein 1bit is L0,2bit is L1 to 8bit, 9bit is L2 to 13bit, 14bit is L3 to 18bit.The last 14bit of ground floor is GA1, GA2, GB1, GB2, and wherein 67bit is GA1 to 69bit, and 70bit is GA2 to 72bit, and 73bit is GB1 to 76bit, and 77bit is GB2 to 80bit;
A2, arrowband LSP rebuild
The LSP reconstruction unit receives the isolated L0 of arrowband code stream separative element, L1, L2, L3, and obtains the LSP of arrowband by the code book search, and the specific implementation step is as follows:
A21, LSP quantization parameter are rebuild
LSP quantization parameter reconstruction unit parses the quantification output of LSP according to L0, L1, L2, L3
Figure BDA0000131700020000061
Be implemented as follows:
l ^ i = L 1 i ( L 1 ) + L 2 i ( L 2 ) i = 1 , · · · , 5 L 1 i ( L 1 ) + L 3 i - 5 ( L 3 ) i = 6 , · · · , 10 - - - ( 1 )
Wherein L1 is the 2bit code book of 10 dimensions, and L2, L3 are the 5bit code books of 5 dimensions;
A22, LSP quantization parameter are reset
LSP quantization parameter reset cell quantizes output according to the LSP of LSP quantization parameter reconstruction unit output, finishes the replacement of LSP quantization parameter, is implemented as follows:
Loop variable i span from 2 to 10 in the formula (1) increases by 1 at every turn.Carry out in each circulation: if satisfy
Figure BDA0000131700020000063
Condition is then carried out l ^ i - 1 = ( l ^ i + l ^ i - 1 - J ) / 2 , l ^ i = ( l ^ i + l ^ i - 1 + J ) / 2 Operation.
LSP quantization parameter reset cell is carried out above-mentioned circulation twice altogether, the seasonal J=0.0012 that wherein circulates for the first time, and seasonal J=0.0006 circulates for the second time;
A23, present frame LSP quantization parameter are rebuild
The LSP coefficient of present frame LSP quantization parameter reconstruction unit after according to the interpolation of LSP quantization parameter interpolation unit output reconstructs the LSP quantization parameter q of current m frame i m, be implemented as follows:
q ^ i m = ( 1 - Σ n = 1 4 p ^ i , n ) l ^ i m + Σ n = 1 4 p ^ i , n l ^ i m - n , i = 1 , · · · , 10 - - - ( 2 )
Wherein, when m<0
Figure BDA0000131700020000067
Figure BDA0000131700020000068
Be the coefficient of moving average forecasting device, can be obtained by the search of L0 code book.
A24, the filtering of present frame LSP coefficient
Present frame LSP coefficient filter unit is according to the LSP quantization parameter of the present frame of present frame LSP quantization parameter reconstruction unit output
Figure BDA0000131700020000069
Filtering operation is implemented as follows:
A241, arrange according to the ascending order of i
Figure BDA00001317000200000610
If A242 q ^ i < 0.005 , Then q ^ i = 0.005 .
If A243 q i + 1 ^ - q i ^ - 0.0391 < 0 , Then q i + 1 ^ = q i ^ + 0.0391 , i = 1 , . . . , 9 .
If A244 q 10 ^ > 3.135 , Then q 10 ^ = 3.135 ;
A3, reflection coefficient are rebuild
A31, linear predictor coefficient are rebuild
LSP finishes the reconstruction of linear predictor coefficient to the LSP coefficient of linear predictor coefficient converting unit according to the present frame of spectrum envelope reconstruction unit output;
A311, be different from the loop variable i span from 1 to 5 of A22 loop variable, increase by 1 at every turn.
Each variable i circulation time
①f 1(i)=-2q 2i-1f 1(i-1)+2f 1(i-2)。
2. loop variable j span is from i-1 to 1, and each loop variable j circulation time is carried out f 1 [ i ] = f 1 [ i - 1 ] ( j ) - 2 q 2 i - 1 f 1 [ i - 1 ] ( j - 1 ) + f 1 [ i - 1 ] ( j - 2 ) Operation.
Wherein, f 1(0)=1, f 1(1)=0.With q 2i-1Replace to q 2iCan obtain f 2(i).
f 1 ` = f 1 ( i ) + f 1 ( i - 1 ) , i = 1 , . . . , 5
A312、 (3)
f 2 ` = f 2 ( i ) - f 2 ( i - 1 ) , i = 1 , . . . , 5
A313、 a i = 0.5 f 1 ` ( i ) + 0.5 f 2 ` ( i ) i = 1 , . . . , 5 0.5 f 1 ` ( 11 - i ) - 0.5 f 2 ` ( 11 - i ) i = 6 , . . . , 10 - - - ( 4 )
A32, reflection coefficient are rebuild
Linear predictor coefficient converts the linear predictor coefficient a of linear predictor coefficient unit output to according to LSP to the reflection coefficient converting unit i, finish reflection coefficient k iReconstruction, be implemented as follows:
A321、 a m ( m ) = - k m ;
A322、 a m ( i ) = a m - 1 ( i ) - k m a m - 1 ( i - 1 ) ;
Wherein, m=10, i=1,2 ..., m-1,
Figure BDA00001317000200000713
A4, residual energy are calculated
A41, self-adapting code book gain are resolved
Self-adapting code book gain resolution unit is according to the isolated GA1 of broadband code stream separative element, and GB1 parses fixed codebook gain, is implemented as follows:
g ^ p = yA 1 ( GA 1 ) + yB 1 ( GB 1 ) - - - ( 5 )
A42, fixed codebook gain are resolved
The fixed codebook gain resolution unit is according to the isolated GA2 of broadband code stream separative element, and GB2 parses fixed codebook gain, is implemented as follows:
g ^ c = g ` ^ c ( yA 2 ( GA 2 ) + yB 2 ( GB 2 ) ) - - - ( 6 )
Wherein
Figure BDA0000131700020000082
The fixed codebook gain of prediction, yA 1And yA 2The code book of 3bit, 2 dimensions, yB 1And yB 2It is the code book of 4bit, 2 dimensions;
A43, residual energy are calculated
The fixed codebook gain that the residual energy computing unit is exported according to self-adapting code book gain and the fixed codebook gain resolution unit of the output of self-adapting code book gain resolution unit is calculated the residual energy E of i frame i, be implemented as follows:
E i = ( g p ^ ) 2 + ( g c ^ ) 2 - - - ( 7 )
B, codebook mapping
The codebook mapping unit expands to high frequency speech frame temporal envelope and frequency domain envelope with each narrowband speech frame LSP, and concrete grammar is as follows:
The narrowband speech frame LSP that the codebook mapping unit obtains the narrowband speech code stream decoding carries out the search of low frequency code book, obtains the line number at its code word place, and exports the data of this journey as high frequency temporal envelope and the frequency domain envelope of correspondence in the high frequency code book.
Described code word refers to the delegation of code book.Described code book is that k characteristic parameter with each speech frame is as 1 * k n dimensional vector n, the eigenvector of a plurality of speech frames of one section voice is divided into the n class and asks the barycenter vector of 1 * k dimension of each class, n barycenter vector namely obtains the code book of the correspondence of this section voice by rows, and each barycenter vector is a code word.To be narrowband speech frame spectrum envelope data that the arrowband code stream decoding is obtained ask poor square as each code word in input vector and the code book to the search of described code book, find out the code word with input vector error minimum, replacing input vector and output codons to be expert at this code word is call number.
C, arrowband energy calculate
The reflection coefficient k that the arrowband energy calculation unit obtains according to code stream analyzing unit, arrowband i, i=1,2 ..., 10 and the residual energy E of i frame iCalculate the arrowband energy of i frame
Figure BDA0000131700020000084
Be implemented as follows:
E x i = E i &Pi; i = 1 10 ( 1 - k i 2 ) - - - ( 8 )
D, Function Mapping
The energy of the narrowband speech that the Function Mapping unit calculates the arrowband energy calculation unit, as the input of mapping function, resulting functional value is corresponding HFS energy.
E, coding
E1, high-frequency energy coding
The high-frequency energy coding unit is finished the high-frequency energy M that the Function Mapping unit maps goes out TCoding, be specially: at log-domain take 3dB as step-length to M TRealize that 5bit quantizes the high-frequency energy code stream after obtaining encoding.
E2, high-frequency envelope coding
E21, high-frequency energy decoding
The high-frequency energy decoding unit is the high-frequency energy code stream decoding of high-frequency energy coding unit output, the high-frequency energy after the front quantification that obtains encoding
Figure BDA0000131700020000091
E22, temporal envelope go DC component
Temporal envelope removes the high-frequency energy of DC component unit by using high-frequency energy decoding unit output
Figure BDA0000131700020000092
That finishes the high frequency temporal envelope goes DC component work, is implemented as follows:
T env M ( i ) = T env ( i ) - M ^ T , i = 0 , &CenterDot; &CenterDot; &CenterDot; , 15 - - - ( 9 )
Wherein, T Env(i) for removing the temporal envelope before the DC component,
Figure BDA0000131700020000094
For removing the temporal envelope after the DC component.
E23, frequency domain envelope go DC component
The frequency domain envelope removes the high-frequency energy of DC component unit by using high-frequency energy decoding unit output
Figure BDA0000131700020000095
High-frequency energy
Figure BDA0000131700020000096
That finishes high frequency frequency domain envelope goes DC component work, is implemented as follows:
F env M ( i ) = F env ( i ) - M ^ T , i = 0 , &CenterDot; &CenterDot; &CenterDot; , 11 - - - ( 10 )
Wherein, F Env(i) for removing the frequency domain envelope before the DC component,
Figure BDA0000131700020000098
For removing the frequency domain envelope after the DC component.
E24, temporal envelope 2 divisions
Temporal envelope 2 division unit will go the temporal envelope after the DC component to split into the vector of two 8 dimensions, be implemented as follows:
T env , 1 = ( T env M ( 0 ) , T env M ( 1 ) , . . . , T env M ( 7 ) ) T env , 2 = ( T env M ( 8 ) , T env M ( 9 ) , . . . , T env M ( 15 ) ) - - - ( 11 )
E25,3 divisions of frequency domain envelope
Frequency domain envelope 3 division unit will go the frequency domain envelope after the DC component to split into the vector of three 4 dimensions, be implemented as follows:
F env , 1 = ( F env M ( 0 ) , F env M ( 1 ) , F env M ( 2 ) , F env M ( 3 ) ) F env , 2 = ( F env M ( 4 ) , F env M ( 5 ) , F env M ( 6 ) , F env M ( 7 ) ) F env , 3 = ( F env M ( 8 ) , F env M ( 9 ) , F env M ( 10 ) , F env M ( 11 ) ) - - - ( 12 )
E26, temporal envelope coding unit
The temporal envelope coding unit all quantizes two 8 n dimensional vector ns of the output of Time Domain Spectrum envelope 2 division unit with 7bit, rear temporal envelope code stream obtains encoding.
E27, frequency domain envelope coding unit
Frequency domain envelope coding unit is with the F of the output of frequency domain envelope 3 division unit Env, 1, F Env, 3All quantize F with 5bit Env, 3Quantize with 4bit, rear frequency domain envelope code stream obtains encoding.
F, code stream synthesize
The code stream synthesis unit is filled into the Layer3 synthetic wideband code stream of code stream with existing arrowband code stream and the coding unit resulting high frequency code stream of encoding according to code stream form G.729.1.
The training method of required transformational relation when arrowband of the present invention code stream converts the broadband code stream to may further comprise the steps:
The training of G1, codebook mapping relation
Mapping code book training unit was that LEN, duration are that 180 minutes broadband voice code stream sample obtains low frequency LSP and corresponding high frequency temporal envelope and frequency domain envelope through the decoding of broadband code stream analyzing cell mesh to a frame number first before expanding element work, then generated code book map unit needed two one to one low frequency code book and high frequency code books through low frequency LSP and high frequency temporal envelope and frequency domain envelope vectors assembled unit, vector taxon and code book generation unit.
G11, broadband code stream separate
Broadband code stream separative element is separated the front 18bit of two 10 milliseconds of frame ground floors in the per 20 milliseconds of frames of broadband code stream G.729.1 and is L0, L1, L2, L3, wherein 1bit is L0,2bit is L1 to 8bit, and 9bit is L2 to 13bit, and 14bit to the 18 is L3.The last 14bit of ground floor is GA1, GA2, GB1, GB2, and wherein 67bit is GA1 to 69bit, and 70bit is GA2 to 72bit, and 73bit is GB1 to 76bit, and 77bit is GB2 to 80bit.The front 5bit that every 20ms frame is the 3rd layer separates and is MU, and 6bit is T1 to 12bit, and 13bit is T2 to 18bit, and 19bit is F1 to 23bit, and 24bit is F2 to 28bit, and 29bit is F3 to 32bit;
G12, low frequency code stream analyzing
Resolve the isolated low frequency code stream of broadband code stream separative element low frequency code stream analyzing unit, and analytic method is with step A;
G13, high frequency code stream analyzing
G131, high-frequency energy are resolved
The high-frequency energy resolution unit obtains high-frequency energy with the isolated MU codeword decoding of broadband code stream separative element
Figure BDA0000131700020000111
G132, high frequency time domain and frequency domain envelope are resolved
High frequency temporal envelope and frequency domain envelope resolution unit receive the isolated high frequency spectrum envelope of broadband code stream separative element code word T1, T2, F1, F2, F3, and search corresponding vector in corresponding code book
Figure BDA0000131700020000112
Wherein
T ^ env , 1 M = ( T ^ env M ( 0 ) , T ^ env M ( 1 ) , &CenterDot; &CenterDot; &CenterDot; , T ^ env M ( 7 ) )
T ^ env , 1 M = ( T ^ env M ( 8 ) , T ^ env M ( 9 ) , &CenterDot; &CenterDot; &CenterDot; , T ^ env M ( 15 ) )
F ^ env , 1 M = ( F ^ env M ( 0 ) , F ^ env M ( 1 ) , F ^ env M ( 2 ) , F ^ env M ( 3 ) )
F ^ env M = ( F ^ env M ( 4 ) , F ^ env M ( 5 ) , F ^ env M ( 6 ) , F ^ env M ( 7 ) )
F ^ env , 3 M = ( F ^ env M ( 8 ) , F ^ env M ( 9 ) , F ^ env M ( 10 ) , F ^ env M ( 11 ) )
And resolve according to the high-frequency energy resolution unit and to obtain high-frequency energy
Figure BDA0000131700020000118
High frequency temporal envelope and frequency domain envelope code stream are decoded, obtain decoded high frequency temporal envelope
Figure BDA0000131700020000119
With the frequency domain envelope The specific implementation step is as follows:
T ^ env ( i ) = T ^ env M ( i ) + M ^ T ; ( i = 0,1 , &CenterDot; &CenterDot; &CenterDot; , 15 ) - - - ( 13 )
F ^ env ( j ) = F ^ env M + M ^ T ; ( j = 0,1 , &CenterDot; &CenterDot; &CenterDot; , 11 ) - - - ( 14 )
When G14, low frequency LSP and high frequency and frequency domain envelope vectors combination
When low frequency LSP and high frequency and 10 dimension LSP of each speech frame of respectively broadband code stream analyzing unit resolves being gone out of frequency domain envelope vectors assembled unit, 16 dimension temporal envelopes And the frequency domain envelope of 12 dimensions
Figure BDA00001317000200001114
According to 10 tieing up LSP before this, be 16 dimension temporal envelopes again The frequency domain envelope of 12 dimensions at last Order form the vector of one 38 dimension;
G15, vector classification
The method that the vector taxon adopts dynamic clustering is with LEN 38 n dimensional vector ns of ading up to of the output of low frequency LSP and high frequency temporal envelope and frequency domain envelope vectors assembled unit, low frequency LSP with 10 dimensions classifies as clustering object, obtains the result of vector classification.
G16, code book generate
The method that the code book generation unit utilizes respectively method that arithmetic is averaging and weighting to be averaging is asked for the barycenter vectors of front 10 dimension LSP and the barycenter vector of rear 28 dimension high frequency temporal envelopes and frequency domain envelope, is implemented as follows:
G161, low frequency code book generate
The method that low frequency code book generation unit utilizes arithmetic to be averaging, the average of the front 10 n dimensional vector n LSP of each class in the compute vectors classification results respectively, the result who tries to achieve is such barycenter vector, and the barycenter vector of each class is namely obtained the low frequency code book by rows.
G162, high frequency code book generate
The method that high frequency code book generation unit utilizes weighting to be averaging, rear 28 dimension temporal envelope and the frequency domain envelope barycenter vectors of each class in the classification results of compute vectors taxon output.The method of utilizing before this arithmetic to be averaging is obtained respectively the average of each all vector of class as such initial barycenter vector, then obtain the distance of each vector and place class barycenter vector, ask the method for barycenter to obtain new barycenter with weighting again, whether 1 norm of judging initial barycenter satisfies threshold requirement with the absolute value of 1 norm relative mistake of new barycenter, make then that new barycenter is initial barycenter if do not satisfy, ask the algorithm of barycenter to obtain new barycenter with identical weighting again, iteration is until the absolute value of the two 1 norm relative mistake withdraws from iteration when satisfying threshold requirement successively, and with the barycenter of this barycenter as this type of.The barycenter vector of all classes is obtained and low frequency code book high frequency code book one to one by rows.Concrete methods of realizing is as follows:
G1621, initial barycenter vector calculate
The method that initial barycenter vector computing unit utilizes first simple arithmetic to be averaging, during the rear 28 dimension high frequency of each class and the initial barycenter of frequency domain envelope, computing formula is as follows in the classification results of compute vectors taxon output:
arver 0 [ ind [ j ] ] [ k ] = 1 n &Sigma; j = 0 n x [ j ] [ k ] , k = 1,2 , &CenterDot; &CenterDot; &CenterDot; , 28 - - - ( 15 )
In this computing formula, n is the vector number in a certain class, x[j] [k] j high frequency temporal envelope of expression and frequency domain envelope vectors, ind[j] represent vector x[j] and the class at [k] place, aver0[ind[j]] [k] represent ind[j] the initial barycenter vector of class.
The calculating of G1622, vector and its place class barycenter vector distance
The computing unit of vector and its place class barycenter vector distance is obtained respectively the distance of each vector and place class barycenter vector, and computing formula is as follows:
dist [ j ] = &Sigma; k = 0 M ( x [ j ] [ k ] - aver 0 [ ind [ j ] ] [ k ] ) 2 , k = 1,2 , &CenterDot; &CenterDot; &CenterDot; , 28 - - - ( 16 )
Dist[j in this computing formula] expression x[j] distance of [k] and place class barycenter vector.
G1623, new barycenter vector calculate
The method that new barycenter vector computing unit is averaging with weighting is obtained new barycenter vector, and computing formula is as follows:
w [ i ] = &Sigma; ind [ j ] = i 1 dist [ j ] - - - ( 17 )
aver [ i ] [ k ] = &Sigma; k = 0 M x [ j ] [ k ] w [ i ] &times; 1 dist [ j ] , k = 1,2 , &CenterDot; &CenterDot; &CenterDot; , 28 - - - ( 18 )
W[i in this unit] represent used vector and barycenter vector distance inverse in such and.Aver[i] the new barycenter vector of [k] expression i class.
G1624, new barycenter and initial barycenter vector 1 norm calculation
New barycenter and initial barycenter vector 1 norm calculation unit calculate 1 norm between new barycenter vector and the initial barycenter vector, and computing formula is as follows:
sum 0 = &Sigma; k = 0 M | aver 0 [ i ] [ k ] |
sum = &Sigma; k = 0 M | aver [ i ] [ k ] | - - - ( 19 )
Sum0 and sum represent respectively 1 norm of initial barycenter vector and new barycenter vector.
G1625, judgement
Whether 1 norm of the initial barycenter of judgment unit judges satisfies threshold requirement with the absolute value of 1 norm relative mistake of new barycenter, and computing formula is as follows:
| sum 0 - sum | sum &le; 10 - 3 - - - ( 20 )
When threshold requirement does not satisfy, make aver0[i] [k]=aver[i] [k], and repeating step G1622-G1625, until the barycenter vector of all classification is when all satisfying threshold requirement, no longer repeat, the barycenter vector of this moment is the barycenter vector of classification, and these barycenter vectors form the high frequency code book.
The training of G2, energy mapped function relation
Energy mapping function training unit receives the low frequency energy of the i speech frame of low frequency code stream analyzing unit output
Figure BDA0000131700020000137
High-frequency energy with the output of high frequency code stream analyzing unit
Figure BDA0000131700020000138
Utilize least square fitting to go out to add up to funtcional relationship between the low-and high-frequency energy of LEN frame
Figure BDA0000131700020000139
The specific implementation step is as follows:
c = ( 1 LEN &Sigma; i = 0 LEN - 1 E x i M T i ) - ( 1 LEN &Sigma; i = 0 LEN - 1 E x i ) ( 1 LEN &Sigma; i = 0 LEN - 1 M T i ) 1 LEN &Sigma; i = 0 LEN - 1 ( E x i ) 2 - ( 1 LEN &Sigma; i = 0 LEN - 1 E x i ) 2 - - - ( 21 )
d = [ 1 LEN &Sigma; i = 0 LEN - 1 ( E x i ) 2 ] ( 1 LEN &Sigma; i = 0 LEN - 1 M T i ) - ( 1 LEN &Sigma; i = 0 LEN - 1 E x i ) ( 1 LEN &Sigma; i = 0 LEN - 1 E x i M T i ) 1 LEN &Sigma; i = 0 LEN - 1 ( E x i ) 2 - ( 1 LEN &Sigma; i = 0 LEN - 1 E x i ) 2 - - - ( 22 ) .
Compared with prior art, the present invention has following beneficial effect:
1, the present invention's realized for the first time G.729 encoding arrowband code stream of obtaining is extended to and can be used as the G.729.1 broadband code stream of demoder input.Then be embodied in real world applications: the arrowband code stream that can directly the existing telephone communication network be transmitted through the present invention is directly exported by decoding G.729.1 and is obtained broadband voice and namely do not need first the arrowband code stream decoding to be obtained narrowband speech and voice are expanded again, and has realized the compatibility of wide-band terminal to narrowband terminal.
2, the present invention adopts artificial expansion narrowband speech code stream at the broadband reception end, only utilizes the information of narrowband speech to rebuild broadband voice, does not need transmitting terminal and network to possess the ability of wideband signal communication.The present invention is not changing existing telephone network basis and has significantly improved quality and the property understood of the narrowband speech that wide-band terminal receives, can obtain broadband voice behind the code stream decoding of broadband, these voice are the narrowband speech behind the arrowband code stream decoding " vexed " no longer---and its naturalness and intelligibility have all improved, make the voice sound more natural, satisfied some to the have relatively high expectations requirement of occasion of voice quality.
3, the present invention realizes by recovering temporal envelope, frequency domain envelope and energy the recovery of broadband code stream, rather than adopt prior-art devices to realize by recovery spectrum envelope and pumping signal, because correlativity is very weak between artificial excitation and the true excitation, it is bad to match each other, so the voice noise sense that prior art is synthesized is strong, especially in voiced segments.And the broadband code stream of the present invention output through common G.729.1 demoder decoding after, the sense of voice high-frequency noise is not obvious, more near the auditory effect of original wideband voice.
4, the present invention does not need arrowband code stream complete decoding, then coding obtains the broadband code stream fully, only need partial decoding of h, namely only need decoding to obtain arrowband LSP, reflection coefficient and residual energy, the high-frequency parameter that only needs coding the present invention expansion to obtain, the i.e. information such as direct coding high-frequency energy, high frequency temporal envelope and high frequency frequency domain envelope.So the present invention has saved operand and the algorithm time delay of arrowband decoding and arrowband coding, operand is 30% of the decoding of first complete arrowband, rear complete wideband encoding mode, and time delay has reduced by 28.9375 milliseconds.
When 5, the present invention asked classification center to high frequency temporal envelope and frequency domain envelope, the method for having utilized the iteration weighting to be averaging, the method can effectively reduce some and depart from the far base point in center on the impact of barycenter, so that sorting technique is more accurate.
Description of drawings
24 in the total accompanying drawing of the present invention, wherein:
Fig. 1 is Bit Allocation in Discrete figure G.729.
Fig. 2 is code stream form G.729.1.
Fig. 3 is Layer3 Bit Allocation in Discrete figure G.729.1.
Fig. 4 is the conversion equipment synoptic diagram that the arrowband code stream is converted to the broadband code stream.
Fig. 5 is the expanding element synoptic diagram.
Fig. 6 is arrowband code stream analyzing cell schematics.
Fig. 7 is LSP reconstruction unit synoptic diagram.
Fig. 8 is reflection coefficient reconstruction unit synoptic diagram.
Fig. 9 is residual energy reconstruction unit synoptic diagram.
Figure 10 is high frequency temporal envelope and frequency domain envelope coding unit synoptic diagram.
Figure 11 is the training unit synoptic diagram.
Figure 12 is broadband code stream analyzing cell schematics.
Figure 13 is that the high frequency code stream is rebuild module diagram.
Figure 14 is mapping code book training unit synoptic diagram.
Figure 15 is code book generation unit synoptic diagram.
Figure 16 is high frequency code book generation unit synoptic diagram.
Figure 17 is the voice sound spectrograph example (male voice of growing up) behind the arrowband code stream decoding.
Figure 18 is the voice sound spectrograph example (male voice of growing up) behind the broadband code stream decoding changed of the present invention.
Figure 19 is the voice sound spectrograph example (female voice of growing up) behind the arrowband code stream decoding.
Figure 20 is the voice sound spectrograph example (female voice of growing up) behind the broadband code stream decoding changed of the present invention.
Figure 21 is the voice sound spectrograph example (boy's sound) behind the arrowband code stream decoding.
Figure 22 is the voice sound spectrograph example (boy's sound) behind the broadband code stream decoding changed of the present invention.
Figure 23 is the voice sound spectrograph example (young girl's sound) behind the arrowband code stream decoding.
Figure 24 is the voice sound spectrograph example (young girl's sound) behind the broadband code stream decoding changed of the present invention.
Among the figure: 1, expanding element, 2, training unit, 11, arrowband code stream separative element, 12, code stream analyzing unit, arrowband, 13, the arrowband energy calculation unit, 14, the codebook mapping unit, 15, the Function Mapping unit, 16, high frequency temporal envelope and frequency domain envelope coding unit, 17, the high-frequency energy coding unit, 18, the code stream synthesis unit, 19, the high-frequency energy decoding unit, 21, broadband code stream separative element, 22, code stream analyzing unit, broadband, 23, mapping code book training unit, 24, energy mapping function training unit, 121, the LSP reconstruction unit, 122, the reflection coefficient reconstruction unit, 123, the residual energy reconstruction unit, 161, temporal envelope goes to the DC component unit, 162, the frequency domain envelope goes to the DC component unit, 163, temporal envelope 2 division unit, 164, frequency domain envelope 3 division unit, 165, the temporal envelope coding unit, 166, frequency domain envelope coding unit, 221, low frequency code stream analyzing unit, 222, high frequency code stream analyzing unit, 1211, LSP quantization parameter reconstruction unit, 1212, LSP quantization parameter reset cell, 1213, present frame LSP quantization parameter reconstruction unit, 1214, present frame LSP quantization parameter filter unit, 1221, LSP converts the linear predictor coefficient unit to, 1222, linear predictor coefficient is to the reflection coefficient converting unit, 1231, the fixed codebook gain resolution unit, 1232, self-adapting code book gain resolution unit, 1233, the residual energy computing unit, 2221, high frequency temporal envelope and frequency domain envelope resolution unit, 2222, the high-frequency energy resolution unit, 231, low frequency LSP and high frequency temporal envelope and frequency domain envelope vectors assembled unit, 232, the vector taxon, 233, code book generation unit 22331, low frequency code book generation unit, 2332, high frequency code book generation unit, 23321, initial barycenter vector calculating/updating block, 23322, the computing unit of vector and its place class barycenter vector distance, 23323, new barycenter vector computing unit, 23324, new barycenter vector and and initial barycenter vector 1 norm calculation unit, 23325, judging unit.
Embodiment
Below in conjunction with accompanying drawing the present invention is described further.Shown in Fig. 1-16, a kind of arrowband code stream is converted to the conversion equipment of broadband code stream, comprise expanding element 1 and training unit 2, described training unit 2 provides expansion work required mapping relations for expanding element 1, only moves once before expanding element 1 work " off-line ";
Described expanding element 1 comprises arrowband code stream separative element 11, code stream analyzing unit, arrowband 12, arrowband energy calculation unit 13, codebook mapping unit 14, Function Mapping unit 15, high frequency temporal envelope and frequency domain envelope coding unit 16, high-frequency energy coding unit 17, code stream synthesis unit 18 and high-frequency energy decoding unit 19, the input end of described arrowband code stream separative element 11 is inputted G.729 arrowband code stream, and output terminal links to each other with the input end of code stream analyzing unit, arrowband 12; The input end of code stream analyzing unit, described arrowband 12 and the output terminal of arrowband code stream separative element 11 link to each other, its output terminal is connected with the arrowband energy calculation unit with codebook mapping unit 14 respectively and is connected; The input end of described codebook mapping unit 14 links to each other with the output terminal of code stream analyzing unit, arrowband 12 and receives the mapping code book that training unit 2 provides, and its output terminal links to each other with the input end of high frequency temporal envelope and frequency domain envelope coding; Described arrowband energy calculation unit 13 is connected with the high-frequency energy coding unit through Function Mapping unit 15 and is connected with code stream synthesis unit 18; The input end of described Function Mapping unit 15 and the mapping function that the output terminal of arrowband energy calculation unit 13 links to each other and the unit 2 of undergoing training provides; One end of described high frequency temporal envelope and frequency domain envelope coding unit 16 is connected with codebook mapping unit 14, its other end is connected with code stream synthesis unit 18; The output terminal of the input end function map unit 15 of described high-frequency energy coding unit 17 links to each other, and output terminal links to each other with the input end of code stream synthesis unit 18 and high-frequency energy decoding unit 19 respectively; The output terminal of described high-frequency energy decoding unit 19 links to each other with high frequency temporal envelope and frequency domain envelope coding unit 16; The output terminal of described code stream synthesis unit 18 is exported G.729.1 broadband code stream;
Code stream analyzing unit, described arrowband 12 comprises LSP reconstruction unit 121, reflection coefficient reconstruction unit 122, residual energy reconstruction unit 123, and the input end of described LSP reconstruction unit 121 links to each other with the output terminal of arrowband code stream separative element 11, output terminal links to each other with the input end of codebook mapping unit 14 input ends and reflection coefficient reconstruction unit 122; The output terminal of described reflection coefficient reconstruction unit 122 links to each other with the input end of arrowband energy calculation unit 13, and the input end of described residual energy reconstruction unit 123 links to each other with the output terminal of arrowband code stream separative element 11, its output terminal links to each other with the input end of arrowband energy calculation unit 13; Described LSP is the abbreviation of line spectrum pair Line spectrum paris;
Described LSP reconstruction unit 121 comprises LSP quantization parameter reconstruction unit 1211, LSP quantization parameter reset cell 1212, present frame LSP quantization parameter reconstruction unit 1213 and present frame LSP quantization parameter filter unit 1214, and the input end of described LSP quantization parameter reconstruction unit 1211 links to each other with the output terminal of broadband code stream separative element 21, its output terminal links to each other with the input end of LSP quantization parameter reset cell 1212; The input end of described LSP quantization parameter reset cell 1212 links to each other with the output terminal of LSP quantization parameter reconstruction unit 1211, its output terminal links to each other with the input end of present frame LSP quantization parameter reconstruction unit 1213; The output terminal of described present frame LSP quantization parameter reconstruction unit 1213 links to each other with the input end of present frame LSP quantization parameter filter unit 1214; The output terminal of described present frame LSP quantization parameter filter unit 1214 links to each other with the input end of the input end of codebook mapping unit 14 and reflection coefficient reconstruction unit 122;
Described reflection coefficient reconstruction unit 122 comprises that LSP converts linear predictor coefficient unit 1221, linear predictor coefficient to reflection coefficient converting unit 1222; The input end that LSP converts linear predictor coefficient unit 1221 to links to each other with the output terminal of LSP reconstruction unit 121, and output terminal links to each other with the input end of linear predictor coefficient to reflection coefficient converting unit 1222; Linear predictor coefficient links to each other with the output terminal that LSP converts linear predictor coefficient unit 1221 to the input end of reflection coefficient converting unit 1222, and output terminal links to each other with arrowband energy calculation unit 13;
Described residual energy computing unit 1233 comprises fixed codebook gain resolution unit 1231, self-adapting code book gain resolution unit 1232, residual energy computing unit 1233; Fixed codebook gain resolution unit 1231 all links to each other with the output terminal of broadband code stream separative element 21 with the input end of self-adapting code book gain resolution unit 1232, its output terminal all links to each other with the input end of residual energy computing unit 1233; The output terminal of described residual energy computing unit 1233 links to each other with the input end of arrowband energy calculation unit 13;
Described high frequency temporal envelope and frequency domain envelope coding unit 16 comprise that temporal envelope goes DC component unit 161, temporal envelope 2 division unit 163, frequency domain envelope to remove DC component unit 162, frequency domain envelope 3 division unit 164, temporal envelope coding unit 165 and frequency domain envelope coding units 166; Described temporal envelope goes DC component unit 161 and frequency domain envelope to go the input end of DC component unit 162 all to link to each other with codebook mapping unit 14, all link to each other with high-frequency energy decoding unit 19 again simultaneously, and its output terminal links to each other with the input end of temporal envelope 2 division unit 163 and frequency domain envelope 3 division unit 164 respectively; The output terminal of described temporal envelope 2 division unit 163 and frequency domain envelope 3 division unit 164 all links to each other with code stream synthesis unit 18;
Described training unit 2 comprises broadband code stream separative element 21, code stream analyzing unit, broadband 22, mapping code book training unit 23 and energy mapping function training unit 24; The input end of described broadband code stream separative element 21 is inputted G.729.1 broadband code stream sample, and its output terminal links to each other with the input end of code stream analyzing unit, broadband 22; The output terminal of code stream analyzing unit, described broadband 22 links to each other with the input end of mapping code book training unit 23 and the input end of energy mapping function training unit 24 respectively; Described mapping code book training unit 23 provides the mapping code book for expanding element 1, and energy mapping function training unit 24 provides mapping function for expanding element 1;
Code stream analyzing unit, described broadband 22 comprises low frequency code stream analyzing unit 221 and high frequency code stream analyzing unit 222, the input end of described low frequency code stream analyzing unit 221 links to each other with the output terminal of broadband code stream separative element 21, and its output terminal links to each other with the input end of mapping code book training unit 23 and the input end of energy mapping function training unit 24 respectively; The input end of described high frequency code stream analyzing unit 222 links to each other with the output terminal of broadband code stream separative element 21, and its output terminal links to each other with the input end of mapping code book training unit 23 and the input end of energy mapping function training unit 24 respectively;
The composition of the low frequency code stream analyzing unit 221 of described training unit 2 and connected mode are with the code stream analyzing unit, arrowband 12 of expanding element 1;
Described high frequency code stream analyzing unit 222 comprises high frequency temporal envelope and frequency domain envelope resolution unit 2221 and high-frequency energy resolution unit 2222, and the input end of described high frequency temporal envelope and frequency domain envelope resolution unit 2221 links to each other with the output terminal of the output terminal of broadband code stream separative element 21 and high-frequency energy resolution unit 2222, its output terminal links to each other with the input end of mapping code book training unit 23; The input end of described high-frequency energy resolution unit 2222 links to each other with the output terminal of broadband code stream separative element 21, its output terminal links to each other with the input end of high frequency temporal envelope and frequency domain envelope resolution unit 2221 and the input end of energy mapping function training unit 24 respectively;
Described mapping code book training unit 23 comprises low frequency LSP and high frequency temporal envelope and frequency domain envelope vectors assembled unit 231, vector taxon 232 and code book generation unit 233, and the input end of described low frequency LSP and high frequency temporal envelope and frequency domain envelope vectors assembled unit 231 links to each other with the output terminal of code stream analyzing unit, broadband 22, its output terminal links to each other with the input end of vector taxon 232; The output terminal of described vector taxon 232 links to each other with the input end of code book generation unit 233; The output terminal output mapping code book of described code book generation unit 233;
Described code book generation unit 233 comprises low frequency code book generation unit 2331 and high frequency code book generation unit 2332, the input end of described low frequency code book generation unit 2331 and high frequency code book generation unit 2332 all links to each other with vector taxon 232, and its output terminal is exported respectively mapping code book medium and low frequency code book and high frequency code book;
Described high frequency code book generation unit 2332, comprise initial barycenter vector calculating/updating block 23321, the computing unit 23322 of vector and its place class barycenter vector distance, new barycenter vector computing unit 23323, new barycenter and initial barycenter vector 1 norm calculation unit 23324 and judging unit 23325, when the input end of described initial barycenter vector calculating/updating block 23321 is inputted high frequency, the frequency domain envelope data also is connected with the output terminal of judging unit 23325, the input end of the input end of the computing unit 23322 of its output terminal difference connected vector and its place class barycenter vector distance and new barycenter and initial barycenter vector 1 norm calculation unit 23324, described vector is connected with the input end of new barycenter vector computing unit 23323 with the output terminal of the computing unit 23322 of its place class barycenter vector distance, the output terminal of described new barycenter vector computing unit 23323 and new barycenter and be connected barycenter vector 1 norm calculation unit 23324 and be connected, the input end of described judging unit 23325 and new barycenter be connected barycenter vector 1 norm calculation unit 23324 and be connected, its output terminal is exported high frequency code book and is connected with initial barycenter vector calculating/updating block 23321.
A kind of arrowband code stream is converted to the conversion method of the device of broadband code stream, carrying out the arrowband code stream before the on-line conversion of broadband code stream, needed mapping relations when needing and only needing once " off-line " to set up conversion for the work languages are namely carried out the training of arrowband code stream required transformational relation when converting the broadband code stream to; After finishing training, carry out again the arrowband code stream and convert the broadband code stream to, specifically may further comprise the steps:
A, arrowband code stream analyzing
A1, arrowband code stream separate
Arrowband code stream separative element 11 with the arrowband code stream that receives before 18bit separate, be L0, L1, L2, L3, wherein 1bit is L0,2bit is L1 to 8bit, 9bit is L2 to 13bit, 14bit is L3 to 18bit; The last 14bit of ground floor is GA1, GA2, GB1, GB2, and wherein 67bit is GA1 to 69bit, and 70bit is GA2 to 72bit, and 73bit is GB1 to 76bit, and 77bit is GB2 to 80bit;
A2, arrowband LSP rebuild
LSP reconstruction unit 121 receives arrowband code stream separative element 11 isolated L0, L1, L2, L3, and obtains the LSP of arrowband by the code book search, and the specific implementation step is as follows:
A21, LSP quantization parameter are rebuild
LSP quantization parameter reconstruction unit 1211 parses the quantification output of LSP according to L0, L1, L2, L3
Figure BDA0000131700020000201
Be implemented as follows:
l ^ i = L 1 i ( L 1 ) + L 2 i ( L 2 ) i = 1 , &CenterDot; &CenterDot; &CenterDot; , 5 L 1 i ( L 1 ) + L 3 i - 5 ( L 3 ) i = 6 , &CenterDot; &CenterDot; &CenterDot; , 10 - - - ( 1 )
Wherein L1 is the 2bit code book of 10 dimensions, and L2, L3 are the 5bit code books of 5 dimensions;
A22, LSP quantization parameter are reset
LSP quantization parameter reset cell 1212 quantizes output according to the LSP of LSP quantization parameter reconstruction unit 1211 outputs, finishes the replacement of LSP quantization parameter, is implemented as follows:
Loop variable i span from 2 to 10 in the formula 1 increases by 1 at every turn; Carry out in each circulation: if satisfy
Figure BDA0000131700020000203
Condition is then carried out l ^ i - 1 = ( l ^ i + l ^ i - 1 - J ) / 2 , l ^ i = ( l ^ i + l ^ i - 1 + J ) / 2 Operation;
LSP quantization parameter reset cell 1212 is carried out above-mentioned circulation twice altogether, the seasonal J=0.0012 that wherein circulates for the first time, and seasonal J=0.0006 circulates for the second time;
A23, present frame LSP quantization parameter are rebuild
The LSP coefficient of present frame LSP quantization parameter reconstruction unit 1213 after according to the interpolation of LSP quantization parameter interpolation unit output reconstructs the LSP quantization parameter q of current m frame i m, be implemented as follows:
q ^ i m = ( 1 - &Sigma; n = 1 4 p ^ i , n ) l ^ i m + &Sigma; n = 1 4 p ^ i , n l ^ i m - n , i = 1 , &CenterDot; &CenterDot; &CenterDot; , 10 - - - ( 2 )
Wherein, when m<0
Figure BDA0000131700020000207
Figure BDA0000131700020000208
Be the coefficient of moving average forecasting device, can be obtained by the search of L0 code book;
A24, the filtering of present frame LSP coefficient
Present frame LSP coefficient filter unit is according to the LSP quantization parameter of the present frame of present frame LSP quantization parameter reconstruction unit 1213 outputs Filtering operation is implemented as follows:
A241, arrange according to the ascending order of i
Figure BDA0000131700020000212
If A242 q ^ i < 0.005 , Then q ^ i = 0.005 ;
If A243 q i + 1 ^ - q i ^ - 0.0391 < 0 , Then q i + 1 ^ = q i ^ + 0.0391 , i = 1 , . . . , 9 ;
If A244 q 10 ^ > 3.135 , Then q 10 ^ = 3.135 ;
A3, reflection coefficient are rebuild
A31, linear predictor coefficient are rebuild
LSP finishes the reconstruction of linear predictor coefficient to the LSP coefficient of linear predictor coefficient converting unit according to the present frame of spectrum envelope reconstruction unit output;
A311, be different from the loop variable i span from 1 to 5 of A22 loop variable, increase by 1 at every turn;
Each variable i circulation time
①f 1(i)=-2q 2i-1f 1(i-1)+2f 1(i-2);
2. loop variable j span is from i-1 to 1, and each loop variable j circulation time is carried out f 1 [ i ] = f 1 [ i - 1 ] ( j ) - 2 q 2 i - 1 f 1 [ i - 1 ] ( j - 1 ) + f 1 [ i - 1 ] ( j - 2 ) Operation;
Wherein, f 1(0)=1, f 1(1)=0; With q 2i-1Replace to q 2iCan obtain f 2(i);
f 1 ` = f 1 ( i ) + f 1 ( i - 1 ) , i = 1 , . . . , 5
A312、 (3)
f 2 ` = f 2 ( i ) - f 2 ( i - 1 ) , i = 1 , . . . , 5
A313、 a i = 0.5 f 1 ` ( i ) + 0.5 f 2 ` ( i ) i = 1 , . . . , 5 0.5 f 1 ` ( 11 - i ) - 0.5 f 2 ` ( 11 - i ) i = 6 , . . . , 10 - - - ( 4 )
A32, reflection coefficient are rebuild
Linear predictor coefficient converts the linear predictor coefficient a of linear predictor coefficient unit 1221 outputs to according to LSP to reflection coefficient converting unit 1222 i, finish reflection coefficient k iReconstruction, be implemented as follows:
A321、 a m ( m ) = - k m ;
A322、 a m ( i ) = a m - 1 ( i ) - k m a m - 1 ( i - 1 ) ;
Wherein, m=10, i=1,2 ..., m-1,
Figure BDA00001317000200002115
A4, residual energy are calculated
A41, self-adapting code book gain are resolved
Self-adapting code book gain resolution unit 1232 is according to broadband code stream separative element 21 isolated GA1, and GB1 parses fixed codebook gain, is implemented as follows:
g ^ p = yA 1 ( GA 1 ) + yB 1 ( GB 1 ) - - - ( 5 )
A42, fixed codebook gain are resolved
Fixed codebook gain resolution unit 1231 is according to broadband code stream separative element 21 isolated GA2, and GB2 parses fixed codebook gain, is implemented as follows:
g ^ c = g ` ^ c ( yA 2 ( GA 2 ) + yB 2 ( GB 2 ) ) - - - ( 6 )
Wherein The fixed codebook gain of prediction, yA 1And yA 2The code book of 3bit, 2 dimensions, yB 1And yB 2It is the code book of 4bit, 2 dimensions;
A43, residual energy are calculated
The fixed codebook gain that residual energy computing unit 1233 is exported according to self-adapting code book gain and the fixed codebook gain resolution unit 1231 of 1232 outputs of self-adapting code book gain resolution unit is calculated the residual energy E of i frame i, be implemented as follows:
E i = ( g p ^ ) 2 + ( g c ^ ) 2 - - - ( 7 )
B, codebook mapping
Codebook mapping unit 14 expands to high frequency speech frame temporal envelope and frequency domain envelope with each narrowband speech frame LSP, and concrete grammar is as follows:
The narrowband speech frame LSP that codebook mapping unit 14 obtains the narrowband speech code stream decoding carries out the search of low frequency code book, obtains the line number at its code word place, and exports the data of this journey as high frequency temporal envelope and the frequency domain envelope of correspondence in the high frequency code book;
Described code word refers to the delegation of code book; Described code book is that k characteristic parameter with each speech frame is as 1 * k n dimensional vector n, the eigenvector of a plurality of speech frames of one section voice is divided into the n class and asks the barycenter vector of 1 * k dimension of each class, n barycenter vector namely obtains the code book of the correspondence of this section voice by rows, and each barycenter vector is a code word; To be narrowband speech frame spectrum envelope data that the arrowband code stream decoding is obtained ask poor square as each code word in input vector and the code book to the search of described code book, find out the code word with input vector error minimum, replacing input vector and output codons to be expert at this code word is call number;
C, arrowband energy calculate
The reflection coefficient k that arrowband energy calculation unit 13 obtains according to code stream analyzing unit, arrowband 12 i, i=1,2 ..., 10 and the residual energy E of i frame iCalculate the arrowband energy of i frame
Figure BDA0000131700020000231
Be implemented as follows:
E x i = E i &Pi; i = 1 10 ( 1 - k i 2 ) - - - ( 8 )
D, Function Mapping
The energy of the narrowband speech that Function Mapping unit 15 calculates arrowband energy calculation unit 13, as the input of mapping function, resulting functional value is corresponding HFS energy;
E, coding
E1, high-frequency energy coding
High-frequency energy coding unit 17 is finished the high-frequency energy M that Function Mapping unit 15 maps out TCoding, be specially: at log-domain take 3dB as step-length to M TRealize that 5bit quantizes the high-frequency energy code stream after obtaining encoding;
E2, high-frequency envelope coding
E21, high-frequency energy decoding
High-frequency energy decoding unit 19 is the high-frequency energy code stream decoding of high-frequency energy coding unit 17 output, the high-frequency energy after the front quantification that obtains encoding
Figure BDA0000131700020000233
E22, temporal envelope go DC component
Temporal envelope goes to DC component unit 161 to utilize the high-frequency energy of high-frequency energy decoding unit 19 outputs
Figure BDA0000131700020000234
That finishes the high frequency temporal envelope goes DC component work, is implemented as follows:
T env M ( i ) = T env ( i ) - M ^ T , i = 0 , &CenterDot; &CenterDot; &CenterDot; , 15 - - - ( 9 )
Wherein, T Env(i) for removing the temporal envelope before the DC component,
Figure BDA0000131700020000236
For removing the temporal envelope after the DC component;
E23, frequency domain envelope go DC component
The frequency domain envelope goes to DC component unit 162 to utilize the high-frequency energy of high-frequency energy decoding unit 19 outputs
Figure BDA0000131700020000237
High-frequency energy
Figure BDA0000131700020000238
That finishes high frequency frequency domain envelope goes DC component work, is implemented as follows:
F env M ( i ) = F env ( i ) - M ^ T , i = 0 , &CenterDot; &CenterDot; &CenterDot; , 11 - - - ( 10 )
Wherein, F Env(i) for removing the frequency domain envelope before the DC component,
Figure BDA00001317000200002310
For removing the frequency domain envelope after the DC component;
E24, temporal envelope 2 divisions
Temporal envelope 2 division unit 163 will go the temporal envelope after the DC component to split into the vector of two 8 dimensions, be implemented as follows:
T env , 1 = ( T env M ( 0 ) , T env M ( 1 ) , . . . , T env M ( 7 ) ) T env , 2 = ( T env M ( 8 ) , T env M ( 9 ) , . . . , T env M ( 15 ) ) - - - ( 11 )
E25,3 divisions of frequency domain envelope
Frequency domain envelope 3 division unit 164 will go the frequency domain envelope after the DC component to split into the vector of three 4 dimensions, be implemented as follows:
F env , 1 = ( F env M ( 0 ) , F env M ( 1 ) , F env M ( 2 ) , F env M ( 3 ) ) F env , 2 = ( F env M ( 4 ) , F env M ( 5 ) , F env M ( 6 ) , F env M ( 7 ) ) F env , 3 = ( F env M ( 8 ) , F env M ( 9 ) , F env M ( 10 ) , F env M ( 11 ) ) - - - ( 12 )
E26, temporal envelope coding unit 165
Temporal envelope coding unit 165 all quantizes two 8 n dimensional vector ns of the output of Time Domain Spectrum envelope 2 division unit with 7bit, rear temporal envelope code stream obtains encoding;
E27, frequency domain envelope coding unit 166
Frequency domain envelope coding unit 166 is with the F of the output of frequency domain envelope 3 division unit 164 Env, 1, F Env, 3All quantize F with 5bit Env, 3Quantize with 4bit, rear frequency domain envelope code stream obtains encoding;
F, code stream synthesize
Code stream synthesis unit 18 is filled into the Layer3 synthetic wideband code stream of code stream with existing arrowband code stream and the coding unit resulting high frequency code stream of encoding according to code stream form G.729.1.
The training method of required transformational relation when arrowband of the present invention code stream converts the broadband code stream to may further comprise the steps:
The training of G1, codebook mapping relation
Mapping code book training unit 23 was that LEN, duration are that 180 minutes broadband voice code stream sample obtains low frequency LSP and corresponding high frequency temporal envelope and frequency domain envelope through code stream analyzing unit, broadband 22 partial decoding of h to a frame number first before expanding element 1 work, then generated code book map unit 14 needed two one to one low frequency code book and high frequency code books through low frequency LSP and high frequency temporal envelope and frequency domain envelope vectors assembled unit 231, vector taxon 232 and code book generation unit 233;
G11, broadband code stream separate
Broadband code stream separative element 21 is separated the front 18bit of two 10 milliseconds of frame ground floors in the per 20 milliseconds of frames of broadband code stream G.729.1 and is L0, L1, L2, L3, wherein 1bit is L0,2bit is L1 to 8bit, and 9bit is L2 to 13bit, and 14bit to the 18 is L3; The last 14bit of ground floor is GA1, GA2, GB1, GB2, and wherein 67bit is GA1 to 69bit, and 70bit is GA2 to 72bit, and 73bit is GB1 to 76bit, and 77bit is GB2 to 80bit; The front 5bit that every 20ms frame is the 3rd layer separates and is MU, and 6bit is T1 to 12bit, and 13bit is T2 to 18bit, and 19bit is F1 to 23bit, and 24bit is F2 to 28bit, and 29bit is F3 to 32bit;
G12, low frequency code stream analyzing
221 pairs of broadbands, low frequency code stream analyzing unit code stream separative element 21 isolated low frequency code streams are resolved, and analytic method is with step A;
G13, high frequency code stream analyzing
G131, high-frequency energy are resolved
High-frequency energy resolution unit 2222 obtains high-frequency energy with broadband code stream separative element 21 isolated MU codeword decodings
Figure BDA0000131700020000251
G132, high frequency time domain and frequency domain envelope are resolved
High frequency temporal envelope and frequency domain envelope resolution unit 2221 receive broadband code stream separative element 21 isolated high frequency spectrum envelope code word T1, T2, F1, F2, F3, and search corresponding vector in corresponding code book
Figure BDA0000131700020000252
Wherein
T ^ env , 1 M = ( T ^ env M ( 0 ) , T ^ env M ( 1 ) , &CenterDot; &CenterDot; &CenterDot; , T ^ env M ( 7 ) )
T ^ env , 1 M = ( T ^ env M ( 8 ) , T ^ env M ( 9 ) , &CenterDot; &CenterDot; &CenterDot; , T ^ env M ( 15 ) )
F ^ env , 1 M = ( F ^ env M ( 0 ) , F ^ env M ( 1 ) , F ^ env M ( 2 ) , F ^ env M ( 3 ) )
F ^ env M = ( F ^ env M ( 4 ) , F ^ env M ( 5 ) , F ^ env M ( 6 ) , F ^ env M ( 7 ) )
F ^ env , 3 M = ( F ^ env M ( 8 ) , F ^ env M ( 9 ) , F ^ env M ( 10 ) , F ^ env M ( 11 ) )
And resolve according to high-frequency energy resolution unit 2222 and to obtain high-frequency energy
Figure BDA0000131700020000258
High frequency temporal envelope and frequency domain envelope code stream are decoded, obtain decoded high frequency temporal envelope
Figure BDA0000131700020000259
With the frequency domain envelope
Figure BDA00001317000200002510
The specific implementation step is as follows:
T ^ env ( i ) = T ^ env M ( i ) + M ^ T ; ( i = 0,1 , &CenterDot; &CenterDot; &CenterDot; , 15 ) - - - ( 13 )
F ^ env ( j ) = F ^ env M + M ^ T ; ( j = 0,1 , &CenterDot; &CenterDot; &CenterDot; , 11 ) - - - ( 14 )
When G14, low frequency LSP and high frequency and frequency domain envelope vectors combination
When low frequency LSP and high frequency and 10 dimension LSP of each speech frame of respectively code stream analyzing unit, broadband 22 being parsed of frequency domain envelope vectors assembled unit, 16 dimension temporal envelopes
Figure BDA00001317000200002513
And the frequency domain envelope of 12 dimensions
Figure BDA0000131700020000261
According to 10 tieing up LSP before this, be 16 dimension temporal envelopes again
Figure BDA0000131700020000262
The frequency domain envelope of 12 dimensions at last
Figure BDA0000131700020000263
Order form the vector of one 38 dimension;
G15, vector classification
The method that vector taxon 232 adopts dynamic clusterings is with LEN 38 n dimensional vector ns of ading up to of the output of low frequency LSP and high frequency temporal envelope and frequency domain envelope vectors assembled unit 2231, low frequency LSP with 10 dimensions classifies as clustering object, obtains the result of vector classification;
G16, code book generate
The method that code book generation unit 233 utilizes respectively method that arithmetic is averaging and weighting to be averaging is asked for the barycenter vectors of front 10 dimension LSP and the barycenter vector of rear 28 dimension high frequency temporal envelopes and frequency domain envelope, is implemented as follows:
G161, low frequency code book generate
The method that low frequency code book generation unit 2331 utilizes arithmetic to be averaging, the average of the front 10 n dimensional vector n LSP of each class in the difference compute vectors classification results, the result who tries to achieve is such barycenter vector, and the barycenter vector of each class is namely obtained the low frequency code book by rows;
G162, high frequency code book generate
The method that high frequency code book generation unit 2332 utilizes weighting to be averaging, rear 28 dimension temporal envelope and the frequency domain envelope barycenter vectors of each class in the classification results of compute vectors taxon 232 outputs; The method of utilizing before this arithmetic to be averaging is obtained respectively the average of each all vector of class as such initial barycenter vector, then obtain the distance of each vector and place class barycenter vector, ask the method for barycenter to obtain new barycenter with weighting again, whether 1 norm of judging initial barycenter satisfies threshold requirement with the absolute value of 1 norm relative mistake of new barycenter, make then that new barycenter is initial barycenter if do not satisfy, ask the algorithm of barycenter to obtain new barycenter with identical weighting again, iteration is until the absolute value of the two 1 norm relative mistake withdraws from iteration when satisfying threshold requirement successively, and with the barycenter of this barycenter as this type of; The barycenter vector of all classes is obtained and low frequency code book high frequency code book one to one by rows; Concrete methods of realizing is as follows:
G1621, initial barycenter vector calculate
The method that initial barycenter vector computing unit utilizes first simple arithmetic to be averaging, during the rear 28 dimension high frequency of each class and the initial barycenter of frequency domain envelope, computing formula is as follows in the classification results of compute vectors taxon 232 outputs:
arver 0 [ ind [ j ] ] [ k ] = 1 n &Sigma; j = 0 n x [ j ] [ k ] , k = 1,2 , &CenterDot; &CenterDot; &CenterDot; , 28 - - - ( 15 )
In this computing formula, n is the vector number in a certain class, x[j] [k] j high frequency temporal envelope of expression and frequency domain envelope vectors, ind[j] represent vector x[j] and the class at [k] place, aver0[ind[j]] [k] represent ind[j] the initial barycenter vector of class;
The calculating of G1622, vector and its place class barycenter vector distance
The computing unit 23322 of vector and its place class barycenter vector distance is obtained respectively the distance of each vector and place class barycenter vector, and computing formula is as follows:
dist [ j ] = &Sigma; k = 0 M ( x [ j ] [ k ] - aver 0 [ ind [ j ] ] [ k ] ) 2 , k = 1,2 , &CenterDot; &CenterDot; &CenterDot; , 28 - - - ( 16 )
Dist[j in this computing formula] expression x[j] distance of [k] and place class barycenter vector;
G1623, new barycenter vector calculate
The method that new barycenter vector computing unit 23323 usefulness weightings are averaging is obtained new barycenter vector, and computing formula is as follows:
w [ i ] = &Sigma; ind [ j ] = i 1 dist [ j ] - - - 17
aver [ i ] [ k ] = &Sigma; k = 0 M x [ j ] [ k ] w [ i ] &times; 1 dist [ j ] , k = 1,2 , &CenterDot; &CenterDot; &CenterDot; , 28 - - - 18
W[i in this unit] represent used vector and barycenter vector distance inverse in such and; Aver[i] the new barycenter vector of [k] expression i class;
G1624, new barycenter and initial barycenter vector 1 norm calculation
New barycenter vector and initial barycenter vector 1 norm calculation unit 23324 calculate 1 norm between new barycenter vector and the initial barycenter vector, and computing formula is as follows:
sum 0 = &Sigma; k = 0 M | aver 0 [ i ] [ k ] |
sum = &Sigma; k = 0 M | aver [ i ] [ k ] | - - - 19
Sum0 and sum represent respectively 1 norm of initial barycenter vector and new barycenter vector;
G1625, judgement
Whether 1 norm that judging unit 23325 is judged initial barycenter satisfies threshold requirement with the absolute value of 1 norm relative mistake of new barycenter, and computing formula is as follows:
| sum 0 - sum | sum &le; 10 - 3 - - - 20
When threshold requirement does not satisfy, make aver0[i] [k]=aver[i] [k], and repeating step G1622-G1625, until the barycenter vector of all classification is when all satisfying threshold requirement, no longer repeat, the barycenter vector of this moment is the barycenter vector of classification, and these barycenter vectors form the high frequency code book;
The training of G2, energy mapped function relation
Energy mapping function training unit 24 receives the low frequency energy of the i speech frame of low frequency code stream analyzing unit 221 outputs
Figure BDA0000131700020000281
High-frequency energy with 222 outputs of high frequency code stream analyzing unit
Figure BDA0000131700020000282
Utilize least square fitting to go out to add up to funtcional relationship between the low-and high-frequency energy of LEN frame
Figure BDA0000131700020000283
The specific implementation step is as follows:
c = ( 1 LEN &Sigma; i = 0 LEN - 1 E x i M T i ) - ( 1 LEN &Sigma; i = 0 LEN - 1 E x i ) ( 1 LEN &Sigma; i = 0 LEN - 1 M T i ) 1 LEN &Sigma; i = 0 LEN - 1 ( E x i ) 2 - ( 1 LEN &Sigma; i = 0 LEN - 1 E x i ) 2 - - - ( 21 )
d = [ 1 LEN &Sigma; i = 0 LEN - 1 ( E x i ) 2 ] ( 1 LEN &Sigma; i = 0 LEN - 1 M T i ) - ( 1 LEN &Sigma; i = 0 LEN - 1 E x i ) ( 1 LEN &Sigma; i = 0 LEN - 1 E x i M T i ) 1 LEN &Sigma; i = 0 LEN - 1 ( E x i ) 2 - ( 1 LEN &Sigma; i = 0 LEN - 1 E x i ) 2 - - - ( 22 ) .
Test result of the present invention is as follows:
In order to verify the validity of the inventive method, we have carried out computer simulation experiment.In experiment, the broadband code stream that expands after decoding G.729.1, is obtained broadband voice, then these voice are carried out objective and subjective testing, wherein the objective examination adopts Spectrum Distortion Measure and sound spectrograph, and subjective testing adopts the in the world measuring method of general Mean Opinion Score (MOS).
1, a kind of objective examination who the arrowband code stream is converted to broadband code stream device
The present invention carries out the objective examination with Spectrum Distortion Measure to the present invention.Spectrum Distortion Measure is defined as
fac [ k ] = 4 N &Integral; &pi; 2 &pi; 20 log 10 ( | A org k ( e j&omega; ) | | A post k ( e j&omega; ) | ) d&omega;
D HC = 1 k &Sigma; k = 1 K &Integral; &pi; 2 &pi; ( 20 log 10 | A org k ( e j&omega; ) | | A post k ( e j&omega; ) | - fac [ k ] ) 2 d&omega;
Fac[k wherein] be gain compensation factor,
Figure BDA0000131700020000288
The envelope of original wideband voice K frame,
Figure BDA0000131700020000289
Be the broadband voice of narrowband speech after 2 times of interpolation (mend 0) or the k frame envelope of the broadband voice that obtains of expansion.In experiment, experiment parameter is: used voice of training stage are from the TIMIT speech database, and the duration of broadband voice is 20s, and sampling rate is 16KHz.It is that 200s, sampling rate are that narrowband speech and the duration corresponding with it of 8KHz is that 200s, sampling rate are the broadband voice of 16KHz that the used voice of test phase are respectively duration.
The voice that the broadband code stream that the inventive method expansion is obtained obtains after demoder decoding G.729.1 and without the arrowband code stream of expansion through decoded voice G.729, calculate respectively its Spectrum Distortion Measure, the result is shown in table 1,2.
Table 1 speech manual distortion measurement result 1
Figure BDA0000131700020000291
Table 2 speech manual distortion measurement result 2
From speech manual distortion measurement result of the present invention as seen, the speech manual distortion obviously reduces behind the broadband code stream decoding that the present invention expands.
Figure 17-24 pair different phonetic is drawn respectively the sound spectrograph of broadband voice of sound spectrograph, the inventive method expansion of its original narrowband speech.
The sound spectrograph of the broadband voice of the inventive method expansion from four groups of sound spectrographs and the sound spectrograph of original narrowband speech can find out that the HFS of the broadband voice that the present invention recovers obviously increases.Can find out that from sound spectrograph the present invention can recover the corresponding HFS of narrow band signal exactly, thereby realize the conversion of arrowband code stream to the broadband code stream.
2, the subjective testing of effect of the present invention
The present invention adopts mean opinion score (MOS) method to carry out subjective testing.In test process, invite the personage of 40 different majors, in the complete unwitting situation to content measurement, be that 200s, sampling rate are that the duration of the narrowband speech of 8KHz and the expansion corresponding with it is that 200s, sampling rate are that the broadband voice of 16KHz is tested to two groups from TIMIT speech database duration.Test result is respectively shown in table 3, table 4.
Table 3 subjective testing result 1
Voice 1 The MOS score
Original 8KHz voice 3.02
The 16KHz voice of the inventive method expansion 3.95
Table 4 subjective testing result 2
Voice 2 The MOS score
Original 8KHz voice 3.03
The 16KHz voice of the inventive method expansion 3.93
From voice subjective testing result of the present invention as seen, the broadband code stream decoding that the present invention the expands MOS that obtains voice divides the voice MOS that obtains with original arrowband code stream decoding to divide to compare, obviously improved.As seen this invention can improve the quality of communication speech.
The used clustering method of vector classification adopts among the present invention is C-mean algorithm in the dynamic clustering.List of references is: Bian Zhaoqi, Zhang Xuegong etc., " pattern-recognition (second edition) ", publishing house of Tsing-Hua University.

Claims (1)

1. an arrowband code stream is converted to the conversion equipment of broadband code stream, comprise expanding element (1) and training unit (2), it is characterized in that: described training unit (2) provides expansion work required mapping relations for expanding element (1), only moves once before expanding element (1) work " off-line ";
Described expanding element (1) comprises arrowband code stream separative element (11), code stream analyzing unit, arrowband (12), arrowband energy calculation unit (13), codebook mapping unit (14), Function Mapping unit (15), high frequency temporal envelope and frequency domain envelope coding unit (16), high-frequency energy coding unit (17), code stream synthesis unit (18) and high-frequency energy decoding unit (19), the input end of described arrowband code stream separative element (11) is inputted G.729 arrowband code stream, and output terminal links to each other with the input end of code stream analyzing unit, arrowband (12); The output terminal of the input end of code stream analyzing unit, described arrowband (12) and arrowband code stream separative element (11) links to each other, its output terminal is connected 13 with codebook mapping unit (14) with the arrowband energy calculation unit respectively) be connected; The input end of described codebook mapping unit (14) links to each other with the output terminal of code stream analyzing unit, arrowband (12) and receives the mapping code book that training unit (2) provides, and its output terminal links to each other with the input end of high frequency temporal envelope and frequency domain envelope coding unit (16); Described arrowband energy calculation unit (13) is connected 17 through Function Mapping unit (15) with the high-frequency energy coding unit) be connected with code stream synthesis unit (18); The mapping function that output terminal links to each other and the unit of undergoing training (2) provide of the input end of described Function Mapping unit (15) and arrowband energy calculation unit (13); One end of described high frequency temporal envelope and frequency domain envelope coding unit (16) is connected with codebook mapping unit (14), its other end is connected with code stream synthesis unit (18); The output terminal of the input end function map unit (15) of described high-frequency energy coding unit (17) links to each other, and output terminal links to each other with the input end of code stream synthesis unit (18) and high-frequency energy decoding unit (19) respectively; The output terminal of described high-frequency energy decoding unit (19) links to each other with high frequency temporal envelope and frequency domain envelope coding unit (16); The output terminal of described code stream synthesis unit (18) is exported G.729.1 broadband code stream;
Code stream analyzing unit, described arrowband (12) comprises LSP reconstruction unit (121), reflection coefficient reconstruction unit (122), residual energy reconstruction unit (123), and the input end of described LSP reconstruction unit (121) links to each other with the output terminal of arrowband code stream separative element (11), output terminal links to each other with the input end of codebook mapping unit (14) input end and reflection coefficient reconstruction unit (122); The output terminal of described reflection coefficient reconstruction unit (122) links to each other with the input end of arrowband energy calculation unit (13), and the input end of described residual energy reconstruction unit (123) links to each other with the output terminal of arrowband code stream separative element (11), its output terminal links to each other with the input end of arrowband energy calculation unit (13); Described LSP is the abbreviation of line spectrum pair Line spectrum paris;
Described LSP reconstruction unit (121) comprises LSP quantization parameter reconstruction unit (1211), LSP quantization parameter reset cell (1212), present frame LSP quantization parameter reconstruction unit (1213) and present frame LSP quantization parameter filter unit (1214), and the input end of described LSP quantization parameter reconstruction unit (1211) links to each other with the output terminal of broadband code stream separative element (21), its output terminal links to each other with the input end of LSP quantization parameter reset cell (1212); The input end of described LSP quantization parameter reset cell (1212) links to each other with the output terminal of LSP quantization parameter reconstruction unit (1211), its output terminal links to each other with the input end of present frame LSP quantization parameter reconstruction unit (1213); The output terminal of described present frame LSP quantization parameter reconstruction unit (1213) links to each other with the input end of present frame LSP quantization parameter filter unit (1214); The output terminal of described present frame LSP quantization parameter filter unit (1214) links to each other with the input end of codebook mapping unit (14) and the input end of reflection coefficient reconstruction unit (122);
Described reflection coefficient reconstruction unit (122) comprises that LSP converts linear predictor coefficient unit (1221), linear predictor coefficient to reflection coefficient converting unit (1222); The input end that LSP converts linear predictor coefficient unit (1221) to links to each other with the output terminal of LSP reconstruction unit (121), and output terminal links to each other with the input end of linear predictor coefficient to reflection coefficient converting unit (1222); Linear predictor coefficient links to each other with the output terminal that LSP converts linear predictor coefficient unit (1221) to the input end of reflection coefficient converting unit (1222), and output terminal links to each other with arrowband energy calculation unit (13);
Described residual energy computing unit (1233) comprises fixed codebook gain resolution unit (1231), self-adapting code book gain resolution unit (1232), residual energy computing unit (1233); Fixed codebook gain resolution unit (1231) all links to each other with the output terminal of broadband code stream separative element (21) with the input end of self-adapting code book gain resolution unit (1232), its output terminal all links to each other with the input end of residual energy computing unit (1233); The output terminal of described residual energy computing unit (1233) links to each other with the input end of arrowband energy calculation unit (13);
Described high frequency temporal envelope and frequency domain envelope coding unit (16) comprise that temporal envelope goes DC component unit (161), temporal envelope 2 division unit (163), frequency domain envelope to remove DC component unit (162), frequency domain envelope 3 division unit (164), temporal envelope coding unit (165) and frequency domain envelope coding units (166); Described temporal envelope goes DC component unit (161) and frequency domain envelope to go the input end of DC component unit (162) all to link to each other with codebook mapping unit (14), all link to each other with high-frequency energy decoding unit (19) again simultaneously, and its output terminal links to each other with the input end of temporal envelope 2 division unit (163) and frequency domain envelope 3 division unit (164) respectively; The output terminal of described temporal envelope 2 division unit (163) and frequency domain envelope 3 division unit (164) all links to each other with code stream synthesis unit (18);
Described training unit (2) comprises broadband code stream separative element (21), code stream analyzing unit, broadband (22), mapping code book training unit (23) and energy mapping function training unit (24); The input end of described broadband code stream separative element (21) is inputted G.729.1 broadband code stream sample, and its output terminal links to each other with the input end of code stream analyzing unit, broadband (22); The output terminal of code stream analyzing unit, described broadband (22) links to each other with the input end of mapping code book training unit (23) and the input end of energy mapping function training unit (24) respectively; Described mapping code book training unit (23) provides the mapping code book for expanding element (1), and energy mapping function training unit (24) provides mapping function for expanding element (1);
Code stream analyzing unit, described broadband (22) comprises low frequency code stream analyzing unit (221) and high frequency code stream analyzing unit (222), the input end of described low frequency code stream analyzing unit (221) links to each other with the output terminal of broadband code stream separative element (21), and its output terminal links to each other with the input end of mapping code book training unit (23) and the input end of energy mapping function training unit (24) respectively; The input end of described high frequency code stream analyzing unit (222) links to each other with the output terminal of broadband code stream separative element (21), and its output terminal links to each other with the input end of mapping code book training unit (23) and the input end of energy mapping function training unit (24) respectively;
The composition of the low frequency code stream analyzing unit (221) of described training unit (2) and the code stream analyzing unit, arrowband (12) of the same expanding element of connected mode (1);
Described high frequency code stream analyzing unit (222) comprises high frequency temporal envelope and frequency domain envelope resolution unit (2221) and high-frequency energy resolution unit (2222), and the input end of described high frequency temporal envelope and frequency domain envelope resolution unit (2221) links to each other with the output terminal of the output terminal of broadband code stream separative element (21) and high-frequency energy resolution unit (2222), its output terminal links to each other with the input end of mapping code book training unit (23); The input end of described high-frequency energy resolution unit (2222) links to each other with the output terminal of broadband code stream separative element (21), its output terminal links to each other with the input end of high frequency temporal envelope and frequency domain envelope resolution unit (2221) and the input end of energy mapping function training unit (24) respectively;
Described mapping code book training unit (23) comprises low frequency LSP and high frequency temporal envelope and frequency domain envelope vectors assembled unit (231), vector taxon (232) and code book generation unit (233), and the input end of described low frequency LSP and high frequency temporal envelope and frequency domain envelope vectors assembled unit (231) links to each other with the output terminal of code stream analyzing unit, broadband (22), its output terminal links to each other with the input end of vector taxon (232); The output terminal of described vector taxon (232) links to each other with the input end of code book generation unit (233); The output terminal output mapping code book of described code book generation unit (233);
Described code book generation unit (233) comprises low frequency code book generation unit (2331) and high frequency code book generation unit (2332), the input end of described low frequency code book generation unit (2331) and high frequency code book generation unit (2332) all links to each other with vector taxon (232), and its output terminal is exported respectively mapping code book medium and low frequency code book and high frequency code book;
Described high frequency code book generation unit (2332), comprise initial barycenter vector calculating/updating block (23321), the computing unit (23322) of vector and its place class barycenter vector distance, new barycenter vector computing unit (23323), new barycenter and initial barycenter vector 1 norm calculation unit (23324) and judging unit (23325), the input end of described initial barycenter vector calculating/updating block (23321) input high frequency temporal envelope and frequency domain envelope data also are connected with the output terminal of judging unit (23325), the input end of the input end of the computing unit (23322) of its output terminal difference connected vector and its place class barycenter vector distance and new barycenter and initial barycenter vector 1 norm calculation unit (23324), described vector is connected with the input end of new barycenter vector computing unit (23323) with the output terminal of the computing unit (23322) of its place class barycenter vector distance, the output terminal of described new barycenter vector computing unit (23323) and new barycenter and be connected barycenter vector 1 norm calculation unit (23324) and be connected, the input end of described judging unit (23325) and new barycenter be connected barycenter vector 1 norm calculation unit (23324) and be connected, its output terminal is exported high frequency code book and is connected with initial barycenter vector calculating/updating block (23321).
CN2012100141176A 2012-01-17 2012-01-17 Conversion device for converting narrowband code streams into broadband code streams Expired - Fee Related CN102543089B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012100141176A CN102543089B (en) 2012-01-17 2012-01-17 Conversion device for converting narrowband code streams into broadband code streams

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012100141176A CN102543089B (en) 2012-01-17 2012-01-17 Conversion device for converting narrowband code streams into broadband code streams

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN201310033941.0A Division CN103093757B (en) 2012-01-17 2012-01-17 Conversion method for conversion from narrow-band code stream to wide-band code stream

Publications (2)

Publication Number Publication Date
CN102543089A CN102543089A (en) 2012-07-04
CN102543089B true CN102543089B (en) 2013-04-17

Family

ID=46349827

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012100141176A Expired - Fee Related CN102543089B (en) 2012-01-17 2012-01-17 Conversion device for converting narrowband code streams into broadband code streams

Country Status (1)

Country Link
CN (1) CN102543089B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103413557B (en) * 2013-07-08 2017-03-15 深圳Tcl新技术有限公司 The method and apparatus of speech signal bandwidth extension
CN103457703B (en) * 2013-08-27 2017-03-01 大连理工大学 A kind of code-transferring method G.729 arriving AMR12.2 speed
CN105374359B (en) * 2014-08-29 2019-05-17 中国电信股份有限公司 The coding method and system of voice data
CN104715756A (en) * 2015-02-10 2015-06-17 百度在线网络技术(北京)有限公司 Audio data processing method and device
CN105070293B (en) * 2015-08-31 2018-08-21 武汉大学 Audio bandwidth expansion coding-decoding method based on deep neural network and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1750124A (en) * 2004-09-17 2006-03-22 哈曼贝克自动系统股份有限公司 Bandwidth extension of band limited audio signals
CN101236745A (en) * 2007-01-12 2008-08-06 三星电子株式会社 Method, apparatus, and medium for bandwidth extension encoding and decoding
CN101521014A (en) * 2009-04-08 2009-09-02 武汉大学 Audio bandwidth expansion coding and decoding devices

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101171098B1 (en) * 2005-07-22 2012-08-20 삼성전자주식회사 Scalable speech coding/decoding methods and apparatus using mixed structure

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1750124A (en) * 2004-09-17 2006-03-22 哈曼贝克自动系统股份有限公司 Bandwidth extension of band limited audio signals
CN101236745A (en) * 2007-01-12 2008-08-06 三星电子株式会社 Method, apparatus, and medium for bandwidth extension encoding and decoding
CN101521014A (en) * 2009-04-08 2009-09-02 武汉大学 Audio bandwidth expansion coding and decoding devices

Also Published As

Publication number Publication date
CN102543089A (en) 2012-07-04

Similar Documents

Publication Publication Date Title
CN103093757B (en) Conversion method for conversion from narrow-band code stream to wide-band code stream
CN108447495B (en) Deep learning voice enhancement method based on comprehensive feature set
JP2956548B2 (en) Voice band expansion device
CN101140759B (en) Band-width spreading method and system for voice or audio signal
EP3336843B1 (en) Speech coding method and speech coding apparatus
CN102543089B (en) Conversion device for converting narrowband code streams into broadband code streams
CN102652336B (en) Speech signal restoration device and speech signal restoration method
RU2463674C2 (en) Encoding device and encoding method
CN103050121A (en) Linear prediction speech coding method and speech synthesis method
CN101207459A (en) Method and device of signal processing
GB2560174A (en) A feature extraction system, an automatic speech recognition system, a feature extraction method, an automatic speech recognition method and a method of train
CN103714822B (en) Sub-band coding and decoding method and device based on SILK coder decoder
JPH10319996A (en) Efficient decomposition of noise and periodic signal waveform in waveform interpolation
CN1424712A (en) Method for encoding 2.3kb/s harmonic wave excidted linear prediction speech
US20050114123A1 (en) Speech processing system and method
Qian et al. Combining equalization and estimation for bandwidth extension of narrowband speech
US5819224A (en) Split matrix quantization
US7493255B2 (en) Generating LSF vectors
CN104517614A (en) Voiced/unvoiced decision device and method based on sub-band characteristic parameter values
CN101770777B (en) LPC (linear predictive coding) bandwidth expansion method, device and coding/decoding system
CN113066483B (en) Sparse continuous constraint-based method for generating countermeasure network voice enhancement
JP4578145B2 (en) Speech coding apparatus, speech decoding apparatus, and methods thereof
Jax et al. An embedded scalable wideband codec based on the GSM EFR codec
CN111243608A (en) Low-rate speech coding method based on depth self-coding machine
Sakka et al. Using geometric spectral subtraction approach for feature extraction for DSR front-end Arabic system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130417

Termination date: 20160117

EXPY Termination of patent right or utility model