CN108696491A - The transmission processing method of audio data and device, receiving handling method and device - Google Patents

The transmission processing method of audio data and device, receiving handling method and device Download PDF

Info

Publication number
CN108696491A
CN108696491A CN201710237479.4A CN201710237479A CN108696491A CN 108696491 A CN108696491 A CN 108696491A CN 201710237479 A CN201710237479 A CN 201710237479A CN 108696491 A CN108696491 A CN 108696491A
Authority
CN
China
Prior art keywords
amr
data
audio
error correcting
audio data
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
CN201710237479.4A
Other languages
Chinese (zh)
Other versions
CN108696491B (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.)
Leadcore Technology Co Ltd
Original Assignee
Leadcore Technology Co Ltd
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 Leadcore Technology Co Ltd filed Critical Leadcore Technology Co Ltd
Priority to CN201710237479.4A priority Critical patent/CN108696491B/en
Publication of CN108696491A publication Critical patent/CN108696491A/en
Application granted granted Critical
Publication of CN108696491B publication Critical patent/CN108696491B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/005Correction of errors induced by the transmission channel, if related to the coding algorithm
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • G10L19/18Vocoders using multiple modes
    • G10L19/24Variable rate codecs, e.g. for generating different qualities using a scalable representation such as hierarchical encoding or layered encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1069Session establishment or de-establishment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]

Abstract

The present invention relates to Audiotechnica field, a kind of transmission processing method of audio data and device, receiving handling method and device are disclosed.In embodiment of the present invention, pulse code modulation audio data to be sent is obtained;By pulse code modulation audio data coding at the AMR audio datas of present frame;According to the AMR audio datas of the N frames continuously transmitted recently before current time, error correcting code is generated, wherein N is positive integer;By the AMR audio datas of present frame and error correcting code composition data packet, and send data packet.Embodiment of the present invention, under compatible prior art specification, effectively reduce audio data packet loss influences caused by speech play, and redundant data is seldom, will not additionally occupy a large amount of transmission bandwidths, effectively prevents obviously increasing for system and network overhead, simultaneously, the ability that packet loss is concentrated with certain processing, voice interim card caused by effectively preventing packet loss lose word, noiseless various problems, significant increase user experience.

Description

The transmission processing method of audio data and device, receiving handling method and device
Technical field
The present invention relates to Audiotechnica field, more particularly to the transmission processing method of audio data is handled with device, reception Method and apparatus.
Background technology
VOLTE (Voice Over Long Term Evolution, the talk business based on long term evolution) telephone service It is one of the core business of 4G communications, better voice quality can be provided, while Internet resources, VOLTE electricity can be saved again Words belong to PS (packet switching, packet switch) phone, and audio-frequency unit uses AMR (Adaptive Multi- Rate, adaptive multi-rate) coding, it is general to give tacit consent to using AMR-WB (Adaptive Multi-Rate WideBand) codings, In view of voice communication interactivity is strong, require transmission delay low the features such as, VOLTE telephone services and other VOIP (Voice OverInternet Protocol, the networking telephone) scheme is the same, in order to ensure the real-time of voice, audio transmission mechanism Similar scheme is used, i.e., quickly sends packets of audio data as far as possible, but any feedback repair place is not made to audio data Reason.According to the code requirement of middle movement, the modem carrying in VOLTE phones uses Unacknowledged Mode, i.e., wirelessly Bottom will not carry out re-transmission reparation after packet loss occurs in channel, while audio transmission layer uses RTP/AVP (Real-time Transport Protocol/AudioVideo Profile, real-time transport protocol/audio frequency and video brief introduction) transmission mode, i.e., RTP layers will not feed back audio packet loss information, however, the packet loss in network transmission process is inevitable, especially wirelessly It is easier packet loss occur in communication environment, packet loss once occur with existing technical specification, to will result in tone decoding data endless It is whole, how much influenced to will produce voice interim card by packet loss, lose word, noiseless various problems, influences subjective experience effect, although VOLTE uses better AMR-WB coded formats, but if packet loss problem cannot be controlled, cannot not only play high definition voice Advantage, may be not as good as the effect of traditional C/S (Circuit Switched, circuit switching) phone.
Currently, including mainly for the technical solution of packet loss processing:Scheme one, using the retransmission mechanism of similar video, i.e., RTP using RTP/AVPF (Real-time Transport Protocol/Audio VideoProfile, real-time transport protocol/ Audio frequency and video brief introduction is fed back) mechanism, it is found that after packet loss occurs in audio, to transmitting terminal feedback information, transmitting terminal is waited for retransmit data Packet.Scheme two retransmits the audio data of primary previous packet using the redundant transmission of audio data that is, in the latter audio pack, Previous packet can be directly recovered by latter bag data after there is packet loss.Scheme three is being sent using forward error correction technique End carries out Error Correction of Coding to data, and receiving terminal directly recovers packet loss data after finding packet loss according to error correcting code.
However, in the implementation of the present invention, the inventors of the present application found that scheme one is wanted after sending feedback information Equal re-transmissions packet is reached and could be played, and considerably increases delay, i.e., total delay, which at least increases, is equal to link RTT (Round Trip Time, round trip delay time) time quantum, usual LTE shows the RTT times off the net more than hundreds of milliseconds, and RTT is more when signal difference Long, usual transmission delay can feel to come more than 200ms, and the interactivity for the longer voice that is delayed is poorer, may be not as good as CS electricity Words are experienced.Scheme two, although very low without latency issue efficiency, usual signal is better, packet loss will not surpass under midpoint Cross 10%, and redundant transmission it is practical increase 100% data volume, for VOLTE phones, carrying bandwidth has maximum value limit It is fixed, it does not have so big surplus generally and carrys out transmission of redundant data.Scheme three, on the one hand, needs are first grouped data packet again Error correcting code is calculated, then error correction information is distributed in each data packet and is carried, i.e., transmitting terminal needs after waiting for whole group data here Could handle, receiving terminal also to wait whole groups data here after could error correction restore, this be equivalent to transmitting terminal and receiving terminal all Delay is added additional, the needs of voice low delay cannot be met, on the other hand, limited error recovery capability, a usual data point Group can only cope with a packet loss, can not restore if concentrating and two packet losses occur, that is, be only used for the very average field of packet loss Scape, moreover, what error correction code word was usually fixed, i.e., dynamically adapting, and Error Correction of Coding can not be carried out according to the variation of audio data Data afterwards are long, it is likely that are more than the maximum bandwidth that network gives, it is seen then that scheme three is only suitable for one-way transmission and right Be delayed insensitive scene, is not appropriate for being used for VOLTE telephone services.
Invention content
A kind of transmission processing method of audio data of being designed to provide of embodiment of the present invention is handled with device, reception Method and apparatus so that under compatible prior art specification, effectively reduce audio data packet loss influences caused by voice, and Redundant data is seldom, will not additionally occupy a large amount of transmission bandwidths, effectively prevents obviously increasing for system and network overhead, together When, there is the ability that packet loss is concentrated in certain processing, voice interim card caused by effectively preventing packet loss loses word, noiseless various asks Topic, significant increase user experience effect.
In order to solve the above technical problems, embodiments of the present invention provide a kind of transmission processing method of audio data, Including:
Obtain pulse code modulation audio data to be sent;
By the pulse code modulation audio data coding at the AMR audio datas of present frame;
According to the AMR audio datas of the N frames continuously transmitted recently before current time, error correcting code is generated, wherein N is just whole Number;
By the AMR audio datas of the present frame and the error correcting code composition data packet, and send the data packet.
Embodiments of the present invention additionally provide a kind of receiving handling method of audio data, including:
Parse the data packet being currently received;
According to analysis result, it whether there is data packet generation packet loss before judging current time;
If there are the data packets, and packet loss occurs before current time, according to the M continuously received recently before current time The AMR audio datas of frame, the error correcting code with the L frames continuously received recently after current time recover the AMR sounds of packet loss Frequency evidence and the error correcting code, and the AMR audio data codings recovered are played at pulse code modulation audio data; Otherwise, directly by the AMR audio data codings of the data packet being currently received at the pulse code modulation Audio data plays.
Embodiments of the present invention additionally provide a kind of transmission processing unit of audio data, including:
Acquisition module, for obtaining pulse code modulation audio data to be sent;
Coding module is used for the pulse code modulation audio data coding into the AMR audio datas of present frame;
Error correction code module generates error correction for the AMR audio datas according to the N frames continuously transmitted recently before current time Code, wherein N is positive integer;
Packet encapsulation module is used for the AMR audio datas of the present frame and the error correcting code composition data packet;
Sending module, for sending the data packet.
Embodiments of the present invention additionally provide a kind of receiving and processing device of audio data, including:
Parsing module, for parsing the data packet being currently received;
Judgment module, for according to analysis result, whether there is data packet generation packet loss before judging current time;
First execution module, when for packet loss to occur there are the data packet before current time, before current time The AMR audio datas of the M data packet continuously received recently, with entangling for L data packet continuously being received recently after current time Error code recovers the AMR audio datas of packet loss and the error correcting code, and the AMR audio datas recovered is compiled Code is played at pulse code modulation audio data;
Second execution module, for directly compiling the AMR audio datas of the data packet being currently received Code is played at the pulse code modulation audio data.
Embodiment of the present invention in terms of existing technologies, obtains pulse code modulation audio data to be sent, and By pulse code modulation audio data coding at the AMR audio datas of present frame so that audio data uses AMR coded formats, According to the AMR audio datas of the N frames continuously transmitted recently before current time, error correcting code is generated, wherein N is positive integer so that is connect Receiving end can recover the data packet that packet loss occurs in transmission process in time according to error correcting code, by the AMR audio datas of present frame With error correcting code composition data packet, and data packet is sent, to be converted into audio data to be transmitted to be suitble to network transmission requirement Data packet be transmitted, under compatible prior art specification, effectively reduce audio data packet loss shadow caused by speech play It rings, and redundant data is seldom, will not additionally occupy a large amount of transmission bandwidths, effectively prevents the apparent increasing of system and network overhead Add, meanwhile, there is the ability that packet loss is concentrated in certain processing.
In addition, it is described by the pulse code modulation audio data coding at the AMR audio datas of present frame, it is specific to wrap It includes:According to the correspondence of preset channel quality and AMR coding modes, institute corresponding with presently described channel quality is obtained State AMR coding modes;The pulse code modulation audio data is encoded into the present frame according to the AMR coding modes AMR audio datas.According to present channel quality in real time, accurately select the AMR coding modes to match, to make full use of Current channel quality carries out audio data transmission, improves efficiency of transmission.
In addition, the AMR audio datas according to the N frames continuously transmitted recently before current time, generate error correcting code, specifically Including:By the sequence from morning to night of sending time, the N-i+1 subdata is taken out from the AMR audio datas of the i-th frame successively Block, and the error correcting code is generated according to each sub-block, wherein i=1,2 ..., N, the AMR audio numbers of i-th frame According to being logically divided into N number of sub-block in advance.According to the error correcting code that the process generates, effectively audio data packet loss is reduced The influence caused by speech play, and redundancy is few, avoids obviously increasing for system and network overhead.
In addition, the N values are 8;The AMR audio datas according to the N frames continuously transmitted recently before current time, it is raw At error correcting code, specifically include:Judge the AMR coding modes whether be the AMR coding modes pattern 5 to the AMR compile The pattern 8 of pattern;If the AMR coding modes are the pattern 5 to the pattern 8, by sending time from morning to The sequence in evening takes out the N-r+1 sub-block from the AMR audio datas of r frames successively, wherein r=1,2 ..., 8, it is described The AMR audio datas of r frames are logically divided into 8 sub-blocks in advance;If the non-mould of AMR coding modes Formula 5 and the pattern 8, then press the sequence from morning to night of sending time, is taken out j-th from the AMR audio datas of jth frame successively Sub-block takes out the N-k+1 sub-block from the AMR audio datas of kth frame successively, wherein j=1,2,3,4, k=5, 6,7,8, the AMR audio datas of the jth frame are logically divided into 4 in advance with the AMR audio datas of the kth frame Sub-block.For different AMR coding modes, rationally effective error correcting code is generated, thus under specific AMR coding modes, The ability of packet loss is concentrated with processing.
Description of the drawings
Fig. 1 is the transmission process flow figure according to a kind of audio data of first embodiment of the invention;
Fig. 2 is the error correcting code generating process schematic diagram according to first embodiment of the invention;
Fig. 3 is the header format schematic diagram according to the common RTP of first embodiment of the invention;
Fig. 4 is the header format schematic diagram according to the extension RTP of first embodiment of the invention;
Fig. 5 is the transmission process flow figure according to a kind of audio data of second embodiment of the invention;
Fig. 6 is the error correcting code generating process schematic diagram according to the AMR coding modes 5 to 8 of second embodiment of the invention;
Fig. 7 is the error correcting code generating process schematic diagram according to the AMR coding modes 0 to 4 of second embodiment of the invention;
Fig. 8 is the receiving handling method flow chart according to a kind of audio data of third embodiment of the invention;
Fig. 9 is the AMR audio datas according to a packet loss of the AMR coding modes 0 to 8 of third embodiment of the invention Recovery process schematic diagram;
Figure 10 is the AMR audio datas according to a packet loss of the AMR coding modes 5 to 8 of third embodiment of the invention Recovery process schematic diagram;
Figure 11 is the AMR audio datas according to a packet loss of the AMR coding modes 0 to 4 of third embodiment of the invention Recovery process schematic diagram;
Figure 12 is the AMR audio datas according to the continual data package dropout of the AMR coding modes 0 to 4 of third embodiment of the invention Recovery process schematic diagram;
Figure 13 is the structural schematic diagram according to a kind of transmission processing unit of audio data of four embodiment of the invention;
Figure 14 is the structural schematic diagram according to a kind of transmission processing unit of audio data of fifth embodiment of the invention;
Figure 15 is the structural schematic diagram according to a kind of receiving and processing device of audio data of sixth embodiment of the invention.
Specific implementation mode
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to each reality of the present invention The mode of applying is explained in detail.However, it will be understood by those skilled in the art that in each embodiment of the present invention, In order to make the reader understand this application better, many technical details are proposed.But even if without these technical details and base In the various changes and modifications of following embodiment, the application technical solution claimed can also be realized.
First embodiment of the invention is related to a kind of transmission processing method of audio data.Detailed process is as shown in Figure 1.
In a step 101, pulse code modulation audio data to be sent is obtained.
Specifically, terminal device obtains pulse code modulation audio data to be sent, such as the pulse of VOLTE phones Code modulated audio data.
In a step 102, by pulse code modulation audio data coding at the AMR audio datas of present frame.
Specifically, according to the related specifications of group of China Mobile, the audio-frequency unit of the VOLTE phones of terminal device It is encoded using AMR, the characteristics of AMR codings are a kind of multi tate audio coding algorithms, incorporating parametric coding and waveform coding, it is more Applied to compress speech, AMR codings include AMR-NB and AMR-WB, and the two is essentially identical in frame format, and AMR-WB encodes code Rate higher can provide better sound quality, be the default code format in VOLTE phones, and the AMR codings subsequently mentioned refer both to AMR-WB is encoded, and certainly, AMR-NB codings can also use same method to handle.
Wherein, during specific coding, terminal device is closed according to preset channel quality is corresponding with AMR coding modes System obtains corresponding with present channel quality AMR coding modes, according to the AMR coding modes, by pulse code modulation sound Frequency evidence is encoded into the AMR audio datas of present frame, wherein different AMR coding modes correspond to different code rates with Data length can use the AMR coding modes of high-speed, such as AMR coding modes 7, AMR coding when channel quality is preferable Pattern 8 can use the AMR coding modes of medium-rate, such as AMR coding modes 5, AMR coding modes when channel quality is general 6, when channel quality is bad, the AMR coding modes of low rate, such as AMR coding modes 0 can be used to AMR coding modes 4, Wherein, channel quality can be prejudged according to actual transfer rate or data packetloss rate.
It further says, usual AMR frames include with lower part:AMR headers, AMR auxiliary informations and AMR audio datas, Specific format is as shown in table 1 below, wherein AMR headers specifically include:Frame type indicates that frame type, which is used to indicate, to be worked as with bad frame Previous frame type of coding, unless coding mode changes, otherwise the field will not change, and bad frame instruction is mainly used for CS phones, indicates Have error code appearance in frame, and the field does not use in PS phones because occur when bad frame link layer can direct packet loss, can receive Be all no error code good frame.AMR auxiliary informations specifically include:Coding mode, request mode and CRC check, coding mode are used In indicating current frame encoding mode, unless coding mode changes, otherwise the field will not change, and request mode is for asking other side Change coding mode, actual coding pattern is controlled by transport layer, which does not use, and CRC check is often used without.AMR audios Data specifically include class A, class B and class C, and class A is critical data, can not be decoded after loss, and class B is on the basis of class A data Sound quality is improved, class C is to improve sound quality on the basis of class B data.
Table 1
In step 103, according to the AMR audio datas of the N frames continuously transmitted recently before current time, error correcting code is generated.
Specifically, can be seen that only AMR audio data portions according to the AMR frame structures of above-mentioned table 1 is that every frame is different , other fields remain unchanged in a stream, so only needing to protect AMR audio data portions with error correcting code, wherein Terminal device is when specifically generating error correcting code, by the sequence from morning to night of sending time, successively from the AMR audio numbers of the i-th frame Error correcting code is generated according to the N-i+1 sub-block of middle taking-up, and according to each sub-block, wherein i=1,2 ..., N, the i-th frame AMR audio datas be logically divided into N number of sub-block in advance, wherein N is positive integer, it should be noted that N's Specific value is by those skilled in the art depending on comprehensive measurement situations such as channel quality, error correcting capability and propagation delay time.
It further says, by taking N values 6 as an example, briefly introduces the generating process of error correcting code, it, should when N takes other values The generating process of error correcting code similarly adapts to.As shown in Fig. 2, being divided into 6 pieces per frame AMR audio data portions, mark respectively It is denoted as A, B, C, D, E, F, wherein the division of data block is only used for calculating error correcting code ECC, audio-frequency unit or complete when actual transmissions A whole frame, then, the error correcting code ECC of the AMR audio datas of present frame, i.e., Pack shown in Fig. 2nECCn, basis is needed to work as The AMR audio datas of 6 frames continuously transmitted recently before the preceding moment generate, that is, need according to Packn-6,Packn-5,Packn-4, Packn-3,Packn-2,Packn-1The sub-blocks such as A, B, C, D, E, F generate, i.e., successively by Fn-6,En-5,Dn-4,Cn-3,Bn-2, An-1The information bit for forming code word, then calculates check bit, i.e. error correcting code ECCn, and it is stored in PacknIt is interior.
It should be noted that selecting RS (Reed-Solomon, inner institute) code as error correcting code, RS to improve error correction efficiency Code is built upon GF (2m) a kind of linear block codes on (Galois Field, galois field) domain, there is very strong error correcting capability. It can choose m=7 according to the data length of AMR, i.e., each 7 bit of symbol, code word maximum length 127 (including information bit and prison Superintend and direct position), and error correcting capability is to supervise the half of bit length, the AMR data lengths under different AMR coding modes and error correction code length Information is as shown in table 2 below, and by taking the AMR coding modes 0 in table 2 as an example, it is (long to be divided into 4 data blocks for a length of 132 bit of audio frame Degree rounds up), i.e., each 35 bit of data block (corresponds to 5 symbols, information bit is made of 8 data blocks, i.e., 40 symbols Number, supervision bit length is 10 symbols (2 times of data block length), i.e., each error correcting code can restore a data block, data packet Total length is that audio frame length adds supervision bit length, i.e. 202 bits, usually in VOLTE phones, the data band of audio-frequency unit application Width increases total data bandwidth base after error correcting code in 40kbps or so (the IP layer datas bandwidth calculated according to highest AMR speedometers) Originally it is not above this limitation, does not have to additional increase data bandwidth.
Table 2
At step 104, by the AMR audio datas of present frame and error correcting code composition data packet.
Specifically, the AMR audio datas of present frame and error correcting code are formed realtime transmission protocol RTP data by terminal device Packet, wherein the AMR audio datas of present frame are stored in the payload portions of RTP data packets, and error correcting code is stored in RTP The head expansion of the header of data packet.
It further says, due to the head expansion of the header of RTP data packets, only by the header of RTP data packets It could be used behind extension flag position 1, so the AMR audio datas of present frame and error correcting code are formed real-time transport protocol Before RTP data packets, in advance by the extension flag position 1 of the header of RTP data packets.Wherein, the header format of common RTP is such as Shown in Fig. 3, after the extension flag position 1 of the header of RTP data packets, the head extension of the header of RTP data packets can be enabled Part, the header format of the RTP behind extension flag position 1 are used for indicating as shown in figure 4, version number field occupies 2 bits RTP versions, filling bit field occupies 1 bit, and if the position of the position, the tail portions of the RTP packets is just filled out comprising additional Byte is filled, Extension Bit field occupies 1 bit, if the position of the position, just with there are one extension header behind RTP fixing heads Portion, CSRC counter fields occupy 4 bits, the number containing the CSRC that fixing head is followed by, and label bit field occupies 1 ratio The explanation of spy, this are undertaken by configuration documentation, and load type field occupies 7 bits, identifies the type of RTP load, sequence Number 16 bits are occupied, sender has sent every just by the value in domain increase by 1 after one RTP packet, and recipient can be examined by the domain It surveys the loss of packet and restores packet sequence, the initial value of sequence number is random, and timestamp field occupies 32 bits, has recorded the packet The sampling instant of the first character section of middle data, synchronous source identifier field occupy 32 bits, and synchronisation source refers to just RTP packet streams Source, document defines field can arrange for distinguishing different RTP header extensions, the field according to practical service environment, If encountering the terminal device for not supporting this programme, error correction code information can be skipped, does not influence normally to decode, length field shows The specific length of header extension, header extension are used for there are error correction code information, and error correcting code can fill zero as needed later, with Keep 32 bit aligneds.
In step 105, transmission data packet.
Specifically, terminal device sends the RTP data packets being completed by network, while the data packet being stored in It has sent in caching, has been encoded for subsequent error correction.
Compared with prior art, in the present embodiment, terminal device is according to preset channel quality and AMR coding modes Correspondence, obtain corresponding with present channel quality AMR coding modes, and by pulse code modulation audio data, volume Code at present frame AMR audio datas, to according to present channel quality in real time, accurately select the AMR to match coding mould Formula so that audio data makes full use of current channel quality to carry out audio number using the AMR coded formats for meeting transmission requirement According to transmission, efficiency of transmission is improved;By the sequence from morning to night of sending time, taken out from the AMR audio datas of the i-th frame successively The N-i+1 sub-block, and error correcting code is generated according to each sub-block so that receiving terminal can in time restore according to error correcting code Go out in transmission process to occur the data packet of packet loss, and redundancy shared by error correcting code is few, effectively prevents system and network overhead It obviously increases;The AMR audio datas of present frame are stored in the payload portions of RTP data packets, error correcting code is stored in The head expansion of the header of RTP data packets forms RTP data packets, to be converted into audio data to be transmitted to be suitble to net The RTP data packets of network transmission requirement are transmitted.
Second embodiment of the invention is related to a kind of transmission processing method of audio data.Second embodiment is real with first It is roughly the same to apply mode, is in place of the main distinction:In the first embodiment, for all AMR coding modes, hair is pressed The sequence from morning to night of time is sent, takes out the N-i+1 sub-block from the AMR audio datas of the i-th frame successively, and according to Each sub-block generates error correcting code, and in second embodiment of the invention, according to different AMR coding modes, using difference Error correcting code generating mode, it is specific as shown in Figure 5.
In step 501, pulse code modulation audio data to be sent is obtained.
In step 502, by pulse code modulation audio data coding at the AMR audio datas of present frame.
In step 503, judge whether AMR coding modes are pattern 5 to pattern 8, it is no if it is thening follow the steps 504 Then follow the steps 505.
Specifically, terminal device judge used by AMR coding modes whether be AMR coding modes 5 encode mould to AMR Formula 8 generates matching if the AMR coding modes used for AMR coding modes 5 to AMR coding modes 8, then follow the steps 504 Otherwise the error correcting code of pattern 5 to pattern 8 executes step 505, generate match pattern 0 to the error correcting code of pattern 4.
In step 504, match pattern 5 is generated to the error correcting code of pattern 8.
Specifically, when terminal device uses AMR coding modes 5 to AMR coding modes 8, according to channel quality, entangle Wrong ability and restore the factors such as the duration waited for required for packet loss data, limits N values as 8, i.e. terminal device is specifically generating When error correcting code, by the sequence from morning to night of sending time, the 8-r+1 son is taken out from the AMR audio datas of the i-th frame successively Data block, and error correcting code is generated according to each sub-block, wherein r=1,2 ..., 8, the AMR audio datas of r frames are in logic On be divided into 8 sub-blocks in advance.
Further say, as shown in fig. 6, be divided into 8 pieces per frame AMR audio data portions, be respectively labeled as A, B, C, D, E, F, G, H, wherein the division of data block is only used for calculating error correcting code ECC, audio-frequency unit or complete when actual transmissions One frame, then, the error correcting code ECC of the AMR audio datas of present frame, i.e., Pack shown in fig. 6nECCn, need according to it is current when The AMR audio datas of 8 frames continuously transmitted recently before carving generate, that is, need according to Packn-8,Packn-7,Packn-6,Packn-5, Packn-4,Packn-3,Packn-2,Packn-1The sub-blocks such as A, B, C, D, E, F, G, H generate, i.e., successively by Hn-8,Gn-7, Fn-6,En-5,Dn-4,Cn-3,Bn-2,An-1The information bit for forming code word, then calculates check bit, i.e. error correcting code ECCn, and store To PacknIt is interior.That is, being divided into 8 sub-blocks per frame AMR audios, data packet is in addition to carrying current AMR audio frames Error correcting code is also carried outside, 8 frame AMR data of the error correcting code before are calculated, i.e., each in order from preceding 8 frame to choose 1 A data block is combined into information bit, then calculates check bit and is stored in current data packet, which is 8 A data block can entangle the error in data of 1 data block, is i.e. can pass through follow-up 8 if losing 1 in 9 data packets The error correcting code that data packet carries is restored, and loss can not then be restored more than 1, and average error correction rate at this time is 11%.
It should be noted that only just the AMR coding modes 7 of high-speed or AMR can be used to compile when channel quality is preferable Pattern 8, and usually give tacit consent under the transmission environment of the channel quality of this kind of situation in industry, data packetloss will not occur Situation, then, in order to reduce transmission bandwidth, transmitted data amount etc., AMR coding modes 7 may not need root with AMR coding modes 8 Error correcting code is generated according to the above process, certainly, those skilled in the art are perfectly safe in order to accomplish, can also be given birth to according to the above process At the error correcting code of AMR coding modes 7 and AMR coding modes 8.
In step 505, match pattern 0 is generated to the error correcting code of pattern 4.
Specifically, when terminal device uses AMR coding modes 0 to AMR coding modes 4, according to channel quality, entangle Wrong ability and restore the factors such as the duration waited for required for packet loss data, limits N values as 8, i.e. terminal device is specifically generating When error correcting code, by the sequence from morning to night of sending time, j-th of subdata is taken out from the AMR audio datas of jth frame successively Block takes out the N-k+1 sub-block from the AMR audio datas of kth frame successively, wherein j=1,2,3,4, k=5,6,7,8, The AMR audio datas of jth frame and the AMR audio datas of kth frame are logically divided into 4 sub-blocks in advance.
Further say, as shown in fig. 7, be divided into 4 pieces per frame AMR audio data portions, be respectively labeled as A, B, C, D, wherein the division of data block is only used for calculating error correcting code ECC, audio-frequency unit or a complete frame when actual transmissions, in The error correcting code ECC of the AMR audio datas of present frame, i.e., Pack shown in Fig. 7nECCn, need according to before current time most The AMR audio datas of 8 frames closely continuously transmitted generate, that is, need according to Packn-8,Packn-7,Packn-6,Packn-5, Packn-4,Packn-3,Packn-2,Packn-1The sub-blocks such as A, B, C, D generate, i.e., successively by An-8,Bn-7,Cn-6,Dn-5, Dn-4,Cn-3,Bn-2,An-1The information bit for forming code word, then calculates check bit, i.e. error correcting code ECCn, and it is stored in PacknIt is interior. That is, being divided into 4 sub-blocks per frame AMR audios, 8 frame AMR data of the error correcting code before are calculated, i.e., It respectively chooses 1 data block in order from preceding 8 frame and is combined into information bit (each sub-block can be 2 times verified), then calculate Go out check bit to be stored in current data packet, which is 8 data blocks, can entangle the number of 1 data block According to mistake, meanwhile, there is reply to concentrate packet loss ability that can pass through follow-up 4 that is, when losing 1 data packet in 5 data packets A fast quick-recovery of data packet is then restored by follow-up 8 data packets when continuously losing 2 data packets in 5 data packets, Average error correction rate at this time is 20%, due in actual test, the packet loss under the poor transmission environment of channel quality Rate is not more than 20% (when channel quality is too poor, can automatic fall-back be CS phones), then, error correcting capability control 20% with It inside just disclosure satisfy that needs.
In step 506, by the AMR audio datas of present frame and error correcting code composition data packet.
In step 507, transmission data packet.
In the present embodiment, for different AMR coding modes, using different error correcting code generating modes, to raw At rationally effectively and targetedly error correcting code, and make receiving terminal under AMR coding modes 0 to 4, there is processing to concentrate packet loss Ability, by error correcting capability control to 20%, reach the requirement of actual test situation.
Third embodiment of the invention is related to a kind of receiving handling method of audio data.Detailed process is as shown in Figure 8.
In step 801, the data packet being currently received is parsed.
Specifically, after the terminal device of receiving terminal receives data packet by network, which is parsed, with Obtain the information such as current AMR coding modes, AMR audio datas, error correcting code, wherein the data packet received be and transmitting terminal phase Matched RTP data packets.
In step 802, it is then executed in case of packet loss with the presence or absence of data packet generation packet loss before judging current time Step 804, no to then follow the steps 803.
Specifically, the terminal device of receiving terminal is according to analysis result, such as:AMR coding modes, entangle AMR audio datas The information such as error code judge that packet loss occurred with the presence or absence of data packet before current time, in case of packet loss, then follow the steps 804, extensive The AMR audio datas and error correcting code for the data packet of packet loss of appearing again, no to then follow the steps 803, the data packet that will be currently received AMR audio data codings at pulse code modulation audio data.
It should be noted that when the terminal device of transmitting terminal uses AMR coding modes 7 or AMR coding modes 8, and send Data packet in when not carrying error correcting code, illustrate under channel quality at this moment, will not there is a situation where data packet packet loss, in It is that the terminal device of receiving terminal is without carrying out the processes such as packet loss detection and loss recovery, the number that will can be directly currently received According to the AMR audio data codings of packet at pulse code modulation audio data.
In step 803, by the AMR audio data codings for the data packet being currently received at pulse code modulation audio number According to.
Specifically, when packet loss occurred there is no data packet before the terminal device of receiving terminal judgement current time, directly By the AMR audio data codings for the data packet being currently received at pulse code modulation audio data, meanwhile, by the AMR audios Data are saved in played caching, are handled for subsequent error correction.
In step 804, the AMR audio datas and error correcting code of the data packet of packet loss are recovered.
Specifically, when packet loss occurred there are data packet before the terminal device of receiving terminal judgement current time, after waiting Continuous data packet can lead to de-jitter buffer and increase broadcast time-delay in practical applications, after follow-up data packet is here, i.e., etc. waiting 6,8 or more data packets are received, RS error code corrections are carried out in conjunction with played AMR audio datas, the data packet of loss is extensive It appears again and, lost if follow-up data packet also has, cause to exceed error correcting capability, then stop waiting for and exporting bad frame, by decoder Carry out frame losing compensation.
It further says, below to the AMR audio datas of packet loss and the recovery process of error correcting code, carries out citing brief introduction.
First, when the data packet that the terminal device of transmitting terminal uses AMR coding modes 0 to AMR coding modes 8, and sends In when carrying error correcting code, in the case where N values are 6, a data packet is had when the terminal device of receiving terminal detects When packet loss occurs, i.e. the data packet Pack of dotted portion in Fig. 9nPacket loss occurs, at this point, each frame AMR audio datas are right Answer 6 sub-blocks, it is assumed that data packet Packn-5To Packn-1Normal play, Packn+1To Packn+6It normally receives, Then data packet PacknRecovery process it is as follows:(1) error correcting code ECCn+1Supervise An,Bn-1,Cn-2,Dn-3,En-4,Fn-5, remove AnIt is outer its 5 data blocks of remaininging have obtained, thus it is possible to restore data block A using error correcting coden.(2) error correcting code ECCn+2Supervise An+1,Bn, Cn-1,Dn-2,En-3,Fn-4, remove BnRemaining outer 5 data block have obtained, thus it is possible to restore data block B using error correcting coden.Weight Multiple above procedure, can utilize ECCn+1To ECCn+6Restore all data blocks AnTo Fn, by AnTo FnIt is combined by sequence as shown in the figure Afterwards, so that it may to obtain data packet PacknThe AMR audio datas of carrying, so as to further obtain data packet PacknIt carries Error correcting code ECCn.Certainly, if data packet Packn+7Also there is packet loss, also restored using same method.It should be noted that , in this case, to be at least spaced N=6 normal data packet among each two packet loss, i.e., error correcting capability is average 7 numbers Restore 1 data packet according to packet.Particularly, when N values are other values, the AMR of packet loss is also carried out using similar processing mode The recovery of audio data.
Secondly, when the data packet that the terminal device of transmitting terminal uses AMR coding modes 5 to AMR coding modes 8, and sends In when carrying error correcting code, in the case where N values are 8, a data packet is had when the terminal device of receiving terminal detects When packet loss occurs, i.e. the data packet Pack of dotted portion in Figure 10nPacket loss occurs, at this point, each frame AMR audio datas are right Answer 8 sub-blocks, it is assumed that data packet Packn-7To Packn-1Normal play, Packn+1To Packn+8It normally receives, Then data packet PacknRecovery process it is as follows:(1) error correcting code ECCn+1Supervise An,Bn-1,Cn-2,Dn-3,En-4,Fn-5,Gn-6,Hn-7, Except AnRemaining outer 7 data block have obtained, thus it is possible to restore data block A using error correcting coden.(2) error correcting code ECCn+2Supervision An+1,Bn,Cn-1,Dn-2,En-3,Fn-4,Gn-5,Hn-6, remove BnRemaining outer 7 data block have obtained, thus it is possible to utilize error correcting code Restore data block Bn.Above procedure is repeated, ECC can be utilizedn+1To ECCn+8Restore all data blocks AnTo Hn, by AnTo HnBy figure Shown in sequentially combine after, so that it may to obtain data packet PacknThe AMR audio datas of carrying, so as to further be counted According to packet PacknThe error correcting code ECC of carryingn.Certainly, if data packet Packn+9Also there is packet loss, also carried out using same method Restore.It should be noted that in this case, to be at least spaced N=8 normal data packet among each two packet loss, i.e. error correction energy Power is 1 data packet of average 9 data packet recoveries.Particularly, when N values are other values, similar processing mode is also used Carry out the recovery of the AMR audio datas of packet loss.
Again, to AMR coding modes 4, and in N values it is 8 using AMR coding modes 0 when the terminal device of transmitting terminal In the case of, when having a data packet generation packet loss, i.e. the data packet Pack of dotted portion shown in Figure 11nIt loses Packet, at this point, each frame AMR audio datas correspond to 4 sub-blocks, it is assumed that data packet Packn-7To Packn-1Normally broadcast It puts, Packn+1To Packn+4It is normally received, then data packet PacknRecovery process it is as follows:(1)ECCn+1Supervise An,Bn-1,Cn-2, Dn-3,Dn-4,Cn-5,Bn-6,An-7, remove AnRemaining outer 7 data block have obtained, thus it is possible to restore data block using error correcting code An。(2)ECCn+2Supervise An+1,Bn,Cn-1,Dn-2,Dn-3,Cn-4,Bn-5,An-6, remove BnRemaining outer 7 data block have obtained, in It is that error correcting code can be utilized to restore data block Bn.Above procedure is repeated, ECC can be utilizedn+1To ECCn+4Restore all data blocks AnTo Dn, by AnTo DnAfter sequentially being combined shown in Figure 10, so that it may to obtain data packet PacknThe AMR audio datas of carrying, from And it can further obtain data packet PacknThe error correcting code ECC of carryingn.Certainly, if Packn+5Also there is packet loss, also utilize same The method of sample is restored, it should be noted that in this case, when having 4 or more normal data packets among every 2 packet losses, directly 4 data packets connected behind packet loss position are restored, and error correcting capability is 1 data packet of average 5 data packet recoveries.It is special Not, when N values are other values, the recovery of the AMR audio datas of packet loss is also carried out using similar processing mode.
Finally, to AMR coding modes 4, and in N values it is 8 using AMR coding modes 0 when the terminal device of transmitting terminal In the case of, when there is continuous two data packets generation packet loss, i.e. the data packet Pack of dotted portion shown in Figure 12n-1With PacknPacket loss occurs, at this point it is possible to restore using more follow-up data packets, it is assumed that data packet Packn-7To Packn-2 Through normal play, Packn+1To Packn+8It is normally received, then data packet Packn-1With PacknRecovery process it is as follows:(1) ECCn+8Supervise An+7,Bn+6,Cn+5,Dn+4,Dn+3,Cn+2,Bn+1,An, remove AnRemaining outer 7 data block have obtained, and can utilize and entangle Error code restores data block An。(2)ECCn+1Supervise An,Bn-1,Cn-2,Dn-3,Dn-4,Cn-5,Bn-6,An-7, and AnIt is recovered, then, It can restore data block B nown-1。(3)ECCn+6Supervise An+5,Bn+4,Cn+3,Dn+2,Dn+1,Cn,Bn-1,An-2, and Bn-1,An Restore, therefore data block C can be recovered nown。(4)ECCn+3Supervise An+2,Bn+1,Cn,Dn-1,Dn-2,Cn-3,Bn-4,An-5, and Bn-1,An,CnIt is recovered, then, it now is possible to recover data block Dn-1。(5)ECCn+4Supervise An+3,Bn+2,Cn+1,Dn,Dn-1, Cn-2,Bn-3,An-4, and Bn-1,Dn-1,An,CnIt is recovered, then, it now is possible to recover data block Dn。(6)ECCn+5Supervision An+4,Bn+3,Cn+2,Dn+1,Dn,Cn-1,Bn-2,An-3, and Bn-1,Dn-1,An,Cn,DnIt is recovered, then, it now is possible to recover Data block Cn-1。(7)ECCn+2Supervise An+1,Bn,Cn-1,Dn-2,Dn-3,Cn-4,Bn-5,An-6, and Bn-1,Cn-1,Dn-1,An,Cn,Dn It is recovered, then, it now is possible to recover data block Bn。(8)ECCn+7Supervise An+6,Bn+5,Cn+4,Dn+3,Dn+2,Cn+1,Bn,An-1, And Bn-1,Cn-1,Dn-1,An,Bn,Cn,DnIt is recovered, then, it now is possible to recover data block An-1.So far An-1,Bn-1, Cn-1,Dn-1,An,Bn,Cn,DnFull recovery.Certainly, if Packn+9,Packn+10Also there is continual data package dropout, also utilize same The method of sample is restored, can the company of processing although error correcting capability remains as 1 data packet of average 5 data packet recoveries The case where continuous packet loss, i.e. it can restore the packet loss of the data packet of arbitrary 2 positions in 10 data packets, anti-dropout ability obtains It dramatically increases.Particularly, when N values are other values, the AMR audio datas of packet loss are also carried out using similar processing mode Restore.
It should be noted that it is above-mentioned only according to for losing a data packet and losing two data packets, it briefly introduces and receives End restore packet loss process, do not represent present embodiment be only capable of processing lose one, two data packets the case where, when lose more When more data packets, it still can be restored according to aforesaid way, only need to wait for arriving for more follow-up data packets Up at this moment technical staff needs according to the delay waited for needed for follow-up data packet and plays information summary consideration, to determine Continue to restore packet loss data or directly output bad frame, to reach best result of broadcast.
In step 805, by the AMR audio data codings recovered at pulse code modulation audio data.
Specifically, terminal device by the AMR audio data codings recovered at pulse code modulation audio data, together When, which is saved in played caching, is handled for subsequent error correction.
In step 806, pulse code modulation audio data is played.
Specifically, the pulse code modulation audio data that terminal device broadcast encoder obtains.
In the present embodiment, the terminal device of receiving terminal detects when packet loss occurred there are data packet before current time, It can be according to the AMR audio datas of the M frames continuously received recently before current time, with the L continuously received recently after current time The error correcting code of frame recovers the AMR audio datas and error correcting code of packet loss, to the ability with recovery packet loss data, moreover, With the ability for restoring to concentrate packet loss, voice interim card caused by effectively preventing packet loss loses word, noiseless various problems, greatly Effect that the user experience is improved.
The step of various methods divide above, be intended merely to describe it is clear, when realization can be merged into a step or Certain steps are split, multiple steps are decomposed into, as long as including identical logical relation, all in the protection domain of this patent It is interior;To either adding inessential modification in algorithm in flow or introducing inessential design, but its algorithm is not changed Core design with flow is all in the protection domain of the patent.
Four embodiment of the invention is related to a kind of transmission processing unit of audio data.As shown in figure 13, including:It obtains Module 131, coding module 132, error correction code module 133, packet encapsulation module 134 and sending module 135, wherein coding mould Block 132 specifically includes:AMR coding modes acquisition submodule 1321 and AMR audio data codings submodule 1322, error correction code module 133 specifically include:Subdata acquisition submodule 1331 and generation error correcting code submodule 1332.
Acquisition module 131, for obtaining pulse code modulation audio data to be sent.
Coding module 132 is used for pulse code modulation audio data coding into the AMR audio datas of present frame.
AMR coding modes acquisition submodule 1321, for being closed according to preset channel quality is corresponding with AMR coding modes System obtains AMR coding modes corresponding with present channel quality.
AMR audio data codings submodule 1322, for according to AMR coding modes, by pulse code modulation audio data, It is encoded into the AMR audio datas of present frame.
Error correction code module 133, for the AMR audio datas according to the N frames continuously transmitted recently before current time, generation is entangled Error code, wherein N is positive integer.
Subdata acquisition submodule 1331, for the sequence from morning to night by sending time, successively from the AMR of the i-th frame The N-i+1 sub-block is taken out in audio data, wherein i=1,2 ..., N, the AMR audio datas of the i-th frame are logically It is divided into N number of sub-block in advance.
Error correcting code submodule 1332 is generated, for generating error correcting code according to each sub-block.
Packet encapsulation module 134 is used for the AMR audio datas of present frame and error correcting code composition data packet.
Sending module 135 is used for transmission data packet.
It is not difficult to find that present embodiment is system embodiment corresponding with first embodiment, present embodiment can be with First embodiment is worked in coordination implementation.The relevant technical details mentioned in first embodiment still have in the present embodiment Effect, in order to reduce repetition, which is not described herein again.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in In first embodiment.
It is noted that each module involved in present embodiment is logic module, and in practical applications, one A logic unit can be a physical unit, can also be a part for a physical unit, can also be with multiple physics lists The combination of member is realized.In addition, in order to protrude the innovative part of the present invention, it will not be with solution institute of the present invention in present embodiment The technical issues of proposition, the less close unit of relationship introduced, but this does not indicate that there is no other single in present embodiment Member.
Fifth embodiment of the invention is related to a kind of transmission processing unit of audio data.5th embodiment is real with the 4th It is roughly the same to apply mode, is in place of the main distinction:In the fourth embodiment, error correction code module 133 specifically includes:Subdata Acquisition submodule 1331 and generation error correcting code submodule 1332.And in fifth embodiment of the invention, error correction code module 133 has Body includes:1,333 first determination sub-module 1334 of judging submodule and the second determination sub-module 1335, as shown in figure 14.
Acquisition module 131, for obtaining pulse code modulation audio data to be sent.
Coding module 132 is used for pulse code modulation audio data coding into the AMR audio datas of present frame.
AMR coding modes acquisition submodule 1321, for being closed according to preset channel quality is corresponding with AMR coding modes System obtains AMR coding modes corresponding with present channel quality.
AMR audio data codings submodule 1322, for according to AMR coding modes, by pulse code modulation audio data, It is encoded into the AMR audio datas of present frame.
Error correction code module 133, for the AMR audio datas according to the N frames continuously transmitted recently before current time, generation is entangled Error code, wherein N is positive integer.
Judging submodule 1333, for judge AMR coding modes whether be AMR coding modes pattern 5 to AMR encode mould The pattern 8 of formula.
First determination sub-module 1334, for when AMR coding modes be pattern 5 to pattern 8 when, by sending time from morning To the sequence in evening, the N-r+1 sub-block is taken out from the AMR audio datas of r frames successively, wherein N=8, r=1, 2 ..., 8, the AMR audio datas of r frames are logically divided into 8 sub-blocks in advance.
Second determination sub-module 1335, for when AMR coding modes non-mode 5 is to pattern 8, by sending time from morning To the sequence in evening, j-th of sub-block is taken out from the AMR audio datas of jth frame successively, successively from the AMR audio datas of kth frame Take out the N-k+1 sub-block, wherein N=8, j=1,2,3,4, k=5,6,7,8, the AMR audio datas and kth of jth frame The AMR audio datas of frame are logically divided into 4 sub-blocks in advance.
Packet encapsulation module 134 is used for the AMR audio datas of present frame and error correcting code composition data packet.
Sending module 135 is used for transmission data packet.
Since second embodiment is corresponded with present embodiment, present embodiment can be mutual with second embodiment Match implementation.The relevant technical details mentioned in second embodiment are still effective in the present embodiment, implement second The attainable technique effect of institute similarly may be implemented in the present embodiment in mode, no longer superfluous here in order to reduce repetition It states.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in second embodiment.
Sixth embodiment of the invention is related to a kind of receiving and processing device of audio data.As shown in figure 15, including:Parsing Module 151, judgment module 152, the first execution module 153 and the second execution module 154.
Parsing module 151, for parsing the data packet being currently received.
Judgment module 152, for according to analysis result, whether there is data packet generation packet loss before judging current time.
First execution module 153, for before current time there are data packet occur packet loss when, according to before current time most The AMR audio datas of the nearly M data packet continuously received, the error correction with the L data packet continuously received recently after current time Code, recovers the AMR audio datas and error correcting code of packet loss, and by the AMR audio data codings recovered at pulse code tune Audio data processed plays.
Second execution module 154 directly will be received currently when packet loss occurs for not there is no data packet before current time The AMR audio data codings of the data packet arrived are played at pulse code modulation audio data.
Since third embodiment is corresponded with present embodiment, present embodiment can be mutual with third embodiment Match implementation.The relevant technical details mentioned in third embodiment are still effective in the present embodiment, implement in third The attainable technique effect of institute similarly may be implemented in the present embodiment in mode, no longer superfluous here in order to reduce repetition It states.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in third embodiment.
It will be appreciated by those skilled in the art that it is that can pass through to implement the method for the above embodiments Program is completed to instruct relevant hardware, which is stored in a storage medium, including some instructions are used so that one A equipment (can be microcontroller, chip etc.) or processor (processor) execute each embodiment the method for the application All or part of step.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
It will be understood by those skilled in the art that the respective embodiments described above are to realize specific embodiments of the present invention, And in practical applications, can to it, various changes can be made in the form and details, without departing from the spirit and scope of the present invention.

Claims (13)

1. a kind of transmission processing method of audio data, which is characterized in that be applied to adaptive multi-rate AMR coded formats, packet It includes:
Obtain pulse code modulation audio data to be sent;
By the pulse code modulation audio data coding at the AMR audio datas of present frame;
According to the AMR audio datas of the N frames continuously transmitted recently before current time, error correcting code is generated, wherein N is positive integer;
By the AMR audio datas of the present frame and the error correcting code composition data packet, and send the data packet.
2. the transmission processing method of audio data according to claim 1, which is characterized in that described by the pulse code Modulating audio frequency data encoding is specifically included at the AMR audio datas of present frame:
According to the correspondence of preset channel quality and AMR coding modes, obtain corresponding with presently described channel quality The AMR coding modes;
The pulse code modulation audio data is encoded into the AMR audios of the present frame according to the AMR coding modes Data.
3. the transmission processing method of audio data according to claim 1, which is characterized in that it is described according to current time before The AMR audio datas of the N frames continuously transmitted recently generate error correcting code, specifically include:
By the sequence from morning to night of sending time, the N-i+1 subdata is taken out from the AMR audio datas of the i-th frame successively Block, and the error correcting code is generated according to each sub-block, wherein i=1,2 ..., N, the AMR audio numbers of i-th frame According to being logically divided into N number of sub-block in advance.
4. the transmission processing method of audio data according to claim 2, which is characterized in that the N values are 8;
The AMR audio datas according to the N frames continuously transmitted recently before current time generate error correcting code, specifically include:
Judge whether the AMR coding modes are the pattern 5 of the AMR coding modes to the pattern 8 of the AMR coding modes;
If the AMR coding modes are the pattern 5 to the pattern 8, by the sequence from morning to night of sending time, according to It is secondary to take out the N-r+1 sub-block from the AMR audio datas of r frames, wherein r=1,2 ..., 8, the AMR of the r frames Audio data is logically divided into 8 sub-blocks in advance;
If the non-pattern 5 of the AMR coding modes and the pattern 8, by the sequence from morning to night of sending time, according to It is secondary to take out j-th of sub-block from the AMR audio datas of jth frame, successively N-k+1 are taken out from the AMR audio datas of kth frame Sub-block, wherein j=1,2,3,4, k=5,6,7,8, the AMR audio datas of the jth frame and the AMR sounds of the kth frame Frequency evidence is logically divided into 4 sub-blocks in advance.
5. the transmission processing method of audio data according to claim 1, which is characterized in that described by the present frame AMR audio datas and the error correcting code composition data packet, specifically include:
The AMR audio datas of the present frame and the error correcting code are formed into realtime transmission protocol RTP data packet;
Wherein, the AMR audio datas of the present frame are stored in the payload portions of the RTP data packets;The error correction Code is stored in the head expansion of the header of the RTP data packets.
6. the transmission processing method of audio data according to claim 5, which is characterized in that described by the present frame AMR audio datas and the error correcting code composition realtime transmission protocol RTP data packet before, further include:
By the extension flag position 1 of the header of RTP data packets.
7. a kind of receiving handling method of audio data, which is characterized in that be applied to adaptive multi-rate AMR coded formats, packet It includes:
Parse the data packet being currently received;
According to analysis result, it whether there is data packet generation packet loss before judging current time;
If there are the data packets, and packet loss occurs before current time, according to the M frames continuously received recently before current time AMR audio datas, the error correcting code with the L frames continuously received recently after current time recover the AMR audios number of packet loss According to the error correcting code, and by the AMR audio data codings recovered at pulse code modulation audio data play;It is no Then, directly by the AMR audio data codings of the data packet being currently received at the pulse code modulation sound Frequency data playback.
8. a kind of transmission processing unit of audio data, which is characterized in that be applied to adaptive multi-rate AMR coded formats, packet It includes:
Acquisition module, for obtaining pulse code modulation audio data to be sent;
Coding module is used for the pulse code modulation audio data coding into the AMR audio datas of present frame;
Error correction code module generates error correcting code for the AMR audio datas according to the N frames continuously transmitted recently before current time, In, N is positive integer;
Packet encapsulation module is used for the AMR audio datas of the present frame and the error correcting code composition data packet;
Sending module, for sending the data packet.
9. the transmission processing unit of audio data according to claim 8, which is characterized in that the coding module specifically wraps It includes:AMR coding modes acquisition submodule and AMR audio data coding submodules;
The AMR coding modes acquisition submodule is used for the correspondence according to preset channel quality and AMR coding modes, Obtain the AMR coding modes corresponding with presently described channel quality;
The AMR audio data codings submodule is used for according to the AMR coding modes, by the pulse code modulation audio Data are encoded into the AMR audio datas of the present frame.
10. the transmission processing unit of audio data according to claim 8, which is characterized in that the error correction code module tool Body includes:Sub-block acquisition submodule and generation error correcting code submodule;
The sub-block acquisition submodule, for the sequence from morning to night by sending time, successively from the AMR sounds of the i-th frame Frequency takes out the N-i+1 sub-block in, wherein i=1,2 ..., N, the AMR audio datas of i-th frame are in logic On be divided into N number of sub-block in advance;
The generation error correcting code submodule, for generating the error correcting code according to each sub-block.
11. the transmission processing unit of audio data according to claim 9, which is characterized in that the error correction code module tool Body includes:Judging submodule, the first determination sub-module and the second determination sub-module;
The judging submodule, for judging whether the AMR coding modes are the pattern 5 of the AMR coding modes to described The pattern 8 of AMR coding modes;
First determination sub-module is used for when the AMR coding modes are the pattern 5 to the pattern 8, by sending time Sequence from morning to night takes out the N-r+1 sub-block from the AMR audio datas of r frames successively, wherein N=8, r=1, 2 ..., 8, the AMR audio datas of the r frames are logically divided into 8 sub-blocks in advance;
Second determination sub-module is used for when the non-pattern 5 of the AMR coding modes is to the pattern 8, by sending time Sequence from morning to night takes out j-th of sub-block, successively from the AMR audios of kth frame from the AMR audio datas of jth frame successively Data take out the N-k+1 sub-block, wherein N=8, j=1,2,3,4, k=5,6,7,8, and the AMR audios of the jth frame The AMR audio datas of data and the kth frame are logically divided into 4 sub-blocks in advance.
12. the transmission processing unit of audio data according to claim 8, which is characterized in that the data envelope is die-filling Block is specifically used for the AMR audio datas of the present frame and the error correcting code forming realtime transmission protocol RTP data packet;Its In, the AMR audio datas of the present frame are stored in the payload portions of the RTP data packets;The error correcting code is deposited It is put into the head expansion of the header of the RTP data packets.
13. a kind of receiving and processing device of audio data, which is characterized in that be applied to adaptive multi-rate AMR coded formats, packet It includes:
Parsing module, for parsing the data packet being currently received;
Judgment module, for according to analysis result, whether there is data packet generation packet loss before judging current time;
First execution module, when for packet loss to occur there are the data packet before current time, according to nearest before current time The AMR audio datas of the M data packet continuously received, the error correcting code with the L data packet continuously received recently after current time, The AMR audio datas of packet loss and the error correcting code are recovered, and by the AMR audio data codings recovered at arteries and veins Rush code modulated audio data playback;
Second execution module directly currently connects described when packet loss occurs for not there is no the data packet before current time The AMR audio data codings of the data packet received are played at the pulse code modulation audio data.
CN201710237479.4A 2017-04-12 2017-04-12 Audio data sending processing method and device and audio data receiving processing method and device Active CN108696491B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710237479.4A CN108696491B (en) 2017-04-12 2017-04-12 Audio data sending processing method and device and audio data receiving processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710237479.4A CN108696491B (en) 2017-04-12 2017-04-12 Audio data sending processing method and device and audio data receiving processing method and device

Publications (2)

Publication Number Publication Date
CN108696491A true CN108696491A (en) 2018-10-23
CN108696491B CN108696491B (en) 2021-05-07

Family

ID=63843670

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710237479.4A Active CN108696491B (en) 2017-04-12 2017-04-12 Audio data sending processing method and device and audio data receiving processing method and device

Country Status (1)

Country Link
CN (1) CN108696491B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111193966A (en) * 2019-12-25 2020-05-22 北京佳讯飞鸿电气股份有限公司 Audio data transmission method and device, computer equipment and storage medium
CN111866026A (en) * 2020-08-10 2020-10-30 四川湖山电器股份有限公司 Voice data packet loss processing system and method for voice conference
CN112601077A (en) * 2020-12-11 2021-04-02 杭州当虹科技股份有限公司 Automatic encoder delay measuring method based on audio
CN112926285A (en) * 2021-02-23 2021-06-08 北京集创北方科技股份有限公司 Chip verification method, platform, device, equipment and storage medium
CN113838477A (en) * 2021-09-13 2021-12-24 阿波罗智联(北京)科技有限公司 Packet loss recovery method and device for audio data packet, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1327329A (en) * 2000-05-23 2001-12-19 株式会社Ntt都科摩 Sound processing method and sound processing equipment
CN1697537A (en) * 2004-05-10 2005-11-16 华为技术有限公司 Method for adjusting data-sampling and encoding time
CN1937631A (en) * 2006-10-24 2007-03-28 杭州华为三康技术有限公司 User datagram protocol message processing method and device
CN101547144A (en) * 2008-12-29 2009-09-30 华为技术有限公司 Method, device and system for improving data transmission quality

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1327329A (en) * 2000-05-23 2001-12-19 株式会社Ntt都科摩 Sound processing method and sound processing equipment
CN1697537A (en) * 2004-05-10 2005-11-16 华为技术有限公司 Method for adjusting data-sampling and encoding time
CN1937631A (en) * 2006-10-24 2007-03-28 杭州华为三康技术有限公司 User datagram protocol message processing method and device
CN101547144A (en) * 2008-12-29 2009-09-30 华为技术有限公司 Method, device and system for improving data transmission quality

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
NOKIA: "AMR/AMR-WB redundancy in MTSI", 《3GPP TSG-SA4 MTSI AD HOC #2 TDOC S4-AHM035》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111193966A (en) * 2019-12-25 2020-05-22 北京佳讯飞鸿电气股份有限公司 Audio data transmission method and device, computer equipment and storage medium
CN111866026A (en) * 2020-08-10 2020-10-30 四川湖山电器股份有限公司 Voice data packet loss processing system and method for voice conference
CN112601077A (en) * 2020-12-11 2021-04-02 杭州当虹科技股份有限公司 Automatic encoder delay measuring method based on audio
CN112601077B (en) * 2020-12-11 2022-07-26 杭州当虹科技股份有限公司 Automatic encoder delay measuring method based on audio
CN112926285A (en) * 2021-02-23 2021-06-08 北京集创北方科技股份有限公司 Chip verification method, platform, device, equipment and storage medium
CN113838477A (en) * 2021-09-13 2021-12-24 阿波罗智联(北京)科技有限公司 Packet loss recovery method and device for audio data packet, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN108696491B (en) 2021-05-07

Similar Documents

Publication Publication Date Title
CN108696491A (en) The transmission processing method of audio data and device, receiving handling method and device
US7920492B1 (en) Devices, softwares and methods for redundantly encoding a data stream for network transmission with adjustable redundant-coding delay
CA2322715C (en) Packet loss control method for real-time multimedia communications
US7017102B1 (en) Forward Error Correction (FEC) for packetized data networks
EP1974528B1 (en) Method and apparatus for enhancing rohc performance when encountering silence suppression
CN104917671B (en) Audio-frequency processing method and device based on mobile terminal
KR102295788B1 (en) Forward Error Correction in Data Streaming
CN102984090B (en) A kind of for sending real-time communication event data to the transmitter of the wobble buffer of receiver and method thereof
EP1941496B1 (en) Processing encoded real-time data
CN103023813B (en) Wobble buffer
CN101536088B (en) System and method for providing redundancy management
WO2001024419A1 (en) Adaptive layered coding for voice over wireless ip applications
US7009935B2 (en) Transmission over packet switched networks
CN110224793B (en) Self-adaptive FEC method based on media content
CN102984091B (en) Wobble buffer
JP2002190793A (en) Communication method, communication equipment and communication system using the communication equipment
US20080117906A1 (en) Payload header compression in an rtp session
KR20100127174A (en) Encoder, decoder and method for encoding and decoding
EP1964340A2 (en) Network processing node and method for manipulating packets
CN106571893B (en) Coding and decoding method for voice data
WO2001063774A1 (en) Partial redundancy encoding of speech
KR20040071765A (en) Unequal error protection using forward error correction based on Reed-Solomon codes
CN110545161B (en) Multimedia data real-time transmission method with redundancy
CN100505714C (en) Drop-frame processing device and method based on ADPCM
EP2919230A1 (en) Audio multi-code transmission method and corresponding apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant