CN104240716B - Audio data quality optimization method - Google Patents
Audio data quality optimization method Download PDFInfo
- Publication number
- CN104240716B CN104240716B CN201410255048.7A CN201410255048A CN104240716B CN 104240716 B CN104240716 B CN 104240716B CN 201410255048 A CN201410255048 A CN 201410255048A CN 104240716 B CN104240716 B CN 104240716B
- Authority
- CN
- China
- Prior art keywords
- matrix
- pcm
- row
- array
- waveform
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 29
- 238000005457 optimization Methods 0.000 title claims abstract description 20
- 230000008569 process Effects 0.000 claims abstract description 11
- 239000011159 matrix material Substances 0.000 claims description 79
- 230000007423 decrease Effects 0.000 claims description 12
- 238000005070 sampling Methods 0.000 claims description 11
- 101100328886 Caenorhabditis elegans col-2 gene Proteins 0.000 claims description 10
- 230000000630 rising effect Effects 0.000 claims description 6
- 238000007689 inspection Methods 0.000 claims description 3
- 230000017105 transposition Effects 0.000 claims description 3
- 230000032683 aging Effects 0.000 abstract description 2
- 238000000926 separation method Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000003491 array Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000009499 grossing Methods 0.000 description 2
- 238000005498 polishing Methods 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 238000001228 spectrum Methods 0.000 description 2
- 241001269238 Data Species 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000001427 coherent effect Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000008034 disappearance Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
Landscapes
- Mobile Radio Communication Systems (AREA)
- Complex Calculations (AREA)
Abstract
The invention discloses an audio data quality optimization method. According to the specific process, first, the time stamp count of each frame of audio data is calculated, then, the time stamp count difference value between every two adjacent frames of audio data is calculated, and if the difference value is larger than 5 times of a normal difference value, an aging optimization algorithm is adopted for correction; if the difference value is larger than 1.5 times of and smaller than 5 times of the normal difference value, a quality priority algorithm is adopted for correction; if the difference value is smaller than 1.5 times of the normal difference value, no correction is performed. After correction is performed with the scheme, no sonic boom is generated any more, people with ordinary hearing will not find missing of audio content, and the quality of a program in which a broadcasting station cites the audio for broadcasting is guaranteed well. The scheme is applicable to real-time optimization processing on audio data in digital video broadcasting.
Description
Technical field
The present invention relates to audio frequency and video process field, more particularly, to a kind of DVB transport stream sound intermediate frequency data matter
The method of amount real-time optimization.
Background technology
In digital video broadcast system, the media content of issue from height, range and it is ageing in terms of, all far above general
Broadcasting station.So, the media content in digital video broadcast system, have become broadcasting station programme it is more and more important
Quarry.In broadcasting station business scope, the multi-medium data in DVB transport stream is mainly to sound
The use of frequency data division.For application conveniently, it is necessary to realize the separation of realaudio data.Simultaneously as transmission channel is deposited
Certain unreliable, cause the presence of frame losing phenomenon during transmission of flow media data, the continuity for causing media data is broken
It is bad.It is this discontinuously mainly to show in audiovisual field:For video section, the impact of video pictures quality is caused, such as usual institute
Mosaic phenomenon said etc.;For audio-frequency unit, audio volume control cannot keep coherent, to hear phenomenon, such as noise, sonic boom, jump
Sound etc..
State Intellectual Property Office of the People's Republic of China disclosed application publication number on 04 23rd, 2014
The patent document of CN103745729A, title is a kind of audio frequency denoising method and system, and its method is by the inspection of audio frequency valid data
Survey in combination with audio frequency denoising, on the one hand, by Mel frequency parameter audio frequency valid data detection methods, obtain noise spectrum estimation
Initial value, estimate signal to noise ratio and remove the noise of non-audio valid data section;On the other hand, the noise by estimating when is made an uproar
Sound instantaneous variation trend, determines that current instant spectrum subtracts equation, removes the noise of audio frequency valid data section, goes in lifting so as to reach
Property noise after making an uproar when reduces the optimization in terms of " music noise " and realizes.But the frame losing that this scheme fails to solve in audio frequency is asked
Topic.
The content of the invention
The present invention mainly solves the problems, such as that existing for prior art frame losing cannot be solved, and may cause noise.Sonic boom, jump
The technical problem of the phenomenons such as sound, there is provided one kind can correct the incoherent problem of audio volume control, it is to avoid the phenomenon such as sonic boom, tone hopping,
Improve the voice data optimization method of quality of the voice data in broadcasting station is relayed, replayed.
The present invention is mainly addressed for above-mentioned technical problem by following technical proposals:A kind of voice data matter
Amount optimization method, comprises the following steps:
Step one, the timestamp counting for calculating each frame voice data;
Timestamp count difference value between step 2, the adjacent two frames voice data of inspection, if difference is more than normal difference
5 times, then between adjacent two frame insertLIndividual quiet sampled point,LComputing formula it is as follows:
L=(P2(t)-P1(t)-J(x))×x/90000
P1(t) for former frame voice data timestamp count,P2(t) for a later frame voice data timestamp count,J
(x) it is normal difference,xFor the sample rate of voice data,J(x) computing formula it is as follows:
J(x)=(1152/x)×90000。
Preferably, in step 2, if the timestamp count difference value between adjacent two frames voice data is more than positive constant
Value 1.5 times and less than 5 times of normal difference, then be modified as follows:
The sampled point number repaired is needed to be N, FB is sequence number of the waveform cut-off point in crude sampling point data, and BL is disconnected
Point waveform length, original sample point array is SN, it is So that sampled point array is exported after amendmentN, P is to calculate wave type energy cloud matrix
Latitude, P=min (BL × 3, N), matrix XP×PAll elements are 0 under original state, array BPAll elements are equal under original state
For 0, the initial value of variable i, variable row, variable col, variable row2 and variable col2 is 0;X [row] [col] representing matrix
XP×PRow rows col row element, B [row] represent array BPThe row element;This programme is in the fortune being multiplied
During calculation, if being related to array, by array BPRegard the matrix of the row of P rows 1 as, other arrays are equally processed;
S1, to matrix XP×PWith array BPAssignment;
S2, to matrix XP×PInvert, obtain inverse matrix X-1 P×P;
S3, by inverse matrix X-1 P×PWith array BPMultiplication obtains array AP;
S4, to matrix X2(N-P)×PAssignment;
S5, take matrix X2(N-P)×PFailure piecemeal submatrix X2 '(N-P)×BL, obtaining algorithm is:
X2′(N-P)×BL = SubMatrix(X2(N-P)×P, 0, N-P, FB, BL);
Carry out failure piecemeal submatrix transposition process and obtain matrix:X2T BL×(N-P);
S6, take matrix X2(N-P)×PFailure before before piecemeal submatrix X2 '(N-P)×BL, obtaining algorithm is:
Before X2 '(N-P)×FB = SubMatrix(X2(N-P)×P, 0, N-P, 0, FB);
S7, take matrix X2(N-P)×PFailure after after piecemeal submatrix X2 '(N-P)×BL, obtaining algorithm is:
After X2 '(N-P)×FB = SubMatrix(X2(N-P)×P, 0, N-P, 0, FB);
S8, piecemeal submatrix after the sub- square of piecemeal before failure and failure is entered ranks merging, matrix after being merged
Ak(N-P)×(B-BL);
S9, take original sample point SNBefore the failure of array before subset SFB, obtaining algorithm is:
Before SFB= SubArray(SN,0,FB);
S10, take original sample point SNAfter the failure of array after subset S(N-FB-BL), obtaining algorithm is:
After S(N-FB-BL)= SubArray(SN,FB+BL,N-FB-BL);
S11, subset after subset before failure and failure is merged, array Sk after being merged(N-BL);
S12, by matrix X2T BL×(N-P)With matrix X2 '(N-P)×BLMultiplication obtains matrix X3BL×BL, i.e.,
X3BL×BL= X2T BL×(N-P)×X2′(N-P)×BL;
S13, to matrix X3BL×BLInvert and obtain matrix X3-1 BL×BL;
S14, by matrix X3-1 BL×BLIn the symbol of each element negate, obtain matrix-X3-1 BL×BL, i.e.,
-X3-1 BL×BL=X3-1 BL×BL×(-1);
S15, by matrix-X3-1 BL×BLWith matrix X2T BL×(N-P)Multiplication obtains matrix X4 BL×(N-P), i.e.,
X4 BL×(N-P)= -X3-1 BL×BL×X2T BL×(N-P);
S16, by matrix X4 BL×(N-P)With matrix A k(N-P)×(B-BL)Multiplication obtains matrix X5BL×(N-BL), i.e.,
X5BL×(N-BL) = X4 BL×(N-P) ×Ak(N-P)×(B-BL);
S17, by matrix X5BL×(N-BL)With array Sk(N-BL)Array Su is obtained after being multiplied toBL, i.e.,
SuBL= X5BL×(N-BL)×Sk(N-BL);
S18, by before array SFB, array SuBLAfter array S(N-FB-BL)Merging obtains array SoN。
Array merging is split, for example, merge before SFBWith array SuBL, it is exactly by before array SFBIn each element make successively
For the 1st to the FB element in array after merging, by array SuBLIn each element successively as the FB after merging in array
+ 1 to the FB+BL element.
SubMatrix and SubArray is the standing order in C language.
Preferably, the detailed process of step S1 is as follows:
S101, when i be less than N-P when, into step S12;If i is more than or equal to N-P, assignment is completed;
S102, when i+P less than FB or i be more than FB+BL, into step S13;If i+P is not less than FB and i is not more than FB
+ BL, then i increases 1 and return to step S11;
If S103, row are less than P, into step S14;If row is more than or equal to P, i increases 1 and return to step
S11;
If S104, col are less than P, into step S15;If col is more than or equal to P, row increases 1 and return step
Rapid S13;
S105, the value of X [row] [col] is added with the value of S [i+row] × S [i+col] after, be assigned to X [row]
[col];After the value of B [row] is added with the value of S [i+P] × S [i+row], B [row] is assigned to;Col is increased into 1, is returned
Return step S14.
Preferably, the detailed process of step S4 is as follows:
S401, when row2 be less than N-P when, into step S42;If row2 is more than or equal to N-P, assignment terminates;
S402, when col2 be less than P when, into step S43;If col2 is more than or equal to P, row2 is increased into 1 and is returned
Return step S41;
S403 ,-A [col2] is assigned to X2 [row] [row+col];The value of X2 [row] [row+P] is set to into 1;Will
Col2 increases 1 and return to step S42.
Preferably, needing sampled point number N repaired to be determined by following methods:
N=N-+N+, N-For the sampling number before waveform breakpoint, N+For the sampling number after waveform breakpoint;N-And N+Value model
Enclose and be [10,50], therefore the span of N is [20,100];
PCM data sequence before breaking is PCM-50…PCM-3、PCM-2、PCM-1, the PCM data after breakpoint is PCM+1、
PCM+2、PCM+3、…PCM+50, then N-Determination algorithm it is as follows:
If PCM-1More than 0, and breakpoint is in the waveform decline stage, then take PCM-5And PCM-50Between, the head of waveform
Individual crest summit serial number N-;If breakpoint is in rising wave band, N-=10;
If PCM-1Less than 0, and breakpoint is in waveform ascent stage, then take PCM-10And PCM-50Between, the head of waveform
Individual trough low spot serial number N-;If breakpoint is in decline wave band, N-=10;
If PCM-1Equal to 0, then N-=10;
N+Determination algorithm it is as follows:
If PCM+1More than 0, and breakpoint is in waveform ascent stage, then take PCM+10And PCM+50Between, the head of waveform
Individual crest summit serial number N+;If breakpoint is in decline wave band, N+=10;
If PCM+1Less than 0, and breakpoint is in the waveform decline stage, then take PCM+10And PCM+50Between, the head of waveform
Individual trough low spot serial number N+;If breakpoint is in rising wave band, N+=10;
If PCM+1Equal to 0, then N+=10。
Preferably, the FB spans are the 40% to 60% of N;The span of the BL is 2 to 18.
This programme considers the distribution situation of energy before and after waveform breakpoint, and more general waveform smoothing processing algorithm is more
Consider neighbouring linguistic context situation, accomplished that the maximum reduction of original audio effect, waveform continue and more preferably smooth.
The substantial effect that the present invention brings is to be modified polishing to missing data, it is to avoid sonic boom is produced during broadcasting, is jumped
Sound phenomenon, it is ensured that is quoted to audio frequency by the program quality for broadcasting for broadcasting station.
Description of the drawings
Fig. 1 is the normal sequential bag schematic diagram of voice data produced after separation;
Fig. 2 is the schematic diagram that the voice data sequential produced after a kind of separation is surrounded by packet loss;
Fig. 3 is a kind of waveform diagram of timestamp count difference value more than 5 times of normal value;
Fig. 4 is the waveform of Fig. 3 through the revised waveform diagram of timeliness optimized algorithm;
Fig. 5 is a kind of timestamp technology difference in normal value 1.5 again to the waveform diagram between 5 times;
Fig. 6 is the waveform of Fig. 5 through the revised waveform diagram of quality priority algorithm;
Fig. 7 is a kind of outline schematic flow sheet of the present embodiment.
Specific embodiment
Below by embodiment, and accompanying drawing is combined, technical scheme is described in further detail.
Embodiment:When digital audio broadcasting uses the voice data in DVB, generally following mistake
Journey:
In real time separator receives the MPEG-2 over TS stream medium datas after unpacking, and carries out audio, video data separation,
Other its use of video data, not in this paper stated ranges;Voice data in the transport stream for obtaining, form is:MPEG-1
Layer 2 or other compression algorithms, while extracting the stamp per frame time.
Original audio data is input into into the decoder of correspondence encryption algorithm, the data obtain 48K samplings after decoding
Rate, monophonic/stereo, the pulse code modulation of 16 precision(Pulse Code Modulation,PCM)Data.
The PCM data produced after decoding and correlation time stamp input quality optimizer, the optimization of quality optimization device difficulty action accomplishment
Afterwards, the PCM data after output optimization.
PCM data after optimization is sent to the audio coders of MPEG-1 Layer 2 and is recoded, and generates and is adapted to broadcast
The voice data of the sector application standard in radio station, form is:MPEG-1 Layer 2 compress, 48K sample rates, it is stereo,
256kbps, 16 precision.
Data after warp knit code, in being stored into audio file, use for operation system.
With regard to audio frequency separation algorithm, can directly using some ripe at present algorithms.To the output after separation, in addition
Improve, i.e., added timestamp before each frame voice data.
Timestamp take 32bits, during value, by should audio frequency PTS(Display time mark in 33bits, TS stream
Sign)Go a high position to obtain, algorithm is timestamp=PTS&0xFFFFFFFF, be the counting of to system clock 300 clocks for dividing
Value, represents the frame data corresponding time(Broadcast)Time, often count=1/90000 second.
It is per the time span of frame MPEG 1-Layer II:1152/ sample rate(Second), such as 48K sample rates, every frame length
For 0.024 second, i.e., 0.024/ (1/90000)=2160 timestamp was counted.
Timestamp counting computing formula can derive as follows:
J(x)=(1152/x)*90000.(Unit:Timestamp is counted)
Wherein, parameter x represents the sample rate of voice data.
After separation, the normal sequential bag of voice data of generation is as shown in Figure 1.
Under normal circumstances, wrap between P1 ... P6, timestamp is continuous, it is necessary to be optimized, if source code and mesh
Mark coding is identical, then the process for can directly skip decoding, optimization, recoding.
If there is packet loss in transmitting procedure, after separation, the voice data sequential bag of generation is as shown in Figure 2.
It is found that between P1, P2 bag, audio pack is discontinuous, it is contemplated that the error of timestamp, for two it is wrapped
Between whether successional judgement, if the timestamp of P1 is P1 (t), P2 timestamps are P2 (t), then evaluation algorithm is as follows:
Tdiff = P2(t)-P1(t) (Unit:Timestamp is counted)
Tdiff <=J(x)*1.5 (Unit:Timestamp is counted)
That is, two bag timestamp count difference value Tdiff are less than within 1.5 times of normal difference J (x), are regarded as continuous
Audio pack.
It is by above-mentioned logic, it is found that different according to time tolerance when two audio packet times stamp is discontinuous, enable different
Optimized algorithm.
The overall outline flow process of this method is as shown in Figure 7.
(1)Timeliness optimized algorithm
If timestamp count difference value Tdiff is more than 5 times of J (x)(About 100ms), common human ear has been able to recognize
Contents lost, i.e. tone hopping phenomenon.The scene cannot lift acoustical quality by amendment optimization, if not mending long data, meeting
Cause audio time length to be lost serious, destroy the Annual distribution of final recording audio.For this purpose, under the failure rank, we
Using quiet polishing strategy, preferential amendment audio frequency duration.
If the timestamp of P1 is P1 (t), P2 timestamps are P2 (t), and J (x) is every frame length of the voice data that sample rate is x
Degree time counting, sample rate is x, then insert sampled point number calculating work formula as follows:
L(t,x)= (P2(t)-P1(t)-J(x))/90000*x(Quiet sampling number is inserted per sound channel)
It is as shown in Figure 3 using the waveform before timeliness optimized algorithm amendment;Revised waveform is as shown in Figure 4.
(2)Quality priority algorithm
If timestamp count difference value Tdiff is less than 5 times of J (x)(About 100ms), common human ear still can not be obvious
Recognize contents lost, but audio volume control is discontinuous, and sudden and violent sound phenomenon can be produced in some cases, affects sound quality.For this purpose,
Under the type failure, using audio continuity optimized algorithm, the lifting to audio frequency acoustical quality is preferentially realized.
Repairing algorithm principle is, first by want repair data before and after necessarily data, the change curve of learning data becomes
Gesture, then referring to the data to be repaired of variation tendency combination, carries out data after-treatment, i.e., maximized reservation initial data
Authenticity in the case of, meeting the general morphologictrend of data as far as possible, do not produce the feelings such as sonic boom, tuning to reach
Condition, the also maximized actual sound for retaining source data.
Assume to need the sampled point number repaired to be N, FB is sequence number (of the waveform cut-off point in crude sampling point data
As close N/2), BL is breakpoint waveform length (2 ~ 18, configure constant), and certain sound channel original sample point array is S [N], after calculating
Output sampled point array is So [N].
If to calculate wave type energy cloud matrix dimensionality, P=min (BL*3, N), i.e. P are less in BL × 3 and the numbers of N two to P
Value.
Define the real-coded GA matrix that matrix V NAME [ROW] [COL] is ROW rows COL row, under original state, Suo Youyuan
Element is 0.Element VNAME [ROW] [COL] is the element of ROW rows COL row in matrix V NAME [ROW] [COL].
It is SIZE that the VName [SIZE] that defines arrays is length, and element is the array of floating type, under preliminary state, Suo Youyuan
Element is 0 value.Element VName [SIZE] is the SIZE element in array VName [SIZE].
Arthmetic statement is as follows:
1. couple matrix X [P] [P] and array B [P] are circulated tax initial value:
for(i=0; i<N-P; i++)
if (i+P < FB|| i >= (FB+ BL))
for(row=0; row<P; row++) {
for(col=0; col<P; col++)
X[row][col] += (S[i+row] * S[i+col]);
B[row] += S[i+P] * S[i+row];
}
X [row] [col], s [i+row], s [i+col], B [row], s [i+P] and s [i+row] are unit in this step
Element;
2., by matrix X [P] [P], inverse matrix X is obtained-1[P][P]
3. A[P]= X-1[P][P] * B[P]
A [P] and B [P] is array in this step, and A [P] is regarded as the matrix of the row of P rows 1 during multiplication, regards B [P] as P rows 1
The matrix of row, X-1[P] [P] is matrix;
4.X2 [N-P] [P] matrix operation:
for(row=0; row<N-P; row++) {
for(col=0; col<P; col++)
X2 [row][row+col] = -A[col];
X2 [row][row+P] = 1;
}
X2 [row] [row+col], A [col] and X2 [row] [row+P] are element in this step;
5. failure piecemeal submatrix X2 ' [N-P] [BL] of matrix X2 [N-P] [P] is taken, and obtaining algorithm is:
X2’[N-P][BL] = SubMatrix(X2[N-P][P], 0, N-P, FB, BL);
Row transposition during ffault matrix is processed and obtains matrix X2T[BL][N-P];
6. take before the failure of matrix X2 [N-P] [P] before piecemeal submatrix X2 ' [N-P] [FB], obtaining algorithm is:Before X2 '
[N-P][FB] = SubMatrix(X2[N-P][P], 0, N-P, 0, FB);
7. take after the failure of matrix X2 [N-P] [P] after piecemeal submatrix X2 ' [N-P] [N-FB-BL], obtaining algorithm is:X2
[N-P] [N-FB-BL]=SubMatrix (X2 [N-P] [P], 0, N-P, FB+BL, N-FB-BL) afterwards;
8. the forward and backward matrix of pair failure enters ranks merging, matrix A k [N-P] [N-BL] after being merged;
9. obtain before the failure of original sample point array S [N] before subset array S [FB], obtaining computing is:[FB] before S=
SubArray(S[N],0,FB)
10. obtain after the failure of original sample point array S [N] after subset array S [N-FB-BL], obtaining computing is:After S
[N-FB-BL]= SubArray(S[N], FB+BL, N-FB-BL)
The forward and backward array of the 11. pairs of failures is merged, array Sk [N-BL] after being merged;
12. pairs of failure submatrixs carry out multiplication process:
X3[BL][BL]= X2T[BL][N-P] * X2’[N-P][BL]
X3 [BL] [BL], X2 in this stepT[BL] [N-P] and X2 ' [N-P] [BL] are matrix;
13., by matrix X3 [BL] [BL], obtain inverse matrix X3-1[BL][BL].
14. pairs of inverse matrix element value symbols are negated, i.e. X3-1[BL][BL]= X3-1[BL][BL]*(-1)
15. X4[BL][N-P]=X3-1[BL][BL]* X2T[BL][N-P]
X4 [BL] [N-P], X3 in this step-1[BL] [BL] and X2T[BL] [N-P] is matrix;
16.X5[BL][N-BL]=X4[BL][N-P]*Ak[N-P][N-BL]
X5 [BL] [N-BL], X4 [BL] [N-P] and Ak [N-P] [N-BL] are matrix in this step;
17.Su[BL]= X5[BL][N-BL] * Sk[N-BL]
Su [BL] and Sk [N-BL] is array in this step, Su [BL] is regarded the matrix of the row of BL rows 1 as, by Sk during multiplication
[N-BL] regards the matrix of the row of N-BL rows 1 as, and X5 [BL] [N-BL] is matrix;
After 18. merge [N-FB-BL] after [FB], array Su [BL] and array S before array S, finally calculated
As a result array So [N].
Sampled point number N repaired is needed, is obtained after waveform state analysis according to before and after breakpoint, its value arthmetic statement is such as
Under:
N=N-+N+, N-For the sampling number before waveform breakpoint, N+For the sampling number after waveform breakpoint.N-And N+Value model
Enclose and be [10,50], therefore the span of N is [20,100].
PCM data sequence before breaking is PCM-50…PCM-3、PCM-2、PCM-1, the PCM data after breakpoint is
PCM+1、PCM+2、PCM+3、…PCM+50, then N-Determination algorithm it is as follows:
If PCM-1More than 0, and breakpoint is in the waveform decline stage, then take PCM-5…PCM-50Between, the head of waveform
Individual crest summit serial number N-;If breakpoint is in rising wave band, N-=10。
If PCM-1Less than 0, and breakpoint is in waveform ascent stage, then take PCM-10…PCM-50Between, the head of waveform
Individual trough low spot serial number N-;If breakpoint is in decline wave band, N-=10。
If PCM-1Equal to 0, then N-=10。
N+Determination algorithm it is as follows:
If PCM+1More than 0, and breakpoint is in waveform ascent stage, then take PCM+10…PCM+50Between, the head of waveform
Individual crest summit serial number N+;If breakpoint is in decline wave band, N+=10。
If PCM+1Less than 0, and breakpoint is in the waveform decline stage, then take PCM+10…PCM+50Between, the head of waveform
Individual trough low spot serial number N+;If breakpoint is in rising wave band, N+=10。
If PCM+1Equal to 0, then N+=10。
It is as shown in Figure 5 using the waveform before quality priority algorithm amendment;Revised waveform is as shown in Figure 6.
The algorithm considers the distribution situation of energy before and after waveform breakpoint, and more general waveform smoothing processing algorithm is more
Consider neighbouring linguistic context situation, accomplished that the maximum reduction of original audio effect, waveform continue and more preferably smooth.
After the method amendment of Jing the present embodiment, sudden and violent sound is no longer produced, common hearing person does not realize audio frequency yet
The disappearance of content, ensure that well the program quality for broadcasting is quoted in broadcasting station to this part audio frequency.
Specific embodiment described herein is only explanation for example spiritual to the present invention.Technology neck belonging to of the invention
The technical staff in domain can be made various modifications to described specific embodiment or supplement or replaced using similar mode
Generation, but without departing from the spiritual of the present invention or surmount scope defined in appended claims.
Although more having used the terms such as matrix, array, timestamp counting herein, it is not precluded from using other terms
Possibility.It is used for the purpose of more easily describing and explaining the essence of the present invention using these terms;It is construed as appointing
A kind of what additional restriction is all contrary with spirit of the invention.
Claims (5)
1. a kind of voice data quality optimization method, it is characterised in that comprise the following steps:
Step one, the timestamp counting for calculating each frame voice data;
Timestamp count difference value between step 2, the adjacent two frames voice data of inspection, if difference is more than the 5 of normal difference
Times, then insert between adjacent two frameLIndividual quiet sampled point,LComputing formula it is as follows:
L=(P2(t)-P1(t)-J(x))×x/90000
P1(t) for former frame voice data timestamp count,P2(t) for a later frame voice data timestamp count,J(x)
For normal difference,xFor the sample rate of voice data,J(x) computing formula it is as follows:
J(x)=(1152/x)×90000;
In step 2, if the timestamp count difference value between adjacent two frames voice data is more than 1.5 times of normal difference and little
In 5 times of normal difference, then it is modified as follows:
The sampled point number repaired is needed to be N, FB is sequence number of the waveform cut-off point in crude sampling point data, and BL is breakpoint ripple
Shape length, original sample point array is SN, it is So that sampled point array is exported after amendmentN, P is to calculate wave type energy cloud matrix latitude,
P=min (BL × 3, N), matrix XP×PAll elements are 0 under original state, array BPAll elements are 0 under original state,
The initial value of variable i, variable row, variable col, variable row2 and variable col2 is 0;X [row] [col] representing matrix XP×P
Row rows col row element, B [row] represent array BPThe row element;
S1, to matrix XP×PWith array BPAssignment;
S2, to matrix XP×PInvert, obtain inverse matrix X-1 P×P;
S3, by inverse matrix X-1 P×PWith array BPMultiplication obtains array AP;
S4, to matrix X2(N-P)×PAssignment;
S5, take matrix X2(N-P)×PFailure piecemeal submatrix X2 '(N-P)×BL, obtaining algorithm is:
X2′(N-P)×BL = SubMatrix(X2(N-P)×P, 0, N-P, FB, BL);
Carry out failure piecemeal submatrix transposition process and obtain matrix:X2T BL×(N-P);
S6, take matrix X2(N-P)×PFailure before before piecemeal submatrix X2 '(N-P)×BL, obtaining algorithm is:
Before X2 '(N-P)×FB = SubMatrix(X2(N-P)×P, 0, N-P, 0, FB);
S7, take matrix X2(N-P)×PFailure after after piecemeal submatrix X2 '(N-P)×BL, obtaining algorithm is:
After X2 '(N-P)×FB = SubMatrix(X2(N-P)×P, 0, N-P, 0, FB);
S8, piecemeal submatrix after the sub- square of piecemeal before failure and failure is entered ranks merging, matrix A k after being merged(N-P)×(B-BL);
S9, take original sample point SNBefore the failure of array before subset SFB, obtaining algorithm is:
Before SFB= SubArray(SN,0,FB);
S10, take original sample point SNAfter the failure of array after subset S(N-FB-BL), obtaining algorithm is:
After S(N-FB-BL)= SubArray(SN,FB+BL,N-FB-BL);
S11, subset after subset before failure and failure is merged, array Sk after being merged(N-BL);
S12, by matrix X2T BL×(N-P)With matrix X2 '(N-P)×BLMultiplication obtains matrix X3BL×BL, i.e.,
X3BL×BL= X2T BL×(N-P)×X2′(N-P)×BL;
S13, to matrix X3BL×BLInvert and obtain matrix X3-1 BL×BL;
S14, by matrix X3-1 BL×BLIn the symbol of each element negate, obtain matrix-X3-1 BL×BL, i.e.,
-X3-1 BL×BL=X3-1 BL×BL×(-1);
S15, by matrix-X3-1 BL×BLWith matrix X2T BL×(N-P)Multiplication obtains matrix X4 BL×(N-P), i.e.,
X4 BL×(N-P)= -X3-1 BL×BL×X2T BL×(N-P);
S16, by matrix X4 BL×(N-P)With matrix A k(N-P)×(B-BL)Multiplication obtains matrix X5BL×(N-BL), i.e.,
X5BL×(N-BL) = X4 BL×(N-P) ×Ak(N-P)×(B-BL);
S17, by matrix X5BL×(N-BL)With array Sk(N-BL)Array Su is obtained after being multiplied toBL, i.e.,
SuBL= X5BL×(N-BL) ×Sk(N-BL);
S18, by before array SFB, array SuBLAfter array S(N-FB-BL)Obtain array SoN。
2. a kind of voice data quality optimization method according to claim 1, it is characterised in that step S1 it is concrete
Process is as follows:
S101, when i be less than N-P when, into step S12;If i is more than or equal to N-P, assignment is completed;
S102, when i+P less than FB or i be more than FB+BL, into step S13;If i+P is not less than FB and i is not more than FB+BL,
Then i increases 1 and return to step S11;
If S103, row are less than P, into step S14;If row is more than or equal to P, i increases 1 and return to step S11;
If S104, col are less than P, into step S15;If col is more than or equal to P, row increases 1 and return to step
S13;
S105, the value of X [row] [col] is added with the value of S [i+row] × S [i+col] after, be assigned to X [row] [col];
After the value of B [row] is added with the value of S [i+P] × S [i+row], B [row] is assigned to;Col is increased into 1, return to step
S14。
3. a kind of voice data quality optimization method according to claim 1, it is characterised in that step S4 it is concrete
Process is as follows:
S401, when row2 be less than N-P when, into step S42;If row2 is more than or equal to N-P, assignment terminates;
S402, when col2 be less than P when, into step S43;If col2 is more than or equal to P, row2 is increased into 1 and step is returned
Rapid S41;
S403 ,-A [col2] is assigned to X2 [row] [row+col];The value of X2 [row] [row+P] is set to into 1;Col2 is increased
Big 1 and return to step S42.
4. a kind of voice data quality optimization method according to claim 1 or 2 or 3, it is characterised in that need what is repaired
Sampled point number N is determined by following methods:
N=N-+N+, N-For the sampling number before waveform breakpoint, N+For the sampling number after waveform breakpoint;N-And N+Span is equal
For [10,50], therefore the span of N is [20,100];
PCM data sequence before breaking is PCM-50…PCM-3、PCM-2、PCM-1, the PCM data after breakpoint is PCM+1、PCM+2、
PCM+3、…PCM+50, then N-Determination algorithm it is as follows:
If PCM-1More than 0, and breakpoint is in the waveform decline stage, then take PCM-5And PCM-50Between, the first crest of waveform
Summit serial number N-;If breakpoint is in rising wave band, N-=10;
If PCM-1Less than 0, and breakpoint is in waveform ascent stage, then take PCM-10And PCM-50Between, the first ripple of waveform
Paddy low spot serial number N-;If breakpoint is in decline wave band, N-=10;
If PCM-1Equal to 0, then N-=10;
N+Determination algorithm it is as follows:
If PCM+1More than 0, and breakpoint is in waveform ascent stage, then take PCM+10And PCM+50Between, the first ripple of waveform
Peak maximum serial number N+;If breakpoint is in decline wave band, N+=10;
If PCM+1Less than 0, and breakpoint is in the waveform decline stage, then take PCM+10And PCM+50Between, the first ripple of waveform
Paddy low spot serial number N+;If breakpoint is in rising wave band, N+=10;
If PCM+1Equal to 0, then N+=10。
5. a kind of voice data quality optimization method according to claim 4, it is characterised in that the FB spans are
The 40% to 60% of N;The span of the BL is 2 to 18.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410255048.7A CN104240716B (en) | 2014-06-11 | 2014-06-11 | Audio data quality optimization method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410255048.7A CN104240716B (en) | 2014-06-11 | 2014-06-11 | Audio data quality optimization method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104240716A CN104240716A (en) | 2014-12-24 |
CN104240716B true CN104240716B (en) | 2017-04-26 |
Family
ID=52228669
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410255048.7A Active CN104240716B (en) | 2014-06-11 | 2014-06-11 | Audio data quality optimization method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104240716B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111048103A (en) * | 2019-11-22 | 2020-04-21 | 湖南泊湾科技有限公司 | Method for processing plosive of audio data of player |
CN117061039B (en) * | 2023-10-09 | 2024-01-19 | 成都思为交互科技有限公司 | Broadcast signal monitoring device, method, system, equipment and medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1531276A (en) * | 2003-03-13 | 2004-09-22 | 华为技术有限公司 | Self adaptable jitter caching method for eliminating IP speech data jitter |
CN101106689A (en) * | 2006-07-11 | 2008-01-16 | 上海高清数字科技产业有限公司 | Data frame filling method for multi-modulation mode transmission system |
CN101321033A (en) * | 2007-06-10 | 2008-12-10 | 华为技术有限公司 | Frame compensation method and system |
CN101651509A (en) * | 2008-08-15 | 2010-02-17 | 威盛电子(中国)有限公司 | Terminal and method for securely playing multimedia broadcast content |
CN102882747A (en) * | 2012-10-10 | 2013-01-16 | 烽火通信科技股份有限公司 | Ethernet network packet loss probability measuring method and system based on sending and receiving timestamps |
CN102891780A (en) * | 2012-10-10 | 2013-01-23 | 烽火通信科技股份有限公司 | Method and system for measuring Ethernet packet loss rate based on transmitting timestamp |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7634227B2 (en) * | 2006-03-29 | 2009-12-15 | Sony Ericsson Mobile Communications Ab | Method and system for controlling audio data playback in an accessory device |
-
2014
- 2014-06-11 CN CN201410255048.7A patent/CN104240716B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1531276A (en) * | 2003-03-13 | 2004-09-22 | 华为技术有限公司 | Self adaptable jitter caching method for eliminating IP speech data jitter |
CN101106689A (en) * | 2006-07-11 | 2008-01-16 | 上海高清数字科技产业有限公司 | Data frame filling method for multi-modulation mode transmission system |
CN101321033A (en) * | 2007-06-10 | 2008-12-10 | 华为技术有限公司 | Frame compensation method and system |
CN101651509A (en) * | 2008-08-15 | 2010-02-17 | 威盛电子(中国)有限公司 | Terminal and method for securely playing multimedia broadcast content |
CN102882747A (en) * | 2012-10-10 | 2013-01-16 | 烽火通信科技股份有限公司 | Ethernet network packet loss probability measuring method and system based on sending and receiving timestamps |
CN102891780A (en) * | 2012-10-10 | 2013-01-23 | 烽火通信科技股份有限公司 | Method and system for measuring Ethernet packet loss rate based on transmitting timestamp |
Also Published As
Publication number | Publication date |
---|---|
CN104240716A (en) | 2014-12-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Brandenburg | MP3 and AAC explained | |
CN101479786B (en) | Method for encoding and decoding object-based audio signal and apparatus thereof | |
CN103155030B (en) | Method and apparatus for processing a multi-channel audio signal | |
CN108111997A (en) | Bluetooth equipment audio synchronization method and system | |
CN101009952B (en) | Method and apparatus to provide active audio matrix decoding based on the positions of speakers and a listener | |
AU2016202800A1 (en) | Signal processing apparatus and method, and program | |
EP3044877B1 (en) | System aspects of an audio codec | |
JP2013537321A5 (en) | ||
CN105306110B (en) | A kind of method and system realized synchronous music and played | |
KR20060131866A (en) | Frequency-based audio channel coding in parametric multi-channel coding systems | |
CA2699004A1 (en) | A method and an apparatus of decoding an audio signal | |
CN104240716B (en) | Audio data quality optimization method | |
ES2370218B1 (en) | PROCEDURE AND DEVICE FOR SYNCHRONIZING SUBTITLES WITH AUDIO IN DIRECT SUBTITLE. | |
JP6728154B2 (en) | Audio signal encoding and decoding | |
US20160286315A1 (en) | Sound processing apparatus, crosstalk canceling system and method | |
CH653192A5 (en) | METHOD FOR ENCODING AND ENCODING A DIGITAL SIGNAL. | |
CN109905763B (en) | Method for optimizing audio playing pause of player | |
CN101512909B (en) | Signal processor | |
US20090257335A1 (en) | Audio signal processing method | |
CN1988662A (en) | Self adaptive multimedia playing method | |
EP3497697A1 (en) | Dominant frequency processing of audio signals | |
CN100530356C (en) | Digital information reproducing apparatus and method | |
US20080124043A1 (en) | Multiplexing apparatus, multiplexing method, and computer product | |
JP4534168B2 (en) | Information processing apparatus and method, recording medium, and program | |
US20100046908A1 (en) | Video editing 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 310052, Zhejiang, Hangzhou province Binjiang District Long River Street No. 399, No. 3, four, five floor Patentee after: Hangzhou grandwell Polytron Technologies Inc Address before: 310052, No. 3, building 399, building four, Qiu Yi Road, Binjiang District Changhe Road, Hangzhou, Zhejiang Patentee before: Hangzhou Linker Digital Technology Co., Ltd. |