CN109887514B - Audio transmission method and device - Google Patents

Audio transmission method and device Download PDF

Info

Publication number
CN109887514B
CN109887514B CN201910024331.1A CN201910024331A CN109887514B CN 109887514 B CN109887514 B CN 109887514B CN 201910024331 A CN201910024331 A CN 201910024331A CN 109887514 B CN109887514 B CN 109887514B
Authority
CN
China
Prior art keywords
audio
data packet
packet
redundant
buffer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910024331.1A
Other languages
Chinese (zh)
Other versions
CN109887514A (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shizhen Information Technology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shizhen Information 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shizhen Information Technology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201910024331.1A priority Critical patent/CN109887514B/en
Publication of CN109887514A publication Critical patent/CN109887514A/en
Application granted granted Critical
Publication of CN109887514B publication Critical patent/CN109887514B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention relates to the field of audio coding. The embodiment of the invention provides an audio transmission method and an audio transmission device, wherein the audio transmission method comprises the following steps: acquiring audio sampling data; encoding the audio sampling data into an audio data packet, and recording the length of the audio data packet; encoding the audio sample data into redundant data packets; adding the Nth redundant data packet into the (N + i) th audio data packet, wherein N is a positive integer, and i is an integer greater than or equal to 2; attaching length information of the audio packet to the audio packet. When continuous packet loss occurs, the invention can recover the audio data packet, thereby greatly improving the voice communication quality.

Description

Audio transmission method and device
Technical Field
The present invention relates to the field of audio coding, and in particular, to an audio transmission method and apparatus.
Background
In the transmission process of the audio data packet, the phenomenon of packet loss often exists, and at present, although a data recovery method exists, once continuous packet loss is met, recovery is difficult to carry out.
Disclosure of Invention
The embodiment of the invention provides an audio transmission method and an audio transmission device, which can recover audio data packets when continuous packet loss occurs.
In a first aspect, an embodiment of the present invention provides an audio transmission method, including:
acquiring audio sampling data;
encoding the audio sampling data into an audio data packet, and recording the length of the audio data packet;
encoding the audio sample data into redundant data packets;
adding the Nth redundant data packet into the (N + i) th audio data packet, wherein N is a positive integer, and i is an integer greater than or equal to 2;
attaching length information of the audio packet to the audio packet.
Wherein, also include setting up the buffer;
the appending the nth redundant data packet to the N + i th audio data packet comprises:
storing the encoded redundant data packet into the last of the buffer;
and judging whether the redundant data packets stored in the buffer reach a preset number, if so, adding the first redundant data packet stored in the buffer to the (N + i) th audio data packet, and deleting the first redundant data packet from the buffer.
Wherein, the buffer is an array of first-in first-out.
Wherein, the audio data packet is an OPUS data packet.
Wherein the redundant data packet is a low bit rate redundant packet.
Wherein the value of i is 4.
Wherein encoding the audio sample data into forward error correction packets; appending the forward error correction data packet to the audio data packet.
Wherein, still include: decoding from the audio data packet when decoding; decoding from said forward error correction data packet when said audio data packet is absent; decoding from said redundant data packet when said forward error correction data packet is absent.
In a second aspect, an embodiment of the present invention further provides an audio transmission apparatus, including:
an acquisition unit for acquiring audio sample data;
the first coding unit is used for coding the audio sampling data into audio data packets and recording the length of the audio data packets;
a second encoding unit for encoding the audio sample data into redundant data packets;
a first adding unit, configured to add an nth redundant data packet to an N + i audio data packet, where N is a positive integer, and i is an integer greater than or equal to 2;
a second appending unit operable to append length information of the audio data packet to the audio data packet.
The device also comprises a setting unit used for setting the buffer;
the first additional unit is used for:
storing the encoded redundant data packet into the last of the buffer;
and judging whether the redundant data packets stored in the buffer reach a preset number, if so, adding the first redundant data packet stored in the buffer to the (N + i) th audio data packet, and deleting the first redundant data packet from the buffer.
Wherein, the buffer is an array of first-in first-out.
Wherein, the audio data packet is an OPUS data packet.
And the redundant data packet is a low-bit-rate redundant packet.
Wherein the value of i is 4.
Wherein, still include:
a third encoding unit for encoding the audio sample data into a forward error correction data packet;
a third appending unit operable to append the forward error correction data packet to the audio data packet.
Wherein, still include the decoding unit, is used for: decoding from the audio data packet when decoding; decoding from said forward error correction data packet when said audio data packet is absent; decoding from said redundant data packet when said forward error correction data packet is absent.
In a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps of any one of the methods described above.
In a fourth aspect, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of any one of the methods described above when executing the program.
The audio transmission method provided by the embodiment of the invention has the following beneficial effects:
in the audio transmission method according to the embodiment of the present invention, audio sampling data is obtained, the audio sampling data is encoded into an audio data packet and a redundant data packet, the redundant data packet and the audio data packet are aggregated, and the nth redundant data packet is appended to the N + i th audio data packet, where the redundant data packet is appended to an audio data packet subsequent to the redundant data packet, for example, the 2 nd (or 3 rd, 4 th, etc.) audio data packet subsequent to the redundant data packet, and the redundant data packet is not appended to an adjacent audio data packet subsequent thereto, so that when a continuous packet loss occurs, packet loss data can be recovered from the redundant data packet, and the quality of voice communication is greatly improved.
Drawings
FIG. 1 is a first flowchart illustrating an audio transmission method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an encoding process in an audio transmission method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a second exemplary embodiment of an audio transmission method;
FIG. 4 is a diagram illustrating a buffer in an audio transmission method according to an embodiment of the invention;
FIG. 5 is a third flowchart illustrating an audio transmission method according to an embodiment of the invention;
fig. 6 is a schematic structural diagram of an audio transmission device according to an embodiment of the invention.
Detailed Description
The embodiments of the present invention will be further described with reference to the drawings and the embodiments.
In the following description, the terms "first" and "second" are used for descriptive purposes only and are not intended to indicate or imply relative importance. The following description provides embodiments of the invention, which may be combined with or substituted for various embodiments, and thus the embodiments of the invention are intended to include all possible combinations of the same and/or different embodiments described. Thus, if one embodiment includes feature A, B, C and another embodiment includes feature B, D, then embodiments of the invention should also be considered to include embodiments that include one or more of all other possible combinations of A, B, C, D, even though such embodiments may not be explicitly recited in the following text.
In the following description, the expressions "have", "may have", "include" and "include" or "may include" and "may include" indicate the presence of corresponding features (e.g., elements such as values, functions, operations or components), but do not preclude the presence of additional features.
In the following description, when one element (e.g., a first element) is referred to as being "operatively or communicatively coupled" or "connected" to another element (e.g., a second element), it may be directly coupled or connected to the other element or intervening elements (e.g., third elements) may be present. On the other hand, when one element (e.g., a first element) is referred to as being "directly coupled" or "directly connected" to another element (e.g., a second element), it is understood that there are no intervening elements (e.g., third elements).
The following description provides examples, and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made in the function and arrangement of elements described without departing from the scope of the embodiments of the invention as set forth in the appended claims. Various examples may omit, substitute, or add various procedures or components as appropriate. For example, the described methods may be performed in an order different than the order described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
Applications of remote voice communication, such as video conferencing, mobile terminal voice calls, etc., are becoming more widespread. In a video conference, a conference place comprises terminal equipment, the terminal equipment in the conference place samples, codes and the like the voice information of participants to form a voice data packet, then the voice data packet is sent to a conference place of another party, and the terminal equipment in the conference place of the other party decodes the voice data packet, so that the voice communication in the video conference of the conference places of the two parties is realized. In a voice call scenario of a mobile terminal, there is also substantially the same voice data transmission. In the transmission process of voice data, packet loss, even continuous packet loss, occurs under the influence of factors such as communication lines. After the packet is lost continuously, whether the voice data packet can be recovered or not has an important influence on the communication quality of a video conference, a mobile terminal voice communication and the like. The audio transmission method and the audio transmission device provided by the embodiment of the invention can recover audio data when continuous packet loss occurs, and improve the stability and quality of voice communication.
The audio transmission method in the embodiment of the present invention may be applied to, for example, an interactive smart tablet, an interactive tablet, a display, a smart television, or other devices, and may also be applied to a mobile terminal, a tablet computer, a Personal computer, a notebook, a desktop computer, a server, a Personal Digital Assistant (PDA), a wearable device, or other devices. An audio transmission method according to an embodiment of the present invention is described below.
Fig. 1 is a first flowchart illustrating an audio transmission method according to an embodiment of the present invention, as shown in fig. 1, the audio transmission method according to the embodiment includes step 101 of obtaining audio sample data; step 102, encoding the audio sampling data into an audio data packet, and recording the length of the audio data packet; 103, coding the audio sampling data into a redundant data packet; 104, adding the Nth redundant data packet into the (N + i) th audio data packet, wherein N is a positive integer, and i is an integer greater than or equal to 2; in step 105, the length information of the audio data packet is appended to the audio data packet. Steps 101-105 are described below.
Step 101, audio sample data is obtained.
Fig. 2 is a schematic diagram of an encoding process in an audio transmission method according to an embodiment of the present invention, as shown in fig. 1-2, in some embodiments, a terminal device samples voice information to obtain audio sample data. The sampling process is a process of converting an acoustic waveform into a series of binary data, and is also an analog/digital conversion process. In the sampling process, the sound wave is sampled at a certain period, and the state of the original analog sound wave at a certain moment is recorded in each sampling process, which is called as a sample. A series of samples are connected to describe a segment of the sound wave. In some embodiments, the sampling period can be set according to practical situations, for example, 20ms, as shown in fig. 2, data1 is audio data of the first sampling period, data2 is audio data of the second sampling period, data3 is audio data of the third sampling period, and so on.
Step 102, encoding the audio sampling data into an audio data packet, and recording the length of the audio data packet.
As shown in fig. 2, in some embodiments, the audio sample data1 is encoded into audio packets p1, the audio sample data2 is encoded into audio packets p2, the audio sample data3 is encoded into audio packets p3, and so on. In some embodiments, the audio packets are OPUS packets, which is a lossy vocoding format with the following main characteristics:
bit rates of 6 kb/s to 510kb/s
Sampling rates from 8kHz (narrow band) to 48kHz (full band)
Frame size from 2.5 ms to 60 ms
Supporting Constant Bit Rate (CBR) and Variable Bit Rate (VBR)
Audio bandwidth from narrow band to full band
Support for speech and music
Support for mono and stereo
Support for up to 255 channels (frames of multiple data streams)
Can dynamically adjust bit rate, audio bandwidth and frame size
Good robust loss rate and packet loss concealment
Floating point and fixed point implementations
In this step, the length of the audio data packet is also recorded because after storing a piece of data in the computer, if the data is to be obtained, the starting position of the piece of data in the computer and the length of the data are needed, so that the whole piece of data can be obtained. In some embodiments, the data sent by the sending terminal is, for example, an aggregation of an audio data packet and a redundant data packet, and length information length of the audio data packet is appended to the end of the aggregation packet; when the receiving terminal decodes, the length of the audio data packet can be obtained according to the length information length, so that the audio data packet can be analyzed, and further the redundant packet can be analyzed from the rest data.
Step 103, encoding the audio sample data into redundant data packets.
As shown in fig. 2, in some embodiments, the audio sample data1 is encoded into redundant data packets nb _ p1, the redundant data packets nb _ p1 being a backup of the audio sample data 1; encoding the audio sample data2 into a redundant data packet nb _ p2, the redundant data packet nb _ p2 being a backup of the audio sample data 2; the audio sample data3 is encoded into redundant data packets nb _ p3, the redundant data packets nb _ p3 are a backup of the audio sample data3, and so on. In some embodiments, the audio sample data is narrowband compressed to generate a narrowband redundant packet of 8Kbps (Kilobit per second), i.e., a redundant data packet. In some embodiments, the redundant data packet is a Low Bit-Rate Redundancy packet (LBRR).
And 104, adding the Nth redundant data packet to the (N + i) th audio data packet, wherein N is a positive integer, and i is an integer greater than or equal to 2.
As shown in fig. 2, in some embodiments, i is an integer greater than or equal to 2, and i may take a value of, for example, 2, 3, 4, 5, 6, 7, etc., and hereinafter, i ═ 4 is described as an example. For the 1 st redundant data packet nb _ p1, it is appended to the rear of the 5(1+4) th audio data packet p 5; for the 2 nd redundant data packet nb _ p2, it is appended to the 6 th (2+4) audio data packet p 6; for the 3 rd redundant data packet nb _ p3, it is appended to the 7 th (3+4) audio data packet p 7; for the 4 th redundant data packet nb _ p4, it is appended to the 8 th (4+4) audio data packet p8, and so on. In this step, the nth redundant data packet is appended to the N + i th audio data packet, and the redundant data packet is appended to the audio data packet following the redundant data packet, for example, the audio data packet located at the 2 nd (or 3 rd, 4 th, etc.) after the redundant data packet, and the redundant data packet is not appended to the adjacent audio data packet following the redundant data packet.
In step 105, the length information of the audio data packet is appended to the audio data packet.
As shown in fig. 2, in some embodiments, length information of an audio packet is appended to the 5 th audio packet p5, for example, after the redundant packet nb _ p 1; the length information of the audio packet is attached to the 6 th audio packet p6, for example, after the redundant packet nb _ p2, and so on. And the length information length of the audio data packet is added to the end of the audio data packet, and when the receiving terminal decodes, the length of the audio data packet can be obtained according to the length information length, so that the audio data packet can be analyzed, and further the redundant data packet can be analyzed from the rest data. In some embodiments, length information is appended to each audio packet.
In the audio transmission method according to the embodiment of the present invention, audio sampling data is obtained, the audio sampling data is encoded into an audio data packet and a redundant data packet, the redundant data packet and the audio data packet are aggregated, and the nth redundant data packet is appended to the N + i th audio data packet, where the redundant data packet is appended to an audio data packet subsequent to the redundant data packet, for example, the 2 nd (or 3 rd, 4 th, etc.) audio data packet subsequent to the redundant data packet, and the redundant data packet is not appended to an adjacent audio data packet subsequent thereto, so that when a continuous packet loss occurs, packet loss data can be recovered from the redundant data packet, and the quality of voice communication is greatly improved.
Fig. 3 is a flowchart illustrating a second audio transmission method according to an embodiment of the present invention, as shown in fig. 3, the audio transmission method according to the embodiment includes step 201 of obtaining audio sample data; step 202, encoding the audio sampling data into an audio data packet, and recording the length of the audio data packet; step 203, encoding the audio sampling data into a redundant data packet; step 204, storing the encoded redundant data packet into the last of the buffer; step 205, judging whether the number of the redundant data packets stored in the buffer reaches a preset number, if so, executing step 206, and if not, executing step 207; step 206, adding the first redundant data packet stored in the buffer to the (N + i) th audio data packet, and deleting the first redundant data packet from the buffer; in step 207, the length information of the audio data packet is appended to the audio data packet. Wherein the steps 201-203 are substantially the same as the steps 101-103, and the steps 207 are substantially the same as the steps 105, please refer to the descriptions of the steps 101-103 and 105, and the following description refers to the steps 204-206.
Step 204, the encoded redundant data packet is stored in the end of the buffer.
In some embodiments, a buffer is included in or before this step. As shown in fig. 3-4, the buffer is used for storing redundant data packets, for example, for storing the last 5 redundant data packets, and may also store other numbers of redundant data packets. The buffer may be sized to store, for example, 5 redundant data packets. The buffer may be, for example, an array of First-in-First-out (FIFO). As shown in fig. 4, the redundant data packets stored in the buffer form a queue, and each time the stored redundant data packet is stored at the end of the buffer, for example, the first redundant data packet nb _ p1 is stored in the buffer, the second redundant data packet nb _ p2 is stored, the second redundant data packet nb _ p2 is stored after the first redundant data packet nb _ p1, the third redundant data packet nb _ p3 is stored, the third redundant data packet nb _ p3 is stored after the second redundant data packet nb _ p2, and so on.
Step 205, determine whether the number of the redundant data packets stored in the buffer reaches the preset number, if yes, execute step 206, if no, execute step 207.
In some embodiments, the preset number may be set according to actual needs, for example, 3, 4, 5, and the like. In some embodiments, the preset number may be, for example, i + 1. In some embodiments, the predetermined number is greater than or equal to 3.
Step 206, the first redundant data packet stored in the buffer is added to the (N + i) th audio data packet, and the first redundant data packet is deleted from the buffer.
As shown in fig. 4, in some embodiments, the first redundant data packet stored in the buffer is the first redundant data packet stored in the buffer, for example, when 5 redundant data packets are stored in the buffer, the first redundant data packet stored in the 5 redundant data packets is appended to the audio data packet, the first redundant data packet stored in the buffer is deleted, and the buffer has space to store the redundant data packet after deletion. In some embodiments, the size of the memory space of the buffer is fixed, for example, 5 redundant data packets are stored.
In this embodiment, the latest redundant data packet is stored in the buffer, and when the number of redundant data packets in the buffer reaches the preset number, the redundant data packet stored first in the buffer is appended to the audio data packet, so that the redundant data packet is appended to the subsequent audio data packet that is not adjacent to the redundant data packet, and when consecutive packet loss occurs, packet loss data can be recovered from the redundant data packet, thereby greatly improving the quality of voice communication.
Fig. 5 is a schematic flowchart illustrating a third exemplary embodiment of an audio transmission method according to the present invention, as shown in fig. 5, the audio transmission method includes step 201 of obtaining audio sample data; step 202, encoding the audio sampling data into an audio data packet, and recording the length of the audio data packet; step 203A, encoding the audio sampling data into a redundant data packet; encoding the audio sample data into forward error correction packets; appending a forward error correction data packet to the audio data packet; step 204, storing the encoded redundant data packet into the last of the buffer; step 205, judging whether the number of the redundant data packets stored in the buffer reaches a preset number, if so, executing step 206, and if not, executing step 207; step 206, adding the first redundant data packet stored in the buffer to the (N + i) th audio data packet, and deleting the first redundant data packet from the buffer; in step 207, the length information of the audio data packet is appended to the audio data packet. Steps 201, 202, 204 and 207 have already been described, please refer to the above description, and step 203A is described below. .
Step 203A, encoding the audio sampling data into a redundant data packet; encoding the audio sample data into forward error correction packets; forward error correction packets are appended to the audio data packets.
In some embodiments, the audio sample data is encoded not only as redundant data packets, but also as Forward Error Correction (FEC) packets, which are appended to the audio data packets. Thus, in this embodiment, the encoded audio data includes audio data packets, forward error correction data packets, and redundancy data packets. For example, the sampling period is 20ms, and the complete packet after encoding for each time segment is as follows:
Figure BDA0001941915670000111
in some embodiments, the audio transmission method further comprises: when decoding, decoding from the audio data packet; decoding from the forward error correction packet when there is no audio packet; when there is no forward error correction packet, decoding from the redundant data packet.
The audio information for each sample period can be recovered from three places, for example, the audio information for a 0-20ms sample period can be recovered from three places:
firstly, the method comprises the following steps: the audio data packets in the complete packet are 0-20 ms.
Secondly, the method comprises the following steps: the FEC packets in the complete packet are 20-40 ms.
Thirdly, the method comprises the following steps: 100-.
In the case where there is no packet loss, it is not necessary to obtain the original audio information from the above three packets at the same time. Therefore, priorities need to be set for the above three packets, and the order of the priorities from large to small is: audio data packet > FEC packet > redundancy data packet.
That is, when all of the above three packets exist, the decoding from the audio data packet is preferred because the other two packets are narrowband packets with low code rate, and the quality of the sound decoded from the narrowband packets is not as high as that decoded from the audio data packet.
If 0-20ms of complete packets are lost, decoding recovery from 0-20ms FEC packets carried in 20-40ms of complete packets is preferred because although the audio quality decoded recovery from 0-20ms of redundant data packets carried in 100-20 ms of complete packets is substantially the same, the decoding delay from 0-20ms FEC packets carried in 20-40ms of complete packets is lower.
When 0-20ms FEC packets carried in 0-20ms complete packets and 20-40ms complete packets are lost, recovery is carried out from 0-20ms redundant data packets in 100-120ms complete packets.
As shown in fig. 6, the audio transmission apparatus according to an embodiment of the present invention includes an obtaining unit 10, configured to obtain audio sampling data; a first encoding unit 11, configured to encode the audio sample data into an audio data packet, and record the length of the audio data packet; a second encoding unit 13 for encoding the audio sample data into redundant data packets; a first appending unit 14 for appending an nth redundant data packet to an N + i-th audio data packet, N being a positive integer, i being an integer greater than or equal to 2; a second appending unit 12 for appending length information of the audio data packet to the audio data packet.
Optionally, the system further comprises a setting unit, configured to set the buffer;
the first additional unit is used for:
storing the encoded redundant data packet into the last of the buffer;
and judging whether the number of the redundant data packets stored in the buffer reaches a preset number, if so, attaching the first redundant data packet stored in the buffer to the (N + i) th audio data packet, and deleting the first redundant data packet from the buffer.
Optionally, the buffer is a first-in-first-out array.
Optionally, the audio data packet is an OPUS data packet.
Optionally, the redundant data packet is a low bit rate redundant packet.
Optionally, i is 4.
Optionally, the method further comprises:
a third encoding unit for encoding the audio sample data into a forward error correction data packet;
a third appending unit for appending the forward error correction data packet to the audio data packet.
Optionally, the apparatus further comprises a decoding unit, configured to: when decoding, decoding from the audio data packet; decoding from the forward error correction packet when there is no audio packet; when there is no forward error correction packet, decoding from the redundant data packet.
In this specification, for the embodiment of the audio transmission apparatus, the content thereof is substantially similar to that of the embodiment of the audio transmission method, and please refer to the above description for related points.
It is clear to a person skilled in the art that the solution according to the embodiments of the invention can be implemented by means of software and/or hardware. The "unit" and "module" in this specification refer to software and/or hardware that can perform a specific function independently or in cooperation with other components, where the hardware may be, for example, an FPGA (Field-ProgrammaBLE Gate Array), an IC (Integrated Circuit), or the like.
Each processing unit and/or module according to the embodiments of the present invention may be implemented by an analog circuit that implements the functions described in the embodiments of the present invention, or may be implemented by software that executes the functions described in the embodiments of the present invention.
The embodiment of the invention also provides electronic equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the steps of the method are realized when the processor executes the program.
Embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk including floppy disks, optical disks, DVD, CD-ROMs, microdrive, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
All functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes may be made to the present embodiment by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.

Claims (18)

1. An audio transmission method, comprising:
acquiring audio sampling data, wherein the audio sampling data is obtained by sampling voice information at a sampling period;
encoding the audio sampling data into an audio data packet, and recording the length of the audio data packet;
encoding the audio sampling data into redundant data packets, wherein the redundant data packets are backups of the audio sampling data, and the redundant data packets correspond to the audio data packets one to one;
adding the Nth redundant data packet to the (N + i) th audio data packet to obtain an aggregation packet, wherein N is a positive integer, and i is an integer greater than or equal to 2;
and attaching length information of the audio data packet to the aggregation packet, wherein the length information is used for analyzing the audio data packet in the aggregation packet.
2. The audio transmission method of claim 1, further comprising providing a buffer;
the appending the nth redundant data packet to the N + i th audio data packet comprises:
storing the encoded redundant data packet into the last of the buffer;
and judging whether the redundant data packets stored in the buffer reach a preset number, if so, adding the first redundant data packet stored in the buffer to the (N + i) th audio data packet, and deleting the first redundant data packet from the buffer.
3. The audio transmission method of claim 2, wherein the buffer is a first-in-first-out array.
4. The audio transmission method according to any one of claims 1 to 3, wherein the audio data packet is an OPUS data packet.
5. The audio transmission method according to any of claims 1 to 3, wherein the redundant data packet is a low bit rate redundant packet.
6. The audio transmission method according to any of claims 1 to 3, wherein i is 4.
7. The audio transmission method according to any one of claims 1 to 3, further comprising encoding the audio sample data into forward error correction packets; appending the forward error correction data packet to the audio data packet.
8. The audio transmission method of claim 7, further comprising: decoding from the audio data packet when decoding; decoding from said forward error correction data packet when said audio data packet is absent; decoding from said redundant data packet when said forward error correction data packet is absent.
9. An audio transmission device, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring audio sampling data, and the audio sampling data is obtained by sampling voice information at a sampling period;
the first coding unit is used for coding the audio sampling data into audio data packets and recording the length of the audio data packets;
a second encoding unit, configured to encode the audio sample data into redundant data packets, where the redundant data packets are backups of the audio sample data, and the redundant data packets correspond to the audio data packets one to one;
a first adding unit, configured to add an nth redundant data packet to an N + i th audio data packet to obtain an aggregate packet, where N is a positive integer, and i is an integer greater than or equal to 2;
a second appending unit, configured to append length information of the audio data packet to the aggregate packet, where the length information is used to parse the audio data packet from the aggregate packet.
10. The audio transmission apparatus according to claim 9, further comprising a setting unit for setting a buffer;
the first additional unit is used for:
storing the encoded redundant data packet into the last of the buffer;
and judging whether the redundant data packets stored in the buffer reach a preset number, if so, adding the first redundant data packet stored in the buffer to the (N + i) th audio data packet, and deleting the first redundant data packet from the buffer.
11. The audio transmission device according to claim 10, wherein the buffer is a first-in-first-out array.
12. The audio transmission device according to any of claims 9 to 11, wherein the audio data packets are OPUS data packets.
13. The audio transmission apparatus according to any of claims 9 to 11, wherein the redundant data packet is a low bit rate redundant packet.
14. The audio transmission device according to any of claims 9 to 11, wherein i has a value of 4.
15. The audio transmission device according to any one of claims 9 to 11, further comprising:
a third encoding unit for encoding the audio sample data into a forward error correction data packet;
a third appending unit operable to append the forward error correction data packet to the audio data packet.
16. The audio transmission apparatus according to claim 15, further comprising a decoding unit configured to: decoding from the audio data packet when decoding; decoding from said forward error correction data packet when said audio data packet is absent; decoding from said redundant data packet when said forward error correction data packet is absent.
17. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 8.
18. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1-8 are implemented when the program is executed by the processor.
CN201910024331.1A 2019-01-10 2019-01-10 Audio transmission method and device Active CN109887514B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910024331.1A CN109887514B (en) 2019-01-10 2019-01-10 Audio transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910024331.1A CN109887514B (en) 2019-01-10 2019-01-10 Audio transmission method and device

Publications (2)

Publication Number Publication Date
CN109887514A CN109887514A (en) 2019-06-14
CN109887514B true CN109887514B (en) 2021-03-19

Family

ID=66925823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910024331.1A Active CN109887514B (en) 2019-01-10 2019-01-10 Audio transmission method and device

Country Status (1)

Country Link
CN (1) CN109887514B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113660063B (en) * 2021-08-18 2023-12-08 杭州网易智企科技有限公司 Spatial audio data processing method and device, storage medium and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1241821A1 (en) * 2001-03-13 2002-09-18 Koninklijke Philips Electronics N.V. Method of data packet error protection
JP2004266378A (en) * 2003-02-25 2004-09-24 Mitsubishi Electric Corp Packet transmitting device
CN100433614C (en) * 2003-11-26 2008-11-12 上海贝尔阿尔卡特股份有限公司 A data packet recovery method
CN101030951B (en) * 2007-02-08 2010-11-24 华为技术有限公司 Drop-out compensating method and compensator
CN102170583B (en) * 2010-02-26 2013-06-05 中兴通讯股份有限公司 Method and system for recovering and playing audio frequency in mobile multimedia broadcast

Also Published As

Publication number Publication date
CN109887514A (en) 2019-06-14

Similar Documents

Publication Publication Date Title
US20190198027A1 (en) Audio frame loss recovery method and apparatus
JP5357904B2 (en) Audio packet loss compensation by transform interpolation
CN111314335B (en) Data transmission method, device, terminal, storage medium and system
JP6077011B2 (en) Device for redundant frame encoding and decoding
US20160050453A1 (en) Asynchronously streaming video of a live event from a handheld device
JP2018514804A (en) Dejitter buffer update
US9916837B2 (en) Methods and apparatuses for transmitting and receiving audio signals
US20190214025A1 (en) Speech/Audio Bitstream Decoding Method and Apparatus
CN109887514B (en) Audio transmission method and device
US9912617B2 (en) Method and apparatus for voice communication based on voice activity detection
KR100792209B1 (en) Method and apparatus for restoring digital audio packet loss
US8451317B2 (en) Indexing a data stream
EP1691561A2 (en) Erasure of DTMF signal transmitted as speech data
CN112769524B (en) Voice transmission method, device, computer equipment and storage medium
CN107680607B (en) Signal compression method, signal decompression method and device thereof
CN114079535B (en) Transcoding method, device, medium and electronic equipment
CN113115039B (en) Working frequency determination method and device and electronic equipment
CN115460186A (en) AMR-WB (adaptive multi-rate-wideband) coding-based capability platform sound recording file generation method and device
KR20150083284A (en) Method and device for encoding data
WO2023049628A1 (en) Efficient packet-loss protected data encoding and/or decoding
CN104683835A (en) Method for searching news clue by applying mobile terminal
CN115632681A (en) Signal transmission method, combining device and splitting device
JP6154592B2 (en) Compression device, decompression device, compression / decompression device, compression method, compression control program, and audio data structure
JP2024521195A (en) Radio transmission and reception of packetized audio data combined with forward error correction
CN113660063A (en) Spatial audio data processing method and device, storage medium and electronic equipment

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