Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
It is to be understood that the terms "first," "second," and the like, as used herein, may be used to describe various technical features, but these technical features are not limited by these terms. These terms are only used to distinguish one technical feature from another technical feature. For example, a first earphone may be referred to as a second earphone, and similarly, a second earphone may be referred to as a first earphone, without departing from the scope of the application. Both the first earpiece and the second earpiece are one (or a group of) earpieces of the set of earpieces, but they are not the same earpiece.
Fig. 1 is a schematic view of an application environment of an audio data transmission method in an embodiment. As shown in fig. 1, the application environment includes a terminal device 101 and a headset set 102, and the headset set 102 includes a first headset 1021 and a second headset 1022. The terminal device 101 communicates with a master earphone in the earphone set 102, and the master earphone communicates with a slave earphone, that is, the master earphone establishes a communication connection with the terminal device 101, the slave earphone establishes a communication connection with the master earphone, and the slave earphone monitors the communication connection between the master earphone and the terminal device 101. When the terminal device 101 needs to send data to the earphone set 102, the terminal device 101 sends the data to the master earphone, and the master earphone sends the data to the slave earphone. Similarly, when the slave earphone needs to transmit data to the terminal device, the data needs to be transmitted to the master earphone, and the master earphone transmits the data to the terminal device 101. One of the first earphone 1021 and the second earphone 1022 is used as a master earphone, the other is a slave earphone, and when the master-slave switching condition is met, the two earphones are switched. Specifically, if the second earphone 1022 is a master earphone, the first earphone 1021 is a slave earphone, and when the master-slave switching condition is satisfied, the first earphone 1021 is switched to the master earphone, and at this time, the second earphone 1022 is switched to the slave earphone.
The terminal device 101 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices and portable wearable devices, and the internet of things devices may be smart televisions, smart vehicle devices and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The earphone set is a truly wireless stereo earphone (TWS earphone) or other type of Bluetooth earphone.
When the earphone set performs stereo recording, after the earphone set 102 successfully establishes a communication connection with the terminal device 101, a recording action is performed in response to a recording start instruction sent by the terminal device 101. The earphone set 102 has a first earphone and a second earphone, which are a master earphone and a slave earphone, respectively, for example, when the first earphone is the master earphone, the second earphone is the slave earphone. The master earphone and the slave earphone respectively acquire audio data through respective microphones and respectively encode the acquired audio data, the slave earphone stores the slave recording data packet generated after encoding into a buffer memory area and sends the slave recording data packet to the master earphone through communication connection established with the master earphone, and the master earphone encodes the audio data acquired by the microphones to generate the master recording data packet and stores the master recording data packet into the local buffer memory area. The master earphone receives the slave recording data packet sent by the slave earphone and stores the slave recording data packet in the slave cache area. The slave earphone can send the slave recording data packet to the master earphone according to a preset period, can send the slave recording data packet to the master earphone when receiving an indication sent by the master earphone, can send data to the master earphone once after each slave recording data packet is generated by the slave earphone in some embodiments, and can send the slave recording data packet to the master earphone when the number of the slave recording data packets in the buffer area reaches a preset value in another embodiment. When the uplink transmission is started, the master earphone acquires a master recording data packet in a local buffer area, sequentially acquires a slave recording data packet and the master recording data packet in a slave buffer area for synchronous comparison, and combines the synchronous master recording data packet and the synchronous slave recording data packet into a double-ear data packet, and transmits the double-ear data packet to the terminal equipment through communication connection with the terminal equipment.
When the microphones respectively arranged in the two earphones of the earphone set are used for audio recording, the effect of binaural recording can be achieved, but in the recording process, the main earphone of the earphone is not only responsible for data transmission with the mobile phone, but also responsible for sending received audio data recorded by the slave earphone to the mobile phone, so that the main earphone consumes more power, when the difference of the electric quantity of the master earphone and the slave earphone is large, master-slave switching is needed, namely, when the electric quantity of the main earphone is low, master-slave switching possibly occurs, namely, the main earphone is switched into the slave earphone, and the slave earphone is switched into the main earphone. In some cases, the user picking off the master earphone will trigger the master-slave switch as well. In one embodiment, if the communication signal between the master earphone and the terminal device is poor, a master-slave switch may be triggered. While in the case of a master-slave switch, data loss may occur in the earphone set where binaural recording is performed.
In order to prevent data loss, the application provides an audio data transmission method. Fig. 2 is a flow chart of a method of audio data transmission in one embodiment. The audio data transmission method in this embodiment is described by taking the first earphone 1021 in fig. 1 as an example. As shown in fig. 2, the audio data transmission method includes steps 201 to 203.
Step 201, in the case that the first earphone is switched from the slave earphone to the master earphone, receiving first recording data sent by the second earphone.
The first recording data is audio data recorded by the second earphone, including audio data recorded by the second earphone before being switched to the slave earphone and not transmitted to the terminal device, and/or audio data recorded by the second earphone after being switched to the slave earphone.
Step 202, if the first recording data is not synchronized with the second recording data cached by the first earphone, obtaining third recording data according to the first recording data.
The third recording data is audio data corresponding to an unsynchronized portion of the first recording data relative to the second recording data. The second recording data is audio data recorded by the first earphone and not yet transmitted to the terminal device, optionally, the second recording data may also include audio data recorded by the first earphone after switching to the main earphone and not yet transmitted to the terminal device, and in some embodiments, the second recording data may also include audio data recorded by the first earphone before switching to the main earphone and not transmitted to the original main earphone (i.e., the second earphone). Before the master-slave switching occurs, the first earphone is used as a slave earphone to record audio data and transmit the audio data to the second earphone which is used as a master earphone, and the third recording data is not transmitted to the terminal equipment in the audio data.
If the first recording data includes audio data recorded by the second earphone before switching to the slave earphone, it may happen that the first recording data is not synchronized with the second recording data. The method is characterized in that audio data recorded by a first earphone before being switched to a master earphone is sent to a second earphone serving as the master earphone, the data are deleted in a local buffer area of the first earphone, when master-slave switching of the earphone occurs, the original second earphone becomes a slave earphone, so that audio data forwarded to the second earphone by the original first earphone (the original slave earphone) may not be sent to a terminal device (for example, when the signals of the terminal device and the second earphone are poor or interference signals are too strong, one data packet can be successfully sent after being retransmitted for a plurality of times), after the master-slave switching occurs, the second earphone sends the audio data recorded by the second earphone to the first earphone (the master earphone), the data are complete, and for the audio data recorded by the first earphone before being switched to the master earphone, the local buffer of the first earphone has no related data, so that the audio data before the master-slave switching are not synchronous, and the data are lost. At this time, the missing third recording data needs to be retrieved, the third recording data is synchronized with the audio data which is recorded before the second earphone is switched to the slave earphone and is not sent to the terminal equipment, and the third recording data is retrieved according to the first recording data.
Optionally, whether the first recording data and the second recording data are synchronous or not is judged, and the first synchronous information of the first recording data and the second synchronous information of the second recording data can be compared for determination. It can be understood that the first synchronization information is identification information added to the recorded audio data by the second earphone, and the second synchronization information is identification information added to the recorded audio data by the first earphone.
The first synchronization information and the second synchronization information may be timestamp information for identifying a time frame, serial number information for identifying a recording sequence, or other data identification information.
If the first synchronization information is not matched with the second synchronization information, the first recording data and the second recording data are judged to be not synchronous. And if the first synchronous information is matched with the second synchronous information, judging that the first recording data is synchronous with the second recording data. And whether the first recording data is matched with the second recording data is judged by adopting a synchronous information comparison mode, so that the judging process is simple and easy to execute.
In one embodiment, the first synchronization information and the second synchronization information are added before encoding the audio data. In this embodiment, the first earphone needs to decode the received first recording data, obtain the first synchronization information and compare with the second synchronization information, and encode the synchronized first recording data, second recording data and/or third recording data to generate the binaural data packet.
In one embodiment, the first synchronization information and the second synchronization information are added after encoding the audio data. In this embodiment, the first earphone may directly compare the synchronization information between the received encoded first recording data and the second recording data or the third recording data, and if the comparison is synchronous, the first earphone generates the composite recording data for transmission, so that the data processing process of the first earphone is reduced, and the data transmission efficiency is improved. In one embodiment, the synchronization comparison may be performed by comparing recording times of the audio data, where the data (data packets) at the same recording time are synchronous data (or data packets), or the first earphone and the second earphone use the same data recording mechanism, and the audio recorded in the same time period is identified with the same serial number, and the synchronization comparison is performed by using the serial number. Step 203, generating composite recording data according to the first recording data, the second recording data and the third recording data.
The synthesized recording data comprises audio data recorded by the first earphone and audio data recorded by the second earphone within a period of time, and the synthesized recording data can be used for being sent to the terminal equipment.
It will be appreciated that binaural recorded audio data that is compared to be synchronized may be synthesized for transmission to a terminal device. In the embodiment of the application, the synthetic recording data can be generated according to the first recording data, the second recording data and the third recording data. Optionally, the first earphone synthesizes first earphone data first, and the first earphone data includes the third record data that first earphone recorded before master-slave switching, and the second record data of recording after master-slave switching to third record data has the continuity in time with the second record data, can splice second record data and third record data according to time sequence, synthesizes into first earphone data. On the basis, the first earphone data and the first recording data are synthesized into binaural recording data. The first recording data is the audio data recorded by the second earphone, so that the synchronization of the recording data of the double earphone can be realized. After the synchronization is successful, the data of the master earphone and the data of the slave earphone are combined and packaged into a packet of data, and then the packet of data is sent to the terminal equipment through wireless communication (such as Bluetooth communication, zigBee communication and the like).
In one embodiment, the binaural recorded synchronized audio data may be synthesized for transmission to a terminal device. When the uplink transmission is started, the audio data with the earliest recording sequence in the first recording data are read, the audio data with the earliest recording sequence in the second recording data are read, whether the synchronous information of the two data is matched or not is compared, and if the synchronous information is matched, the synchronous information is synthesized into synthesized recording data, and the synthesized recording data are transmitted to the terminal equipment. If the first record data and the second record data are not matched, third record data synchronous with the first record data are obtained, the two data are synthesized into synthesized record data, and the synthesized record data are sent to the terminal equipment.
Because the first earphone is the main earphone at this moment, so first earphone has communication connection with terminal equipment to send synthetic recording data to the terminal.
In one embodiment, the audio data successfully sent to the terminal device will be released from the buffer.
According to the audio data transmission method, after the first earphone and the second earphone are subjected to master-slave switching, the first earphone switched to the master earphone receives first recording data sent by the second earphone, if the first recording data are not synchronous with second recording data cached by the first earphone, third recording data are obtained according to the first recording data, the third recording data are audio data corresponding to an asynchronous part of the first recording data relative to the second recording data, synthetic recording data are generated according to the first recording data, the second recording data and the third recording data, the audio data recorded when the first earphone is used as a slave earphone are prevented from being lost, the integrity of the recording data is guaranteed, and the recording effect is prevented from being influenced due to the fact that the recording data are lost due to master-slave switching. In addition, compared with the earphone which adopts the balanced stereo recording of single-ear recording, the earphone directly superimposes the single-ear recording data as the double-ear data, and in the embodiment, the true stereo realized by separately recording two (or two groups of) earphones is adopted, so that the true spatial sound field can be represented, and the tone quality is improved.
In order to complete the recorded audio data, when the first recording data and the second recording data are not synchronous, the missing recording data needs to be retrieved. As shown in fig. 3, in one embodiment, obtaining third recording data according to the first recording data includes:
step 301, the first recording data is synchronously compared with the audio data of the backup area of the first earphone.
The backup area is used for backing up the audio data recorded by the first earphone when the first earphone is used as the slave earphone and sent to the second earphone.
In one embodiment, when the first earphone is used as the slave earphone, the data is backed up to the backup area and cleared from the main buffer area every time the data is sent to the second earphone. The data may be sent to the second earphone once after the recording of a group of data is completed, or all the data which is not yet sent to the second earphone in the primary buffer area of the first earphone may be sent periodically according to a preset sending period and backed up, or in some embodiments, the data may be sent to the second earphone once when the accumulated data reaches the preset number and backed up.
Step 302, extracting third recording data synchronized with the first recording data in the backup area.
Based on the same/similar comparison principle and method of the first synchronous information and the second synchronous information, third recording data with matched third synchronous information can be found according to the first synchronous information of the first recording data, the first synchronous information is compared with synchronous identification information of data to be compared, if the first synchronous information is matched with the synchronous identification information of the data to be compared, the third recording data is determined, and the third synchronous information is identification information added to the recorded audio data when the first earphone is used as a slave earphone. And searching third recording data synchronous with the first recording data through synchronous comparison, and recovering the third recording data from the backup area.
In one embodiment, the first synchronization information, the second synchronization information, and the third synchronization information may be time stamps or sequence numbers.
Taking a serial number as an example for illustration, the first earphone sequentially adds serial numbers B1, B2 and B3 according to the recording sequence, and the first earphone is cached to a main cache area of the first earphone, and the second earphone sequentially adds serial numbers A1, A2 and A3 according to the recording sequence, and the second earphone is cached to the main cache area of the second earphone.
Referring to fig. 4, when the first earphone is a slave earphone, if transmission is started, data is sequentially transmitted to the second earphone (the master earphone in this case) in the recording order, and the second earphone stores the received data (for example, data with a sequence number B2) in the slave buffer. And meanwhile, the first earphone backs up the successfully transmitted data to the backup area and clears the data in the main buffer area.
Referring to fig. 5, when the first earphone is switched to the master earphone, the second earphone is switched to the slave earphone at this time, and the second earphone sequentially sends the first recording data in the master buffer area to the first earphone according to the recording sequence, and the first earphone stores the received first recording data in the slave buffer area. When the uplink transmission is started, the first earphone reads the second recording data in the main buffer area, reads the first recording data in the slave buffer area, compares the first recording data with the sequence number of the read second recording data, determines the second recording data to be synchronous data if the second recording data are matched (for example, the sequence numbers of A1 and B1 are matched), and combines the synchronous data into composite recording data to be transmitted to the terminal equipment. If the serial numbers of the second recording data and the first recording data are not matched, namely at least part of the first recording data cannot be synchronized with the data in the first earphone main buffer area, the data is considered to be lost, and the missing data needs to be retrieved. The first earphone reads the recording data (for example, B2) from the backup area and compares the serial numbers with the first recording data (A2), if the recording data are matched with the first recording data, the matched recording data and the first recording data are combined into synthetic recording data.
It can be appreciated that the storage space of the first earphone has a master buffer and a slave buffer, where the master buffer of the first earphone is used to buffer the second recording data, and the slave buffer of the first earphone is used to buffer the audio data sent by the second earphone (e.g. receive the first recording data sent by the second earphone when the first earphone is switched to the master earphone). The storage space of the second earphone is provided with a main buffer area and a secondary buffer area, the main buffer area of the second earphone is used for buffering the first recording data, and the secondary buffer area of the second earphone is used for buffering the secondary recording data sent by the first earphone.
The slave buffer of the first earphone in the embodiment of the present application may be newly added after the master-slave switching occurs, or may exist from beginning to end. When the second earphone is switched to the slave earphone, the backup area can be newly added, or the backup area exists from beginning. The main buffer area, the auxiliary buffer area and the backup area in the first earphone and the second earphone can be virtual partitions realized by software or physical memories realized by hardware.
Because the wireless headset has a smaller memory, normal use will be affected if the backup data is not released all the time, and in one embodiment of the present application, when the first headset is used as the slave headset, and releasing the data in the backup area according to the preset rule, setting the released preset rule, and releasing the backup data when the release condition is reached.
In one embodiment, the preset rule may be to set a threshold of the memory, and release the audio data of the backup area when the memory of the first earphone is lower than the threshold. In one embodiment, the release may be performed sequentially according to the order of data storage, so as to release the data stored first preferentially. Illustratively, data a 1 is stored at time t and data a 2 is stored at time t+1, data a 1 is released first when the memory is below the threshold, and data a 2 is released again after data a 1 is released if the memory is still below the threshold.
In one embodiment, the preset rule may be further sequentially released according to a preset period and the data storage sequence. That is, the preset period is T, and a part of data is released according to the data storage sequence every interval T. Illustratively, data a 1 is stored at time T, data a 2 is stored at time t+1, data a 1 is released at time T, and data a 2 is released at time T.
In one embodiment, the preset period and the threshold value of the memory may be combined together as a preset rule, optionally, the data is released according to the preset period, the amount of data to be released is determined according to the remaining amount of the memory when the data is released, for example, the data a 1 is stored at time T, the data a 2 is stored at time t+1, the data a 1 is released at intervals of T, if the memory is higher than the threshold value after the data a 1 is released, the release is stopped until the data a 2 is released again at the next time T, and if the memory is still lower than the threshold value after the data a 1 is released, the data is continuously released until the memory is not lower than the threshold value.
Optionally, the data in the backup area may also be released based on the data transmission record of the second earpiece. It will be appreciated that the data transmission record records the data record that the second earpiece has completed transmitting when acting as the master earpiece. The second earphone may feed back a data transmission record to the first earphone when the transmission of a group of data is completed, or may feed back a data transmission record to the first earphone periodically. The first earphone can determine that the data corresponding to the backup audio data in the backup area is sent to the terminal equipment through the second earphone according to the data sending record, and the data is released from the backup area.
In this embodiment, the first earphone releases the data that has been sent in the backup area according to the data sending record by obtaining the data sending record, so as to reduce the occupation of the memory by the backup data, and ensure that the data that is not sent still has backup, and when the master-slave switching occurs, the data that is not sent yet can be recovered, so as to ensure the integrity of the audio data.
As shown in fig. 6, in one embodiment, acquiring third recording data according to the first recording data includes:
in step 601, the first earphone acquires slave recording data sent by the second earphone.
The slave recording data may be audio data recorded by the first earphone received when the second earphone is used as the master earphone, and is data which is not transmitted to the terminal device by the second earphone.
Step 602, the first recording data is synchronously compared with the slave recording data, and third recording data synchronous with the first recording data is obtained from the slave recording data.
The method includes the steps of taking a synchronous comparison by using serial numbers as an example, sequentially adding serial numbers B1, B2 and B3 to recorded recording data by a first earphone according to a recording sequence, and buffering the recorded recording data to a main buffer area of the first earphone, and sequentially adding serial numbers A1, A2 and A3 to recorded recording data by a second earphone according to the recording sequence, and buffering the recorded recording data to the main buffer area of the second earphone.
Referring to fig. 7, when the first earphone is a slave earphone, if transmission is started, data is sequentially transmitted to the second earphone (the master earphone in this case) in the recording order, and the second earphone stores the received slave recording data (e.g., data with serial numbers B1 and B2) in the slave buffer. And meanwhile, the first earphone clears the successfully transmitted data from the main buffer area of the first earphone.
Referring to fig. 8, when the first earphone is switched to the master earphone, the second earphone is switched to the slave earphone, and the second earphone transmits the first recording data in the master buffer and the slave recording data in the slave buffer to the first earphone, and the first earphone stores the received first recording data and the slave recording data in the slave buffer (two slave buffers may be respectively provided, one for buffering the first recording data and one for buffering the slave recording data). It can be understood that the recording data can be obtained from the second earphone when the first earphone judges that the first recording data and the second recording data have the asynchronous part, or the second earphone can be transmitted together with the first recording data. When the uplink transmission is started, the first earphone reads the second recording data in the main buffer area, reads the first recording data in the slave buffer area, compares the first recording data with the sequence number of the read second recording data, determines the second recording data to be synchronous data if the second recording data are matched (for example, the sequence numbers of A1 and B1 are matched), and combines the synchronous data into composite recording data to be transmitted to the terminal equipment. If the serial numbers of the second recording data and the first recording data are not matched, namely at least part of the first recording data cannot be synchronized with the data in the first earphone main buffer area, the data is considered to be lost, and the missing data needs to be retrieved. The first earphone reads the recorded data (for example, B1) and compares the serial numbers with the first recorded data (A1), if the serial numbers are matched, the recorded data is determined to be the true third recorded data, and the third recorded data and the first recorded data are combined to be the synthesized recorded data. In this embodiment, when the master-slave switching occurs, the second earphone serving as the original master earphone transmits the slave recording data and the first recording data which are not transmitted to the terminal device to the first earphone, the first earphone synchronously compares the first recording data with the slave recording data, and acquires the third recording data synchronous with the first recording data from the slave recording data. The embodiment can save the memory of the slave earphone and ensure that data loss cannot occur when master-slave switching occurs.
The embodiment of the application also provides an audio data transmission method, which is described by taking an example of application to a headset set, wherein the headset set comprises a first headset and a second headset, and the method comprises the following steps:
under the condition that the second earphone is switched from the master earphone to the slave earphone, the first recording data and the slave recording data are sent to the first earphone;
The first recording data is audio data recorded by the second earphone, and the slave ear recording data is audio data recorded by the first earphone and transmitted to the second earphone when the first earphone is used as the slave earphone;
The first earphone is used for acquiring third recording data according to the first recording data when the first recording data are not synchronous with second recording data cached by the first earphone, and generating synthesized recording data according to the first recording data, the second recording data and the third recording data, wherein the third recording data are audio data corresponding to an asynchronous part of the first recording data relative to the second recording data.
In this embodiment, the second earphone is switched from the master earphone to the slave earphone, and there may be audio data that is not yet transmitted to the terminal, at this time, the second earphone transmits the first recording data that is recorded by itself and is not yet transmitted to the terminal to the first earphone, and transmits the slave recording data that is transmitted to the second earphone when the first earphone is used as the slave earphone back to the first earphone, so that the first earphone can acquire the third recording data from the slave recording data according to the first recording data when the first recording data is not synchronous with the second recording data, and generate the synthesized recording data according to the first recording data, the second recording data and the third recording data, and transmit the synthesized recording data to the terminal device, thereby avoiding data loss caused by master-slave switching between the first earphone and the second earphone.
The embodiment of the application also provides an audio data transmission method which is applied to an earphone set formed by the first earphone and the second earphone and comprises the following steps:
in the case where the first earphone is switched from the slave earphone to the master earphone, the second earphone transmits the first recording data to the first earphone.
When the first recording data is not synchronous with the second recording data buffered by the first earphone, the first earphone acquires third recording data according to the first recording data,
The first earphone generates composite recording data according to the first recording data, the second recording data and the third recording data.
The third recording data is audio data corresponding to an unsynchronized portion of the first recording data relative to the second recording data. The second recording data is audio data which is recorded by the first earphone and is not transmitted to the terminal equipment. In particular, the second recording data may include audio data recorded by the first earpiece after switching to the master earpiece and not yet transmitted to the terminal device, and in some embodiments, the second recording data may also include audio data recorded by the first earpiece before switching to the master earpiece but not transmitted to the original master earpiece (i.e., the second earpiece). The synthesized recording data comprises audio data recorded by the first earphone and audio data recorded by the second earphone within a period of time, and the synthesized recording data is used for being sent to the terminal equipment.
Before the master-slave switching occurs, the first earphone is used as a slave earphone to record audio data and transmit the audio data to the second earphone which is used as a master earphone, and the third recording data is not transmitted to the terminal equipment in the audio data. If the first recording data comprises the audio data recorded by the second earphone before being switched to the slave earphone, the first recording data and the second recording data are not synchronous, the missing third recording data need to be retrieved at the moment, the third recording data and the audio data which are recorded by the second earphone before being switched to the slave earphone and are not transmitted to the terminal equipment are synchronous, and the third recording data are retrieved according to the first recording data. Because the first earphone is the main earphone at this moment, so first earphone has the communication connection with terminal equipment establishment, sends synthetic recording data to terminal equipment through first earphone. In one embodiment, data successfully sent to the terminal device will be released from the buffer.
It should be understood that each step in the flowcharts corresponding to the above embodiments is shown in order as indicated by the arrow, but these steps are not necessarily performed in order as indicated by the arrow. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a portion of the steps of each flowchart may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order in which the sub-steps or stages are performed is not necessarily sequential, and may be performed in turn or alternately with at least a portion of the sub-steps or stages of other steps or steps.
As shown in fig. 9, the present application further provides an audio data transmission device 900, which is applied to a first earphone in an earphone set, where the earphone set further includes a second earphone, and the device includes:
the first receiving module 901 is configured to receive first recording data sent by the second earphone when the first earphone is switched from the slave earphone to the master earphone;
The data obtaining module 902 is configured to obtain third recording data according to the first recording data when the first recording data is not synchronous with the second recording data cached by the first earphone, where the third recording data is audio data corresponding to an unsynchronized portion of the first recording data relative to the second recording data;
the data synthesis module 903 is configured to generate synthetic recording data according to the first recording data, the second recording data, and the third recording data.
In one embodiment, the data acquisition module comprises:
the backup area is used for backing up and storing the audio data recorded by the first earphone as the slave earphone and sent to the second earphone;
and the backup recovery unit is used for extracting third recording data which are synchronous with the first recording data in the backup area.
In one embodiment, the data acquisition module comprises:
The secondary recording data acquisition unit is used for acquiring secondary recording data sent by the second earphone, wherein the secondary recording data is audio data recorded by the first earphone and received when the second earphone is used as a main earphone;
And the data extraction unit is used for synchronously comparing the first recording data with the slave recording data and acquiring third recording data synchronous with the first recording data from the slave recording data.
In one embodiment, the audio data transmission apparatus further includes:
The system comprises a synchronization module, a first earphone, a second earphone, a first recording module and a second recording module, wherein the synchronization module is used for comparing first synchronization information of first recording data with second synchronization information of second recording data;
and the judging module is used for judging that the first recording data is not synchronous with the second recording data when the first synchronous information is not matched with the second synchronous information.
In one embodiment, the audio data transmission apparatus further includes:
And the sending module is used for synthesizing the recording data and sending the recording data to the terminal equipment.
The above-mentioned division of the respective modules in the audio data transmission device is merely for illustration, and in other embodiments, the audio data transmission device may be divided into different modules as needed to perform all or part of the functions of the audio data transmission device.
For specific limitations of the audio data transmission device, reference may be made to the above limitations of the audio data transmission method, and no further description is given here. The respective modules in the above-described audio data transmission device may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
Fig. 10 is a schematic view of the internal structure of a tympanic membrane in one embodiment. The earphone may be a first earphone or a second earphone. The headset includes a processor and a memory connected by a system bus. Wherein the processor may comprise one or more processing units. The processor may be a CPU (Central Processing Unit ) or DSP (DIGITAL SIGNAL Processing, digital signal processor) or the like. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program is executable by a processor for implementing an audio data transmission method provided in the following embodiments. The internal memory provides a cached operating environment for operating system computer programs in the non-volatile storage medium.
The implementation of each module in the audio data transmission device provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on a headset. Program modules of the computer program may be stored in the memory of the electronic device. Which when executed by a processor, performs the steps of the method described in the embodiments of the application.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of the above-described audio data transmission method.
The embodiments of the present application also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the above-described audio data transmission method.
Any reference to memory, storage, database, or other medium used in the present application may include non-volatile and/or volatile memory. The nonvolatile Memory may include a ROM (Read-Only Memory), a PROM (Programmable Read-Only Memory), an EPROM (Erasable Programmable Read-Only Memory ), an EEPROM (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory), or a flash Memory. Volatile memory can include RAM (Random Access Memory ), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as SRAM (Static Random Access Memory ), DRAM (Dynamic Random Access Memory, dynamic random access memory), SDRAM (Synchronous Dynamic Random Access Memory ), double data rate DDR SDRAM (Double Data Rate Synchronous Dynamic Random Access memory, double data rate synchronous dynamic random access memory), ESDRAM (Enhanced Synchronous Dynamic Random Access memory ), SLDRAM (SYNC LINK DYNAMIC Random Access Memory, synchronous link dynamic random access memory), RDRAM (Rambus Dynamic Random Access Memory, bus dynamic random access memory), DRDRAM (Direct Rambus Dynamic Random Access Memory, interface dynamic random access memory).
As shown in fig. 11, the embodiment of the present application further provides an earphone set including the first earphone and the second earphone as in the above embodiment.
The earphone set can interact with the terminal equipment through one earphone (or a group of earphones) as a master earphone, and the other earphone (or a group of earphones) as a slave earphone interact with the terminal equipment through the master earphone, so that the transmission of audio data is realized. According to the embodiment of the application, the earphone group records the audio through two (or two groups of) earphones respectively, the secondary earphone sends recorded audio data to the primary earphone, and the primary earphone packs the synchronized data and sends the packed data to the terminal after synchronous comparison, so that true stereo recording is realized. In addition, after the master-slave switching of the earphone set occurs, the master earphone acquires the audio data which is not transmitted to the terminal when the slave earphone is used as the original master earphone, processes the audio data and transmits the processed audio data to the terminal, so that the data loss caused by the master-slave switching is avoided, and the data integrity is ensured.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.