WO2024001398A1 - 音频数据传输方法、装置、芯片、电子设备及存储介质 - Google Patents

音频数据传输方法、装置、芯片、电子设备及存储介质 Download PDF

Info

Publication number
WO2024001398A1
WO2024001398A1 PCT/CN2023/086766 CN2023086766W WO2024001398A1 WO 2024001398 A1 WO2024001398 A1 WO 2024001398A1 CN 2023086766 W CN2023086766 W CN 2023086766W WO 2024001398 A1 WO2024001398 A1 WO 2024001398A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio data
packet
data packet
target audio
audio
Prior art date
Application number
PCT/CN2023/086766
Other languages
English (en)
French (fr)
Inventor
颜廷管
余庆华
王泷
Original Assignee
哲库科技(上海)有限公司
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 哲库科技(上海)有限公司 filed Critical 哲库科技(上海)有限公司
Publication of WO2024001398A1 publication Critical patent/WO2024001398A1/zh

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/0017Lossless audio signal coding; Perfect reconstruction of coded audio signal by transmission of coding error
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72442User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for playing music files

Definitions

  • This application relates to the field of audio processing technology, and specifically to an audio data transmission method, device, chip, electronic equipment and storage medium.
  • the sending device when a sending device transmits audio data to a receiving device for audio playback through the receiving device, the sending device usually needs to first perform a series of codec processing on the audio source data, and then transmit the processed audio to the receiving end. data, resulting in loss of audio quality of the audio source data, affecting the audio playback effect.
  • Embodiments of the present application disclose an audio data transmission method, device, chip, electronic device and storage medium, which can realize lossless transmission of audio data, avoid audio quality loss of original audio data, and improve the audio playback effect.
  • the embodiment of the present application discloses an audio data transmission method, which is applied to electronic devices.
  • the method includes:
  • the indication part of the communication protocol is used to indicate that the data format of the target audio data packet conforms to the communication protocol.
  • the embodiment of the present application discloses a chip, including a processor and a communication module,
  • the processor is configured to: encapsulate the frame original audio packet into a target audio data packet, where the target audio data packet includes the frame original audio packet and an indication part of the communication protocol;
  • the communication module is configured to: send the target audio data packet to an audio output device via a wireless communication channel;
  • the indication part of the communication protocol is used to indicate that the data format of the target audio data packet complies with the communication protocol.
  • the embodiment of the present application discloses an audio data transmission method, which is applied to an audio output device.
  • the method includes:
  • a target audio data packet via a wireless communication channel, the target audio data packet including a frame original audio packet and an indication portion of the communication protocol;
  • the embodiment of the present application discloses a chip, including a processor and a communication module,
  • the communication module is configured to: receive a target audio data packet via a wireless communication channel, the target audio data packet including a frame original audio packet and an indication part of a communication protocol;
  • the processor is configured to: unpack the target audio data packet
  • the indication part of the communication protocol is used to indicate that the data format of the target audio data packet conforms to the communication protocol.
  • the embodiment of the present application discloses an audio data transmission device, which is applied to electronic equipment.
  • the device includes:
  • a packetization module configured to encapsulate the original audio packet of the frame into a target audio data packet, where the target audio data packet includes the original audio packet of the frame and an indication part of the communication protocol;
  • a sending module configured to send the target audio data packet to an audio output device via a wireless communication channel
  • the indication part of the communication protocol is used to indicate that the data format of the target audio data packet conforms to the communication protocol.
  • the embodiment of the present application discloses an audio data transmission device, which is applied to audio output equipment.
  • the device includes:
  • a receiving module configured to receive a target audio data packet via a wireless communication channel, where the target audio data packet includes a frame original audio packet and an indication part of the communication protocol;
  • An audio processing module used to unpack the target audio data packet
  • the indication part of the communication protocol is used to indicate that the data format of the target audio data packet conforms to the communication protocol.
  • An embodiment of the present application discloses an electronic device, including a memory and a processor.
  • a computer program is stored in the memory.
  • the processor implements any of the above. method.
  • An embodiment of the present application discloses a computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, any one of the methods described above is implemented.
  • Figure 1A is a schematic diagram of audio data transmission in related technologies
  • Figure 1B is an application scenario diagram of the audio data transmission method in one embodiment
  • Figure 2 is a flow chart of an audio data transmission method in one embodiment
  • Figure 3 is a schematic flow chart of an audio transmission method in one embodiment
  • Figure 4A is a schematic diagram of the data format of the target audio data packet in one embodiment
  • Figure 4B is a schematic diagram of the data format of the target audio data packet in another embodiment
  • Figure 4C is a schematic diagram of the data format of the target audio data packet in another embodiment
  • Figure 4D is a schematic diagram of the data format of the target audio data packet in another embodiment
  • Figure 4E is a schematic diagram of the data format of the target audio data packet in another embodiment
  • Figure 4F is a schematic diagram of the data format of the target audio data packet in another embodiment
  • Figure 4G is a schematic diagram of the data format of the target audio data packet in another embodiment
  • Figure 4H is a schematic diagram of the data format of the target audio data packet in another embodiment
  • Figure 4I is a schematic diagram of the data format of the target audio data packet in another embodiment
  • Figure 4J is a schematic diagram of the data format of the target audio data packet in another embodiment
  • Figure 4K is a schematic diagram of the data format of the target audio data packet in another embodiment
  • Figure 4L is a schematic diagram of the data format of the target audio data packet in another embodiment
  • Figure 5 is a flow chart of an audio data transmission method in another embodiment
  • Figure 6 is a block diagram of an audio data transmission device in one embodiment
  • Figure 7 is a block diagram of an audio data transmission device in another embodiment
  • Figure 8 is a structural block diagram of an electronic device in one embodiment.
  • first simulation data may be referred to as second simulation data
  • first simulation data may be referred to as first simulation data
  • second simulation data may be referred to as first simulation data, without departing from the scope of the present application.
  • Both the first simulation data and the second simulation data are simulation data, but they are not the same simulation data.
  • plurality used in this application refers to two or more than two.
  • and/or used in this application refers to one of the solutions, or any combination of multiple solutions thereto.
  • FIG. 1A is a schematic diagram of audio data transmission in the related art. As shown in Figure 1A, taking the electronic device transmitting audio data to the audio output device for playback through Bluetooth wireless communication as an example, the electronic device obtains the sound source data and can first perform PCM (Pulse Code Modulation) decoding on the sound source data.
  • PCM Pulse Code Modulation
  • PCM data Obtain the PCM data, and then perform Bluetooth audio encoding processing on the PCM data such as SBC (Sub Band Coding) and AAC (Advanced Audio Coding) to obtain Bluetooth audio encoding data in SBC, AAC and other encoding formats.
  • Electronic devices can transmit Bluetooth audio encoding data in encoding formats such as SBC and AAC to the audio output device through Bluetooth wireless communication.
  • the audio output device performs PCM decoding on Bluetooth audio encoding data in encoding formats such as BC and AAC to obtain PCM data and then use it.
  • DAC Digital to Analog converter, digital-to-analog converter
  • AMP Anamplifier for Power, power amplifier
  • the electronic device will first decode the audio source data into PCM data, and then perform encoding processing such as SBC and AAC.
  • the encoding processing such as SBC and AAC is a lossy audio coding technology, which will cause the audio quality loss of the audio source data and seriously affect the audio quality.
  • the playback effect prevents users from successfully experiencing the lossless playback effect of audio source data.
  • Embodiments of the present application provide an audio data transmission method, device, chip, electronic device and storage medium, which can realize lossless transmission of audio data, avoid audio quality loss of original audio data, and improve the audio playback effect.
  • FIG. 1B is an application scenario diagram of the audio data transmission method in one embodiment.
  • the electronic device 110 and the audio output device 120 may establish a communication connection.
  • the electronic device 110 may include but is not limited to a mobile phone, a smart wearable device, a vehicle-mounted terminal, a tablet computer, a PC (Personal Computer, personal computer), a PDA (Personal Digital Assistant, personal digital assistant), etc.
  • the audio output device 120 may include but is not limited to headphones, speaker equipment, vehicle-mounted terminals, etc. Further, the audio output device 120 may be a TWS (True Wireless Stereo) headset.
  • TWS Truste Wireless Stereo
  • Wireless communication connections such as Bluetooth and WiFi can be established between the electronic device 110 and the audio output device 120, or a wired communication connection can be established through a USB (Universal Serial Bus, Universal Serial Bus) interface.
  • USB Universal Serial Bus, Universal Serial Bus
  • the communication connection method between the output devices 120 is not specifically limited.
  • the electronic device 110 may obtain the original audio packet of the frame to be transmitted in the audio source data, and encapsulate the original audio packet of the frame. into a target audio data packet, which includes the original audio packet of the frame and the indication part of the communication protocol.
  • the electronic device 110 may send the target audio data packet to the audio output device 120.
  • the audio output device 120 may unpack the target audio data packet and obtain the unpacked audio data packet.
  • Frame raw audio packets are processed to play the processed audio data.
  • the electronic device 110 does not need to Performing a series of encoding and decoding processes can avoid the loss of original audio data caused by encoding and decoding processing, achieve zero compression and lossless transmission of audio data, and improve the audio playback effect.
  • “communication protocol” includes public communication protocols, which can be adopted by standards organizations or promoted in the industry. “Communication protocols” can also be private communication protocols, so that in the equipment and systems produced by the manufacturer, It can be used by other manufacturers with permission. In this application, the nature and usage occasions of the “communication protocol” are not limited.
  • an audio data transmission method is provided, which can be applied to the above-mentioned electronic device.
  • the audio data transmission method may include the following steps:
  • Step 210 Encapsulate the frame original audio packet into a target audio data packet, where the target audio data packet includes the frame original audio packet and an indication part of the communication protocol.
  • the electronic device can perform audio playback through the audio output device, and the electronic device can obtain the original audio packet of the frame to be transmitted from the audio source data.
  • the audio source data can refer to the audio data to be played or currently being played.
  • the sound source data can be any kind of audio data including music, video sounds, background sounds of applications running on electronic devices, call sounds, prompt sounds, etc., but is not limited to this.
  • the audio source data may be audio data in a lossless encoding format
  • the original audio packet of the frame obtained from the audio source data may include original audio data in a lossless encoding format.
  • the lossless encoding format includes FLAC (Free Lossless Audio Codec, lossless audio compression coding) format, APE format (obtained through Monkey's Audio compression), ALAC (Apple lossless audio codec, lossless audio format developed by Apple) and other formats. any kind. It should be understood that with the development of encoding technology, the embodiments of the present application can also be applied to other encoding formats that may appear in the future.
  • the audio source data may be audio data in a lossless encoding format with frame breaking capabilities.
  • the audio source data can be divided into multiple data frames according to the preset frame duration (Frame duration), that is, the audio source data can be divided into multiple frames of original audio packets, and each frame of the original audio packet can include a data segment of the audio source data.
  • Each frame of the original audio packet can contain all the information required for decoding, so that there is no need to rely on the previous or next frame of the original audio packet when decoding.
  • Each frame of the original audio packet may include a packet header and a data part.
  • the packet header of each frame of the original audio packet may include the supplier identifier of the frame's original audio packet and the encoder identifier of the frame's original audio packet.
  • the supplier identifier may be used to identify As a supplier of audio data, the encoder identifier can be used to identify the encoding format of the audio source data. Audio source data in different encoding formats can correspond to different encoder identifiers.
  • the header of each frame of the original audio package may also include one of the version identification of the audio source data, sampling rate, sampling depth, number of channels, frame length (such as the above-mentioned frame period length), data section length, etc., or Various fields are not limited here.
  • the data portion of each frame of the original audio packet may at least include original audio data in a lossless encoding format, and may also include other data content, which is not limited here.
  • the electronic device can package multiple frames of original audio packets divided into audio source data based on the communication protocol, and send the packaged target audio data packets to the audio output device in sequence, so that the audio output device can play audio with lossless music quality. data.
  • each frame of the original audio packet can carry a corresponding frame sequence number.
  • the frame sequence number can be used to represent the order in which the original audio packets are arranged in the audio source data.
  • the original audio packets can be obtained in order from small to large frame numbers. , and packs the obtained original audio packets to obtain the corresponding target audio data packets, and then sends the target audio data packets to the audio output device.
  • the electronic device can sequentially transmit target audio data packets to the audio output device in frames, achieving the effect of playing while transmitting, ensuring the real-time nature of audio playback, and can be applied to prompt tone playback and call voice playback. , playing background sounds during the use of applications and other scenarios that require high real-time audio playback, can meet users' needs for lossless quality of audio playback in various scenarios.
  • a communication protocol can be configured to achieve zero-compression lossless transmission of original audio packets.
  • the communication protocol can specify a data format of a target audio data packet by encapsulating the frame of the original audio packet into a target that conforms to the data format. Audio data packets, achieving zero compression and lossless transmission of original audio packets.
  • the target audio data packet may include a frame original audio packet and one or more setting fields. Each setting field may be stored in a corresponding data segment in the target audio data packet. The position of each data segment in the target data packet may be determined based on Adjust settings according to actual needs.
  • the target audio data packet may include a frame original audio packet and an indication part of a communication protocol.
  • the indication part of the communication protocol is used to indicate that the data format of the target audio data packet complies with the communication protocol.
  • the indication part of the communication protocol may be located before the original audio packet of the frame or after the original audio packet of the frame, but is not limited to this.
  • the electronic device can encapsulate the frame original audio packet based on the data format specified in the communication protocol, and obtain a target audio data packet including the frame original audio packet and the indication part of the communication protocol.
  • the indication part of the communication protocol may at least include a supplier identifier of the communication protocol and an encoder identifier of the communication protocol.
  • the encoder identifier of the communication protocol may be used to identify the encoding format corresponding to the original audio packet of the frame in the target audio data packet, Can be used to indicate that the target packet is an audio packet carrying audio data in a lossless encoding format.
  • the instruction part of the communication protocol may also include information such as the version number of the communication protocol, but is not limited to this.
  • the above-mentioned supplier identifier, encoder identifier, version number, etc. can all be composed of one of numbers, characters, symbols, etc. One or more components are not limited here.
  • the setting field included in the target audio data packet may also include, but is not limited to, one or more of time series values, check codes, etc., and the time series values may be used to characterize the information corresponding to the target audio data packet.
  • Sending sequence, check code can be used to verify the integrity of the target audio data packet.
  • the electronic device directly encapsulates the frame original audio packet of the audio source data to obtain the target audio data packet whose data format conforms to the communication protocol, without the need to perform PCM decoding and SBC, AAC, etc. encoding on the frame original audio packet.
  • processing which can not only avoid the loss of music quality in the encoding and decoding process of the original audio packet of the frame, but also save processing time and power consumption, and the packaging process is simple, saving the computing power of electronic equipment and consumed memory and other resources, achieving Lossless quality audio transmission with zero compression, low power consumption and low latency.
  • Step 220 Send the target audio data packet to the audio output device via the wireless communication channel.
  • the electronic device can send the encapsulated target audio data packet to the audio output device.
  • the audio output device can unpack the target audio data packet to obtain the original audio packet of the frame, and then The raw audio packets are processed to play the processed audio data.
  • the audio output device can first extract the indication part of the communication protocol from the target audio data packet. According to the indication part of the communication protocol, it can identify that the target audio data packet is an audio data packet that complies with the communication protocol. The output device can then extract the frame original audio packet from the target audio data packet based on the communication protocol, and then process the extracted frame original audio packet to play the processed audio data. Since the original audio packet of the frame will not undergo processes such as lossy compression and encoding during the entire transmission process, the audio output device can play audio data with lossless music quality, improving the audio playback effect.
  • the audio output device can perform PCM decoding on the original audio packet of the frame extracted from the target audio data packet to obtain the PCM decoded data, and then perform digital-to-analog conversion on the PCM decoded data to obtain the first analog data, and Power amplify the first simulation data to obtain the second simulation data.
  • the audio output device may output the second analog data.
  • the audio output device unpacks the target audio data packet and obtains the original audio packet of the frame in the lossless encoding format, and then performs PCM decoding on the original audio packet of the frame to obtain the PCM decoded data.
  • the audio output device can convert the PCM decoded data from a digital signal to an analog signal through a digital-to-analog converter to obtain the first analog data, and then amplify the power of the first analog data through a power amplifier to obtain the second analog data.
  • the power amplifier can transmit the second analog data to the playback unit, and the audio output device outputs the second analog data through the playback unit to achieve the effect of playing audio.
  • the wireless communication channel may include a Bluetooth communication channel including a broadcast channel and/or a data channel.
  • the electronic device can send the target audio data packet to the audio output device through a broadcast channel or a data channel. If the electronic device receives a retransmission request sent by the audio output device, it can send the target audio data packet to the audio output device through the data channel. The channel resends the target audio packet indicated by the retransmission request to the audio output device.
  • a Bluetooth connection can be established between the electronic device and the audio output device.
  • the Bluetooth connection can include a classic Bluetooth connection, a BLE (Bluetooth Low Energy, Bluetooth low energy) connection, etc.
  • the classic Bluetooth connection is a Bluetooth communication established based on the classic Bluetooth protocol.
  • BLE connection is a Bluetooth communication connection established based on the BLE protocol.
  • the classic Bluetooth protocol usually refers to the Bluetooth protocol below Bluetooth protocol version 4.0
  • the BLE protocol usually refers to the Bluetooth protocol above Bluetooth protocol version 4.0.
  • the Bluetooth connection can be a LE Audio Bluetooth connection established based on a BLE connection, which can support the transmission of audio data.
  • the electronic device can send the target audio data packet to the audio output device through the audio service transmission channel of the Bluetooth connection.
  • the audio service transmission channel can be a transmission channel established based on the A2DP (Advanced Audio Distribution Profile, Bluetooth Audio Transmission Model Protocol) protocol or the HFP (Hands-free Profile) protocol.
  • the Bluetooth connection is LE Audio Bluetooth connection
  • the audio service transmission channel can be CIS (Connected Isochronous Streams, based on connection synchronous data stream) and other transmission channels, but is not limited to this. It should be noted that the embodiments of the present application do not limit the specific Bluetooth connection method and communication channel between the electronic device and the audio output device, and may be changed according to the development of the Bluetooth standard protocol.
  • the target audio data packet is generated based on the communication protocol encapsulation, it can be ensured that the audio transmission is not limited to the data format specified by the communication standard protocol in the related technology.
  • the audio transmission method provided by the embodiment of the present application can be applied to various different applications.
  • the Bluetooth wireless communication transmission is highly adaptable, can meet the needs of different transmission scenarios, and improves the audio transmission capability between electronic devices and audio output devices.
  • FIG. 3 is a schematic flowchart of an audio transmission method in one embodiment.
  • the electronic device can obtain the frame original audio packet from the audio source data, and package the obtained frame original audio packet based on the communication protocol to obtain the corresponding target audio data packet, and then transmit the target audio through Bluetooth wireless transmission.
  • the packet is sent to the audio output device.
  • the audio output device receives the target audio data packet, it can unpack the target audio data packet to obtain the frame's original audio packet, and can perform PMC decoding on the frame's original audio packet to obtain the PCM decoded data, which can then be processed through DAC and AMP respectively.
  • the electronic device does not need to perform PCM decoding and Bluetooth audio encoding such as SBC and ACC, thus avoiding the loss of music quality in the played audio data. , and the overall processing time is shorter, reducing the transmission delay (taking the 10 millisecond frame calculation of Bluetooth transmission as an example, reducing the two processes of PMC decoding and Bluetooth encoding, which can shorten the delay by more than 20 milliseconds), and improve
  • the real-time nature of audio transmission also reduces the power consumption and memory consumption of electronic devices and other resources. It does not rely on the Bluetooth audio encoding capability of electronic devices and improves the ability of lossless audio transmission between electronic devices and audio output devices.
  • the electronic device directly packs the original audio packet of the frame to obtain the target audio data packet whose data format conforms to the communication protocol and transmits it to the audio output device.
  • the electronic device since the electronic device does not need to perform a series of encoding and decoding processes on the audio source data, the transmission delay can be reduced and the audio transmission capability can be improved.
  • the target audio data packet includes the original audio packet of the frame and the indication part of the communication protocol.
  • the indication part of the communication protocol may at least include a supplier identifier of the communication protocol and an encoder identifier of the communication protocol.
  • the encoder identifier of the communication protocol may be used to identify the encoding format corresponding to the original audio packet of the frame in the target audio data packet, Can be used to indicate that the target packet is an audio packet carrying audio data in a lossless encoding format.
  • the instruction part of the communication protocol may also include information such as the version number of the communication protocol, but is not limited to this.
  • the above-mentioned supplier identifier, encoder identifier, version number, etc. can all be composed of one of numbers, characters, symbols, etc. One or more components are not limited here.
  • the frame original audio packet may include a packet header and a data part, and the data part may include original audio data.
  • the target audio data packet may include a packet header of the frame original audio packet stored in the first data segment, and a packet header stored in the second data segment.
  • Electronic device gets frame raw After the audio packet is received, the header of the original audio packet of the frame can be stored in the first data segment of the target audio data packet, the data part of the original audio packet of the frame can be stored in the second data segment of the target audio data packet, and the instructions of the communication protocol
  • the third data segment of the target audio data packet is stored internally.
  • target audio data packet can be configured as:
  • the third data segment is positioned after the first data segment and the second data segment.
  • FIG. 4A is a schematic diagram of the data format of a target audio data packet in one embodiment.
  • the FLAC original audio packet may include a FLAC header and a FLAC data part
  • the target audio data packet may include an indication part of the communication protocol and the FLAC original audio packet.
  • the communication protocol The indication part may be located before the header and FLAC data part of the FLAC original audio packet.
  • FIG. 4B is a schematic diagram of the data format of a target audio data packet in another embodiment.
  • the FLAC original audio packet may include a FLAC header and a FLAC data part
  • the target audio data packet may include an indication part of the communication protocol and the FLAC original audio packet.
  • the communication protocol The indication part may be located between the FLAC header and the FLAC data part of the FLAC original audio packet.
  • FIG. 4C is a schematic diagram of the data format of a target audio data packet in another embodiment.
  • the FLAC original audio packet may include a FLAC header and a FLAC data part
  • the target audio data packet may include an indication part of the communication protocol and the FLAC original audio packet.
  • the communication protocol The indication part may be located after the FLAC header and FLAC data part of the FLAC original audio packet.
  • the audio output device can unpack the target audio data packet, and can extract the indication part of the communication protocol from the third data segment of the target audio data packet. Further, the packet header of the original audio packet of the frame is extracted from the first data segment of the target audio data packet, and the data part of the original audio packet of the frame is extracted from the second data segment of the target audio data packet. The audio output device may first determine that the target audio data packet supports the communication protocol according to the instruction part of the extracted communication protocol, and then extract the original audio packet of the frame from the first data segment of the target audio data packet and the second data segment of the target audio data packet respectively. header and data part, and then process the original audio packet of the frame to play the processed audio data.
  • the target audio data packet includes the original audio packet of the frame, the indication part of the communication protocol and the time series value.
  • the time series value is used to characterize the corresponding sending order of the target audio data packet.
  • the electronic device can generate a time series value corresponding to each target audio data packet in sequence according to the sending order corresponding to each generated target audio data packet.
  • the time series value can also be used to characterize the original audio packet of the frame contained in the target audio data packet.
  • the frame sequence in the audio source data that is, the corresponding data frame sequence.
  • the time series values corresponding to each target audio data packet can be accumulated in sequence, and the time series values corresponding to the target audio data packets can be generated according to the preset sequence generation method.
  • the sending order is arranged in the last
  • the difference between the time series value corresponding to the target audio data packet and the time series value corresponding to the previous target audio data packet in the sending order may be a fixed difference.
  • the fixed difference value can be 1. If the time series value corresponding to the last generated target audio data packet (including the original audio packet of the previous frame) is 100, then the number of currently generated target audio data (including the original audio packet of the previous frame) The corresponding time series value may be 101, but is not limited to this, the fixed difference value may also be 2, 3, etc.
  • a numerical range corresponding to the time series value can be set.
  • the time series value corresponding to a certain target audio data packet reaches the maximum value of the numerical range, the time series value corresponding to the next target audio data packet can be set from this value.
  • Starting from the minimum value of the range a new round of time series accumulation is started.
  • the numerical range corresponding to the time series value is 0 to 264. If the time series value corresponding to a certain target audio data packet reaches 264, the time series value corresponding to the next target audio data packet is 0, which can avoid the time series value Infinite accumulation leads to excessive consumption of computing resources.
  • the electronic device after the electronic device obtains the original audio packet of the frame, it can The time series value corresponding to the packet is generated, and the time series value corresponding to the original audio packet of the frame is stored in the fourth data segment of the target audio data packet to generate an instruction part containing the communication protocol. , the original audio packet of the frame and the target audio data packet of the corresponding time series value.
  • the position of the fourth data segment in the target audio data packet can be configured in advance.
  • the fourth data segment can be after the third data segment (ie, the indication part of the communication protocol), or the fourth data segment can be after the first between the data segment and the second data segment (i.e., between the header of the original audio packet of the frame and the original audio data), or the fourth data segment may be after the second data segment (i.e., the original audio data of the original audio packet of the frame), etc. , not limited here.
  • FIG. 4D is a schematic diagram of the data format of a target audio data packet in another embodiment.
  • the FLAC original audio packet may include a FLAC header and a FLAC data part
  • the target audio data packet may include an indication part of the communication protocol, a FLAC original audio packet and a time sequence. value, the time series value may be located after the indication part of the communication protocol, and the time series value may be located before the FLAC header and FLAC data part of the FLAC original audio packet.
  • FIG. 4E is a schematic diagram of the data format of a target audio data packet in another embodiment.
  • the FLAC original audio packet may include a FLAC packet header and a FLAC data part
  • the target audio data packet may include an indication part of the communication protocol, a FLAC original audio packet and a time sequence. value, the time series value may be located after the indication part of the communication protocol, and the indication part of the communication protocol and the time series value may be located between the FLAC header and the FLAC data part of the FLAC original audio packet.
  • FIG. 4F is a schematic diagram of the data format of a target audio data packet in another embodiment.
  • the FLAC original audio packet may include a FLAC header and a FLAC data part
  • the target audio data packet may include an indication part of the communication protocol, a FLAC original audio packet and a time sequence. value, the time sequence value may be located between the FLAC packet header and the FLAC data part of the FLAC original audio packet, and the indication part of the communication protocol may be located before the FLAC packet header of the FLAC original audio packet.
  • the audio output device can package the frame original audio packets contained in each target audio data packet according to the time sequence value in each received target audio data packet, so that audio processing and playback can be performed in the correct frame sequence.
  • the audio output device can extract the time series value from the fourth data segment of the target audio data packet, and determine the target audio based on the time series value extracted from the target audio data packet. According to the sending order corresponding to the data packets, the audio output device can process the target audio data packets according to the sending order corresponding to the target audio data packets to play the processed audio data.
  • the audio output device can also determine whether there is a missed target audio data packet based on the time series value in each target audio data packet. If a missed time series value is detected, a retransmission can be sent to the electronic device. request, the retransmission request may carry the missing time series value. After receiving the retransmission request, the electronic device can re-send the target audio data packet corresponding to the missing time series value to the audio output device according to the missing time series value carried in the retransmission request.
  • the electronic device can store target audio data packets within a fixed time range, for example, only store the latest 20 target audio data packets, which can ensure retransmission according to the needs of the audio output device without occupying Too much storage space.
  • the target audio data packet includes the original audio packet of the frame, the instruction part of the communication protocol and the check code.
  • the check code is used to verify the integrity of the target audio data packet.
  • the electronic device can calculate the original audio packet of the frame according to the preset calculation method to obtain the check code, and store the check code in the fifth data segment of the target audio data packet to Generate a target audio data packet including an indication part of a communication protocol, a frame original audio packet, and a corresponding check code.
  • the position of the fifth data segment in the target audio data packet may be pre-configured.
  • the fifth data segment may be in After the third data segment (ie, the indication part of the communication protocol), or the fifth data segment may be between the first data segment and the second data segment (ie, between the header of the original audio packet of the frame and the original audio data), or , the fifth data segment may be after the second data segment (that is, the original audio data of the original audio packet of the frame), etc., which is not limited here.
  • FIG. 4G is a schematic diagram of the data format of a target audio data packet in another embodiment.
  • the FLAC original audio packet may include a FLAC header and a FLAC data part
  • the target audio data packet may include an indication part of the communication protocol, a FLAC original audio packet and a checksum. code
  • the check code may be located after the instruction part of the communication protocol, and the check code may be located before the FLAC header and FLAC data part of the FLAC original audio packet.
  • FIG. 4H is a schematic diagram of the data format of a target audio data packet in another embodiment.
  • the FLAC original audio packet may include a FLAC header and FLAC data
  • the target audio data packet may include the instruction part of the communication protocol, the FLAC original audio packet and a check code.
  • the check code may be located after the indication part of the communication protocol
  • the indication part and the check code of the communication protocol may be located between the FLAC header and the FLAC data part of the FLAC original audio packet.
  • FIG. 4I is a schematic diagram of the data format of a target audio data packet in another embodiment.
  • the FLAC original audio packet may include a FLAC header and a FLAC data part
  • the target audio data packet may include an indication part of the communication protocol, a FLAC original audio packet and a checksum. code and check code may be located between the header of the FLAC original audio packet and the FLAC data part, and the instruction part of the communication protocol may be located before the FLAC header of the FLAC original audio packet.
  • the original audio packet of the frame can be divided into multiple groups of bit data.
  • Each group of bit data packets can contain N-bit values, and N can be a positive integer.
  • N can be 1, 4, 8, etc., But not limited to this.
  • the current group of bit data and the next group of bit data are XORed until the next group of bit data becomes the last group of bit data to obtain the check code.
  • the indication part of the communication protocol and the original audio packet of the frame can also be divided into multiple groups of bit data, and then starting from the first group of bit data, the current group of bit data and the next group of bit data are XORed Calculate until the next set of bit data is the last set of bit data to obtain the check code.
  • the check code can also be calculated in other ways. For example, you can start from the first bit value of the original audio packet of the frame and invert each bit value to obtain the check code, etc., but it is not limited to this. , the specific check code calculation method can be set according to actual needs.
  • the audio output device can extract the check code from the fifth data segment of the target audio data packet, and verify the target audio based on the check code extracted from the target audio data packet. Packet integrity.
  • the indication part of the communication protocol, the original audio packet of the frame and the check code can be obtained from the target audio data packet based on the communication protocol.
  • the original audio packet of the frame can be calculated according to the preset calculation method, and the calculation results are compared with the check code.
  • the codes are compared to determine whether they are consistent. If they are consistent, the verification passes, indicating that the target audio data packet is complete. If they are inconsistent, the verification fails, indicating that the target audio data packet is incomplete. If the audio output device detects that the target audio data packet is incomplete, it may send a retransmission request to the electronic device. The retransmission request is used to instruct the electronic device to resend the target audio data packet.
  • the retransmission request may carry a packet identifier, and each target audio data packet may correspond to a different packet identifier.
  • the packet identifier may be composed of one or more of numbers, characters, symbols, etc.
  • the integrity of the target audio data packet can be ensured, and the accuracy of audio transmission can be ensured.
  • the target audio data packet includes the original audio packet of the frame, the instruction part of the communication protocol, the time series value and the check code.
  • the electronic device can generate the corresponding time series value and the corresponding check code respectively.
  • the header and original audio data of the original audio packet are stored in the first data segment and the second data segment of the target audio data packet respectively, the instruction part of the communication protocol is stored in the third data segment of the target audio data packet, and the time series value is stored in the third data segment of the target audio data packet.
  • the fourth data segment of the target audio data packet is entered, and the fifth data segment of the target audio data packet is stored to obtain the target audio data packet.
  • FIG. 4J is a schematic diagram of the data format of a target audio data packet in another embodiment.
  • the FLAC original audio packet may include a FLAC header and a FLAC data part
  • the target audio data packet may include an indication part of the communication protocol, FLAC original audio packet, and time sequence.
  • value and check code the time series value can be located after the indication part of the communication protocol
  • the check code can be located after the time series value
  • the check code can be located before the FLAC header and FLAC data part of the FLAC original audio packet.
  • FIG. 4K is a schematic diagram of the data format of a target audio data packet in another embodiment.
  • the FLAC original audio packet may include a FLAC header and a FLAC data part
  • the target audio data packet may include an indication part of the communication protocol, FLAC original audio packet, and time sequence.
  • Value and check code, the time series value can be located after the indication part of the communication protocol
  • the check code can be located after the time series value
  • the indication part of the communication protocol, time series value and check code are located in the FLAC header of the FLAC original audio packet and FLAC data department.
  • FIG. 4L is a schematic diagram of the data format of a target audio data packet in another embodiment.
  • the FLAC original audio packet may include a FLAC header and a FLAC data part
  • the target audio data packet may include an indication part of the communication protocol, FLAC original audio packet, and time sequence.
  • Value and check code, the instruction part of the communication protocol can be located before the FLAC header and FLAC data part of the FLAC original audio packet
  • the time series value and check code can be located after the FLAC data part of the FLAC original audio packet
  • the check code is located after the time series values.
  • the electronic device may first generate a time series value, and then generate a check code based on the instruction part of the communication protocol, the original audio packet of the frame, and the time series value.
  • the indication part of the communication protocol, the original audio packet of the frame and the time sequence value can be divided into multiple groups of bit data, and then starting from the first group of bit data, the current group of bit data and the next group of bit data are XORed until the The next set of bit data is the last set of bit data to obtain the check code.
  • This check code can not only help verify the integrity of the original audio packet in the target audio data packet, but also help verify the integrity of the instruction part and time series value of the communication protocol, further ensuring the accuracy of the transmitted target audio data packet. .
  • the audio output device If the audio output device detects that the target audio data packet is incomplete based on the check code in the target audio data packet, it can use the time series value in the target audio data packet as a packet identifier and send the time series value to the electronic device. retransmission request. After receiving the retransmission request, the electronic device can resend the target audio data packet corresponding to the time series value to the audio output device according to the time series value carried in the retransmission request.
  • the data format of the target audio data packet is not limited to the above-mentioned data formats.
  • the target audio data packet may also include other fields other than the indication part of the communication protocol, the original audio packet, the time sequence and the check code. Information can be adjusted based on actual needs.
  • the electronic device can package the original audio packet of the frame based on the data format specified by the communication protocol, obtain the target audio data packet and transmit it to the audio output device. There is no need to perform a series of encoding and decoding of the audio source data.
  • the processing and packaging method is simple and does not rely on the coding ability of electronic equipment, which reduces power consumption and resource loss, and can reduce transmission delays, achieve zero compression and lossless transmission of original audio data, and improve the audio playback effect.
  • a chip configured to perform the steps in the audio data transmission method applied to electronic devices as described in the above embodiments.
  • the chip may include a processor and a communication module.
  • the processor may be used to perform the step of encapsulating the original audio packet of the frame into a target audio data packet.
  • the communication module may be used to perform the step of sending the target audio data packet to the audio output device via a wireless communication channel.
  • the chip can be installed in electronic devices, such as mobile phones and wearable devices. equipment, vehicle terminals, tablet computers, etc.
  • another audio data transmission method is provided, which can be applied to the above-mentioned audio output device.
  • the method may include the following steps:
  • Step 510 Receive a target audio data packet via the wireless communication channel, where the target audio data packet includes a frame original audio packet and an indication part of the communication protocol.
  • the instruction part of the communication protocol is used to indicate that the data format of the target audio data packet complies with the communication protocol.
  • Step 520 Unpack the target audio data packet.
  • step 520 includes: extracting the indication part of the communication protocol from the third data segment of the target audio data packet.
  • step 520 further includes: extracting the header of the original audio packet of the frame from the first data segment of the target audio data packet; extracting the data portion of the original audio packet of the frame from the second data segment of the target audio data packet.
  • the target audio data packet also includes time series values.
  • the method also includes: determining the sending order corresponding to the target audio data packet according to the time series value extracted from the target audio data packet, and extracting the target audio data packet from the target audio data packet according to the sending order corresponding to the target audio data packet.
  • the original audio packet of the frame is processed to play the processed audio data.
  • the target audio data packet further includes a check code.
  • the method also includes: verifying the integrity of the target audio data packet according to the check code extracted from the target audio data packet; if it is detected that the target audio data packet is incomplete, sending a retransmission to the electronic device Request, a retransmission request is used to instruct the electronic device to resend the target audio data packet.
  • step 520 it may include: performing PCM decoding on the original audio packet of the frame extracted from the target audio data packet to obtain PCM decoded data; performing digital-to-analog conversion on the PCM decoded data to obtain the first analog data. , perform power amplification on the first simulation data to obtain the second simulation data; and output the second simulation data.
  • the electronic device directly packs the original audio packet of the frame to obtain the target audio data packet whose data format conforms to the communication protocol and transmits it to the audio output device.
  • the electronic device since the electronic device does not need to perform a series of encoding and decoding processes on the original audio data, the transmission delay can be reduced and the audio transmission capability can be improved.
  • a chip configured to perform the steps in the audio data transmission method applied to an audio output device as described in the above embodiments.
  • the chip may include a processor and a communication module.
  • the communication module may be used to perform steps of receiving target audio data packets, and the processor may be used to unpack the target audio data packets.
  • the chip can be set in audio output devices, such as headphones, speakers, car players, etc.
  • an audio data transmission device 600 is provided, which can be applied to the above-mentioned electronic equipment.
  • the audio data transmission device 600 can include a packetization module 610 and a sending module 620 .
  • the packetization module 610 is used to encapsulate the original audio packet of the frame into a target audio data packet.
  • the target audio data packet includes the original audio packet of the frame and an indication part of the communication protocol.
  • the instruction part of the communication protocol is used to indicate that the data format of the target audio data packet complies with the communication protocol.
  • the frame original audio packet includes original audio data in a lossless encoding format.
  • the lossless encoding format includes any one of FLAC format, APE format, and ALAC format.
  • the sending module 620 is configured to send the target audio data packet to the audio output device via the wireless communication channel.
  • the wireless communication channel includes a Bluetooth communication channel
  • the Bluetooth communication channel includes a broadcast channel and/or data channel.
  • the electronic device directly packs the original audio packet of the frame to obtain the target audio data packet whose data format conforms to the communication protocol and transmits it to the audio output device.
  • the electronic device since the electronic device does not need to perform a series of encoding and decoding processes on the original audio data, the transmission delay can be reduced and the audio transmission capability can be improved.
  • the frame original audio packet includes a packet header and a data part, and the data part includes original audio data;
  • the target audio data packet includes a packet header of the frame original audio packet stored in the first data segment, a packet header stored in the second data segment The data part of the original audio packet of the frame, and the indication part of the communication protocol stored in the third data segment.
  • the indication part of the communication protocol includes:
  • Encoder identifier for the communication protocol
  • the target audio data packet further includes a time series value, and the time series value is used to characterize the corresponding sending order of the target audio data packet.
  • the target audio data packet further includes a check code, which is used to verify the integrity of the target audio data packet.
  • the audio data transmission device 600 further includes a configuration module.
  • a configuration module configured to configure the target audio data packet such that the third data segment is located before the first data segment and the second data segment.
  • the electronic device can package the original audio packet of the frame based on the data format specified by the communication protocol, obtain the target audio data packet and transmit it to the audio output device, without the need to perform a series of encoding and decoding of the audio source data.
  • the processing and packaging method is simple and does not rely on the coding ability of electronic equipment, which reduces power consumption and resource loss, and can reduce transmission delays, achieve zero compression and lossless transmission of original audio data, and improve the audio playback effect.
  • an audio data transmission device 700 is provided, which is applied to the above-mentioned audio output device.
  • the audio data transmission device 700 may include a receiving module 710 and an unpacking module 720 .
  • the receiving module 710 is configured to receive a target audio data packet via a wireless communication channel, where the target audio data packet includes a frame original audio packet and an indication part of a communication protocol.
  • the unpacking module 720 is used to unpack the target audio data packet.
  • the unpacking module 720 is also configured to extract the indication part of the communication protocol from the third data segment of the target audio data packet.
  • the unpacking module 720 is also configured to extract the packet header of the original audio packet of the frame from the first data segment of the target audio data packet; extract the data part of the original audio packet of the frame from the second data segment of the target audio data packet.
  • the target audio data packet also includes time series values.
  • the audio data transmission device 700 also includes an audio processing module.
  • the audio processing module is used to determine the sending order corresponding to the target audio data packet according to the time series value extracted from the target audio data packet; according to the sending order corresponding to the target audio data packet, The frame raw audio packet extracted from the target audio data packet is processed to play the processed audio data.
  • the target audio data packet further includes a check code.
  • the audio data transmission device 700 also includes a verification module.
  • the verification module is used to verify the integrity of the target audio data packet based on the check code extracted from the target audio data packet; if it is detected that the target audio data packet is incomplete, a retransmission request is sent to the electronic device, and the retransmission request is Used to instruct the electronic device to resend the target audio data packet.
  • the audio processing module is also used to perform PCM decoding on the frame original audio packet extracted from the target audio data packet to obtain PCM decoded data; perform digital-to-analog conversion on the PCM decoded data to obtain the first analog data, and performing power amplification on the first analog data to obtain second analog data; and outputting the second analog data.
  • the electronic device directly packs the original audio packets of the frame to obtain data conforming to the communication
  • the target audio data packet of the protocol is transmitted to the audio output device.
  • Figure 8 is a structural block diagram of an electronic device in one embodiment.
  • the electronic device 800 may include one or more of the following components: a processor 810, a memory 820 coupled to the processor 810, where the memory 820 may store one or more computer programs, and one or more computer programs. It may be configured to implement the audio data transmission method applied to electronic devices as described in the above embodiments when executed by one or more processors 810 .
  • Processor 810 may include one or more processing cores.
  • the processor 810 uses various interfaces and lines to connect various parts of the entire electronic device 800, and executes by running or executing instructions, programs, code sets or instruction sets stored in the memory 820, and calling data stored in the memory 820.
  • the processor 810 may use at least one of digital signal processing (Digital Signal Processing, DSP), field-programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). implemented in hardware form.
  • the processor 810 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU), a modem, etc.
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • modem etc.
  • the CPU mainly handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the display content; and the modem is used to handle wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 810 and may be implemented solely through a communication chip.
  • the memory 820 may include random access memory (RAM) or read-only memory (Read-Only Memory, ROM). Memory 820 may be used to store instructions, programs, codes, sets of codes, or sets of instructions.
  • the memory 820 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing an operating system and instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing each of the above method embodiments, etc.
  • the storage data area may also store data created during use of the electronic device 800 and the like.
  • the electronic device 800 may also include a Bluetooth module, which may be used to provide Bluetooth communication functions, establish a Bluetooth connection with a second electronic device, and perform Bluetooth data transmission.
  • the Bluetooth module can support one or more Bluetooth protocols, such as classic Bluetooth, BLE, BLE Audio, etc.), but is not limited to this and can change with the development of the Bluetooth protocol.
  • An embodiment of the present application also provides an electronic device, including a memory and a processor.
  • the memory stores a computer program.
  • the processor implements the audio output device described in the above embodiments. audio data transmission method.
  • An embodiment of the present application discloses a computer-readable storage medium that stores a computer program, wherein when the computer program is executed by a processor, the audio data transmission method applied to electronic devices as described in the above embodiments is implemented.
  • An embodiment of the present application discloses a computer-readable storage medium that stores a computer program, wherein when the computer program is executed by a processor, the audio data transmission method applied to an audio output device as described in the above embodiments is implemented.
  • An embodiment of the present application discloses a computer program product.
  • the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, it can implement the application described in the above embodiments. Audio data transmission method for electronic equipment.
  • An embodiment of the present application discloses a computer program product.
  • the computer program product includes a non-transitory computer-readable storage medium that stores a computer program.
  • the computer program When executed by a processor, it can implement the application described in the above embodiments. Audio data transmission method for audio output devices.
  • the programs can be stored in a non-volatile computer-readable storage medium. , when the program is executed, it may include the processes of the above-mentioned method embodiments.
  • the storage medium It can be a magnetic disk, optical disk, ROM, etc.
  • Non-volatile memory may include ROM, programmable ROM (PROM), erasable PROM (Erasable PROM, EPROM), electrically erasable PROM (Electrically Erasable PROM, EEPROM) or flash memory.
  • Volatile memory may include random access memory (RAM), which acts as external cache memory.
  • RAM can be in many forms, such as static RAM (Static RAM, SRAM), dynamic RAM (Dynamic Random Access Memory, DRAM), synchronous DRAM (synchronous DRAM, SDRAM), double data rate SDRAM (Double Data Rate SDRAM, DDR SDRAM), enhanced SDRAM (Enhanced Synchronous DRAM, ESDRAM), synchronous link DRAM (Synchlink DRAM, SLDRAM), memory bus direct RAM (Rambus DRAM, RDRAM) and direct memory bus dynamic RAM (Direct Rambus DRAM , DRDRAM).
  • static RAM Static RAM, SRAM
  • dynamic RAM Dynamic Random Access Memory
  • DRAM Dynamic Random Access Memory
  • SDRAM synchronous DRAM
  • double data rate SDRAM Double Data Rate SDRAM, DDR SDRAM
  • enhanced SDRAM Enhanced Synchronous DRAM, ESDRAM
  • synchronous link DRAM Synchlink DRAM, SLDRAM
  • memory bus direct RAM Rabus DRAM, RDRAM
  • DRDRAM direct memory bus dynamic RAM
  • DRDRAM Direct Rambus DRAM
  • the units described above as separate components may or may not be physically separated.
  • the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the above integrated units can be implemented in the form of hardware or software functional units.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

一种音频数据传输方法、装置(600,700)、芯片、电子设备(110,800)及存储介质。方法包括:将帧原始音频包封装成目标音频数据包,目标音频数据包包括帧原始音频包和通信协议的指示部(210);将目标音频数据包经由无线通信信道发送至音频输出设备(120) (220);其中,通信协议的指示部用于指示目标音频数据包的数据格式符合通信协议。

Description

音频数据传输方法、装置、芯片、电子设备及存储介质
本申请要求于2022年06月27日提交、申请号为202210738048.7、发明名称为“音频 数据传输方法、装置、芯片、电子设备及存储介质”的中国专利申请的优先权,其全部内 容通过引用结合在本申请中。
技术领域
本申请涉及音频处理技术领域,具体涉及一种音频数据传输方法、装置、芯片、电子设备及存储介质。
背景技术
目前,在发送端设备向接收端设备传输音频数据,以通过接收端设备进行音频播放时,发送端设备通常需要先对音源数据进行一系列的编解码处理,再向接收端传输处理得到的音频数据,导致音源数据的音频品质出现损失,影响了音频的播放效果。
发明内容
本申请实施例公开了一种音频数据传输方法、装置、芯片、电子设备及存储介质,能够实现音频数据的无损传输,避免了原始音频数据出现音频品质损失的情况,提高了音频的播放效果。
本申请实施例公开了一种音频数据传输方法,应用于电子设备,所述方法包括:
将帧原始音频包封装成目标音频数据包,所述目标音频数据包包括所述帧原始音频包和通信协议的指示部;
将所述目标音频数据包经由无线通信信道发送至音频输出设备;
其中,所述通信协议的指示部用于指示所述目标音频数据包的数据格式符合所述通信协议。
本申请实施例公开了一种芯片,包括处理器和通信模块,
所述处理器配置成:将帧原始音频包封装成目标音频数据包,所述目标音频数据包包括所述帧原始音频包和通信协议的指示部;
所述通信模块配置成:将所述目标音频数据包经由无线通信信道发送至音频输出设备;
其中,所述通信协议的指示部用于指示所述目标音频数据包的数据格式符合所述通信协议。
本申请实施例公开了一种音频数据传输方法,应用于音频输出设备,所述方法包括:
经无线通信信道接收目标音频数据包,所述目标音频数据包包括帧原始音频包和通信协议的指示部;
对所述目标音频数据包进行解包。
本申请实施例公开了一种芯片,包括处理器和通信模块,
所述通信模块配置成:经无线通信信道接收目标音频数据包,所述目标音频数据包包括帧原始音频包和通信协议的指示部;
所述处理器配置成:对所述目标音频数据包进行解包;
其中,所述通信协议的指示部用于指示所述目标音频数据包的数据格式符合所述通信协议。
本申请实施例公开了一种音频数据传输装置,应用于电子设备,所述装置包括:
编包模块,用于将帧原始音频包封装成目标音频数据包,所述目标音频数据包包括所述帧原始音频包和通信协议的指示部;
发送模块,用于将所述目标音频数据包经由无线通信信道发送至音频输出设备;
其中,所述通信协议的指示部用于指示所述目标音频数据包的数据格式符合所述通信协议。
本申请实施例公开了一种音频数据传输装置,应用于音频输出设备,所述装置包括:
接收模块,用于经无线通信信道接收目标音频数据包,所述目标音频数据包包括帧原始音频包和通信协议的指示部;
音频处理模块,用于对所述目标音频数据包进行解包;
其中,所述通信协议的指示部用于指示所述目标音频数据包的数据格式符合所述通信协议。
本申请实施例公开了一种电子设备,包括存储器及处理器,所述存储器中存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器实现如上任一所述的方法。
本申请实施例公开了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上任一所述的方法。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和有益效果将从说明书、附图以及权利要求书中体现。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1A为相关技术中音频数据传输的示意图;
图1B为一个实施例中音频数据传输方法的应用场景图;
图2为一个实施例中音频数据传输方法的流程图;
图3为一个实施例中音频传输方法的流程示意图;
图4A为一个实施例中目标音频数据包的数据格式示意图;
图4B为另一个实施例中目标音频数据包的数据格式示意图;
图4C为另一个实施例中目标音频数据包的数据格式示意图;
图4D为另一个实施例中目标音频数据包的数据格式示意图;
图4E为另一个实施例中目标音频数据包的数据格式示意图;
图4F为另一个实施例中目标音频数据包的数据格式示意图;
图4G为另一个实施例中目标音频数据包的数据格式示意图;
图4H为另一个实施例中目标音频数据包的数据格式示意图;
图4I为另一个实施例中目标音频数据包的数据格式示意图;
图4J为另一个实施例中目标音频数据包的数据格式示意图;
图4K为另一个实施例中目标音频数据包的数据格式示意图;
图4L为另一个实施例中目标音频数据包的数据格式示意图;
图5为另一个实施例中音频数据传输方法的流程图;
图6为一个实施例中音频数据传输装置的框图;
图7为另一个实施例中音频数据传输装置的框图;
图8为一个实施例中电子设备的结构框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申 请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,本申请实施例及附图中的术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一模拟数据称为第二模拟数据,且类似地,可将第二模拟数据称为第一模拟数据。第一模拟数据和第二模拟数据两者都是模拟数据,但其不是同一模拟数据。本申请所使用的术语“多个”指的是两个及两个以上。本申请所使用的术语“和/或”指的是其中的一种方案,或是其中多种方案的任意组合。
在相关技术中,电子设备在向音频输出设备传输音频数据,以通过接收端设备进行音频播放时,电子设备通常需要先对音源数据进行一系列的编解码处理。示例性地,图1A为相关技术中音频数据传输的示意图。如图1A所示,以电子设备通过蓝牙无线通信,向音频输出设备传输音频数据进行播放为例,电子设备获取音源数据,可先对音源数据进行PCM(Pulse Code Modulation,脉冲编码调制)解码,得到PCM数据,再对PCM数据进行SBC(Sub Band Coding,子带编码)、AAC(Advanced Audio Coding,高级音频编码)等蓝牙音频编码处理,以得到SBC、AAC等编码格式的蓝牙音频编码数据。电子设备可将SBC、AAC等编码格式的蓝牙音频编码数据通过蓝牙无线通信传输给音频输出设备,音频输出设备对BC、AAC等编码格式的蓝牙音频编码数据进行PCM解码,得到PCM数据,再利用DAC(Digital to Analog converter,数模转换器)及AMP(Amplifier for Power,功率放大器)进行数模转换及功率放大,得到模拟数据,从而对模拟数据进行播放。
由于电子设备会先将音源数据解码为PCM数据,再进行SBC、AAC等编码处理,该SBC、AAC等编码处理是有损音频编码技术,从而会导致音源数据的音频品质损失,严重影响音频的播放效果,导致用户无法成功体验到音源数据的无损播放效果。
本申请实施例提供了一种音频数据传输方法、装置、芯片、电子设备及存储介质,能够实现音频数据的无损传输,避免了原始音频数据出现音频品质损失的情况,提高了音频的播放效果。
图1B为一个实施例中音频数据传输方法的应用场景图。如图1B所示,电子设备110与音频输出设备120可建立通信连接。电子设备110可包括但不限于手机、智能可穿戴设备、车载终端、平板电脑、PC(Personal Computer,个人电脑)、PDA(Personal Digital Assistant,个人数字助理)等。音频输出设备120可包括但不限于耳机、音箱设备、车载终端等,进一步地,该音频输出设备120可以是TWS(True Wireless Stereo,真无线立体声)耳机。
电子设备110与音频输出设备120之间可建立蓝牙、WiFi等无线通信连接,也可通过USB(Universal Serial Bus,通用串行总线)接口建立有线通信连接,本申请实施例对电子设备110与音频输出设备120之间的通信连接方式不作具体限定。
在电子设备110向音频输出设备120传输音频数据,以通过音频输出设备120进行音频播放的过程中,电子设备110可获取音源数据中待传输的帧原始音频包,并将该帧原始音频包封装成目标音频数据包,该目标音频数据包包括该帧原始音频包和通信协议的指示部。电子设备110可将目标音频数据包发送至音频输出设备120,音频输出设备120接收到电子设备110发送的目标音频数据包后,可对该目标音频数据包进行解包,并对解包得到的帧原始音频包进行处理,以播放处理得到的音频数据。电子设备110不需要对音源数据 进行一系列的编解码处理,可避免编解码处理导致的原始音频数据出现损失的情况,实现了音频数据的零压缩、无损传输,提高了音频的播放效果。
在本申请的一些实施例中,“通信协议”包括公有通信协议,其可以为标准组织采纳或在业界推广,“通信协议”也可以是私有通信协议,从而在生产方自己生产的设备及系统间使用,经许可后其他厂商也可使用。本申请中,对“通信协议”的性质及使用场合不作限定。
如图2所示,在一个实施例中,提供一种音频数据传输方法,可应用于上述的电子设备,该音频数据传输方法可包括以下步骤:
步骤210,将帧原始音频包封装成目标音频数据包,其中,目标音频数据包包括帧原始音频包和通信协议的指示部。
电子设备可通过音频输出设备进行音频播放,电子设备可从音源数据获取待传输的帧原始音频包,该音源数据可指的是待播放或当前正在播放的音频数据。音源数据可为音乐、视频声音、电子设备运行的应用程序的背景音、通话语音、提示音等中的任一种音频数据,但不限于此。
在一些实施例中,该音源数据可为采用无损编码格式的音频数据,从音源数据获取的帧原始音频包内可包括采用无损编码格式的原始音频数据。可选地,无损编码格式包括FLAC(Free Lossless Audio Codec,无损音频压缩编码)格式、APE格式(通过Monkey's Audio压缩得到)、ALAC(Apple lossless audio codec,苹果公司研发的无损音频格式)等格式中的任一种。应可理解,随着编码技术的发展,本申请的实施例还可应用于未来可能出现的其他编码格式。
进一步地,音源数据可为具备分帧能力的无损编码格式的音频数据。音源数据可按照预设的帧周期(Frame duration)时长,被划分为多个数据帧,即音源数据可被划分为多帧原始音频包,每帧原始音频包可包括音源数据的一个数据片段。每帧原始音频包中可包含有解码所需的全部信息,从而在进行解码时无需依赖于前一帧或后一帧原始音频包。每帧原始音频包中可包括包头及数据部,每帧原始音频包的包头可包括帧原始音频包的供应商标识符、帧原始音频包的编码器标识符,该供应商标识符可用于标识音频数据的供应商,编码器标识符可用于标识音源数据的编码格式,不同编码格式的音源数据可分别对应不同的编码器标识符。可选地,每帧原始音频包的包头还可包括音源数据的版本标识、采样率、采样深度、声道数、帧长度(如上述的帧周期时长)、数据部长度等中的一种或多种字段,在此不作限定。每帧原始音频包的数据部可至少包括采用无损编码格式的原始音频数据,也可包括其它数据内容,在此不作限定。
电子设备可基于通信协议分别对音源数据划分的多帧原始音频包进行编包,并将编包得到的目标音频数据包依次发送给音频输出设备,以使得音频输出设备能够播放音乐品质无损的音频数据。可选地,每帧原始音频包中可携带有对应的帧序号,该帧序号可用于表征原始音频包在音源数据中的排列顺序,可按照帧序号从小到大的顺序,依次获取原始音频包,并对获取的原始音频包进行编包,得到相应的目标音频数据包,再将目标音频数据包发送给音频输出设备。在本申请实施例中,电子设备可分帧向音频输出设备依次传输目标音频数据包,实现边传输边播放的效果,可保证音频播放的实时性,能够应用于提示音播放、通话语音播话、在使用应用程序的过程中播放背景音等对音频播放实时性要求高的场景中,能够满足用户在各种不同场景下对于音频播放无损品质的需求。
在一些实施例中,可配置通信协议以实现对原始音频包的零压缩无损传输,该通信协议可规定有目标音频数据包的数据格式,通过将帧原始音频包封装成符合该数据格式的目标音频数据包,实现对原始音频包的零压缩无损传输。
目标音频数据包可包括帧原始音频包及一个或多个设定字段,各个设定字段可分别存储于目标音频数据包中对应的数据段中,各个数据段在目标数据包中的位置可根据实际需求进行调整设置。在本申请实施例中,目标音频数据包可包括帧原始音频包及通信协议的指示部,该通信协议的指示部用于指示目标音频数据包的数据格式符合通信协议。例如,在目标音频数据包的数据格式中,该通信协议的指示部可位于帧原始音频包之前,也可位于帧原始音频包之后,但不限于此。
电子设备可基于通信协议中规定的数据格式对帧原始音频包进行封装,得到包括所述帧原始音频包和通信协议的指示部的目标音频数据包。通信协议的指示部可至少包括通信协议的供应商标识符、通信协议的编码器标识符,该通信协议的编码器标识符可用于标识目标音频数据包中的帧原始音频包对应的编码格式,可用于指示目标数据包为携带无损编码格式的音频数据的音频数据包。进一步地,通信协议的指示部还可包括通信协议的版本号等信息,但不限于此,上述的供应商标识符、编码器标识符、版本号等均可由数字、字符及符号等中的一种或多种组成,在此不作限定。
可选地,目标音频数据包中包括的设定字段,还可包括但不限于时间序列值及校验码等中的一种或多种,该时间序列值可用于表征目标音频数据包对应的发送顺序,校验码可用于验证目标音频数据包的完整性。
在本申请实施例中,电子设备直接对音源数据的帧原始音频包进行封装,得到数据格式符合通信协议的目标音频数据包,而不需要对帧原始音频包进行PCM解码及SBC、AAC等编码处理,既可避免帧原始音频包在编解码过程中出现音乐品质损失,又可节省处理时间及功耗,且编包过程简单,节省了电子设备的计算力及消耗的内存等资源,实现了零压缩、低功耗、低延迟的无损品质音频传输。
步骤220,将目标音频数据包经由无线通信信道发送至音频输出设备。
电子设备可将封装得到的目标音频数据包发送给音频输出设备,音频输出设备接收到该目标音频数据包后,可对该目标音频数据包进行解包,得到帧原始音频包,再对该帧原始音频包进行处理,以播放处理得到的音频数据。在一些实施例中,音频输出设备可先从目标音频数据包中提取通信协议的指示部,根据该通信协议的指示部可识别到该目标音频数据包为符合通信协议规定的音频数据包,音频输出设备可再基于通信协议从目标音频数据包中提取帧原始音频包,然后对提取的帧原始音频包进行处理,以播放处理得到的音频数据。由于在整个传输的过程中帧原始音频包不会经历有损压缩编码等过程,因此,音频输出设备能够播放无损音乐品质的音频数据,提高了音频播放效果。
在一些实施例中,音频输出设备可对从目标音频数据包中提取的帧原始音频包进行PCM解码,得到PCM解码数据,再对该PCM解码数据进行数模转换,得到第一模拟数据,并对第一模拟数据进行功率放大,得到第二模拟数据。音频输出设备可输出该第二模拟数据。
音频输出设备对目标音频数据包进行解包,得到无损编码格式的帧原始音频包后,可对该帧原始音频包进行PCM解码,得到PCM解码数据。音频输出设备可通过数模转换器将PCM解码数据从数字信号转换为模拟信号,得到第一模拟数据,再通过功率放大器对第一模拟数据进行功率放大,得到第二模拟数据。功率放大器可将第二模拟数据传输至播放单元,音频输出设备通过播放单元输出第二模拟数据,以实现播放音频的效果。
在一些实施例中,无线通信信道可包括蓝牙通信信道,该蓝牙通信信道包括广播信道和/或数据信道。可选地,电子设备在得到目标音频数据包后,可通过广播信道或者数据信道发送该目标音频数据包至音频输出设备,若电子设备接收到音频输出设备发送的重传请求,则可通过数据信道向音频输出设备重新发送该重传请求指示的目标音频数据包。
电子设备与音频输出设备之间可建立蓝牙连接,该蓝牙连接可包括经典蓝牙连接、BLE(Bluetooth Low Energy,蓝牙低功耗)连接等,其中,经典蓝牙连接为基于经典蓝牙协议建立的蓝牙通信连接,BLE连接为基于BLE协议建立的蓝牙通信连接,经典蓝牙协议通常泛指在蓝牙协议4.0版本以下的蓝牙协议,BLE协议通常泛指在蓝牙协议4.0版本以上的蓝牙协议。进一步地,该蓝牙连接可以是基于BLE连接建立的LE Audio蓝牙连接,能够支持音频数据的传输。
电子设备可通过蓝牙连接的音频业务传输信道,将目标音频数据包发送至音频输出设备。若蓝牙连接为经典蓝牙连接,则音频业务传输信道可为基于A2DP(Advanced Audio Distribution Profile,蓝牙音频传输模型协定)协议或HFP(Hands-free Profile)协议等建立的传输信道,若蓝牙连接为LE Audio蓝牙连接,则音频业务传输通道可为CIS(Connected Isochronous Streams,基于连接同步数据流)等传输信道,但不限于此。需要说明的是,本申请实施例对于电子设备与音频输出设备之间的具体蓝牙连接方式及通信信道不作限定,可根据蓝牙标准协议的发展进行变化。由于目标音频数据包是基于通信协议封装生成的,因此可保证该音频传输不受限于相关技术中通信标准协议所规定的数据格式,本申请实施例提供的音频传输方法可适用于各种不同的蓝牙无线通信传输,适应性强,能够满足不同传输场景的需求,提高了电子设备与音频输出设备之间的音频传输能力。
示例性地,图3为一个实施例中音频传输方法的流程示意图。如图3所示,电子设备可从音源数据中获取帧原始音频包,并基于通信协议对获取的帧原始音频包进行编包,得到相应的目标音频数据包,再通过蓝牙无线传输将目标音频数据包发送给音频输出设备。音频输出设备接收到该目标音频数据包后,可对目标音频数据包进行解包,得到帧原始音频包,可对帧原始音频包进行PMC解码,得到PCM解码数据,再通过DAC和AMP分别进行数模转换处理及功率放大处理,得到模拟数据,最后通过播放单元输出该模拟数据。相较于图1A所示的音频传输方式,本申请实施提供的音频传输方法中电子设备不需要进行PCM解码及SBC、ACC等蓝牙音频编码,从而避免了播放的音频数据出现音乐品质损失的情况,且整体的处理时间较短,降低了传输延时(以蓝牙传输的10毫秒的帧计算为例,减少了PMC解码及蓝牙编码两个过程,可缩短20毫秒以上的延时),提高了音频传输实时性,还降低了电子设备的功耗及消耗的内存等资源,不依赖于电子设备的蓝牙音频编码的能力,提升了电子设备与音频输出设备之间的无损音频传输的能力。
在本申请实施例中,电子设备直接对帧原始音频包进行编包,得到数据格式符合通信协议的目标音频数据包并传输给音频输出设备,不需要对音源数据进行一系列的编解码处理,可避免编解码处理导致的原始音频数据出现损失的情况,实现了音频数据的零压缩无损传输,提高了音频的播放效果。而且,由于电子设备不需要对音源数据进行一系列的编解码处理,可降低传输时延,提高了音频传输能力。
下面对目标音频数据包的几种数据格式进行介绍:
(1)目标音频数据包包括帧原始音频包及通信协议的指示部。
通信协议的指示部可至少包括通信协议的供应商标识符、通信协议的编码器标识符,该通信协议的编码器标识符可用于标识目标音频数据包中的帧原始音频包对应的编码格式,可用于指示目标数据包为携带无损编码格式的音频数据的音频数据包。进一步地,通信协议的指示部还可包括通信协议的版本号等信息,但不限于此,上述的供应商标识符、编码器标识符、版本号等均可由数字、字符及符号等中的一种或多种组成,在此不作限定。
在一些实施例中,帧原始音频包可包括包头及数据部,该数据部可包括原始音频数据,目标音频数据包可包括存储于第一数据段的帧原始音频包的包头、存储于第二数据段的帧原始音频包的数据部,以及存储于第三数据段的通信协议的指示部。电子设备获取帧原始 音频包后,可将帧原始音频包的包头存入目标音频数据包的第一数据段,将帧原始音频包的数据部存入目标音频数据包的第二数据段,并将通信协议的指示部存入目标音频数据包的第三数据段。
进一步地,可将目标音频数据包配置成:
使得第三数据段位于第一数据段和第二数据段之前;或者,
使得第三数据段位于第一数据段及第二数据段之间;或者,
使得第三数据段位于第一数据段和第二数据段之后。
示例性地,图4A为一个实施例中目标音频数据包的数据格式示意图。如图4A所示,以音源数据为FLAC格式的音频数据为例,FLAC原始音频包可包括FLAC包头及FLAC数据部,目标音频数据包可包括通信协议的指示部及FLAC原始音频包,通信协议的指示部可位于在FLAC原始音频包的包头及FLAC数据部之前。
示例性地,图4B为另一个实施例中目标音频数据包的数据格式示意图。如图4B所示,以音源数据为FLAC格式的音频数据为例,FLAC原始音频包可包括FLAC包头及FLAC数据部,目标音频数据包可包括通信协议的指示部及FLAC原始音频包,通信协议的指示部可位于在FLAC原始音频包的FLAC包头与FLAC数据部之间。
示例性地,图4C为另一个实施例中目标音频数据包的数据格式示意图。如图4C所示,以音源数据为FLAC格式的音频数据为例,FLAC原始音频包可包括FLAC包头及FLAC数据部,目标音频数据包可包括通信协议的指示部及FLAC原始音频包,通信协议的指示部可位于在FLAC原始音频包的FLAC包头及FLAC数据部之后。
在一个实施例中,音频输出设备接收到目标音频数据包后,可对目标音频数据包进行解包,可从目标音频数据包的第三数据段提取通信协议的指示部。进一步地,再从目标音频数据包的第一数据段提取帧原始音频包的包头,以及从目标音频数据包的第二数据段提取帧原始音频包的数据部。音频输出设备可先根据提取的通信协议的指示部确定目标音频数据包支持该通信协议,再从目标音频数据包的第一数据段及目标音频数据包的第二数据段分别提取帧原始音频包的包头及数据部,然后再对帧原始音频包进行处理,以播放处理得到的音频数据。
(2)目标音频数据包包括帧原始音频包、通信协议的指示部及时间序列值,时间序列值用于表征目标音频数据包对应的发送顺序。
电子设备可按照生成的每个目标音频数据包对应的发送顺序,依次生成每个目标音频数据包对应的时间序列值,该时间序列值也可用于表征目标音频数据包中包含的帧原始音频包在音源数据中的帧序(即对应的数据帧顺序)。按照发送顺序从先到后的顺序,各个目标音频数据包对应的时间序列值可依次累加,可按照预设的序列生成方式生成目标音频数据包对应的时间序列值,发送顺序排列在后一个的目标音频数据包对应的时间序列值,相对于发送顺序排列在前一个的目标音频数据包对应的时间序列值之间的差值可为固定差值。例如,该固定差值可为1,若上一个生成的目标音频数据包(包含上一帧原始音频包)对应的时间序列值为100,则当前生成的目标音频数(包含帧原始音频包)对应的时间序列值可为101,但不限于此,该固定差值也可为2、3等。
可选地,可设置时间序列值对应的数值范围,当某个目标音频数据包对应的时间序列值达到该数值范围的最大值时,下一个目标音频数据包对应的时间序列值可从该数值范围的最小值开始,重新一轮的时间序列累计。例如,时间序列值对应的数值范围为0~264,若某个目标音频数据包对应的时间序列值达到该264,则下一个目标音频数据包对应的时间序列值为0,可避免时间序列值无限累计导致计算资源消耗过大的问题。
在一些实施例中,电子设备获取帧原始音频包后,可根据上一次生成的目标音频数据 包对应的时间序列值,生成帧原始音频包对应的时间序列值,并将该帧原始音频包对应的时间序列值存入目标音频数据包的第四数据段,以生成包含通信协议的指示部、帧原始音频包及对应的时间序列值的目标音频数据包。
该第四数据段在目标音频数据包中的位置可预先进行配置,例如,第四数据段可在第三数据段(即通信协议的指示部)之后,或者,第四数据段可在第一数据段及第二数据段之间(即帧原始音频包的包头与原始音频数据之间),或者,第四数据段可在第二数据段(即帧原始音频包的原始音频数据)之后等,在此不作限定。
示例性地,图4D为另一个实施例中目标音频数据包的数据格式示意图。如图4D所示,以音源数据为FLAC格式的音频数据为例,FLAC原始音频包可包括FLAC包头及FLAC数据部,目标音频数据包可包括通信协议的指示部、FLAC原始音频包及时间序列值,时间序列值可位于通信协议的指示部之后,且时间序列值可位于FLAC原始音频包的FLAC包头及FLAC数据部之前。
示例性地,图4E为另一个实施例中目标音频数据包的数据格式示意图。如图4E所示,以音源数据为FLAC格式的音频数据为例,FLAC原始音频包可包括FLAC包头及FLAC数据部,目标音频数据包可包括通信协议的指示部、FLAC原始音频包及时间序列值,时间序列值可位于通信协议的指示部之后,且通信协议的指示部与时间序列值可位于FLAC原始音频包的FLAC包头及FLAC数据部之间。
示例性地,图4F为另一个实施例中目标音频数据包的数据格式示意图。如图4F所示,以音源数据为FLAC格式的音频数据为例,FLAC原始音频包可包括FLAC包头及FLAC数据部,目标音频数据包可包括通信协议的指示部、FLAC原始音频包及时间序列值,时间序列值可位于FLAC原始音频包的FLAC包头及FLAC数据部之间,通信协议的指示部可位于FLAC原始音频包的FLAC包头之前。
音频输出设备可按照接收的各个目标音频数据包中的时间序列值,对各个目标音频数据包中包含的帧原始音频包进行组包,从而能够按照正确的帧序进行音频处理及播放。音频输出设备在接收到电子设备发送的目标音频数据包后,可从目标音频数据包的第四数据段提取时间序列值,根据从该目标音频数据包中提取的时间序列值,确定该目标音频数据包对应的发送顺序,音频输出设备可按照该目标音频数据包对应的发送顺序,对该目标音频数据包进行处理,以播放处理得到的音频数据。
在一些实施例中,音频输出设备也可根据各个目标音频数据包中的时间序列值判断是否存在漏接收的目标音频数据包,若检测到遗漏的时间序列值,则可向电子设备发送重传请求,该重传请求中可携带该遗漏的时间序列值。电子设备接收到该重传请求后,可根据该重传请求中携带的遗漏的时间序列值,重新向音频输出设备发送该遗漏的时间序列值对应的目标音频数据包。可选地,电子设备可存储固定时间范围内的目标音频数据包,例如,只存储最新生成的20个目标音频数据包,既可以保证能够根据音频输出设备的需求进行重传,又不会占用过多的存储空间。
在本申请实施例中,通过在目标音频数据包中添加时间序列值,可保证音频输出设备得到的原始音频码流的顺序正确,保证播放的准确性。
(3)目标音频数据包包括帧原始音频包、通信协议的指示部及校验码,校验码用于验证目标音频数据包的完整性。
电子设备在获取帧原始音频包后,可按照预设的计算方式对该帧原始音频包进行计算,得到校验码,并将该校验码存入目标音频数据包的第五数据段,以生成包含通信协议的指示部、帧原始音频包及对应的校验码的目标音频数据包。
该第五数据段可在目标音频数据包中的位置可预先进行配置,例如,第五数据段可在 第三数据段(即通信协议的指示部)之后,或者,第五数据段可在第一数据段及第二数据段之间(即帧原始音频包的包头与原始音频数据之间),或者,第五数据段可在第二数据段(即帧原始音频包的原始音频数据)之后等,在此不作限定。
示例性地,图4G为另一个实施例中目标音频数据包的数据格式示意图。如图4G所示,以音源数据为FLAC格式的音频数据为例,FLAC原始音频包可包括FLAC包头及FLAC数据部,目标音频数据包可包括通信协议的指示部、FLAC原始音频包及校验码,校验码可位于通信协议的指示部之后,且校验码可位于FLAC原始音频包的FLAC包头及FLAC数据部之前。
示例性地,图4H为另一个实施例中目标音频数据包的数据格式示意图。如图4H所示,以音源数据为FLAC格式的音频数据为例,FLAC原始音频包可包括FLAC包头及FLAC数据,目标音频数据包可包括通信协议的指示部、FLAC原始音频包及校验码,校验码可位于通信协议的指示部之后,且通信协议的指示部与校验码可位于FLAC原始音频包的FLAC包头及FLAC数据部之间。
示例性地,图4I为另一个实施例中目标音频数据包的数据格式示意图。如图4I所示,以音源数据为FLAC格式的音频数据为例,FLAC原始音频包可包括FLAC包头及FLAC数据部,目标音频数据包可包括通信协议的指示部、FLAC原始音频包及校验码,校验码可位于FLAC原始音频包的包头及FLAC数据部之间,通信协议的指示部可位于FLAC原始音频包的FLAC包头之前。
作为一种实施方式,可将帧原始音频包划分为多组比特数据,每组比特数包可包含N位比特值,该N可为正整数,例如,N可为1、4、8等,但不限于此。可从帧原始音频包的第一组比特数据开始,将当前组比特数据与下一组比特数据进行异或计算,直至该下一组比特数据为最后一组比特数据,以得到校验码。
作为另一种实施方式,也可将通信协议的指示部与帧原始音频包划分为多组比特数据,再从第一组比特数据开始,将当前组比特数据与下一组比特数据进行异或计算,直至该下一组比特数据为最后一组比特数据,以得到校验码。需要说明的是,也可采用其它方式计算校验码,例如,可从帧原始音频包的第一位比特值开始,将每个比特值进行反转,得到校验码等,但不限于此,具体的校验码计算方式可根据实际需求进行设置。
音频输出设备在接收到电子设备发送的目标音频数据包后,可从目标音频数据包的第五数据段提取校验码,根据从该目标音频数据包中提取的校验码,验证该目标音频数据包的完整性。可基于通信协议从目标音频数据包中解析得到通信协议的指示部、帧原始音频包及校验码,可按照预设的计算方式对帧原始音频包进行计算,并将计算结果与该校验码进行比对,判断是否一致,若一致,则校验通过,说明该目标音频数据包完整,若不一致,则校验失败,说明该目标音频数据包不完整。若音频输出设备检测到该目标音频数据包不完整,则可向电子设备发送重传请求,该重传请求用于指示电子设备重新发送该目标音频数据包。
可选地,该重传请求中可携带有包标识,每个目标音频数据包可分别对应不同的包标识,该包标识可由数字、字符及符号等中的一种或多种组成。电子设备接收到重传请求后,可根据该重传请求携带的包标识,向音频输出设备重新发送与该包标识对应的目标音频数据包。
在本申请实施例中,通过在目标音频数据包中添加校验码,可保证目标音频数据包的完整性,保证了音频传输的准确性。
(4)目标音频数据包包括帧原始音频包、通信协议的指示部、时间序列值及校验码。
电子设备在获取帧原始音频包后,可分别生成对应的时间序列值及对应的校验码,帧 原始音频包的包头及原始音频数据分别存入目标音频数据包的第一数据段及第二数据段,将通信协议的指示部存入目标音频数据包的第三数据段,将时间序列值存入目标音频数据包的第四数据段,以及将存入目标音频数据包的第五数据段,以得到目标音频数据包。
示例性地,图4J为另一个实施例中目标音频数据包的数据格式示意图。如图4J所示,以音源数据为FLAC格式的音频数据为例,FLAC原始音频包可包括FLAC包头及FLAC数据部,目标音频数据包可包括通信协议的指示部、FLAC原始音频包、时间序列值及校验码,时间序列值可位于通信协议的指示部之后,校验码可位于时间序列值之后,且校验码可位于FLAC原始音频包的FLAC包头及FLAC数据部之前。
示例性地,图4K为另一个实施例中目标音频数据包的数据格式示意图。如图4K所示,以音源数据为FLAC格式的音频数据为例,FLAC原始音频包可包括FLAC包头及FLAC数据部,目标音频数据包可包括通信协议的指示部、FLAC原始音频包、时间序列值及校验码,时间序列值可位于通信协议的指示部之后,校验码可位于时间序列值之后,且通信协议的指示部、时间序列值及校验码位于FLAC原始音频包的FLAC包头与FLAC数据部之间。
示例性地,图4L为另一个实施例中目标音频数据包的数据格式示意图。如图4L所示,以音源数据为FLAC格式的音频数据为例,FLAC原始音频包可包括FLAC包头及FLAC数据部,目标音频数据包可包括通信协议的指示部、FLAC原始音频包、时间序列值及校验码,通信协议的指示部可位于FLAC原始音频包的FLAC包头及FLAC数据部之前,时间序列值及校验码可位于FLAC原始音频包的FLAC数据部之后,且校验码位于时间序列值之后。
电子设备生成时间序列值及校验码的方式可参考上述实施例中的相关描述,在此不再赘述。
作为另一种实施方式,电子设备可先生成时间序列值,再根据通信协议的指示部、帧原始音频包及时间序列值生成校验码。可将通信协议的指示部、帧原始音频包及时间序列值划分为多组比特数据,再从第一组比特数据开始,将当前组比特数据与下一组比特数据进行异或计算,直至该下一组比特数据为最后一组比特数据,以得到校验码。该校验码不仅可用于帮助验证目标音频数据包中原始音频包的完整性,也可帮助验证通信协议的指示部及时间序列值的完整性,进一步保证了传输的目标音频数据包的准确性。
若音频输出设备根据目标音频数据包中的校验码,检测到该目标音频数据包不完整,可将该目标音频数据包中的时间序列值作为包标识,向电子设备发送携带该时间序列值的重传请求。电子设备接收到重传请求后,可根据该重传请求携带的时间序列值,向音频输出设备重新发送与该时间序列值对应的目标音频数据包。
需要说明的是,目标音频数据包的数据格式并不仅限于上述的几种数据格式,目标音频数据包也可包括除通信协议的指示部、原始音频包、时间序列及校验码以外的其它字段信息,可基于实际需求进行调整。
在本申请实施例中,电子设备可基于通信协议规定的数据格式,对帧原始音频包进行编包,得到目标音频数据包并传输给音频输出设备,不需要对音源数据进行一系列的编解码处理,编包方式简单,不依赖于电子设备的编码能力,减少了功耗及资源损耗,且可降低传输时延,实现了原始音频数据的零压缩无损传输,提高了音频的播放效果。
在一个实施例中,提供一种芯片,配置成执行如上述各实施例描述的应用于电子设备的音频数据传输方法中的步骤。该芯片可包括处理器及通信模块,处理器可用于执行将帧原始音频包封装成目标音频数据包的步骤,通信模块可用于执行将目标音频数据包经由无线通信信道发送至音频输出设备的步骤。该芯片可设置在电子设备中,如手机、可穿戴设 备、车载终端、平板电脑等。
如图5所示,在一个实施例中,提供另一种音频数据传输方法,可应用于上述的音频输出设备,该方法可包括以下步骤:
步骤510,经无线通信信道接收目标音频数据包,目标音频数据包包括帧原始音频包和通信协议的指示部。
其中,通信协议的指示部用于指示目标音频数据包的数据格式符合该通信协议。
步骤520,对目标音频数据包进行解包。
在一个实施例中,步骤520,包括:从所述目标音频数据包的第三数据段提取通信协议的指示部。
在一个实施例中,步骤520,还包括:从目标音频数据包的第一数据段提取帧原始音频包的包头;从目标音频数据包的第二数据段提取帧原始音频包的数据部。
在一个实施例中,目标音频数据包还包括时间序列值。在步骤520之后,该方法还包括:根据从目标音频数据包提取的时间序列值,确定目标音频数据包对应的发送顺序,按照目标音频数据包对应的发送顺序,对从目标音频数据包中提取的帧原始音频包进行处理,以播放处理得到的音频数据。
在一个实施例中,目标音频数据包还包括校验码。在步骤520之后,该方法还包括:根据从目标音频数据包中提取的校验码,验证目标音频数据包的完整性;若检测到该目标音频数据包不完整,则向电子设备发送重传请求,重传请求用于指示电子设备重新发送该目标音频数据包。
在一个实施例中,在步骤520之后,可包括:对从目标音频数据包中提取的帧原始音频包进行PCM解码,得到PCM解码数据;对PCM解码数据进行数模转换,得到第一模拟数据,并对第一模拟数据进行功率放大,得到第二模拟数据;输出该第二模拟数据。
需要说明的是,本申请实施例提供的应用于音频输出设备的音频数据传输方法的具体描述,可参考上述各实施例中提供的应用于电子设备的音频数据传输方法的描述,在此不再重复赘述。
在本申请实施例中,电子设备直接对帧原始音频包进行编包,得到数据格式符合通信协议的目标音频数据包并传输给音频输出设备,不需要对音源数据进行一系列的编解码处理,可避免编解码处理导致的原始音频数据出现损失的情况,实现了音频数据的零压缩无损传输,提高了音频的播放效果。而且,由于电子设备不需要对原始音频数据进行一系列的编解码处理,可降低传输时延,提高了音频传输能力。
在一个实施例中,提供一种芯片,配置成执行如上述各实施例描述的应用于音频输出设备的音频数据传输方法中的步骤。该芯片可包括处理器及通信模块,通信模块可用于执行接收目标音频数据包的步骤,处理器可用于对目标音频数据包进行解包等步骤。该芯片可设置在音频输出设备中,如耳机、音箱、车载播放器等。
如图6所示,在一个实施例中,提供一种音频数据传输装置600,可应用于上述的电子设备,音频数据传输装置600可包括编包模块610及发送模块620。
编包模块610,用于将帧原始音频包封装成目标音频数据包,目标音频数据包包括帧原始音频包和通信协议的指示部。其中,通信协议的指示部用于指示目标音频数据包的数据格式符合通信协议。
在一个实施例中,帧原始音频包内包括采用无损编码格式的原始音频数据。
在一个实施例中,无损编码格式包括FLAC格式、APE格式、ALAC格式中的任一种。
发送模块620,用于将目标音频数据包经由无线通信信道发送至音频输出设备。
在一个实施例中,无线通信信道包括蓝牙通信信道,蓝牙通信信道包括广播信道和/或 数据信道。
在本申请实施例中,电子设备直接对帧原始音频包进行编包,得到数据格式符合通信协议的目标音频数据包并传输给音频输出设备,不需要对音源数据进行一系列的编解码处理,可避免编解码处理导致的原始音频数据出现损失的情况,实现了音频数据的零压缩无损传输,提高了音频的播放效果。而且,由于电子设备不需要对原始音频数据进行一系列的编解码处理,可降低传输时延,提高了音频传输能力。
在一个实施例中,帧原始音频包包括包头及数据部,所述数据部包括原始音频数据;目标音频数据包包括存储于第一数据段的帧原始音频包的包头、存储于第二数据段的帧原始音频包的数据部,以及存储于第三数据段的通信协议的指示部。
在一个实施例中,通信协议的指示部包括:
通信协议的供应商标识符;
通信协议的编码器标识符。
在一个实施例中,目标音频数据包还包括时间序列值,该时间序列值用于表征目标音频数据包对应的发送顺序。
在一个实施例中,目标音频数据包还包括校验码,该校验码用于验证目标音频数据包的完整性。
在一个实施例中,音频数据传输装置600还包括配置模块。配置模块,用于将目标音频数据包配置成:使得第三数据段位于第一数据段和第二数据段之前。
在本申请实施例中,电子设备可基于通信协议规定的数据格式接对帧原始音频包进行编包,得到目标音频数据包并传输给音频输出设备,不需要对音源数据进行一系列的编解码处理,编包方式简单,不依赖于电子设备的编码能力,减少了功耗及资源损耗,且可降低传输时延,实现了原始音频数据的零压缩无损传输,提高了音频的播放效果。
如图7所示,在一个实施例中,提供一种音频数据传输装置700,应用于上述的音频输出设备,音频数据传输装置700可包括接收模块710及解包模块720。
接收模块710,用于经无线通信信道接收目标音频数据包,其中,目标音频数据包包括帧原始音频包和通信协议的指示部。
解包模块720,用于对目标音频数据包进行解包。
在一个实施例中,解包模块720,还用于从目标音频数据包的第三数据段提取通信协议的指示部。
在一个实施例中,解包模块720,还用于从目标音频数据包的第一数据段提取帧原始音频包的包头;从目标音频数据包的第二数据段提取帧原始音频包的数据部。
在一个实施例中,目标音频数据包还包括时间序列值。音频数据传输装置700还包括音频处理模块,音频处理模块用于根据从目标音频数据包中提取的时间序列值,确定目标音频数据包对应的发送顺序;按照目标音频数据包对应的发送顺序,对从目标音频数据包中提取的帧原始音频包进行处理,以播放处理得到的音频数据。
在一个实施例中,目标音频数据包还包括校验码。音频数据传输装置700还包括校验模块。校验模块用于根据从目标音频数据包中提取的校验码,验证目标音频数据包的完整性;若检测到该目标音频数据包不完整,则向电子设备发送重传请求,重传请求用于指示电子设备重新发送该目标音频数据包。
在一个实施例中,音频处理模块,还用于对从目标音频数据包中提取的帧原始音频包进行PCM解码,得到PCM解码数据;对PCM解码数据进行数模转换,得到第一模拟数据,并对第一模拟数据进行功率放大,得到第二模拟数据;以及输出该第二模拟数据。
在本申请实施例中,电子设备直接对帧原始音频包进行编包,得到数据格合符合通信 协议的目标音频数据包并传输给音频输出设备,不需要对音源数据进行一系列的编解码处理,可避免编解码处理导致的原始音频数据出现损失的情况,实现了音频数据的零压缩无损传输,提高了音频的播放效果。而且,由于电子设备不需要对原始音频数据进行一系列的编解码处理,可降低传输时延,提高了音频传输能力。
图8为一个实施例中电子设备的结构框图。如图8所示,电子设备800可以包括一个或多个如下部件:处理器810、与处理器810耦合的存储器820,其中存储器820可存储有一个或多个计算机程序,一个或多个计算机程序可以被配置为由一个或多个处理器810执行时实现如上述各实施例描述的应用于电子设备的音频数据传输方法。
处理器810可以包括一个或者多个处理核。处理器810利用各种接口和线路连接整个电子设备800内的各个部分,通过运行或执行存储在存储器820内的指令、程序、代码集或指令集,以及调用存储在存储器820内的数据,执行电子设备800的各种功能和处理数据。可选地,处理器810可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器810可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器810中,单独通过一块通信芯片进行实现。
存储器820可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。存储器820可用于存储指令、程序、代码、代码集或指令集。存储器820可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现上述各个方法实施例的指令等。存储数据区还可以存储电子设备800在使用中所创建的数据等。
电子设备800还可包括蓝牙模块,蓝牙模块可用于提供蓝牙通信功能,与第二电子设备建立蓝牙连接,并进行蓝牙数据传输。蓝牙模块可支持一种或多种蓝牙协议,如经典蓝牙、BLE、BLE Audio等),但不限于此,可随着蓝牙协议的发展而变化。
本申请实施例还提供一种电子设备,包括存储器及处理器,该存储器中存储有计算机程序,计算机程序被该处理器执行时,使得处理器实现如上述各实施例描述的应用于音频输出设备的音频数据传输方法。
本申请实施例公开一种计算机可读存储介质,其存储计算机程序,其中,该计算机程序被处理器执行时实现如上述各实施例描述的应用于电子设备的音频数据传输方法。
本申请实施例公开一种计算机可读存储介质,其存储计算机程序,其中,该计算机程序被处理器执行时实现如上述各实施例描述的应用于音频输出设备的音频数据传输方法。
本申请实施例公开一种计算机程序产品,该计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,且该计算机程序可被处理器执行时实现如上述各实施例描述的应用于电子设备的音频数据传输方法。
本申请实施例公开一种计算机程序产品,该计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,且该计算机程序可被处理器执行时实现如上述各实施例描述的应用于音频输出设备的音频数据传输方法。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质 可为磁碟、光盘、ROM等。
如此处所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。合适的非易失性存储器可包括ROM、可编程ROM(Programmable ROM,PROM)、可擦除PROM(Erasable PROM,EPROM)、电可擦除PROM(Electrically Erasable PROM,EEPROM)或闪存。易失性存储器可包括随机存取存储器(random access memory,RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM可为多种形式,诸如静态RAM(Static RAM,SRAM)、动态RAM(Dynamic Random Access Memory,DRAM)、同步DRAM(synchronous DRAM,SDRAM)、双倍数据率SDRAM(Double Data Rate SDRAM,DDR SDRAM)、增强型SDRAM(Enhanced Synchronous DRAM,ESDRAM)、同步链路DRAM(Synchlink DRAM,SLDRAM)、存储器总线直接RAM(Rambus DRAM,RDRAM)及直接存储器总线动态RAM(Direct Rambus DRAM,DRDRAM)。
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定特征、结构或特性可以以任意适合的方式结合在一个或多个实施例中。本领域技术人员也应该知悉,说明书中所描述的实施例均属于可选实施例,所涉及的动作和模块并不一定是本申请所必须的。需要说明的,本申请中的“多个”包括“两个或两个以上”。
在本申请的各种实施例中,应理解,上述各过程的序号的大小并不意味着执行顺序的必然先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可位于一个地方,或者也可以分布到多个网络单元上。可根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。
另外,在本申请各实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上对本申请实施例公开的一种音频数据传输方法、装置、芯片、电子设备及存储介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想。同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (22)

  1. 一种音频数据传输方法,其特征在于,应用于电子设备,所述方法包括:
    将帧原始音频包封装成目标音频数据包,所述目标音频数据包包括所述帧原始音频包和通信协议的指示部;
    将所述目标音频数据包经由无线通信信道发送至音频输出设备;
    其中,所述通信协议的指示部用于指示所述目标音频数据包的数据格式符合所述通信协议。
  2. 根据权利要求1所述的方法,其特征在于,所述帧原始音频包内包括采用无损编码格式的原始音频数据。
  3. 根据权利要求2所述的方法,其特征在于,所述无损编码格式包括FLAC格式、APE格式、ALAC格式中的任一种。
  4. 根据权利要求1所述的方法,其特征在于,所述帧原始音频包包括包头及数据部,所述数据部包括原始音频数据;
    所述目标音频数据包包括存储于第一数据段的所述帧原始音频包的包头、存储于第二数据段的所述帧原始音频包的数据部,以及存储于第三数据段的通信协议的指示部。
  5. 根据权利要求4所述的方法,其特征在于,所述通信协议的指示部包括:
    所述通信协议的供应商标识符;
    所述通信协议的编码器标识符。
  6. 根据权利要求4所述的方法,其特征在于,所述目标音频数据包还包括时间序列值,所述时间序列值用于表征所述目标音频数据包对应的发送顺序。
  7. 根据权利要求4所述的方法,其特征在于,所述目标音频数据包还包括校验码,所述校验码用于验证所述目标音频数据包的完整性。
  8. 根据权利要求4所述的方法,其特征在于,所述方法还包括:将所述目标音频数据包配置成:
    使得所述第三数据段位于所述第一数据段和所述第二数据段之前。
  9. 根据权利要求1~8任一项所述的方法,其特征在于,所述无线通信信道包括蓝牙通信信道,所述蓝牙通信信道包括广播信道和/或数据信道。
  10. 一种芯片,其特征在于,包括处理器和通信模块,
    所述处理器配置成:将帧原始音频包封装成目标音频数据包,所述目标音频数据包包括所述帧原始音频包和通信协议的指示部;
    所述通信模块配置成:将所述目标音频数据包经由无线通信信道发送至音频输出设备;
    其中,所述通信协议的指示部用于指示所述目标音频数据包的数据格式符合所述通信协议。
  11. 一种音频数据传输方法,其特征在于,应用于音频输出设备,所述方法包括:
    经无线通信信道接收目标音频数据包,所述目标音频数据包包括帧原始音频包和通信协议的指示部;
    对所述目标音频数据包进行解包;
    其中,所述通信协议的指示部用于指示所述目标音频数据包的数据格式符合所述通信协议。
  12. 根据权利要求11所述的方法,其特征在于,所述对所述目标音频数据包进行解包,包括:
    从所述目标音频数据包的第三数据段提取所述通信协议的指示部。
  13. 根据权利要求12所述的方法,其特征在于,所述对所述目标音频数据包进行解包, 还包括:
    从所述目标音频数据包的第一数据段提取所述帧原始音频包的包头;
    从所述目标音频数据包的第二数据段提取所述帧原始音频包的数据部。
  14. 根据权利要求12所述的方法,其特征在于,所述目标音频数据包还包括时间序列值;
    所述方法还包括:
    根据从所述目标音频数据包中提取的所述时间序列值,确定所述目标音频数据包对应的发送顺序;
    按照所述目标音频数据包对应的发送顺序,对从所述目标音频数据包中提取的帧原始音频包进行处理,以播放处理得到的音频数据。
  15. 根据权利要求12所述的方法,其特征在于,所述目标音频数据包还包括校验码,所述方法还包括:
    根据从所述目标音频数据包中提取的所述校验码,验证所述目标音频数据包的完整性。
  16. 根据权利要求11所述的方法,其特征在于,所述方法还包括:
    对从所述目标音频数据包中提取的所述帧原始音频包进行PCM解码,得到PCM解码数据;
    对所述PCM解码数据进行数模转换,得到第一模拟数据;
    对所述第一模拟数据进行功率放大,得到第二模拟数据。
  17. 根据权利要求11~16任一项所述的方法,其特征在于,所述无线通信信道包括蓝牙通信信道,所述蓝牙通信信道包括广播信道和/或数据信道。
  18. 一种芯片,其特征在于,包括处理器和通信模块,
    所述通信模块配置成:经无线通信信道接收目标音频数据包,所述目标音频数据包包括帧原始音频包和通信协议的指示部;
    所述处理器配置成:对所述目标音频数据包进行解包;
    其中,所述通信协议的指示部用于指示所述目标音频数据包的数据格式符合所述通信协议。
  19. 一种音频数据传输装置,其特征在于,应用于电子设备,所述装置包括:
    编包模块,用于将帧原始音频包封装成目标音频数据包,所述目标音频数据包包括所述帧原始音频包和通信协议的指示部;
    发送模块,用于将所述目标音频数据包经由无线通信信道发送至音频输出设备;
    其中,所述通信协议的指示部用于指示所述目标音频数据包的数据格式符合所述通信协议。
  20. 一种音频数据传输装置,其特征在于,应用于音频输出设备,所述装置包括:
    接收模块,用于经无线通信信道接收目标音频数据包,所述目标音频数据包包括帧原始音频包和通信协议的指示部;
    解包模块,用于对所述目标音频数据包进行解包;
    其中,所述通信协议的指示部用于指示所述目标音频数据包的数据格式符合所述通信协议。
  21. 一种电子设备,其特征在于,包括存储器及处理器,所述存储器中存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器实现如权利要求1~9或11~17任一项所述的方法。
  22. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1~9或11~17任一项所述的方法。
PCT/CN2023/086766 2022-06-27 2023-04-07 音频数据传输方法、装置、芯片、电子设备及存储介质 WO2024001398A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210738048.7A CN115132213A (zh) 2022-06-27 2022-06-27 音频数据传输方法、装置、芯片、电子设备及存储介质
CN202210738048.7 2022-06-27

Publications (1)

Publication Number Publication Date
WO2024001398A1 true WO2024001398A1 (zh) 2024-01-04

Family

ID=83378989

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/086766 WO2024001398A1 (zh) 2022-06-27 2023-04-07 音频数据传输方法、装置、芯片、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN115132213A (zh)
WO (1) WO2024001398A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115132213A (zh) * 2022-06-27 2022-09-30 哲库科技(上海)有限公司 音频数据传输方法、装置、芯片、电子设备及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160125886A1 (en) * 2014-10-29 2016-05-05 Mediatek Inc. Audio data transmitting method and data transmitting system
CN109587497A (zh) * 2018-12-13 2019-04-05 广州虎牙信息科技有限公司 Flv流的音频数据传输方法、装置和系统
CN112887305A (zh) * 2021-01-25 2021-06-01 深圳市朗强科技有限公司 一种音频数据的发送、接收方法及设备
CN113242546A (zh) * 2021-06-25 2021-08-10 南京中感微电子有限公司 音频转发方法、设备和存储介质
CN113489567A (zh) * 2018-02-14 2021-10-08 华为技术有限公司 一种高速传输音频数据的方法和装置
CN114205336A (zh) * 2020-09-01 2022-03-18 华为技术有限公司 跨设备音频播放方法、移动终端、电子设备及存储介质
CN115132213A (zh) * 2022-06-27 2022-09-30 哲库科技(上海)有限公司 音频数据传输方法、装置、芯片、电子设备及存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160125886A1 (en) * 2014-10-29 2016-05-05 Mediatek Inc. Audio data transmitting method and data transmitting system
CN113489567A (zh) * 2018-02-14 2021-10-08 华为技术有限公司 一种高速传输音频数据的方法和装置
CN109587497A (zh) * 2018-12-13 2019-04-05 广州虎牙信息科技有限公司 Flv流的音频数据传输方法、装置和系统
CN114205336A (zh) * 2020-09-01 2022-03-18 华为技术有限公司 跨设备音频播放方法、移动终端、电子设备及存储介质
CN112887305A (zh) * 2021-01-25 2021-06-01 深圳市朗强科技有限公司 一种音频数据的发送、接收方法及设备
CN113242546A (zh) * 2021-06-25 2021-08-10 南京中感微电子有限公司 音频转发方法、设备和存储介质
CN115132213A (zh) * 2022-06-27 2022-09-30 哲库科技(上海)有限公司 音频数据传输方法、装置、芯片、电子设备及存储介质

Also Published As

Publication number Publication date
CN115132213A (zh) 2022-09-30

Similar Documents

Publication Publication Date Title
US11109138B2 (en) Data transmission method and system, and bluetooth headphone
WO2024016758A1 (zh) 音频数据传输方法、装置、芯片、电子设备及存储介质
KR102569374B1 (ko) 블루투스 장치 동작 방법
CN111294783B (zh) 音频数据传输的方法、装置、芯片和电子设备
TW200805901A (en) Method and system for optimized architecture for bluetooth streaming audio applications
WO2024001398A1 (zh) 音频数据传输方法、装置、芯片、电子设备及存储介质
WO2021223243A1 (zh) 音频数据传输的方法、装置、芯片和电子设备
WO2022151778A1 (zh) 音频数据的传输方法,电子设备及存储介质
CN113689864B (zh) 一种音频数据处理方法、装置及存储介质
CN110880949B (zh) 一种蓝牙通信方法、装置和系统
WO2024001405A1 (zh) 音频处理方法、装置、芯片、电子设备及存储介质
WO2024001447A1 (zh) 音频处理方法、芯片、装置、设备和计算机可读存储介质
WO2024001387A1 (zh) 数据编码方法、数据解码方法、装置、设备及介质
CN111385780A (zh) 一种蓝牙音频信号传输方法和装置
CN110662205B (zh) 一种基于蓝牙的音频传输方法、装置、介质和设备
CN109461451B (zh) 一种基于opus的语音传输方法和设备及系统
CN105188157A (zh) 音频播放方法及音频终端
KR102697310B1 (ko) 블루투스 장치 동작 방법
KR102673934B1 (ko) 데이터 교환을 통한 공간 오디오 모노럴화
EP4262229A1 (en) Wireless headphones and audio device
CN118351860A (zh) 通信方法和系统、音频设备及芯片
TW202315430A (zh) 用於產生立體聲語音效果的藍牙語音通信系統及相關的電腦程式產品
CN116092506A (zh) 通信方法和系统、音频设备及芯片
TW201730878A (zh) 利用簡訊通訊的通訊裝置及通訊系統及通訊方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23829588

Country of ref document: EP

Kind code of ref document: A1