CN102543089A - Conversion device for converting narrowband code streams into broadband code streams and conversion method thereof - Google Patents

Conversion device for converting narrowband code streams into broadband code streams and conversion method thereof Download PDF

Info

Publication number
CN102543089A
CN102543089A CN2012100141176A CN201210014117A CN102543089A CN 102543089 A CN102543089 A CN 102543089A CN 2012100141176 A CN2012100141176 A CN 2012100141176A CN 201210014117 A CN201210014117 A CN 201210014117A CN 102543089 A CN102543089 A CN 102543089A
Authority
CN
China
Prior art keywords
unit
code stream
frequency
vector
env
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.)
Granted
Application number
CN2012100141176A
Other languages
Chinese (zh)
Other versions
CN102543089B (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

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

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 converts the conversion equipment and the conversion method thereof of broadband code stream into
Technical field
The present invention relates to a kind of communication technology, particularly a kind of arrowband code stream converts the conversion equipment and the conversion method thereof of broadband code stream into.
Background technology
Language is the main carrier 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 being supported 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 code rate as far as possible, reducing aspect such as tonequality loss and consider, (0.05~7KHz) voice coding research remains focus to be primarily aimed at 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 big to code stream form, code rate etc.; There is not to consider compatibility to 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 under the situation of broadband voice transmission standard at transmission terminal, receiving terminal and communication network.The upgrading of communication network is a complicacy, very long, progressive process, and the quality that how under the existing network transmission conditions, to obtain broadband voice as early as possible just becomes a realistic problem that needs to be resolved hurrily.Artificial speech bandwidth extended mode is undoubtedly an effective solution of this problem.So-called artificial speech bandwidth expansion is a process of only utilizing the information of narrowband speech to rebuild broadband voice.
Along with the raising and the wideband speech coding development of technology of processor speed, since the 1980's Mos and nineteen ninety for the initial stage people bandwidth extended 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 the sound signal after spectrum folding produces spectrum folding at least a portion of narrowband audio signal earlier; In the noise signal of the sound signal at least a portion behind the spectrum folding being carried out after noise shaping produces shaping, merge into broadband signal through noise signal and the sound signal behind the spectrum folding of combiner after at last with shaping.This programme is characterised in that through 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 the spectrum envelope of the high frequency component signal in analog voice or the sound signal earlier; 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 extended method and device thereof.In this scheme, earlier one section time-domain signal is divided into HFS and low frequency part through pre-service, and transforms to frequency domain, calculate bandwidth expansion desired parameters, and then realize the bandwidth expansion.
Such scheme all need carry out the bandwidth expansion after the arrowband code stream complete decoding with transmission again; And back two technology have also related to time-frequency conversion; So the calculated amount of these schemes and system's time delay are all bigger; Processing cost rising, tonequality are descended, even can't use fully in dense process systems such as WMGs.
Summary of the invention
Be to solve the problems referred to above that prior art exists, the present invention will design and a kind ofly not only can improve the narrowband speech communication quality but also can reduce algorithm operation quantity and the arrowband code stream of system's time delay converts the conversion equipment and the conversion method of broadband code stream into.
To achieve these goals, technical scheme of the present invention is following:
A kind of arrowband code stream converts the conversion equipment of broadband code stream into, comprises expanding element and training unit, and described training unit is that expanding element provides expansion work required mapping relations, only before expanding element work, moves once " off-line ".
Described expanding element comprises arrowband code stream separative element, code stream analyzing unit, arrowband, arrowband energy calculation unit, code book map 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 imported 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 code book map unit respectively.The input end of described code book map 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 code book map unit, its other end is connected with the code stream synthesis unit.The output terminal of the input end and 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 code book map 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 code book map 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 unit.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 code book map 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 imported 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 is that expanding element provides the mapping code book, and energy mapping function training unit is that expanding element provides mapping function.
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 mapping code book medium and low frequency code book and high frequency code book respectively.
Described high frequency code book generation unit; Comprise the computing unit of initial barycenter vector calculating/updating block, 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; During the input end of described initial barycenter vector calculating/updating block input high frequency, frequency domain envelope data and be connected with the output terminal of judging unit; Its output terminal connects input end and the newly barycenter and the initially input end of barycenter vector 1 norm calculation unit of the computing unit of vector and its place class barycenter vector distance respectively; 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 is connected with initial barycenter vector 1 norm calculation unit with new barycenter, and the input end of described judging unit and new barycenter are with initially barycenter vector 1 norm calculation unit is connected, its output terminal is exported high frequency code book and be connected with initial barycenter vector calculating/updating block.
A kind of arrowband code stream converts the conversion method of the device of broadband code stream into; 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 promptly carried out the training of arrowband code stream required transformational relation when converting the broadband code stream to; After accomplishing training, carry out the arrowband code stream again 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 through the code book search, and concrete performing step is following:
A21, LSP quantization parameter are rebuild
LSP quantization parameter reconstruction unit parses concrete the realization as follows of quantification output of LSP according to L0, L1, L2, L3:
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, accomplishes the replacement of LSP quantization parameter, the concrete realization 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 interior the inserting of LSP quantization parameter interpolation unit output reconstructs the LSP quantization parameter q of current m frame i m, the concrete realization 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,
Figure BDA0000131700020000067
Figure BDA0000131700020000068
is the coefficient of running mean fallout predictor when m<0, 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 specifically realized as follows according to LSP quantization parameter
Figure BDA0000131700020000069
filtering operation of the present frame of present frame LSP quantization parameter reconstruction unit output:
A241, according to the ascending order of i is arranged
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 accomplishes 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, accomplish reflection coefficient k iReconstruction, the concrete realization 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, the concrete realization 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, the concrete realization as follows:
g ^ c = g ` ^ c ( yA 2 ( GA 2 ) + yB 2 ( GB 2 ) ) - - - ( 6 )
Wherein
Figure BDA0000131700020000082
Be the fixed codebook gain of prediction, yA 1And yA 2Be the 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 the 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, the concrete realization as follows:
E i = ( g p ^ ) 2 + ( g c ^ ) 2 - - - ( 7 )
B, code book mapping
The code book map unit expands to high frequency speech frame temporal envelope and frequency domain envelope with each narrowband speech frame LSP, and concrete grammar is following:
The narrowband speech frame LSP that the code book map unit obtains the narrowband speech code stream decoding carries out low frequency code book search, obtains the row number at its code word place, and in the high frequency code book data of output this journey as the high frequency temporal envelope and the frequency domain envelope of correspondence.
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 type; N barycenter vector promptly 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 and the minimum code word of input vector error, replacing input vector and export code word place row with 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
The concrete realization 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 pairing HFS energy.
E, coding
E1, high-frequency energy coding
The high-frequency energy coding unit is accomplished the high-frequency energy M that the Function Mapping unit maps goes out TCoding, be specially: at log-domain is that step-length is to M with 3dB 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 code stream decoding that the high-frequency energy decoding unit is exported the high-frequency energy coding unit, the high-frequency energy
Figure BDA0000131700020000091
after quantizing before obtaining encoding
E22, temporal envelope go DC component
What temporal envelope went that the high-frequency energy
Figure BDA0000131700020000092
of DC component unit by using high-frequency energy decoding unit output accomplishes the high frequency temporal envelope goes DC component work, the concrete realization 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
What the frequency domain envelope went that high-frequency energy
Figure BDA0000131700020000095
high-frequency energy
Figure BDA0000131700020000096
of DC component unit by using high-frequency energy decoding unit output accomplishes high frequency frequency domain envelope goes DC component work, the concrete realization 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, specifically realize 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, specifically realize 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, back 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, back 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, code book mapping relations
Mapping code book training unit before expanding element work earlier to a frame number be LEN, duration be 180 minutes broadband voice code stream sample the decoding of code stream analyzing cell mesh obtains low frequency LSP and corresponding high frequency temporal envelope and frequency domain envelope through the broadband, then through low frequency LSP and high frequency temporal envelope and frequency domain envelope vectors assembled unit, vector taxon and code book generation unit generation code book map unit needed two low frequency code book and high frequency code books one to one.
G11, broadband code stream separate
Broadband code stream separative element is separated the preceding 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 preceding 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
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 in corresponding code book, search corresponding vector
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, specifically performing step is following to obtain decoded high frequency temporal envelope and frequency domain envelope
Figure BDA00001317000200001110
:
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 the combination of frequency domain envelope vectors
When low frequency LSP and high frequency and the frequency domain envelope
Figure BDA00001317000200001114
of 10 dimension LSP, 16 dimension temporal envelopes
Figure BDA00001317000200001113
and 12 dimensions of each speech frame of respectively broadband code stream analyzing unit resolves being gone out of frequency domain envelope vectors assembled unit according to 10 dimension LSP before this, be that 16 dimension temporal envelopes
Figure BDA00001317000200001115
are the vector that the order of the frequency domain envelope
Figure BDA00001317000200001116
of 12 dimensions is formed one 38 dimension at last again;
G15, vector classification
The method that the vector taxon adopts dynamic clustering adds up to 38 individual n dimensional vector ns of LEN with 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 the cluster object, obtains the vector sorting result.
G16, code book generate
The code book generation unit utilizes arithmetic to ask average method and weighting to ask average method to ask for the barycenter vector of preceding 10 dimension LSP and the barycenter vector of back 28 dimension high frequency temporal envelopes and frequency domain envelope, the concrete realization as follows respectively:
G161, low frequency code book generate
Low frequency code book generation unit utilizes arithmetic to ask average method, the average of the preceding 10 n dimensional vector n LSP of each type in the compute vectors classification results respectively, and the result who is tried to achieve is such barycenter vector, and the barycenter vector of each type is promptly obtained the low frequency code book by rows.
G162, high frequency code book generate
High frequency code book generation unit utilizes weighting to ask average method, the back 28 dimension temporal envelope and the frequency domain envelope barycenter vectors of each type in the classification results of compute vectors taxon output.Utilized arithmetic to ask average method to obtain the initial barycenter vector of the average of all vectors of each type respectively before this as such; Obtain each vector then and belong to type distance of 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, makes then that new barycenter is initial barycenter if do not satisfy, and asks the algorithm of barycenter to obtain new barycenter with identical weighting again; Iteration withdraws from iteration when the absolute value of the two 1 norm relative mistake satisfies threshold requirement successively, and with the barycenter of this barycenter as this type of.The barycenter vector of all types is obtained and low frequency code book high frequency code book one to one by rows.Concrete implementation method is following:
G1621, initial barycenter vector calculate
Initial barycenter vector computing unit utilizes simple arithmetic to ask average method earlier, and during the back 28 dimension high frequencies of each type and the initial barycenter of frequency domain envelope, computing formula is following 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 type, j high frequency temporal envelope of x [j] [k] expression and frequency domain envelope vectors, the class at ind [j] expression vector x [j] [k] place, aver0 [ind [j]] [k] expression ind [j] type initial barycenter vector.
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 each vector respectively and is belonged to type distance of barycenter vector, and computing formula is following:
dist [ j ] = &Sigma; k = 0 M ( x [ j ] [ k ] - aver 0 [ ind [ j ] ] [ k ] ) 2 , k = 1,2 , &CenterDot; &CenterDot; &CenterDot; , 28 - - - ( 16 )
Dist in this computing formula [j] expression x [j] [k] and a distance that belongs to class barycenter vector.
G1623, new barycenter vector calculate
New barycenter vector computing unit asks average method to obtain new barycenter vector with weighting, and computing formula is following:
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 in this unit [i] represent used vector and barycenter vector distance in such reciprocal with.The new barycenter vector of aver [i] [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 following:
sum 0 = &Sigma; k = 0 M | aver 0 [ i ] [ k ] |
sum = &Sigma; k = 0 M | aver [ i ] [ k ] | - - - ( 19 )
Sum0 and sum represent 1 norm of initial barycenter vector and new barycenter vector respectively.
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 following:
| 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; When the barycenter vector of all classification all satisfies threshold requirement; No longer repeat, the barycenter vector of this moment is the barycenter vector of classification, and these barycenter vectors are formed the high frequency code book.
The training of G2, energy mapped function relation
Energy mapping function training unit receives low-frequency output stream analysis unit of the i-th speech frame frequency energy
Figure BDA0000131700020000137
and high-frequency output stream analysis unit frequency energy using the least squares fit of the total energy LEN frame between the high and low frequency function specific implementation steps are 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.In real world applications, then be embodied in: the arrowband code stream that can be directly the existing telephone communication network be transmitted through the present invention directly obtains broadband voice through decoding output G.729.1 promptly not to be needed the arrowband code stream decoding is obtained narrowband speech voice to be expanded again earlier, 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 the quality and the property understood that has significantly improved the narrowband speech that wide-band terminal receives on the existing telephone network basis; 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 the have relatively high expectations requirement of occasion of voice quality.
3, the present invention realizes through recovering temporal envelope, frequency domain envelope and energy the recovery of broadband code stream; Rather than adopt prior-art devices to realize through recovery spectrum envelope and pumping signal; Because between artificial excitation and the true excitation correlativity very a little less than; 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 is through behind the common G.729.1 decoder decode, and the sense of voice high frequency noise is not obvious, more near the auditory effect of original wideband voice.
4, the present invention need be to arrowband code stream complete decoding, coding obtains the broadband code stream fully then; Only need partial decoding of h; Promptly only need decoding to obtain arrowband LSP, reflection coefficient and residual energy; The high-frequency parameter that only needs coding to obtain, i.e. information such as direct coding high-frequency energy, high frequency temporal envelope and high frequency frequency domain envelope by the present invention's expansion.So the present invention has saved operand and the algorithm time delay of arrowband decoding and arrowband coding, operand be earlier fully the arrowband decode, after complete wideband encoding mode 30%, time delay reduced by 28.9375 milliseconds.
When 5, the present invention asks classification center to high frequency temporal envelope and frequency domain envelope, utilized the iteration weighting to ask average method, the method can effectively reduce the influence of the far base point of some off-center to barycenter, makes sorting technique 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 a 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 converts the broadband code stream into.
Fig. 5 is the expanding element synoptic diagram.
Fig. 6 is an arrowband code stream analyzing cell schematics.
Fig. 7 is a LSP reconstruction unit synoptic diagram.
Fig. 8 is a reflection coefficient reconstruction unit synoptic diagram.
Fig. 9 is a 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 a broadband code stream analyzing cell schematics.
Figure 13 is a high frequency code stream rebuilding module synoptic diagram.
Figure 14 is a mapping code book training unit synoptic diagram.
Figure 15 is a code book generation unit synoptic diagram.
Figure 16 is a 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, arrowband energy calculation unit, 14, the code book map unit, 15, the Function Mapping unit, 16, high frequency temporal envelope and frequency domain envelope coding unit; 17, 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, broadband code stream analyzing unit, 23, mapping code book training unit, 24, energy mapping function training unit, 121, the LSP reconstruction unit; 122, 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, and 1231, the fixed codebook gain resolution unit, 1232, self-adapting code book gain resolution unit; 1233, 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 converts the conversion equipment of broadband code stream into; Comprise expanding element 1 and training unit 2, described training unit 2 provides expansion work required mapping relations for expanding element 1, only before expanding element 1 is worked, moves once " off-line ";
Described expanding element 1 comprises arrowband code stream separative element 11, code stream analyzing unit, arrowband 12, arrowband energy calculation unit 13, code book map 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 imported 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 links to each other with the output terminal of arrowband code stream separative element 11, its output terminal is connected with arrowband energy calculation unit 13 with code book map unit 14 respectively; The input end of described code book map 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 code stream synthesis unit 18 with high-frequency energy coding unit 17 through Function Mapping unit 15; 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 code book map unit 14, its other end is connected with code stream synthesis unit 18; The output terminal of the input end and 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 code book map 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 code book map 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 unit 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 code book map 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 imported 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 mapping code book medium and low frequency code book and high frequency code book respectively;
Described high frequency code book generation unit 2332; Comprise the computing unit 23322 of initial barycenter vector calculating/updating block 23321, 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; During the input end of described initial barycenter vector calculating/updating block 23321 input high frequency, frequency domain envelope data and be connected with the output terminal of judging unit 23325; Its output terminal connects input end and the newly barycenter and the initially input end of barycenter vector 1 norm calculation unit 23324 of the computing unit 23322 of vector and its place class barycenter vector distance respectively; 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 is connected with initial barycenter vector 1 norm calculation unit 23324 with new barycenter, and the input end of described judging unit 23325 and new barycenter are with initially barycenter vector 1 norm calculation unit 23324 is connected, its output terminal is exported high frequency code book and be connected with initial barycenter vector calculating/updating block 23321.
A kind of arrowband code stream converts the conversion method of the device of broadband code stream into; 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 promptly carried out the training of arrowband code stream required transformational relation when converting the broadband code stream to; After accomplishing training, carry out the arrowband code stream again 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 reception arrowband code stream separative elements 11 isolated L0, L1, L2, L3, and obtain the LSP of arrowband through code book search, concrete performing step is following:
A21, LSP quantization parameter are rebuild
LSP quantization parameter reconstruction unit 1211 parses concrete the realization as follows of quantification output of LSP according to L0, L1, L2, L3:
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, accomplishes the replacement of LSP quantization parameter, the concrete realization 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 interior the inserting of LSP quantization parameter interpolation unit output reconstructs the LSP quantization parameter q of current m frame i m, the concrete realization 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,
Figure BDA0000131700020000208
is the coefficient of running mean fallout predictor when m<0, 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 specifically realized as follows according to LSP quantization parameter filtering operation of the present frame of present frame LSP quantization parameter reconstruction unit 1213 outputs:
A241, according to the ascending order of i is arranged
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 accomplishes 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, accomplish reflection coefficient k iReconstruction, the concrete realization 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, the concrete realization 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, the concrete realization as follows:
g ^ c = g ` ^ c ( yA 2 ( GA 2 ) + yB 2 ( GB 2 ) ) - - - ( 6 )
Wherein
Figure BDA0000131700020000223
Be the fixed codebook gain of prediction, yA 1And yA 2Be the 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 the 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, the concrete realization as follows:
E i = ( g p ^ ) 2 + ( g c ^ ) 2 - - - ( 7 )
B, code book mapping
Code book map unit 14 expands to high frequency speech frame temporal envelope and frequency domain envelope with each narrowband speech frame LSP, and concrete grammar is following:
The narrowband speech frame LSP that code book map unit 14 obtains the narrowband speech code stream decoding carries out low frequency code book search, obtains the row number at its code word place, and in the high frequency code book data of output this journey as the high frequency temporal envelope and the frequency domain envelope of correspondence;
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 type; N barycenter vector promptly 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 and the minimum code word of input vector error, replacing input vector and export code word place row with 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
The concrete realization 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 pairing HFS energy;
E, coding
E1, high-frequency energy coding
High-frequency energy coding unit 17 is accomplished Function Mapping unit 15 and is shone upon the high-frequency energy M that TCoding, be specially: at log-domain is that step-length is to M with 3dB 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 code stream decoding that high-frequency energy decoding unit 19 is exported high-frequency energy coding unit 17, the high-frequency energy
Figure BDA0000131700020000233
after quantizing before obtaining encoding
E22, temporal envelope go DC component
What temporal envelope went that DC component unit 161 utilizes that the high-frequency energy
Figure BDA0000131700020000234
of high-frequency energy decoding unit 19 output accomplishes the high frequency temporal envelope goes DC component work, the concrete realization 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
What the frequency domain envelope went that DC component unit 162 utilizes that high-frequency energy
Figure BDA0000131700020000237
high-frequency energy of high-frequency energy decoding unit 19 output accomplishes high frequency frequency domain envelope goes DC component work, the concrete realization 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, specifically realize 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, specifically realize 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, back 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, back 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, code book mapping relations
Mapping code book training unit 23 before expanding element 1 work earlier to a frame number be LEN, duration be 180 minutes broadband voice code stream sample code stream analyzing unit 22 partial decoding of h obtain low frequency LSP and corresponding high frequency temporal envelope and frequency domain envelope through the broadband, then 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 generation code book map unit 14 needed two low frequency code book and high frequency code books one to one;
G11, broadband code stream separate
Broadband code stream separative element 21 is separated the preceding 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 preceding 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
Figure BDA0000131700020000251
with broadband code stream separative element 21 isolated MU codeword decodings
G132, high frequency time domain and frequency domain envelope are resolved
High frequency temporal envelope and frequency domain envelope resolution unit 2221 reception broadband code stream separative elements 21 isolated high frequency spectrum envelope code word T1, T2, F1, F2, F3, and in corresponding code book, search corresponding vector 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, specifically performing step is following to obtain decoded high frequency temporal envelope
Figure BDA0000131700020000259
and frequency domain envelope
Figure BDA00001317000200002510
:
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 the combination of frequency domain envelope vectors
When low frequency LSP and high frequency and the frequency domain envelope
Figure BDA0000131700020000261
of 10 dimension LSP, 16 dimension temporal envelopes and 12 dimensions of each speech frame of respectively code stream analyzing unit, broadband 22 being parsed of frequency domain envelope vectors assembled unit according to 10 dimension LSP before this, be that 16 dimension temporal envelopes
Figure BDA0000131700020000262
are the vector that the order of the frequency domain envelope
Figure BDA0000131700020000263
of 12 dimensions is formed one 38 dimension at last again;
G15, vector classification
The method that vector taxon 232 adopts dynamic clusterings adds up to 38 individual n dimensional vector ns of LEN with 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 the cluster object, obtains the vector sorting result;
G16, code book generate
Code book generation unit 233 utilizes arithmetic to ask average method and weighting to ask average method to ask for the barycenter vector of preceding 10 dimension LSP and the barycenter vector of back 28 dimension high frequency temporal envelopes and frequency domain envelope, the concrete realization as follows respectively:
G161, low frequency code book generate
Low frequency code book generation unit 2331 utilizes arithmetic to ask average method; The average of the preceding 10 n dimensional vector n LSP of each type in the difference compute vectors classification results; The result who is tried to achieve is such barycenter vector, and the barycenter vector of each type is promptly obtained the low frequency code book by rows;
G162, high frequency code book generate
High frequency code book generation unit 2332 utilizes weighting to ask average method, the back 28 dimension temporal envelope and the frequency domain envelope barycenter vectors of each type in the classification results of compute vectors taxon 232 outputs; Utilized arithmetic to ask average method to obtain the initial barycenter vector of the average of all vectors of each type respectively before this as such; Obtain each vector then and belong to type distance of 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, makes then that new barycenter is initial barycenter if do not satisfy, and asks the algorithm of barycenter to obtain new barycenter with identical weighting again; Iteration withdraws from iteration when the absolute value of the two 1 norm relative mistake satisfies threshold requirement successively, and with the barycenter of this barycenter as this type of; The barycenter vector of all types is obtained and low frequency code book high frequency code book one to one by rows; Concrete implementation method is following:
G1621, initial barycenter vector calculate
Initial barycenter vector computing unit utilizes simple arithmetic to ask average method earlier, and during the back 28 dimension high frequencies of each type and the initial barycenter of frequency domain envelope, computing formula is following 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 type, j high frequency temporal envelope of x [j] [k] expression and frequency domain envelope vectors, the class at ind [j] expression vector x [j] [k] place, aver0 [ind [j]] [k] expression ind [j] type initial barycenter vector;
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 each vector respectively and is belonged to type distance of barycenter vector, and computing formula is following:
dist [ j ] = &Sigma; k = 0 M ( x [ j ] [ k ] - aver 0 [ ind [ j ] ] [ k ] ) 2 , k = 1,2 , &CenterDot; &CenterDot; &CenterDot; , 28 - - - ( 16 )
Dist in this computing formula [j] expression x [j] [k] and a distance that belongs to class barycenter vector;
G1623, new barycenter vector calculate
New barycenter vector computing unit 23323 usefulness weightings ask average method to obtain new barycenter vector, and computing formula is following:
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 in this unit [i] represent used vector and barycenter vector distance in such reciprocal with; The new barycenter vector of aver [i] [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 following:
sum 0 = &Sigma; k = 0 M | aver 0 [ i ] [ k ] |
sum = &Sigma; k = 0 M | aver [ i ] [ k ] | - - - 19
Sum0 and sum represent 1 norm of initial barycenter vector and new barycenter vector respectively;
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 following:
| 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; When the barycenter vector of all classification all satisfies threshold requirement; No longer repeat, the barycenter vector of this moment is the barycenter vector of classification, and these barycenter vectors are formed the high frequency code book;
The training of G2, energy mapped function relation
Energy mapping function training unit 24 receives low-stream analysis unit 221 outputs the i-th speech frame frequency energy
Figure BDA0000131700020000281
and high-frequency stream analysis unit 222 outputs the high-frequency energy using the least squares fit of the total number of frames of high frequency energy LEN the functional relationship between
Figure BDA0000131700020000283
specific implementation steps are 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 following:
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 G.729.1 decoding, is obtained broadband voice, then these voice are carried out objective and subjective testing; Wherein the objective examination adopts spectrum distortion to estimate and sound spectrograph, and subjective testing adopts the measuring method of general in the world Mean Opinion Score (MOS).
1, a kind of objective examination who converts the arrowband code stream in broadband code stream device
The present invention estimates with spectrum distortion the present invention is carried out the objective examination.What spectrum distortion was estimated 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;
Wherein fac [k] is a gain compensation factor;
Figure BDA0000131700020000288
is the envelope of original wideband voice K frame,
Figure BDA0000131700020000289
the k frame envelope of the broadband voice that obtains for broadband voice or the expansion of narrowband speech after 2 times of interpolation (benefit 0).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.
Voice that the broadband code stream that the inventive method expansion is obtained obtains behind decoder decode G.729.1 and without the arrowband code stream warp of expansion decoded voice G.729 calculate its spectrum distortion respectively and estimate, and the result is like table 1, shown in 2.
Table 1 speech manual distortion measurement result 1
Figure BDA0000131700020000291
Table 2 speech manual distortion measurement result 2
Figure BDA0000131700020000292
Visible from speech manual distortion measurement result of the present invention, 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 the sound spectrograph of broadband voice of sound spectrograph, the inventive method expansion of its original narrowband speech respectively.
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 out obviously increases.Can find out that from sound spectrograph the present invention can recover the pairing HFS of narrow band signal exactly, thereby realize the conversion of arrowband code stream code stream to the broadband.
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 specialties; Under complete unwitting situation, be that 200s, sampling rate are that the duration of narrowband speech and the expansion corresponding with it of 8KHz is that 200s, sampling rate are that the broadband voice of 16KHz is tested from TIMIT speech database duration to two groups to content measurement.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
Visible from voice subjective testing result of the present invention, the MOS that the broadband code stream decoding that the present invention expands obtains voice divides the voice MOS branch that obtains with original arrowband code stream decoding to compare, and has obviously improved.It is thus clear that this invention can improve the quality of communication speech.
What the used clustering method of vector classification adopted among the present invention is the 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 (3)

1. an arrowband code stream converts the conversion equipment of broadband code stream into; 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 before expanding element (1) work, moves once " off-line ";
Described expanding element (1) comprises arrowband code stream separative element (11), code stream analyzing unit, arrowband (12), arrowband energy calculation unit (13), code book map 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 imported 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) links to each other with the output terminal of arrowband code stream separative element (11), its output terminal is connected with arrowband energy calculation unit (13) with code book map unit (14) respectively; The input end of described code book map 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 code stream synthesis unit (18) with high-frequency energy coding unit (17) through Function Mapping unit (15); 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 code book map unit (14), its other end is connected with code stream synthesis unit (18); The output terminal of the input end and 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 code book map 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 code book map 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 unit (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 code book map 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 imported 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 mapping code book medium and low frequency code book and high frequency code book respectively;
Described high frequency code book generation unit (2332); Comprise the computing unit (23322) of initial barycenter vector calculating/updating block (23321), 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); Its output terminal connects input end and the newly barycenter and the initially input end of barycenter vector 1 norm calculation unit (23324) of the computing unit (23322) of vector and its place class barycenter vector distance respectively; 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) is connected with initial barycenter vector 1 norm calculation unit (23324) with new barycenter, and the input end of described judging unit (23325) and new barycenter are with initially barycenter vector 1 norm calculation unit (23324) is connected, its output terminal is exported high frequency code book and be connected with initial barycenter vector calculating/updating block (23321).
2. an arrowband code stream converts the conversion method of the conversion equipment of broadband code stream into; It is characterized in that: 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 promptly carried out the training of arrowband code stream required transformational relation when converting the broadband code stream to; After accomplishing training, carry out the arrowband code stream again 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 the isolated L0 of arrowband code stream separative element (11), L1, L2, L3, and obtains the LSP of arrowband through the code book search, and concrete performing step is following:
A21, LSP quantization parameter are rebuild
LSP quantization parameter reconstruction unit (1211) parses concrete the realization as follows of quantification output of LSP according to L0, L1, L2, L3:
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) output, accomplishes the replacement of LSP quantization parameter, the concrete realization 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 FDA0000131700010000053
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 interior the inserting of LSP quantization parameter interpolation unit output reconstructs the LSP quantization parameter q of current m frame i m, the concrete realization 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,
Figure FDA0000131700010000057
is the coefficient of running mean fallout predictor when m<0, 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 specifically realized as follows according to LSP quantization parameter
Figure FDA0000131700010000059
filtering operation of the present frame of present frame LSP quantization parameter reconstruction unit (1213) output:
A241, according to the ascending order of i is arranged
Figure FDA00001317000100000510
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 accomplishes 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) output to according to LSP to reflection coefficient converting unit (1222) i, accomplish reflection coefficient k iReconstruction, the concrete realization 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,
A4, residual energy are calculated
A41, self-adapting code book gain are resolved
Self-adapting code book gain resolution unit (1232) is according to the isolated GA1 of broadband code stream separative element (21), and GB1 parses fixed codebook gain, the concrete realization 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 the isolated GA2 of broadband code stream separative element (21), and GB2 parses fixed codebook gain, the concrete realization as follows:
g ^ c = g ` ^ c ( yA 2 ( GA 2 ) + yB 2 ( GB 2 ) ) - - - ( 6 )
Wherein
Figure FDA0000131700010000071
Be the fixed codebook gain of prediction, yA 1And yA 2Be the 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 the self-adapting code book gain and the fixed codebook gain resolution unit (1231) of self-adapting code book gain resolution unit (1232) output is calculated the residual energy E of i frame i, the concrete realization as follows:
E i = ( g p ^ ) 2 + ( g c ^ ) 2 - - - ( 7 )
B, code book mapping
Code book map unit (14) expands to high frequency speech frame temporal envelope and frequency domain envelope with each narrowband speech frame LSP, and concrete grammar is following:
The narrowband speech frame LSP that code book map unit (14) obtains the narrowband speech code stream decoding carries out low frequency code book search, obtains the row number at its code word place, and in the high frequency code book data of output this journey as the high frequency temporal envelope and the frequency domain envelope of correspondence;
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 type; N barycenter vector promptly 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 and the minimum code word of input vector error, replacing input vector and export code word place row with 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 FDA0000131700010000073
The concrete realization 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 pairing HFS energy;
E, coding
E1, high-frequency energy coding
High-frequency energy coding unit (17) is accomplished Function Mapping unit (15) and is shone upon the high-frequency energy M that TCoding, be specially: at log-domain is that step-length is to M with 3dB 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 code stream decoding that high-frequency energy decoding unit (19) is exported high-frequency energy coding unit (17), the high-frequency energy
Figure FDA0000131700010000081
after quantizing before obtaining encoding
E22, temporal envelope go DC component
What temporal envelope went that DC component unit (161) utilizes that the high-frequency energy
Figure FDA0000131700010000082
of high-frequency energy decoding unit (19) output accomplishes the high frequency temporal envelope goes DC component work, the concrete realization 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 FDA0000131700010000084
For removing the temporal envelope after the DC component;
E23, frequency domain envelope go DC component
What the frequency domain envelope went that DC component unit (162) utilizes that high-frequency energy
Figure FDA0000131700010000085
high-frequency energy
Figure FDA0000131700010000086
of high-frequency energy decoding unit (19) output accomplishes high frequency frequency domain envelope goes DC component work, the concrete realization 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 FDA0000131700010000088
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, specifically realize 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, specifically realize 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, back 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, back 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.
3. a kind of arrowband according to claim 2 code stream converts the conversion method of the conversion equipment of broadband code stream into, it is characterized in that: the training method of required transformational relation when described arrowband code stream converts the broadband code stream to may further comprise the steps:
The training of G1, code book mapping relations
Mapping code book training unit (23) before expanding element (1) work earlier to a frame number be LEN, duration be 180 minutes broadband voice code stream sample code stream analyzing unit (22) partial decoding of h obtains low frequency LSP and corresponding high frequency temporal envelope and frequency domain envelope through the broadband, then 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) generation code book map unit (14) needed two low frequency code book and high frequency code books one to one;
G11, broadband code stream separate
Broadband code stream separative element (21) is separated the preceding 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 preceding 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 (21) low frequency code stream analyzing unit (221), 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
Figure FDA0000131700010000101
with the isolated MU codeword decoding of broadband code stream separative element (21)
G132, high frequency time domain and frequency domain envelope are resolved
High frequency temporal envelope and frequency domain envelope resolution unit (2221) receive the isolated high frequency spectrum envelope of broadband code stream separative element (21) code word T1, T2, F1, F2, F3, and in corresponding code book, search corresponding vector 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 high frequency temporal envelope and frequency domain envelope code stream are decoded, specifically performing step is following to obtain decoded high frequency temporal envelope and frequency domain envelope :
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 the combination of frequency domain envelope vectors
When low frequency LSP and high frequency and the frequency domain envelope
Figure FDA00001317000100001014
of 10 dimension LSP, 16 dimension temporal envelopes
Figure FDA00001317000100001013
and 12 dimensions of each speech frame of respectively code stream analyzing unit, broadband (22) being parsed of frequency domain envelope vectors assembled unit according to 10 dimension LSP before this, be that 16 dimension temporal envelopes
Figure FDA00001317000100001015
are the vector that the order of the frequency domain envelope
Figure FDA00001317000100001016
of 12 dimensions is formed one 38 dimension at last again;
G15, vector classification
The method that vector taxon (232) adopts dynamic clustering adds up to 38 individual n dimensional vector ns of LEN with the output of low frequency LSP and high frequency temporal envelope and frequency domain envelope vectors assembled unit (231); Low frequency LSP with 10 dimensions classifies as the cluster object, obtains the vector sorting result;
G16, code book generate
Code book generation unit (233) utilizes arithmetic to ask average method and weighting to ask average method to ask for the barycenter vector of preceding 10 dimension LSP and the barycenter vector of back 28 dimension high frequency temporal envelopes and frequency domain envelope, the concrete realization as follows respectively:
G161, low frequency code book generate
Low frequency code book generation unit (2331) utilizes arithmetic to ask average method; The average of the preceding 10 n dimensional vector n LSP of each type in the difference compute vectors classification results; The result who is tried to achieve is such barycenter vector, and the barycenter vector of each type is promptly obtained the low frequency code book by rows;
G162, high frequency code book generate
High frequency code book generation unit (2332) utilizes weighting to ask average method, the back 28 dimension temporal envelope and the frequency domain envelope barycenter vectors of each type in the classification results of compute vectors taxon (232) output; Utilized arithmetic to ask average method to obtain the initial barycenter vector of the average of all vectors of each type respectively before this as such; Obtain each vector then and belong to type distance of 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, makes then that new barycenter is initial barycenter if do not satisfy, and asks the algorithm of barycenter to obtain new barycenter with identical weighting again; Iteration withdraws from iteration when the absolute value of the two 1 norm relative mistake satisfies threshold requirement successively, and with the barycenter of this barycenter as this type of; The barycenter vector of all types is obtained and low frequency code book high frequency code book one to one by rows; Concrete implementation method is following:
G1621, initial barycenter vector calculate
Initial barycenter vector computing unit (23321) utilizes simple arithmetic to ask average method earlier, and during the back 28 dimension high frequencies of each type and the initial barycenter of frequency domain envelope, computing formula is following in the classification results of compute vectors taxon (2232) 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 type, j high frequency temporal envelope of x [j] [k] expression and frequency domain envelope vectors, the class at ind [j] expression vector x [j] [k] place, aver0 [ind [j]] [k] expression ind [j] type initial barycenter vector;
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 each vector respectively and is belonged to type distance of barycenter vector, and computing formula is following:
dist [ j ] = &Sigma; k = 0 M ( x [ j ] [ k ] - aver 0 [ ind [ j ] ] [ k ] ) 2 , k = 1,2 , &CenterDot; &CenterDot; &CenterDot; , 28 - - - ( 16 )
Dist in this computing formula [j] expression x [j] [k] and a distance that belongs to class barycenter vector;
G1623, new barycenter vector calculate
New barycenter vector computing unit (23323) asks average method to obtain new barycenter vector with weighting, and computing formula is following:
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 in this unit [i] represent used vector and barycenter vector distance in such reciprocal with; The new barycenter vector of aver [i] [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 following:
sum 0 = &Sigma; k = 0 M | aver 0 [ i ] [ k ] |
sum = &Sigma; k = 0 M | aver [ i ] [ k ] | - - - ( 19 )
Sum0 and sum represent 1 norm of initial barycenter vector and new barycenter vector respectively;
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 following:
| 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; When the barycenter vector of all classification all satisfies threshold requirement; No longer repeat, the barycenter vector of this moment is the barycenter vector of classification, and these barycenter vectors are formed the high frequency code book;
The training of G2, energy mapped function relation
Energy mapping function training unit (24) receives the low frequency code stream parsing unit (221) outputs the i-th speech frame LF energy
Figure FDA0000131700010000127
and high-frequency stream analysis unit (222) outputs the high-frequency energy
Figure FDA0000131700010000128
using the least squares fit of the total number of frames of high frequency energy LEN function relation between
Figure FDA0000131700010000129
specific implementation steps are 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 ) .
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 true CN102543089A (en) 2012-07-04
CN102543089B 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)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103413557A (en) * 2013-07-08 2013-11-27 深圳Tcl新技术有限公司 Voice signal bandwidth expansion method and device thereof
CN103457703A (en) * 2013-08-27 2013-12-18 大连理工大学 G.729 to AMR12.2 rate transcoding method
CN104715756A (en) * 2015-02-10 2015-06-17 百度在线网络技术(北京)有限公司 Audio data processing method and device
CN105070293A (en) * 2015-08-31 2015-11-18 武汉大学 Audio bandwidth extension coding and decoding method and device based on deep neutral network
CN105374359A (en) * 2014-08-29 2016-03-02 中国电信股份有限公司 Encoding method and system of speech data

Citations (4)

* 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
US20070033023A1 (en) * 2005-07-22 2007-02-08 Samsung Electronics Co., Ltd. Scalable speech coding/decoding apparatus, method, and medium having mixed structure
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

Patent Citations (4)

* 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
US20070033023A1 (en) * 2005-07-22 2007-02-08 Samsung Electronics Co., Ltd. Scalable speech coding/decoding apparatus, method, and medium having mixed structure
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

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103413557A (en) * 2013-07-08 2013-11-27 深圳Tcl新技术有限公司 Voice signal bandwidth expansion method and device thereof
CN103413557B (en) * 2013-07-08 2017-03-15 深圳Tcl新技术有限公司 The method and apparatus of speech signal bandwidth extension
CN103457703A (en) * 2013-08-27 2013-12-18 大连理工大学 G.729 to AMR12.2 rate transcoding method
CN105374359A (en) * 2014-08-29 2016-03-02 中国电信股份有限公司 Encoding method and system of speech data
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
CN105070293A (en) * 2015-08-31 2015-11-18 武汉大学 Audio bandwidth extension coding and decoding method and device based on deep neutral network
CN105070293B (en) * 2015-08-31 2018-08-21 武汉大学 Audio bandwidth expansion coding-decoding method based on deep neural network and device

Also Published As

Publication number Publication date
CN102543089B (en) 2013-04-17

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
CN102543089B (en) Conversion device for converting narrowband code streams into broadband code streams
CN102341852B (en) Filtering speech
US20150262587A1 (en) Pitch Synchronous Speech Coding Based on Timbre Vectors
US20050075869A1 (en) LPC-harmonic vocoder with superframe structure
RU2463674C2 (en) Encoding device and encoding method
CN101207459A (en) Method and device of signal processing
CN103325375A (en) Coding and decoding device and method of ultralow-bit-rate speech
CN1186765C (en) Method for encoding 2.3kb/s harmonic wave excidted linear prediction speech
CN103714822B (en) Sub-band coding and decoding method and device based on SILK coder decoder
CN104025189A (en) Method for encoding voice signal, method for decoding voice signal, and apparatus using same
CN103258543A (en) Method for expanding artificial voice bandwidth
JPH10319996A (en) Efficient decomposition of noise and periodic signal waveform in waveform interpolation
CN103345920B (en) Self-adaptation interpolation weighted spectrum model voice conversion and reconstructing method based on Mel-KSVD sparse representation
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
CN102982807A (en) Method and system for multi-stage vector quantization of speech signal LPC coefficients
CN101256773A (en) Method and device for vector quantifying of guide resistance spectrum frequency parameter
CN101770777A (en) LPC (linear predictive coding) bandwidth expansion method, device and coding/decoding system
CN111243608A (en) Low-rate speech coding method based on depth self-coding machine
JP2004348120A (en) Voice encoding device and voice decoding device, and method thereof
WO2011052221A1 (en) Encoder, decoder and methods thereof

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