CN101046961B - Speech compression, decompression method and circuit based on wave shape - Google Patents
Speech compression, decompression method and circuit based on wave shape Download PDFInfo
- Publication number
- CN101046961B CN101046961B CN2006100668901A CN200610066890A CN101046961B CN 101046961 B CN101046961 B CN 101046961B CN 2006100668901 A CN2006100668901 A CN 2006100668901A CN 200610066890 A CN200610066890 A CN 200610066890A CN 101046961 B CN101046961 B CN 101046961B
- Authority
- CN
- China
- Prior art keywords
- data
- control word
- compression
- amplitude
- bit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000007906 compression Methods 0.000 title claims abstract description 90
- 230000006835 compression Effects 0.000 title claims abstract description 83
- 230000006837 decompression Effects 0.000 title claims abstract description 59
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000005070 sampling Methods 0.000 claims abstract description 28
- 238000006243 chemical reaction Methods 0.000 claims abstract description 7
- 241001269238 Data Species 0.000 claims description 21
- 230000003321 amplification Effects 0.000 claims description 6
- 238000003199 nucleic acid amplification method Methods 0.000 claims description 6
- 238000013500 data storage Methods 0.000 claims description 5
- 238000009434 installation Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 6
- 238000013144 data compression Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000005056 compaction Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
Images
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Analogue/Digital Conversion (AREA)
Abstract
The present invention belongs to the field of speech compression and encoding technology, in particular, it relates to a speech compression and decompression method based on waveform and circuit. Said method includes the following steps: (a), making speech material undergo the processes of sampling and conversion treatment to produce PCM speech data; (b), compressing 8-bit linear PCM speech data of every sampling point into 5-bit; (c), using several sampling points, after these sampling point data adding a 5-bit control word; and (d), storing finally-obtained data. Said device includes compressed circuit device formed from sampling circuit, A/D converter, data buffer memory, compression encoder and data memory, and its decompression circuit device is composed of data ROM, decompression encoding circuit, D/A converter and loudspeaker drive circuit.
Description
Invention field
The present invention relates to voice voice compression coding, decompression technique field, particularly a kind of compress speech, decompression method and circuit based on waveform.
Technical background
Voice coding is exactly with the analog voice signal digitlization, can be used as digital data transmission, storage or processing after the digitlization, can take full advantage of the various technology of Digital Signal Processing.In order to reduce memory space or to reduce transmission bit rate and save bandwidth, also need the voice signal after the digitlization is carried out compressed encoding Here it is voice compressed encoding and decoding technology.
The compaction coding method of voice is concluded and can be divided into three major types: waveform coding, parameter coding and hybrid coding.The waveform coding distortion is less, and numeric code rate is than higher, but codec is simple.The code rate of parameter coding can be very low, but tonequality is relatively poor, can only reach synthetic speech quality, secondly is the complexity height, the codec more complicated.Hybrid coding has absorbed the advantage of waveform coding and parameter coding, thereby obtains higher voice quality on lower bit rate, but also more complicated of codec.
Summary of the invention
Fundamental purpose of the present invention is to provide a kind of compress speech disposal route, the record, the playback that particularly are applicable to small size are used, can further compress needed voice data storage space, guaranteeing that speech quality does not have on the condition of too big loss, shortcut calculation, reduce the compression coding and decoding time-delay, improve the service efficiency of storer.
According to above-mentioned purpose, the invention provides a kind of voice compressing method based on waveform, in order to the speech digit code of compression after the sampling conversion.Compression process mainly may further comprise the steps:
(a) the voice data conversion of taking a sample produces PCM (Pulse Code Modulation, sign indicating number pulsed modulation) speech data;
(b) 8 bit linear PCM speech datas with each sampled point are compressed into 5;
(c) get 31 sampled points, per 31 sampling numbers increase by 5 control words according to the back;
(d) the last resulting data of storage.
During decompression, grouping earlier, per 32 data are divided into one group, last data is as control word, how to decide decompress(ion) according to control word, during to each data decompression, the stet position decides how back 4 bit data decompress(ion)s are reduced into 7 speech datas according to control word.
As shown in Figure 1, in the sampled point 8 bit linear PCM speech datas, b
7Be sign bit, sign bit is 1, and amplitude is for just, and sign bit is 0, and amplitude is for negative; b
6~b
0The amplitude of bit representation voice signal waveform, its amplitude range is from 00 to FF.Keep the first bit sign position b after the compression
7, rear 7 bit data then are compressed into 4 according to cy-pres doctrine; And keep 4 bit data.Concrete data compression situation as shown in Figure 2.Shown in situation one, when data amplitude for just, i.e. b
7=1 o'clock, data were 1000b before the compression
3b
2b
1b
0, rear 4 bit data represent signal amplitude, add the first bit sign position, keep 5 bit data; b
7, give up the 2nd~4 bit data at=0 o'clock.During situation two, data have 5 bit representation signal amplitude---b before the compression
4b
3b
2b
1b
0, give up low level b
0, stet position and b
4b
3b
2b
1Totally 5 is data.Same, situation three, four all adopts this kind method, stet position and expression signal amplitude high 4.These four kinds of situations are 5 different control words of dispensing respectively: 00000,00001,00010,00011.If data all add 5 control words after the compression of each sampled point, its figure place in addition surpassed the compression before data length.In order to guarantee compression efficiency, per 32 data are one group, and comprising 31 sampled points and a control word, this control word is the pairing control word of data of amplitude maximum in 31 sampled points.So both guaranteed that speech quality does not have too big loss, can improve ratio of compression again.
Data store organisation as shown in Figure 3.Add a control word after 5 bit data after per 31 sampled points compression.The data of the present invention's compression are not limited to 31, and compressible data are 2
n-1, such as 63,127,255......, the data after the compression add a control word, with 2
nIndividual data are one group and deposit in the memory.N is natural number
During decompression, grouping earlier is accordingly with 2
nIndividual data are divided into one group, and last data is as control word, how to decide decompress(ion) according to control word.During to each data decompression, the stet position decides how back 4 bit data decompress(ion)s are reduced into 7 speech datas according to control word.
As shown in Figure 4, be example for one group with 32 data, decompression procedure is described.Divide four kinds of situations: 1, when control word is 00000, represent that there are and only have 4 b its amplitude position
3b
2b
1b
0, sign bit is 1, mends 000 behind sign bit, and sign bit is 0, fills 111 behind sign bit, and namely the data behind the decompress(ion) are 1000b
3b
2b
1b
0Or 0111b
3b
2b
1b
02, when control word is 00001, represent that there are 5 b its amplitude position
4b
3b
2b
1b
0, given up low level b during compression
0, in the process that decompresses, low level mends 0, and the hold mark invariant position is reduced into 7 with rear 4 bit data decompression, and according to the difference of control word, low level is filled 0 of corresponding number; According to the difference of sign bit, fill 0 or 1 of corresponding number in a high position.Fill accordingly 00 or 11 then behind sign bit, namely the data behind the decompress(ion) are 100b
4b
3b
2b
10 or 011b
4b
3b
2b
10; 3, control word is 00010 o'clock, and its amplitude is 6 b
5b
4b
3b
2b
1b
0, give up low level b during compression
1b
0, low level fills 00 during decompression, fills accordingly 0 or 1 behind the sign bit, and namely the data behind the decompress(ion) are 10b
5b
4b
3b
200 or 01b
5b
4b
3b
200; 4, control word is 00011 o'clock, and its amplitude is 7 b
6b
5b
4b
3b
2b
1b
0, give up low level b during compression
2b
1b
0, low level fills 000 during decompression, and namely the data behind the decompress(ion) are 1b
6b
5b
4b
3000 or 0b
6b
5b
4b
3000.Like this, compare basic identically behind the decompress(ion) before data and the compression, just amplitude slightly changes, as shown in Figure 5.
Compression method based on waveform of the present invention, the sound after the compression can reach seven PCM voice qualities substantially, satisfy the requirement of recording, playback series products.Ratio of compression is about 1.58.Algorithm is fairly simple, so the encoding and decoding time-delay is shorter, and when sample rate was 8KHz, delaying time was 4ms.
A kind of voice compressing method based on waveform, compression process mainly may further comprise the steps:
(a) the voice data conversion of taking a sample produces the PCM speech data;
(b) 8 bit linear PCM speech datas with each sampled point are compressed into 5;
(c) data that contract of pressure are 2
n-1 sampled point increases by 5 control words at these sampling numbers according to the back;
(d) data after the compression add a control word, with 2
nIndividual data are one group and deposit in the memory.
Described voice compressing method based on waveform, its concrete steps are as follows:
Whether step 3 is determined control word according to its scope, be 00000,00001,00010 or 00011;
Control word is encoded to control multiplication factor, port status;
Step 4 with data compression, keeps the first bit sign position according to corresponding relation, and rear 7 bit data then are compressed into 4 according to cy-pres doctrine, keep altogether at last 5 bit data;
Step 5 deposits 31 packed datas and a control word in the storer in.
Described voice compressing method based on waveform, its concrete steps are as follows:
Step 3 is determined control word according to its scope, and control word is encoded to control multiplication factor, port status;
Step 4 with data compression, keeps the first bit sign position according to corresponding relation, and rear 7 bit data then are compressed into 4 according to cy-pres doctrine, keep altogether at last 5 bit data;
Step 5 deposits 63 packed datas and a control word in the storer in.
A kind of voice decompression method based on waveform, its step is as follows:
During decompression, grouping earlier is with 2
nIndividual data are divided into one group, and last data is as control word, how to decide decompress(ion) according to control word, and during to each data decompression, the hold mark invariant position decides how back 4 bit data decompress(ion)s are reduced into 7 speech datas according to control word.
Described voice decompression method based on waveform, its concrete steps are as follows:
Step 3 judges whether control word is 00000,00001,00010 or 00011;
Step 4, according to control word, according to its corresponding relation decompress(ion), according to the difference of control word, low level is filled 0 of corresponding number; According to the difference of sign bit, fill 0 or 1 of corresponding number in a high position, control word is decoded to amplification multiple and port status;
Step 5, the data behind the decompress(ion) are sent to D/A converter.
Described voice decompression method based on waveform, its concrete steps are as follows:
During decompression, when decompress(ion) is condensed to 32 bit data, per 32 data are divided into one group, last data is as control word, how to decide decompress(ion) according to control word, during to each data decompression, the hold mark invariant position decides how back 4 bit data decompress(ion)s are reduced into 7 speech datas according to control word.
Described voice decompression method based on waveform, its concrete steps are as follows:
During decompression, when decompress(ion) is condensed to 64 bit data, per 32 data are divided into one group, last data is as control word, how to decide decompress(ion) according to control word, during to each data decompression, the hold mark invariant position decides how back 4 bit data decompress(ion)s are reduced into 7 speech datas according to control word.
During decompression, when decompress(ion) is condensed to 64 bit data, per 32 data are divided into one group, last data is as control word, how to decide decompress(ion) according to control word, during to each data decompression, the hold mark invariant position decides how back 4 bit data decompress(ion)s are reduced into 7 speech datas according to control word.
Description of drawings
Fig. 1 is 8 bit linear PCM speech data figure.
Fig. 2 is the corresponding relation of data before and after the compression, and relative control word figure.
Fig. 3 is the storage node composition of compression back data.
Fig. 4 is data corresponding relation figure before and after the decompress(ion).
Fig. 5 be before the compression with decompress(ion) after the variation diagram of data amplitude.
Fig. 6 is the circuit arrangement figure of compression process.
Fig. 7 is the circuit arrangement figure of decompression process.
Fig. 8 is the method flow diagram of compression process.
Fig. 9 is the method flow diagram of decompression process.
Embodiment
For purpose of the present invention, feature, advantage can be become apparent, the implementation method of below putting up with compression and decompression procedure is described in detail.
Fig. 3 represents to compress rear data storage structure chart.The present invention is with the storage organization of 32 data instance explanation compression back data.Per 32 data are one group, and front 31 are 5 speech datas after the compression, and the 32nd is 5 control words.The sense data end mark during as decompress(ion) with control word.The data of the present invention's compression are not limited to 31, and compressible data are 2
n-1, such as 63,127,255......, the data after the compression add a control word, with 2
nIndividual data are one group and deposit in the memory.N is natural number.To the data more than 31, can 31 compressed data structures be example, come packed data take per 31 data as one group.
Fig. 4 is data corresponding relation figure before and after the decompress(ion).Divide four kinds of situations: when control word is 00000, represent that there are and only have 4 b its amplitude position
3b
2b
1b
0, sign bit is 1, mends 000 behind sign bit, sign bit is 0, fills 111 behind sign bit; When control word is 00001, represent that there are 5 b its amplitude position
4b
3b
2b
1b
0, given up low level b during compression
0, in the process that decompresses, low level mends 0, fills accordingly 00 or 11 then behind sign bit; In like manner, control word is 00010 and 00011 o'clock, and method is identical.
Fig. 5 be before the compression with decompress(ion) after the variation diagram of data amplitude.Sinusoidal wave wave-shape amplitude changes slightly.
As Fig. 6 is the circuit arrangement of compression process.Shown in voice signal at first pass through sample circuit, carry out analog sample with certain sample frequency, obtain corresponding phonetic sampling value, then the phonetic sampling value is utilized the A/D conversion regime, convert each phonetic sampling value to one group by 0 and 1 binary code of forming, simple numerical sign indicating number form is the PCM sign indicating number.Then the PCM sign indicating number is divided into groups, compresses, and definite control word.At last by organizing the gained data storage in ROM.
The compressor circuit device, form by sample circuit, A/D converter, data buffer, condensing encoder, data-carrier store, condensing encoder comprises data shift device, control word enlargement factor scrambler, control word port status scrambler, control word is encoded to control enlargement factor, port status, wherein, the output of data buffer is connected in data shift device, control word enlargement factor scrambler, and control word enlargement factor scrambler and control word port status scrambler are connected in the data shift device.In the compressor circuit, sample circuit, A/D converter, data buffer, condensing encoder, data-carrier store are linked in sequence successively.
Decompression procedure is come out the data extract that is stored among the MaskRom as shown in Figure 7, behind the decompress(ion), converts simulating signal to through D/A converter, is emitted by loudspeaker again.
The decompression circuit installation drawing is made up of data ROM, decompression coding circuit, D/A converter, loudspeaker driving circuit, loudspeaker.The decompression coding circuit comprises data shift device, control word enlargement factor demoder, control word port status demoder, control word is decoded to amplification multiple and port status, wherein, the output of data ROM is connected to data shift device, control word enlargement factor demoder, control word port status demoder.In the decompression circuit, data ROM, decompression coding circuit, D/A converter, loudspeaker driving circuit, loudspeaker are linked in sequence successively.
Fig. 8 is the method flow diagram of compression process.Its step is as follows:
Whether step 3 is determined control word according to its scope, be 00000,00001,00010 or 00011;
Control word is encoded to control multiplication factor, port status;
Step 4 with data compression, keeps the first bit sign position according to corresponding relation, and rear 7 bit data then are compressed into 4 according to cy-pres doctrine, keep altogether at last 5 bit data;
Step 5 deposits 31 packed datas and a control word in the storer in.
Fig. 9 is the method flow diagram of decompression process.Its step is as follows:
Step 3 judges whether control word is 00000,00001,00010 or 00011;
Step 4, according to control word, according to its corresponding relation decompress(ion), according to the difference of control word, low level is filled 0 of corresponding number; According to the difference of sign bit, fill 0 or 1 of corresponding number in a high position, control word is decoded to amplification multiple and port status;
Step 5, the data behind the decompress(ion) are sent to D/A converter.
Claims (9)
1. voice compressing method based on waveform, compression process mainly may further comprise the steps:
(a) the voice data conversion of taking a sample produces the PCM speech data, b
7Be sign bit, when sign bit was 1, amplitude was for just, and when sign bit was 0, amplitude was for negative; b
6~b
0The amplitude of bit representation voice signal waveform, its amplitude range is from 00 to FF;
(b) 8 bit linear PCM speech datas with each sampled point are compressed into 5; Keep the first bit sign position b after the compression
7, rear 7 bit data then are compressed into 4 according to data corresponding relation before and after the compression; And keep 4 bit data; The data corresponding relation is before and after the described compression:
Situation one: when data amplitude for just, i.e. b
7=1 o'clock, data were 1000b before the compression
3b
2b
1b
0, rear four figures is according to the expression signal amplitude, and after the compression, data are 1b
3b
2b
1b
0When data amplitude for negative, i.e. b
7=0 o'clock, data were 0111b before the compression
3b
2b
1b
0,, after the compression, data are 0b
3b
2b
1b
05 control words that described situation one is distributed are 00000;
Situation two: when data amplitude for just, i.e. b
7=1 o'clock, data were 100b before the compression
4b
3b
2b
1b
0, rear five-digit number is according to the expression signal amplitude, and after the compression, data are 1b
4b
3b
2b
1, namely give up low level b
0When data amplitude for negative, i.e. b
7=0 o'clock, data were 011b before the compression
4b
3b
2b
1b
0, data are 0b after the compression
4b
3b
2b
1, namely give up low level b
05 control words that described situation two is distributed are 00001;
Situation three: when data amplitude for just, i.e. b
7=1 o'clock, data were 10b before the compression
5b
4b
3b
2b
1b
0, rear six bit data represent signal amplitude, after the compression, data are 1b
5b
4b
3b
2, namely give up low level b
1b
0When data amplitude for negative, i.e. b
7=0 o'clock, data were 01b before the compression
5b
4b
3b
2b
1b
0, data are 0b after the compression
5b
4b
3b
2, namely give up low level b
1b
05 control words that described situation three is distributed are 00010;
Situation four: when data amplitude for just, i.e. b
7=1 o'clock, data were 1b before the compression
6b
5b
4b
3b
2b
1b
0, rear seven bit data represent signal amplitude, after the compression, data are 1b
6b
5b
4b
3, namely give up low level b
2b
1b
0When data amplitude for negative, i.e. b
7=0 o'clock, data were 0b before the compression
6b
5b
4b
3b
2b
1b
0, data are 0b after the compression
6b
5b
4b
3, namely give up low level b
2b
1b
05 control words that described situation four is distributed are 00011;
(c) data that contract of pressure are 2
nThe pairing control word of data of amplitude maximum increases by 5 control words at these sampling numbers according to the back in-1 sampled point;
(d) data after the compression add a control word, with 2
nIndividual data are one group and deposit in the memory.
2. the voice compressing method based on waveform according to claim 1, its concrete steps are as follows:
Step 1, sampling number are read in 31 sampling number certificates during according to 32, are one group with 31 sampled points, and have judged whether data;
Step 2, the data of amplitude maximum in the judgement sampled point;
Step 3 is determined 5 control words that the data of amplitude maximum in the aforementioned sample point are distributed according to data corresponding relation before and after the compression, and control word is encoded to control multiplication factor, port status;
Step 4 is compressed according to aforementioned corresponding relation according to the present different situations of each data, keeps the first bit sign position, and rear 7 bit data then are compressed into 4 according to corresponding relation, keeps altogether at last 5 bit data;
Step 5 deposits 31 packed datas and a control word in the storer in.
3. the voice compressing method based on waveform according to claim 1, its concrete steps are as follows:
Step 1, sampling number are read in 63 sampling number certificates during according to 64, are one group with 63 sampled points, and have judged whether data;
Step 2, the data of amplitude maximum in the judgement sampled point;
Step 3 is determined 5 control words that the data of amplitude maximum in the aforementioned sample point are distributed according to data corresponding relation before and after the compression, and control word is encoded to control multiplication factor, port status;
Step 4 is compressed according to aforementioned corresponding relation according to the present different situations of each data, keeps the first bit sign position, and rear 7 bit data then are compressed into 4 according to cy-pres doctrine, keeps altogether at last 5 bit data;
Step 5 deposits 63 packed datas and a control word in the storer in.
4. voice decompression method based on waveform, its step is as follows:
During decompression, grouping earlier is with 2
nIndividual data are divided into one group, last data is as control word, how to decide decompress(ion) according to control word according to the data corresponding relation before and after the decompress(ion), during to each data decompression, the hold mark invariant position decides how back 4 bit data decompress(ion)s are reduced into 7 speech datas according to control word according to data corresponding relation before and after the decompress(ion); The data corresponding relation comprises four kinds of situations before and after the described decompress(ion):
1, when control word is 00000, represents that there are and only have 4 b its amplitude position
3b
2b
1b
0, sign bit is 1 o'clock, mends 000 behind sign bit, and sign bit is 0 o'clock, fills 111 behind sign bit, and namely the data behind the decompress(ion) are 1000b
3b
2b
1b
0Or 0111b
3b
2b
1b
0
2, when control word is 00001, represent that there are 5 b its amplitude position
4b
3b
1b
0, given up low level b during compression
0, in the process that decompresses, low level mends 0, and the hold mark invariant position is reduced into 7 with rear 4 bit data decompression, and according to the difference of control word, low level is filled 0 of corresponding number; According to the difference of sign bit, fill 0 or 1 of corresponding number in a high position; Fill accordingly 00 or 11 then behind sign bit, namely the data behind the decompress(ion) are 100b
4b
3b
2b
10 or 011b
4b
3b
2b
10;
3, control word is 00010 o'clock, and its amplitude is 6 b
5b
4b
3b
2b
1b
0, give up low level b during compression
1b
0, low level fills 00 during decompression, fills accordingly 0 or 1 behind the sign bit, and namely the data behind the decompress(ion) are 10b
5b
4b
3b
200 or 01b
5b
4b
3b
200;
4, control word is 00011 o'clock, and its amplitude is 7 b
6b
5b
4b
3b
2b
1b
0, give up low level b during compression
2b
1b
0, low level fills 000 during decompression, and namely the data behind the decompress(ion) are 1b
6b
5b
4b
3000 or 0b
6b
5b
4b
3000;
Wherein said b
7Be sign bit, sign bit is 1, and amplitude is for just, and sign bit is 0, and amplitude is for negative; b
6~b
0The amplitude of bit representation voice signal waveform, its amplitude range is from 00 to FF.
5. the voice decompression method based on waveform according to claim 4, its concrete steps are as follows:
Step 1 reads 2 from storer
nIndividual data;
Step 2 has judged whether end mark, and whether control word is promptly arranged;
Step 3 judges whether control word is 00000,00001,00010 or 00011;
Step 4, according to control word, according to data corresponding relation decompress(ion) before and after the decompress(ion), according to the difference of control word, low level is filled 0 of corresponding number; According to the difference of sign bit, fill 0 or 1 of corresponding number in a high position, control word is decoded to amplification multiple and port status;
Step 5, the data behind the decompress(ion) are sent to D/A converter.
6. the voice decompression method based on waveform according to claim 4, its concrete steps are as follows:
During decompression, when decompress(ion) is condensed to 32 bit data, per 32 data are divided into one group, last data is as control word, how to decide decompress(ion) according to control word, during to each data decompression, the hold mark invariant position decides how back 4 bit data decompress(ion)s are reduced into 7 speech datas according to control word.
7. the voice decompression method based on waveform according to claim 4, its concrete steps are as follows:
During decompression, when decompress(ion) is condensed to 64 bit data, it is one group with 64 data, last data is as control word, how to decide decompress(ion) according to control word, during to each data decompression, the hold mark invariant position decides how back 4 bit data decompress(ion)s are reduced into 7 speech datas according to control word.
8. circuit arrangement based on the compress speech of waveform, it is characterized in that, the compressor circuit device, by sample circuit, A/D converter, data buffer, condensing encoder, data-carrier store is formed, condensing encoder comprises the data shift device, control word enlargement factor scrambler, control word port status scrambler, control word is to the control enlargement factor, port status is encoded, wherein, the output of data buffer is connected in the data shift device, control word enlargement factor scrambler, control word enlargement factor scrambler and control word port status scrambler are connected in the data shift device, in the compressor circuit, sample circuit, A/D converter, data buffer, condensing encoder, data-carrier store is linked in sequence successively; Shown in voice signal at first pass through sample circuit, carry out analog sample with certain sample frequency, obtain corresponding phonetic sampling value, then the phonetic sampling value is utilized A/D converter, convert each phonetic sampling value to one group by 0 and 1 binary code of forming, simple numerical sign indicating number form is the PCM sign indicating number; Data buffer divides into groups to the PCM sign indicating number then, and the data shift device compresses the corresponding relation of data according to data before and after the compression, and control word enlargement factor scrambler is determined control word; At last by organizing the gained data storage in data-carrier store;
The PCM speech data that voice signal produces after sampling and conversion, b
7Be sign bit, when sign bit was 1, amplitude was for just, and when sign bit was 0, amplitude was for negative; b
6~b
0The amplitude of bit representation voice signal waveform, its amplitude range is from 00 to FF;
Data buffer divides into groups to the PCM sign indicating number, promptly gets 2
n-1 sampled point, the data shift device is compressed into 5 with 8 bit linear PCM speech datas of each sampled point; The compression back keeps the first bit sign position b
7, back 7 bit data then are compressed into 4 according to data corresponding relation before and after the compression; And keep 4 bit data; The data corresponding relation is before and after the described compression:
Situation one: when data amplitude for just, i.e. b
7=1 o'clock, data were 1000b before the compression
3b
2b
1b
0, rear four figures is according to the expression signal amplitude, and after the compression, data are 1b
3b
2b
1b
0When data amplitude for negative, i.e. b
7=0 o'clock, data were 0111b before the compression
3b
2b
1b
0,, after the compression, data are 0b
3b
2b
1b
05 control words that described situation one is distributed are 00000;
Situation two: when data amplitude for just, i.e. b
7=1 o'clock, data were 100b before the compression
4b
3b
2b
1b
0, rear five-digit number is according to the expression signal amplitude, and after the compression, data are 1b
4b
3b
2b
1, namely give up low level b
0When data amplitude for negative, i.e. b
7=0 o'clock, data were 011b before the compression
4b
3b
2b
1b
0, data are 0b after the compression
4b
3b
2b
1, namely give up low level b
05 control words that described situation two is distributed are 00001;
Situation three: when data amplitude for just, i.e. b
7=1 o'clock, data were 10b before the compression
5b
4b
3b
2b
1b
0, rear six bit data represent signal amplitude, after the compression, data are 1b
5b
4b
3b
2, namely give up low level b
1b
0When data amplitude for negative, i.e. b
7=0 o'clock, data were 01b before the compression
5b
4b
3b
2b
1b
0, data are 0b after the compression
5b
4b
3b
2, namely give up low level b
1b
05 control words that described situation three is distributed are 00010;
Situation four: when data amplitude for just, i.e. b
7=1 o'clock, data were 1b before the compression
6b
5b
4b
3b
2b
1b
0, rear seven bit data represent signal amplitude, after the compression, data are 1b
6b
5b
4b
3, namely give up low level b
2b
1b
0When data amplitude for negative, i.e. b
7=0 o'clock, data were 0b before the compression
6b
5b
4b
3b
2b
1b
0, data are 0b after the compression
6b
5b
4b
3, namely give up low level b
2b
1b
05 control words that described situation four is distributed are 00011;
The data of control word multiplication factor encoder pressure contracting are 2
nThe corresponding control word of data of amplitude maximum in-1 sampled point, at these sampling numbers according to 5 control words of rear increase; Data after the data shift unit will compress add a control word, with 2
nIndividual data are one group and deposit in the data storage;
Comprise port information in the control word, port information is encoded, be input to again in the data shift device by control word port status scrambler.
9. circuit arrangement that decompresses based on the voice of waveform, it is characterized in that, the decompression circuit installation drawing, by data-carrier store, the decompression coding circuit, D/A converter, loudspeaker driving circuit, loudspeaker is formed, the decompression coding circuit comprises the data shift device, control word enlargement factor demoder, control word port status demoder, control word is decoded to amplification multiple and port status, wherein, the output of data-carrier store is connected to the data shift device, control word enlargement factor demoder, control word port status demoder, in the decompression circuit, data-carrier store, the decompression coding circuit, D/A converter, loudspeaker driving circuit, loudspeaker is linked in sequence successively;
From data-carrier store, read 2
nIndividual data; Control word enlargement factor demoder has judged whether end mark, and whether control word is promptly arranged; And judge whether control word is 00000,00001,00010 or 00011; The data shift device is according to control word, and according to data corresponding relation decompress(ion) before and after the decompress(ion), according to the difference of control word, low level is filled 0 of corresponding number; According to the difference of sign bit, fill 0 or 1 of corresponding number in a high position, control word is decoded to amplification multiple and port status; Data behind the decompress(ion) scrambler decompress(ion) are sent to D/A converter;
The data corresponding relation comprises four kinds of situations before and after the described decompress(ion):
1, when control word is 00000, represents that there are and only have 4 b its amplitude position
3b
2b
1b
0, sign bit is 1 o'clock, mends 000 behind sign bit, and sign bit is 0 o'clock, fills 111 behind sign bit, and namely the data behind the decompress(ion) are 1000b
3b
2b
1b
0Or 0111b
3b
2b
1b
0
2, when control word is 00001, represent that there are 5 b its amplitude position
4b
3b
2b
1b
0, given up low level b during compression
0, in the process that decompresses, low level mends 0, and the hold mark invariant position is reduced into 7 with rear 4 bit data decompression, and according to the difference of control word, low level is filled 0 of corresponding number; According to the difference of sign bit, fill 0 or 1 of corresponding number in a high position; Fill accordingly 00 or 11 then behind sign bit, namely the data behind the decompress(ion) are 100b
4b
3b
2b
10 or 011b
4b
3b
2b
10;
3, control word is 00010 o'clock, and its amplitude is 6 b
5b
4b
3b
2b
1b
0, give up low level b during compression
1b
0, low level fills 00 during decompression, fills accordingly 0 or 1 behind the sign bit, and namely the data behind the decompress(ion) are 10b
5b
4b
3b
200 or 01b
5b
4b
3b
200;
4, control word is 00011 o'clock, and its amplitude is 7 b
6b
5b
4b
3b
2b
1b
0, give up low level b during compression
2b
1b
0, low level fills 000 during decompression, and namely the data behind the decompress(ion) are 1b
6b
5b
4b
3000 or 0b
6b
5b
4b
3000;
Wherein said b
7Be sign bit, sign bit is 1, and amplitude is for just, and sign bit is 0, and amplitude is for negative; b
6~b
0The amplitude of bit representation voice signal waveform, its amplitude range is from 00 to FF;
Data after the decompression are 8 PCM speech datas, are converted into simulating signal by D/A converter, enter loudspeaker driving circuit, loudspeaker more successively;
Comprise port information in the control word, port information is decoded by control word port status demoder.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2006100668901A CN101046961B (en) | 2006-03-31 | 2006-03-31 | Speech compression, decompression method and circuit based on wave shape |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2006100668901A CN101046961B (en) | 2006-03-31 | 2006-03-31 | Speech compression, decompression method and circuit based on wave shape |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101046961A CN101046961A (en) | 2007-10-03 |
CN101046961B true CN101046961B (en) | 2011-10-12 |
Family
ID=38771507
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2006100668901A Expired - Fee Related CN101046961B (en) | 2006-03-31 | 2006-03-31 | Speech compression, decompression method and circuit based on wave shape |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101046961B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102270262A (en) * | 2011-08-23 | 2011-12-07 | 复旦大学 | Method and device for compressing and decompressing analog waveform of integrated circuit |
CN102682772A (en) * | 2012-03-20 | 2012-09-19 | 华为技术有限公司 | Data sending method, data receiving method, data sending equipment and data receiving equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN86101813A (en) * | 1985-03-25 | 1986-09-24 | 美国无线电公司 | Have block deviation compensation numeral surely than circuit |
CN1249057A (en) * | 1997-10-29 | 2000-03-29 | 皇家菲利浦电子有限公司 | Device for encoding/decoding N-bit source words into corresponding M-bit channel words, and vice versa |
CN1255702A (en) * | 1992-03-10 | 2000-06-07 | 索尼公司 | Modulation method and demodulation method, and modulator and demodulator thereof |
CN1327590A (en) * | 1999-08-13 | 2001-12-19 | 皇家菲利浦电子有限公司 | Transmission of a digital information signal having M bit PCM samples |
CN1455557A (en) * | 2002-03-25 | 2003-11-12 | 联合特里西斯株式会社 | Changeable length/fixed length data conversion method and apparatus |
-
2006
- 2006-03-31 CN CN2006100668901A patent/CN101046961B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN86101813A (en) * | 1985-03-25 | 1986-09-24 | 美国无线电公司 | Have block deviation compensation numeral surely than circuit |
CN1255702A (en) * | 1992-03-10 | 2000-06-07 | 索尼公司 | Modulation method and demodulation method, and modulator and demodulator thereof |
CN1249057A (en) * | 1997-10-29 | 2000-03-29 | 皇家菲利浦电子有限公司 | Device for encoding/decoding N-bit source words into corresponding M-bit channel words, and vice versa |
CN1327590A (en) * | 1999-08-13 | 2001-12-19 | 皇家菲利浦电子有限公司 | Transmission of a digital information signal having M bit PCM samples |
CN1455557A (en) * | 2002-03-25 | 2003-11-12 | 联合特里西斯株式会社 | Changeable length/fixed length data conversion method and apparatus |
Non-Patent Citations (1)
Title |
---|
宋岩涛,俞铁城,周健来.一种新的语音波形压缩编码算法.第五届全国人机语音通讯学术会议论文集.1998,362-365. * |
Also Published As
Publication number | Publication date |
---|---|
CN101046961A (en) | 2007-10-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5166686A (en) | Variable length block coding with changing characteristics of input samples | |
US4718087A (en) | Method and system for encoding digital speech information | |
US5978757A (en) | Post storage message compaction | |
US4825451A (en) | Technique for transmission of voice communications and apparatus useful therein | |
US4382160A (en) | Methods and apparatus for encoding and constructing signals | |
JPH03503708A (en) | Digital sample coding devices and methods, and video signal processing systems | |
EP1274172A3 (en) | Digital signal modulation method and apparatus, encoding method and apparatus, storage medium, transmission apparatus and program | |
CN101046961B (en) | Speech compression, decompression method and circuit based on wave shape | |
WO1985005514A1 (en) | Signal processing system | |
CN101388731A (en) | Low-rate equivalent voice underwater acoustic communication technology | |
CN105337617B (en) | A kind of FSN files high-efficiency compression method | |
AU716880B2 (en) | Method for compressing an analog signal | |
US4890326A (en) | Method for compressing data | |
KR100453142B1 (en) | Compression Method for Sound in a Mobile Communication Terminal | |
CN117294313B (en) | Educational robot data intelligent acquisition and storage method and system | |
JPH07199996A (en) | Waveform data coding device, waveform data coding method, waveform data decoding device, and waveform data coding / decoding device | |
KR950022178A (en) | Method and apparatus for encoding / decoding digital signal | |
US5323154A (en) | Data compressing and expanding apparatus | |
Rani et al. | A survey on lossless text data compression techniques | |
JP2005151327A (en) | Pcm data compressing/decompressing method and apparatus | |
CN113923262B (en) | Data communication real-time dynamic compression method based on cache | |
JP3912304B2 (en) | Compressed data structure, waveform generation device, and waveform storage device | |
KR100306891B1 (en) | A data coding method by pattern convertion | |
Hidayat et al. | Critical Understanding Performance of Huffman and Lempel Zip to Pattern Audio Data 16-bit | |
JPS6323426A (en) | Sound coding system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220221 Address after: 518040 innovation and Technology Plaza, Tian An Digital City, Shenzhen, Guangdong, Futian District B407 Patentee after: SHENZHEN SIGMA MICROELECTRONICS CO.,LTD. Address before: 100086 Beijing city Haidian District No. 48 Zhichun Road Yingdu building B block 15 layer Patentee before: BEIJING SIGMACHIP CO.,LTD. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20111012 |