CN107809435A - A kind of extracting method and device of AMR speech datas - Google Patents

A kind of extracting method and device of AMR speech datas Download PDF

Info

Publication number
CN107809435A
CN107809435A CN201711104971.0A CN201711104971A CN107809435A CN 107809435 A CN107809435 A CN 107809435A CN 201711104971 A CN201711104971 A CN 201711104971A CN 107809435 A CN107809435 A CN 107809435A
Authority
CN
China
Prior art keywords
rtp
amr
data
datas
payload
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.)
Pending
Application number
CN201711104971.0A
Other languages
Chinese (zh)
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.)
Beijing Ruian Technology Co Ltd
Original Assignee
Beijing Ruian 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 Beijing Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN201711104971.0A priority Critical patent/CN107809435A/en
Publication of CN107809435A publication Critical patent/CN107809435A/en
Pending legal-status Critical Current

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/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • 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/75Media network packet handling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Abstract

The invention discloses a kind of extracting method and device of AMR speech datas, it is related to wireless flow media field.The extracting method includes:Gather RTP data;The RTP data are parsed sequentially in time obtains link data and RTP carryings;The RTP carryings are parsed, judges whether the RTP carryings are AMR forms by Payload Type value, is to obtain the AMR payload datas in the RTP carryings;By the property value Quality Indicator of the AMR payload datas, when to confirm the AMR payload datas be lossless data, extract and preserve AMR speech datas.The present invention is extracted by the parsing to bearing protocol and property value, and it is AMR forms to determine RTP data, then is further parsed, judged and extracted, so as to obtain lossless AMR speech datas.The present invention is advantageous to accurately and efficiently extract AMR data in mass data, without relying on Session Initiation Protocol, and is applied to different bearing mode and network environment.

Description

A kind of extracting method and device of AMR speech datas
Technical field
The present invention relates to wireless flow media field, more particularly to a kind of extracting method and device of AMR speech datas.
Background technology
AMR (Adaptive Multi-Rate, AMR), it is a kind of common audio coding formats, it is used Algebraic code-excited linear prediction algorithm (ACELP) and voiced activity detection, Rate decision, error concealment, comfortable background The technologies such as noise generation, can support code rate different in the 8 of 4.75kbps to 12.2kbps, and according to the reality of wireless channel Border situation and business demand adaptively switch speech encoding rate, and good folding is obtained between speech quality and power system capacity Inner feelings.Because its compression ratio is very high, the audio compression of voice class is common in, the network transmission being widely used between mobile device.
Realtime transmission protocol RTP (Real-time transaction Protocol) is to handle more matchmakers on internet A kind of procotol of volume data stream, using it can one-to-one (unicast, unicast) or it is one-to-many (multicast, Multicast) network environment in realize and spread the real-time Transmission of media data.AMR speech datas typically use in network transmission For Real-time Transport Protocol as bearing protocol, Real-time Transport Protocol uses Session Initiation Protocol as signaling control protocol, traditional VOIP generally uses SIP+ RTP pattern carries out the transmission of speech data.
Traditional extracting mode of AMR speech datas is that the RTP port numbers of foundation SIP signaling negotiations and IP information are carried out in advance Survey, screening extraction efficiency is relatively low, if SIP signalings can not be obtained or in the presence of loss, correctly can not extracted in mass data Existing AMR forms.
The content of the invention
It is an object of the invention to propose a kind of extracting method and device of AMR speech datas, SIP associations can need not be relied on Discuss rapid extraction AMR speech datas.
To use following technical scheme up to this purpose, the present invention:
On the one hand, the present invention provides a kind of extracting method of AMR speech datas, including:
Gather RTP data;
The RTP data are parsed sequentially in time obtains link data and RTP carryings;
The RTP carryings are parsed, judge whether the RTP carryings are AMR forms, are by Payload Type value Then obtain the AMR payload datas in the RTP carryings;
By the property value Quality Indicator of the AMR payload datas, it is nothing to confirm the AMR payload datas When damaging data, extract and preserve AMR speech datas.
Further, after parsing the RTP data acquisition link data and RTP carryings sequentially in time, in addition to:
Managing listings are established the link according to the link data;
Accordingly, if judging that the RTP is carried as non-AMR forms by Payload Type value, abandon described in RTP is carried, and the link data corresponding to deletion from url management list.
Wherein, extract and preserve AMR speech datas, including:
According to property value CMR and the Frame Type of the AMR payload datas, phase is extracted from the AMR payload datas Answer the AMR speech datas of payload length.
Wherein, the RTP data are parsed sequentially in time obtains link data and RTP carryings, including:
According to the bearing protocol of the RTP data, corresponding protocol analysis is carried out sequentially in time, obtains link data Carried with RTP;
The link data include source IP, purpose IP and UDP port number.
Wherein, judge whether the RTP carryings are AMR forms by Payload Type value, including:
Judge the Payload Type value whether be more than or equal to 96 and less than or equal to 127 integer;
If so, the RTP is carried as AMR forms;
If it is not, the RTP is carried as non-AMR forms.
On the other hand, the present invention provides a kind of extraction element of AMR speech datas, including:
Data acquisition module, for gathering RTP data;
Bearing protocol parsing module, for parsing sequentially in time, the RTP data obtain link data and RTP is held Carry;
RTP decoder modules, for parsing the RTP carryings, judge that the RTP is carried by Payload Type value Whether it is AMR forms, is to obtain the AMR payload datas in the RTP carryings;
AMR decoder modules, for the property value Quality Indicator by the AMR payload datas, described in confirmation When AMR payload datas are lossless data, extract and preserve AMR speech datas.
Further, the extraction element also includes:Url management module, for described in parsing sequentially in time After RTP data obtain link data and RTP carryings,
Managing listings are established the link according to the link data;
Accordingly, if the RTP decoder modules judge that the RTP is carried as non-AMR by Payload Type value Form, then abandon the RTP carryings;
The url management module is additionally operable to, the link data corresponding to deletion from url management list.
Wherein, the AMR decoder modules are specifically used for:
By the property value Quality Indicator of the AMR payload datas, it is nothing to confirm the AMR payload datas Damage data;
According to property value CMR and the Frame Type of the AMR payload datas, phase is extracted from the AMR payload datas Answer the AMR speech datas of payload length.
Wherein, the bearing protocol parsing module is specifically used for:
According to the bearing protocol of the RTP data, corresponding protocol analysis is carried out sequentially in time, obtains link data Carried with RTP;
The link data include source IP, purpose IP and UDP port number.
Wherein, the RTP decoder modules are specifically used for:
Judge the Payload Type value whether be more than or equal to 96 and less than or equal to 127 integer;
If so, the RTP is carried as AMR forms;
If it is not, the RTP is carried as non-AMR forms.
Beneficial effects of the present invention are:
Extracted by the parsing to bearing protocol and property value, it is AMR forms to determine RTP data, then is carried out further Parsing, judge and extract, so as to obtain lossless AMR speech datas.The present invention is advantageous in mass data accurately and efficiently AMR data are extracted, without relying on Session Initiation Protocol, and are applied to different bearing mode and network environment.
Brief description of the drawings
Fig. 1 is the flow chart of the extracting method for the AMR speech datas that the embodiment of the present invention one provides;
Fig. 2 is the structural representation of the extraction element for the AMR speech datas that the embodiment of the present invention two provides.
Embodiment
For make present invention solves the technical problem that, the technical scheme that uses and the technique effect that reaches it is clearer, below The technical scheme of the embodiment of the present invention will be described in further detail with reference to accompanying drawing, it is clear that described embodiment is only It is part of the embodiment of the present invention, rather than whole embodiments.
Embodiment one
The present embodiment provides a kind of extracting method of AMR speech datas, suitable for extracting AMR voice numbers mass data According to situation.The extracting method is performed by a kind of extraction element of AMR speech datas, and the device is by software and/or hardware group Into, and it is integrated in the inside of the audio processing equipments such as computer.
Fig. 1 is the flow chart of the extracting method for the AMR speech datas that the embodiment of the present invention one provides.As shown in figure 1, this is carried Method is taken to comprise the following steps:
S11, gather RTP data.
The RTP data of different bearer mode are gathered, its bearing protocol includes but is not limited to PPPOE, GTP and GRE.
S12, the RTP data are parsed sequentially in time and obtain link data and RTP carryings.
According to the bearing protocol of the RTP data, each RTP packet is subjected to corresponding agreement sequentially in time Parsing, obtain link data and RTP carryings;The link data include source IP, purpose IP and UDP port number.
S13, managing listings are established the link according to the link data.
Link data are obtained according to step S12 and establish the link managing listings, are handed over for ensureing between client and server The message changed will not lose, be damaged or out-of-sequence.
S14, the RTP carryings are parsed, judge whether the RTP carryings are AMR lattice by Payload Type value Formula, it is then to perform step S15~S16, otherwise performs step S17.
The RTP carryings extracted are parsed by RTP standard protocol stacks, its Payload Type value is specified The type of RTP carryings, default static are mapped as [0,95], and dynamic mapping is [96,127], and AMR forms are dynamic mapping.
Therefore, whether the value for judging the Payload Type is whole more than or equal to 96 and less than or equal to 127 Number, that is, belong to the section of dynamic mapping;If so, the RTP is carried as AMR forms;If it is not, the RTP is carried as non-AMR lattice Formula.
S15, obtain the AMR payload datas in the RTP carryings.
AMR payload datas will be obtained by parsing RTP carrying, and Sequence number, Timestap, The property values such as Synchronization Source Identifier, after subsequent step extracts AMR speech datas, with institute AMR speech datas are stated to preserve together.
S16, by the property value Quality Indicator of the AMR payload datas, confirm the AMR payload datas For lossless data when, extract and preserve AMR speech datas.
AMR different coding type is different with voice frame length corresponding to different mode, it is therefore desirable to the AMR languages of extraction The payload length of sound data is also different, according to property value CMR (codec mode request, the coding of the AMR payload datas Mode request) and Frame Type (frame type), extract the AMR voice numbers of corresponding payload length from the AMR payload datas According to.
S17, abandon the RTP carryings, and the link data corresponding to deletion from url management list.
Carried for the RTP of non-AMR forms, be not current embodiment require that the target of extraction, therefore can be abandoned, final chain Connect and there was only link data corresponding to the RTP carryings of AMR forms in managing listings.
The technical scheme of the present embodiment, which extracts the AMR voices of mass data, to be become more efficiently, simply, to extract result phase To accurate;Session Initiation Protocol can need not be relied on, is relied on for objective environment condition less;Various network environments are suitable for, it is different The situation of bottom bearing mode or network environment poor (out of order, packet loss) can act on.
Embodiment two
The present embodiment provides a kind of extraction element of AMR speech datas, for performing the extraction side described in above-described embodiment Method, solve identical technical problem, reach identical technique effect.
Fig. 2 is the structural representation of the extraction element for the AMR speech datas that the embodiment of the present invention two provides.As shown in Fig. 2 The extraction element includes:
Data acquisition module 21, for gathering RTP data.
Bearing protocol parsing module 22, for parsing sequentially in time, the RTP data obtain link data and RTP is held Carry.
RTP decoder modules 23, for parsing the RTP carryings, judge that the RTP is held by Payload Type value Whether load is AMR forms, is to obtain the AMR payload datas in the RTP carryings.
AMR decoder modules 24, for the property value Quality Indicator by the AMR payload datas, confirm institute When to state AMR payload datas be lossless data, extract and preserve AMR speech datas.
Further, the extraction element also includes:Url management module 25, for described in parsing sequentially in time After RTP data obtain link data and RTP carryings, managing listings are established the link according to the link data.
Accordingly, if by Payload Type value to judge that the RTP is carried as non-for the RTP decoder modules 23 AMR forms, then abandon the RTP carryings;
The url management module 25 is additionally operable to, the link data corresponding to deletion from url management list.
Wherein, the AMR decoder modules 24 are specifically used for:
By the property value Quality Indicator of the AMR payload datas, it is nothing to confirm the AMR payload datas Damage data;According to property value CMR and the Frame Type of the AMR payload datas, extracted from the AMR payload datas corresponding The AMR speech datas of payload length.
Wherein, the bearing protocol parsing module 22 is specifically used for:
According to the bearing protocol of the RTP data, corresponding protocol analysis is carried out sequentially in time, obtains link data Carried with RTP;The link data include source IP, purpose IP and UDP port number.
Wherein, the RTP decoder modules 23 are specifically used for:
Judge the Payload Type value whether be more than or equal to 96 and less than or equal to 127 integer;If It is that the RTP is carried as AMR forms;If it is not, the RTP is carried as non-AMR forms.
The present embodiment is extracted by the parsing to bearing protocol and property value, and it is AMR forms to determine RTP data, then is carried out Further parsing, judge and extract, so as to obtain lossless AMR speech datas, be advantageous in mass data accurately, efficiently Ground extracts AMR data, without relying on Session Initiation Protocol, and is applied to different bearing mode and network environment.
The technical principle of the present invention is described above in association with specific embodiment.These descriptions are intended merely to explain the present invention's Principle, and limiting the scope of the invention can not be construed in any way.Based on explanation herein, the technology of this area Personnel would not require any inventive effort the other embodiments that can associate the present invention, and these modes are fallen within Within protection scope of the present invention.

Claims (10)

  1. A kind of 1. extracting method of AMR speech datas, it is characterised in that:
    Gather RTP data;
    The RTP data are parsed sequentially in time obtains link data and RTP carryings;
    The RTP carryings are parsed, judge whether the RTP carryings are AMR forms, are to obtain by Payload Type value Take the AMR payload datas in the RTP carryings;
    By the property value Quality Indicator of the AMR payload datas, it is lossless number to confirm the AMR payload datas According to when, extract and preserve AMR speech datas.
  2. 2. extracting method according to claim 1, it is characterised in that parse the RTP data sequentially in time and obtain After linking data and RTP carryings, in addition to:
    Managing listings are established the link according to the link data;
    Accordingly, if judging that the RTP is carried as non-AMR forms by Payload Type value, abandon the RTP and hold Carry, and the link data corresponding to deletion from url management list.
  3. 3. extracting method according to claim 1, it is characterised in that extract and preserve AMR speech datas, including:
    According to property value CMR and the Frame Type of the AMR payload datas, extracted from the AMR payload datas corresponding net The AMR speech datas of lotus length.
  4. 4. extracting method according to claim 1, it is characterised in that parse the RTP data sequentially in time and obtain Data and RTP carryings are linked, including:
    According to the bearing protocol of the RTP data, carry out corresponding protocol analysis sequentially in time, obtain link data and RTP is carried;
    The link data include source IP, purpose IP and UDP port number.
  5. 5. extracting method according to claim 1, it is characterised in that by described in Payload Type value judgement Whether RTP carryings are AMR forms, including:
    Judge the Payload Type value whether be more than or equal to 96 and less than or equal to 127 integer;
    If so, the RTP is carried as AMR forms;
    If it is not, the RTP is carried as non-AMR forms.
  6. A kind of 6. extraction element of AMR speech datas, it is characterised in that including:
    Data acquisition module, for gathering RTP data;
    Bearing protocol parsing module, link data and RTP carryings are obtained for parsing the RTP data sequentially in time;
    RTP decoder modules, for parsing the RTP carryings, whether the RTP carryings are judged by Payload Type value For AMR forms, it is to obtain the AMR payload datas in the RTP carryings;
    AMR decoder modules, for the property value Quality Indicator by the AMR payload datas, confirm the AMR When payload data is lossless data, extracts and preserve AMR speech datas.
  7. 7. extraction element according to claim 6, it is characterised in that also include:Url management module, for according to when Between sequentially parse after the RTP data obtain link data and RTP carryings,
    Managing listings are established the link according to the link data;
    Accordingly, if the RTP decoder modules judge that the RTP is carried as non-AMR forms by Payload Type value, Then abandon the RTP carryings;
    The url management module is additionally operable to, the link data corresponding to deletion from url management list.
  8. 8. extraction element according to claim 6, it is characterised in that the AMR decoder modules are specifically used for:
    By the property value Quality Indicator of the AMR payload datas, it is lossless number to confirm the AMR payload datas According to;
    According to property value CMR and the Frame Type of the AMR payload datas, extracted from the AMR payload datas corresponding net The AMR speech datas of lotus length.
  9. 9. extraction element according to claim 6, it is characterised in that the bearing protocol parsing module is specifically used for:
    According to the bearing protocol of the RTP data, carry out corresponding protocol analysis sequentially in time, obtain link data and RTP is carried;
    The link data include source IP, purpose IP and UDP port number.
  10. 10. extraction element according to claim 6, it is characterised in that the RTP decoder modules are specifically used for:
    Judge the Payload Type value whether be more than or equal to 96 and less than or equal to 127 integer;
    If so, the RTP is carried as AMR forms;
    If it is not, the RTP is carried as non-AMR forms.
CN201711104971.0A 2017-11-10 2017-11-10 A kind of extracting method and device of AMR speech datas Pending CN107809435A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711104971.0A CN107809435A (en) 2017-11-10 2017-11-10 A kind of extracting method and device of AMR speech datas

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711104971.0A CN107809435A (en) 2017-11-10 2017-11-10 A kind of extracting method and device of AMR speech datas

Publications (1)

Publication Number Publication Date
CN107809435A true CN107809435A (en) 2018-03-16

Family

ID=61583645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711104971.0A Pending CN107809435A (en) 2017-11-10 2017-11-10 A kind of extracting method and device of AMR speech datas

Country Status (1)

Country Link
CN (1) CN107809435A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060268845A1 (en) * 2005-05-31 2006-11-30 Santera Systems, Inc. Methods and systems for unlicensed mobile access realization in a media gateway
CN101567853A (en) * 2009-05-13 2009-10-28 中兴通讯股份有限公司 Audio frequency media package-transmitting controller, method and audio frequency media server
CN101778432A (en) * 2009-12-22 2010-07-14 华为技术有限公司 Method and device for conversion of voice rate
CN101814973A (en) * 2010-01-29 2010-08-25 深圳市融创天下科技发展有限公司 RTP rapid packet accumulation method based on AMR audio frame
CN104253696A (en) * 2013-06-25 2014-12-31 北京计算机技术及应用研究所 Police hand-held voice intercommunication method and system based on Internet

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060268845A1 (en) * 2005-05-31 2006-11-30 Santera Systems, Inc. Methods and systems for unlicensed mobile access realization in a media gateway
CN101567853A (en) * 2009-05-13 2009-10-28 中兴通讯股份有限公司 Audio frequency media package-transmitting controller, method and audio frequency media server
CN101778432A (en) * 2009-12-22 2010-07-14 华为技术有限公司 Method and device for conversion of voice rate
CN101814973A (en) * 2010-01-29 2010-08-25 深圳市融创天下科技发展有限公司 RTP rapid packet accumulation method based on AMR audio frame
CN104253696A (en) * 2013-06-25 2014-12-31 北京计算机技术及应用研究所 Police hand-held voice intercommunication method and system based on Internet

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
DOUBLE LI: ""wireshark解析rtp协议,流媒体中的AMR/H263/H264包的方法"", 《HTTPS://WWW.CNBLOGS.COM/LIDABO/P/7159074.HTML》 *
J. SJOBERG ET AL: ""rfc3267:Real-Time Transport Protocol (RTP) Payload Format and File Storage Format for the Adaptive Multi-Rate (AMR) and Adaptive Multi-Rate Wideband (AMR-WB) Audio Codecs"", 《IETF》 *
SZFHY: ""AMR 文件解析及编解码流程"", 《HTTPS://BLOG.CSDN.NET/SZFHY/ARTICLE/DETAILS/50435350》 *

Similar Documents

Publication Publication Date Title
CN100550933C (en) Monitor method based on the wireless network call monitoring device of distributed structure/architecture
US20130191890A1 (en) Method and system for user identity recognition based on specific information
CN103873356B (en) Application and identification method, system and home gateway based on home gateway
US8155145B2 (en) Method and system for telecommunications using layer 3 packets obtained from a sequence of layer 2 radio link control layer data frames
US9392082B2 (en) Communication interface and method for robust header compression of data flows
AU2012265335B2 (en) Audio decoding method and device
CN101262418B (en) Transmission of a digital message interspersed throughout a compressed information signal
WO2012070859A3 (en) Broadcast signal transmitting apparatus, broadcast signal receiving apparatus, and broadcast signal transceiving method in broadcast signal transmitting and receiving apparatuses
CN105100508B (en) A kind of network voice quality appraisal procedure, device and system
CN103944992B (en) Method for accelerating HTTP on IOS
US20120281589A1 (en) Audio quality measurement apparatus, audio quality measurement method, and program
CN102882865A (en) Method for realizing multimedia agency service control on basis of socks5 agency agreement
CN102299962A (en) Cloud-based Voice over Internet Protocol (VoIP) system, device and method
Ortega et al. Comparison between the real and theoretical values of the technical parameters of the VoIP codecs
CN101689370B (en) Sound packet receiving device, and sound packet receiving method
US9973402B2 (en) Transmission device, receiving device, and relay device
Ortega et al. Evaluation of the voice quality and QoS in real calls using different voice over IP codecs
EP2903224B1 (en) Method for transmitting audio information and packet communication system
Nguyen et al. A dynamic rate adaptation algorithm using WB E-model for voice traffic over LTE network
CN107809435A (en) A kind of extracting method and device of AMR speech datas
CN102882846A (en) IP voice restoration method and device
CN101631174A (en) Network telephone real-time identification and filtering method based on session initiation protocol
CN110225212A (en) A kind of VoIP voice restoration methods and device
Zhang et al. Perceived QoS assessment for Voip networks
CN105553935B (en) A kind of data package processing method, device and terminal

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180316