Bluetooth earphone and sound box synchronous playing method and system supporting stereo synthesis

Through the synchronous playback method between Bluetooth headphones and speakers that supports stereo synthesis, digital sampling and high-low frequency separation, combined with Bluetooth 5.0 protocol and millisecond-level timestamp synchronization channel, the problem of clock drift and data processing capabilities in synchronous playback of multiple devices is solved. Efficient audio synchronization and output consistency are achieved.

CN119450304AInactive Publication Date: 2025-02-14SHENZHEN DACOM ELECTRONICS CO LTD

Patent Information

Application Number
CN202510039468.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-02-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing Bluetooth audio transmission solution has problems such as clock drift, inconsistent data transmission delay and different audio data processing capabilities during synchronous playback of multiple devices, resulting in sound delay and distortion, and lacks adaptive adjustment capabilities for network conditions, which are prone to audio intermittent and Miracle.

Method used

Using the synchronous playback method of Bluetooth headphones and speakers that supports stereo synthesis, through digital sampling and high-low frequency separation, combined with the device identification and connection mechanism of Bluetooth 5.0 protocol, a synchronization channel based on millisecond-level timestamp is established to perform device clock synchronization and audio parameters dynamics. Adjust to achieve accurate allocation and synchronous playback of high-frequency and low-frequency data.

Benefits of technology

It effectively solves the data synchronization problem between multiple devices, reduces the impact of network fluctuations on audio playback, realizes accurate clock synchronization between devices and consistency of audio output, and improves the overall playback effect of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119450304A_ABST
    Figure CN119450304A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of sound box synchronous playing, and discloses a Bluetooth earphone and sound box synchronous playing method and system supporting stereo synthesis, and the method comprises the steps: carrying out the digital sampling of an input audio signal, and obtaining high-frequency digital audio data and low-frequency digital audio data; performing scanning and stereo function identification on peripheral equipment based on a Bluetooth 5.0 protocol to obtain a target audio equipment list; distributing a main data buffer area and a standby data buffer area; distributing the high-frequency digital audio data to Bluetooth earphone equipment for transmission, distributing the low-frequency digital audio data to sound box equipment for transmission, and when detecting that clock drift among equipment exceeds a preset target value, adjusting a reading rate of a main data buffer area for clock synchronization to obtain an equipment synchronization state; and the signal gain and the equalization parameter of the equipment are dynamically adjusted, and the target synchronous playing audio is output, so that the accurate distribution of the high-frequency data and the low-frequency data is realized, and the overall playing effect of the system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of speaker synchronous playback, and in particular to a method and system for synchronous playback of a Bluetooth headset and a speaker supporting stereo synthesis. Background Art

[0002] With the popularity of smart audio devices, users have a growing demand for multi-device collaborative audio playback. Especially in home entertainment systems, users expect to get a better stereo listening experience through the combination of Bluetooth headphones and speakers. However, due to the inherent characteristics of the Bluetooth protocol and the hardware differences between devices, there are serious technical challenges in achieving multi-device synchronous playback.

[0003] In traditional Bluetooth audio transmission solutions, the problem of audio synchronization between multiple devices has not been effectively solved. It is mainly manifested in clock drift between devices, inconsistent data transmission delays, and differences in audio data processing capabilities. These factors lead to obvious sound delays and distortion when multiple devices are playing. These problems are particularly prominent in high-quality audio transmission scenarios. In addition, existing Bluetooth audio transmission solutions lack the ability to adaptively adjust to network conditions, and are prone to audio interruptions, noise, and other problems when network quality fluctuates. At the same time, differences in audio processing capabilities of different devices can also lead to inconsistent playback effects, affecting user experience. Summary of the invention

[0004] The present application provides a method and system for synchronous playback of Bluetooth headphones and speakers supporting stereo synthesis, thereby achieving accurate allocation of high-frequency data and low-frequency data and improving the overall playback effect of the system.

[0005] The first aspect of the present application provides a method for synchronously playing a Bluetooth headset and a speaker supporting stereo synthesis, and the method for synchronously playing a Bluetooth headset and a speaker supporting stereo synthesis comprises: Digitally sampling the input audio signal to obtain original digital audio data, and performing high-frequency and low-frequency separation to obtain high-frequency digital audio data and low-frequency digital audio data; Scan the peripheral devices and identify the stereo function based on the Bluetooth 5.0 protocol, obtain the target audio device list, establish a Bluetooth connection, and obtain the audio parameters of the target device; Allocate a main data buffer and a backup data buffer for each target audio device according to the target device audio parameters, establish a synchronization channel based on millisecond timestamps, and generate device synchronization control data; Allocate the high-frequency digital audio data to the Bluetooth headset device for transmission, and at the same time allocate the low-frequency digital audio data to the speaker device for transmission, and perform transmission control to obtain the device audio transmission status; The data processing delay of all devices is monitored based on the audio transmission status of the device, and when it is detected that the clock drift between devices exceeds a preset target value, the reading rate of the main data buffer is adjusted to perform clock synchronization to obtain the device synchronization status; The audio output parameters of each device are collected according to the device synchronization state, and the signal gain and equalization parameters of the device are dynamically adjusted to output the target synchronous playback audio.

[0006] A second aspect of the present application provides a Bluetooth headset and a speaker synchronous playback device supporting stereo synthesis, the Bluetooth headset and a speaker synchronous playback device supporting stereo synthesis comprising: The sampling module is used to digitally sample the input audio signal to obtain original digital audio data, and to separate the high frequency and low frequency to obtain high frequency digital audio data and low frequency digital audio data; The identification module is used to scan and identify the stereo function of peripheral devices based on the Bluetooth 5.0 protocol, obtain a list of target audio devices, establish a Bluetooth connection, and obtain audio parameters of the target devices; An allocation module, configured to allocate a primary data buffer and a backup data buffer to each target audio device according to the target device audio parameters, establish a synchronization channel based on millisecond timestamps, and generate device synchronization control data; A transmission module, used to distribute the high-frequency digital audio data to the Bluetooth headset device for transmission, and distribute the low-frequency digital audio data to the speaker device for transmission, and perform transmission control to obtain the device audio transmission status; A synchronization module, configured to monitor the data processing delay of all devices based on the audio transmission status of the device, and when it is detected that the clock drift between devices exceeds a preset target value, adjust the reading rate of the main data buffer to perform clock synchronization to obtain the device synchronization status; The output module is used to collect the audio output parameters of each device according to the device synchronization state, and dynamically adjust the signal gain and equalization parameters of the device to output the target synchronous playback audio.

[0007] The third aspect of the present application provides an electronic device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the electronic device executes the above-mentioned method for synchronous playback of Bluetooth headphones and speakers supporting stereo synthesis.

[0008] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned method for synchronous playback of Bluetooth headphones and speakers supporting stereo synthesis.

[0009] Compared with the prior art, the present application has the following beneficial effects: through high-precision digital sampling with a sampling rate of 96kHz and a bit depth of 24bit, combined with high and low frequency separation processing, the restoration degree and stereo effect of the audio signal are effectively improved; the device identification and connection mechanism based on the Bluetooth 5.0 protocol is adopted, and the stereo function screening is coordinated to ensure stable and reliable data transmission between devices; through the double buffer design of the main data buffer and the backup data buffer, combined with the millisecond timestamp synchronization mechanism, the data synchronization problem between multiple devices is effectively solved; based on the dynamic data packet distribution strategy and the redundant data supplement mechanism, the impact of network fluctuations on audio playback is significantly reduced; by real-time monitoring of device clock drift and dynamically adjusting the buffer reading rate, accurate clock synchronization between devices is achieved; a multi-level audio parameter dynamic adjustment mechanism is adopted, including signal gain control and equalization parameter optimization, to ensure the consistency of audio output between different devices; through device grouping and data distribution optimization, the precise allocation of high-frequency data and low-frequency data is achieved, and the overall playback effect of the system is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0011] The structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with this technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantive technical significance. Any structural modification, change in proportion or adjustment of size, without affecting the effects and purposes that can be achieved by the present invention, should still fall within the scope of the technical contents disclosed by the present invention.

[0012] Figure 1 It is a flow chart of a method for synchronously playing a Bluetooth headset and a speaker supporting stereo synthesis provided by an embodiment of the present invention; Figure 2 It is a schematic block diagram of the structure of a Bluetooth headset and speaker synchronous playback device supporting stereo synthesis provided by an embodiment of the present invention; Figure 3 It is a schematic block diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0013] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0014] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0015] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0016] It should be further understood that the term "and / or" used in the specification and appended claims of this application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations. Figure 1 In the embodiment of the present application, an embodiment of a method for synchronously playing a Bluetooth headset and a speaker supporting stereo synthesis includes: Step 100: digitally sample the input audio signal to obtain original digital audio data, and separate the high frequency and low frequency to obtain high frequency digital audio data and low frequency digital audio data; It is understandable that the execution subject of the present application can be a Bluetooth headset and speaker synchronous playback device supporting stereo synthesis, or a terminal or a server, which is not limited here. The present application embodiment takes the server as the execution subject as an example for explanation.

[0017] Specifically, the input audio signal is digitized at a sampling rate of 96kHz and a bit depth of 24bit. The high sampling rate and high bit depth ensure the high fidelity and detail retention of the audio signal. The sampling rate of 96kHz far exceeds the upper frequency limit of 20kHz for human hearing, so that more spectrum information can be captured and the detail expression of the audio can be improved. The bit depth of 24bit provides a higher dynamic range, ensuring that the audio has sufficient delicacy in both quiet and loud parts. This process converts the analog signal into a digital signal to obtain a first digitized audio sequence. A time base is set for the first digitized audio sequence, and a timestamp is marked. Time information is added to each sampling point to obtain a second digitized audio sequence. The setting of the time base can avoid audio delay or misalignment caused by timing differences, and the timestamp can help adjust and calibrate the delay during transmission. The second digitized audio sequence is frequency filtered according to the preset high-frequency and low-frequency thresholds to obtain a high-frequency audio sequence and a low-frequency audio sequence respectively. A digital filter is used to achieve frequency separation. A high-pass filter is used to separate the high frequency of the audio sequence, remove the low-frequency components, and only retain the high-frequency signals that exceed the set threshold to obtain a high-frequency audio sequence; similarly, a low-pass filter is used to separate the low frequency of the audio sequence, remove the frequency components that are higher than the set threshold, and only retain the low-frequency signals to obtain a low-frequency audio sequence. The audio signal is divided into content suitable for playback on different devices according to the frequency band. Usually, the high-frequency part is more suitable for transmission and playback by Bluetooth headphones, while the low-frequency part is suitable for output through speakers. Speakers often have better low-frequency performance capabilities, thereby making full use of the physical characteristics of different devices and improving the overall auditory experience. The signal amplitude is normalized and the frequency response is compensated for the high-frequency and low-frequency audio sequences. The purpose of signal amplitude normalization is to standardize the amplitude of the audio signal so that different devices can keep the same volume when playing the same audio, avoiding volume imbalance caused by power differences or other hardware reasons between devices. Normalization processing adjusts the signal to a predetermined amplitude range through an algorithm based on the amplitude dynamic range of the audio to ensure that the audio output on each device has consistent loudness performance, effectively avoiding audio distortion or uneven volume caused by signal amplitude differences. Frequency response compensation is performed on the signal to overcome the differences in frequency response characteristics between devices. Bluetooth headsets and speakers have significant differences in physical structure and sound units, resulting in different response characteristics to audio signals of different frequencies. Through frequency response compensation, the audio signal is pre-processed so that it can restore the original sound characteristics as much as possible when it is played. For example, by adjusting the gain in a specific frequency band of the signal to compensate for the shortcomings of Bluetooth headsets in certain frequencies, or by attenuating the excessive frequency enhancement of the speaker, the final output audio is balanced and natural in subjective perception.After signal amplitude normalization and frequency response compensation, the high-frequency audio sequence is processed into high-frequency digital audio data, and the low-frequency audio sequence is processed into low-frequency digital audio data.

[0018] Step 200: Scan the peripheral devices and identify the stereo function based on the Bluetooth 5.0 protocol, obtain a list of target audio devices, establish a Bluetooth connection, and obtain audio parameters of the target devices; Specifically, based on the Bluetooth 5.0 protocol, the device broadcast mode is started to scan the signals of the surrounding Bluetooth devices. In the Bluetooth broadcast mode, the device actively sends broadcast signals to ensure that other Bluetooth devices can discover and establish connections. In this process, the system can identify the surrounding Bluetooth devices and obtain a list of basic information of the devices, including device name, device category, MAC address, and Bluetooth signal strength. By extracting the MAC address and Bluetooth signal strength in the basic information of the device, the characteristic data of each device is obtained. The MAC address is the unique identifier of the device, which is used to ensure the uniqueness of the device and the certainty of the connection; while the signal strength is used to measure the physical distance of the device, helping the system to determine which devices are more suitable for connection. Devices with a closer distance can reduce signal delay and interference. The stereo function of the device is identified according to the device characteristic data. Devices with stereo synthesis capabilities are screened out to form a list of candidate devices. The stereo function identification process is determined by the Bluetooth protocol version supported by the device, the device type and other attributes. For example, only Bluetooth headphones and speakers with certain audio processing capabilities and supporting stereo functions can be selected as candidate devices. Devices that do not have stereo playback capabilities, such as mono Bluetooth devices or low-version Bluetooth devices, will be excluded from the candidate list. Detect the audio processing capabilities of the devices in the candidate device list. Obtain the audio codec format and sampling rate range parameters supported by each device to form device capability data. These parameters determine the sound quality and delay performance of the device when playing audio. For example, high-quality Bluetooth headsets support high-resolution audio codec formats (such as aptX, LDAC), while some speakers only support the basic SBC format. According to the device's codec format and sampling rate range, configure the most suitable audio processing solution for each device in the subsequent steps to ensure that the sound quality and delay during synchronous playback are well balanced. Classify the devices according to the device capability data, divide the devices into Bluetooth headset groups and speaker groups, and form a grouped device list. Apply different audio signal processing strategies to different types of devices to optimize the final auditory experience. For example, the Bluetooth headset group is used to play high-frequency audio content, while the speaker group is suitable for playing low-frequency content. Send a connection request instruction to the device in the grouped device list, establish a Bluetooth data transmission channel, and obtain connection status data. The establishment of a Bluetooth connection requires both parties to confirm the connection request, and go through encryption authentication and other steps to ensure the security and reliability of the connection. During this process, the system continuously monitors the connection status data to ensure that each device is successfully connected and ready to receive audio data. Device identifiers are assigned to connected devices based on the connection status data, and corresponding audio processing configuration parameters are set according to the characteristics of each device. The allocation of device identifiers ensures that each device is uniquely identified in subsequent audio data transmission and synchronization control to avoid confusion.The audio processing configuration parameters include volume gain, equalization adjustment, codec settings, etc. The purpose of configuring these parameters is to optimize the audio output effect of the device and ensure that all devices perform at their best when playing audio. Perform device compatibility verification on the target device audio parameters. Compatibility verification includes checking whether the device supports the codec format, whether the connection stability meets the requirements, etc. Only devices that pass the compatibility verification can be added to the final target audio device list.

[0019] Step 300: Allocate a main data buffer and a backup data buffer for each target audio device according to the target device audio parameters, establish a synchronization channel based on millisecond timestamps, and generate device synchronization control data; It should be noted that the codec format and sampling rate range in the audio parameters of the target device are processed to obtain the buffer requirement data of each device. The audio codec format and sampling rate directly determine the flow size, transmission rate and processing capacity of the audio data, so as to determine the data buffer capacity required by each device according to the hardware characteristics and processing capacity of different devices. Based on the buffer requirement data, the capacity of the main data buffer is allocated for each device to obtain the configuration data of the main buffer. The main data buffer is the main data storage area of ​​the device when playing audio, and its size directly affects the continuity and smoothness of audio playback. In the configuration of the main buffer, factors such as the fluctuation of the audio data stream and the network interference encountered by the device are considered to ensure that the buffer has sufficient capacity to cope with instantaneous data transmission interruption. Based on the buffer requirement data, the capacity of the backup data buffer is allocated for each device to obtain the configuration data of the backup buffer. As a supplement to the main buffer, when the data in the main buffer is insufficient or fluctuates, the data in the backup buffer is quickly enabled to ensure the continuity of audio playback. Through the reasonable configuration of the main buffer and the backup buffer, the system can maintain stable transmission of audio data in a complex network environment, effectively avoiding audio jams and playback interruptions caused by Bluetooth signal interference or device performance limitations. After completing the capacity allocation of the buffer, the data volume in the main buffer configuration data is monitored by the threshold setting. When the data volume in the buffer is lower than the set threshold, the data supplement mechanism is triggered to obtain the control parameters of the buffer. The purpose of the data supplement mechanism is to fill the buffer with new audio data in a timely manner to avoid audio playback interruption. Through a dynamic supplement mechanism, the buffer status of each device is monitored, and the data volume is supplemented in time when the data volume is insufficient to maintain the smooth flow of audio data. In addition, the control parameters are used to adjust the rate and frequency of data supplementation to adapt to different network conditions and device performance. According to the buffer control parameters, a timestamp system is established to time-stamp the transmitted data packets to obtain a data packet timestamp sequence. A synchronous communication channel between devices is established for the data packet timestamp sequence, and the transmission priority is set for the data packet to obtain the configuration data of the synchronous channel to ensure that audio data can be transmitted first during the transmission process to avoid the loss or delay of audio data packets due to network congestion. Based on the configuration data of the synchronization channel, a clock synchronization mechanism is established between devices to obtain clock synchronization data. In the synchronous audio playback of multiple devices, the clock difference between different devices is one of the main reasons for audio asynchrony. The clock synchronization mechanism continuously calibrates the time difference between devices so that the clocks of all devices are always kept on the same reference to achieve synchronous audio playback. By collecting and analyzing the clock synchronization data, the clock of each device is dynamically adjusted to keep it consistent with the global reference clock. The device synchronization control data is generated according to the clock synchronization data.Synchronous control data is used to guide each device on how to acquire data, manage buffers, and output audio data during playback. Synchronous control ensures that the Bluetooth headset and speakers start playing the same audio at the same time, and can be dynamically adjusted according to the real-time network status and device playback status to ensure the stability and consistency of audio playback.

[0020] Step 400: Allocate high-frequency digital audio data to the Bluetooth headset device for transmission, and allocate low-frequency digital audio data to the speaker device for transmission, and perform transmission control to obtain the device audio transmission status; Specifically, high-frequency digital audio data and low-frequency digital audio data are divided into packets to obtain an audio data packet sequence. The audio data packet sequence is prioritized by using device synchronization control data to obtain a data packet transmission queue. The high-frequency digital audio data is distributed to the Bluetooth headset device according to the packet transmission queue to form a data stream for headset transmission. Similarly, based on the packet transmission queue, the low-frequency digital audio data is distributed to the speaker device to obtain a transmission data stream for the speaker. Through this allocation strategy, the high-frequency part of the audio data is preferentially transmitted to the headset device, because the headset device has a better frequency response range to process high-frequency signals with rich details, while the low-frequency part is transmitted to the speaker device, and the overall audio expression is enhanced by using the speaker's advantage in low frequency. In the process of audio data distribution, the stability and integrity of the headset transmission data stream and the speaker transmission data stream are monitored. Packet loss detection is performed on the headset transmission data stream and the speaker transmission data stream to identify the packet loss caused by interference, signal attenuation, etc. during the transmission process, and these lost packets are recorded. Through the packet loss record, the corresponding redundant data packets are extracted from the spare data buffer, and the data is supplemented to obtain a supplementary data packet sequence. Insert the supplementary data packet sequence into the transmission data stream of the corresponding device, and reorder the data packets of the entire data stream to obtain a complete transmission sequence. At the same time, perform statistical analysis on the data transmission rate and data packet arrival time of each device to ultimately obtain the transmission status of the device audio. Statistical analysis can provide the system with detailed information on the delay, packet loss rate, and data stream fluctuations in the transmission process, helping the system to better adjust and optimize in real time.

[0021] Step 500: Monitor the data processing delay of all devices based on the device audio transmission status. When it is detected that the clock drift between devices exceeds the preset target value, adjust the reading rate of the main data buffer to perform clock synchronization to obtain the device synchronization status; Specifically, the arrival timestamp of the data packet in the audio transmission state of the device is parsed to obtain the time difference data of the device. By recording and comparing the arrival time of each data packet on different devices, the time difference between the devices is identified to form the time difference data of the device. A time deviation matrix is ​​constructed based on the device time difference data, and the time deviation between the devices is calculated to obtain the time deviation data. The time deviation of each device relative to other devices is measured in a systematic way, and the matrix reflects the synchronization status between all devices. By calculating the time deviation, it is determined whether there is a significant time difference between the devices. If so, further measures are taken to adjust it. The time deviation data is threshold judged. When it is detected that the time deviation value exceeds the preset target value, a clock drift mark is generated to indicate which devices need to adjust the clock. Only when the time deviation between the devices exceeds the allowable range will the system take corrective measures to ensure the efficiency of synchronization control and the rational use of resources. The reading rate compensation value of each device is calculated according to the clock drift mark to perform effective clock synchronization. During the calculation process, a rate adjustment matrix is ​​generated and rate compensation data is obtained. The rate compensation data effectively eliminates the time difference between devices by adjusting the reading rate of the main data buffer of each device to achieve the purpose of synchronization. Based on the rate compensation data, the read rate of the main data buffer of each device is adjusted to obtain the adjusted read configuration parameters. In the process of adjusting the read rate, factors such as the hardware performance, network conditions, and transmission load of each device are considered to ensure that the adjustment of the read rate does not negatively affect the quality of audio playback. The read rate adjustment aims to fine-tune the playback time between devices to keep them consistent by changing the speed at which each device extracts audio data from the buffer. The adjusted read configuration parameters are strictly verified to ensure that the adjustment effect is as expected and no new delays or playback issues are introduced. While performing the verification process, all adjustment results are recorded to form rate adjustment result data. Based on the rate adjustment result data, the new time deviation between devices is calculated to evaluate the synchronization effect and obtain synchronization evaluation data. According to the synchronization evaluation data, the clock synchronization status of each device is dynamically updated to generate the final synchronization status of the device.

[0022] Step 600: collect audio output parameters of each device according to the device synchronization state, dynamically adjust the signal gain and equalization parameters of the device, and output the target synchronous playback audio.

[0023] Specifically, the audio output of each device is sampled and detected according to the device synchronization state, and various parameters including audio loudness, channel balance and frequency response are collected to obtain the output characteristic data of the device. The audio loudness parameter is used to measure the perceived intensity of the volume, the channel balance reflects the output balance of the left and right channels, and the frequency response describes the amplification or attenuation characteristics of the device on each frequency band. The energy distribution of each frequency band in the device output characteristic data is calculated to obtain the frequency response compensation parameter, which reflects the energy distribution of the device in different frequency bands. By analyzing these data, it is identified whether there is insufficient energy or excessive enhancement in certain frequency bands, so as to correct the frequency response characteristics of the device, so that the device can be closer to the spectrum characteristics of the original audio when playing audio. The calculation of frequency response compensation needs to be combined with the hardware characteristics of each device and the playback environment to ensure that the compensation result can effectively improve the balance and naturalness of the audio. The audio signal is processed by a digital equalizer based on the frequency response compensation parameters. The digital equalizer changes the energy distribution of the audio signal in each frequency band by adjusting the gain coefficient of different frequency bands, thereby realizing the correction and balance of the audio signal. The gain coefficient of each frequency band is adjusted according to the frequency response compensation parameter to ensure a good frequency response during playback and obtain the equalization calibration data. The equalizer processing is to make up for the shortcomings of the device in hardware design or to adapt to the special requirements of the playback environment so that the audio performance is closer to the ideal state. Based on the equalization calibration data, the dynamic range of the audio output gain of the device is controlled to obtain the gain control parameter. The dynamic range control makes the volume change between the quiet and loud parts of the audio more natural while avoiding excessive dynamic fluctuations. When the gain is controlled, the gain control parameter is calculated to adjust the volume level of the audio output to keep it within a reasonable range so as not to cause distortion or sound quality degradation under the boundary conditions of the device performance. Feedback compensation calculation is performed on the gain control parameter to obtain the dynamic gain coefficient, so that the system can continuously adjust the gain according to the real-time audio content to achieve adaptive adjustment for different dynamic environments. Based on the dynamic gain coefficient, the audio signal is segmented and compressed. When the dynamic change of the audio signal is large, the amplitude of the signal can be compressed to avoid the discomfort of the user caused by the sudden volume change, and the compressed processing data is obtained. The audio output clipping threshold is set based on the compressed data, and the signal exceeding the threshold is clipped to obtain the clipping control data. The clipping control data is input into the audio output buffer of the device, and the output control of synchronous playback is performed to obtain the target synchronous playback audio. The output buffer is used to store the audio data to be output to ensure that the data can be kept smooth and synchronous during Bluetooth transmission and playback. Synchronous playback output control ensures that the Bluetooth headset and speakers play audio at the same time reference to avoid audio asynchrony between different devices.By precisely controlling the output buffers of each device, synchronous playback between multiple audio devices is achieved, ultimately outputting high-quality, stereo synthesized audio.

[0024] In the embodiment of the present application, high-precision digital sampling with a sampling rate of 96kHz and a bit depth of 24bit is combined with high- and low-frequency separation processing to effectively improve the restoration degree and stereo effect of the audio signal; a device identification and connection mechanism based on the Bluetooth 5.0 protocol is adopted, combined with stereo function screening, to ensure stable and reliable data transmission between devices; a double buffer design of the main data buffer and the backup data buffer, combined with a millisecond timestamp synchronization mechanism, effectively solves the data synchronization problem between multiple devices; based on a dynamic data packet distribution strategy and a redundant data supplement mechanism, the impact of network fluctuations on audio playback is significantly reduced; accurate clock synchronization between devices is achieved by real-time monitoring of device clock drift and dynamically adjusting the buffer reading rate; a multi-level audio parameter dynamic adjustment mechanism is adopted, including signal gain control and equalization parameter optimization, to ensure the consistency of audio output between different devices; through device grouping and data distribution optimization, accurate allocation of high-frequency data and low-frequency data is achieved, thereby improving the overall playback effect of the system.

[0025] In a specific embodiment, the process of executing step 100 may specifically include the following steps: Performing digital processing on the input audio signal at a sampling rate of 96 kHz and a bit depth of 24 bits to obtain a first digital audio sequence; Setting a time reference for the first digitized audio sequence and performing a time stamp to obtain a second digitized audio sequence; Performing frequency filtering on the second digitized audio sequence according to a preset high-frequency threshold to obtain a high-frequency audio sequence, and performing frequency filtering on the second digitized audio sequence according to a preset low-frequency threshold to obtain a low-frequency audio sequence; The high-frequency audio sequence is subjected to signal amplitude normalization and frequency response compensation to obtain high-frequency digital audio data, and the low-frequency audio sequence is subjected to signal amplitude normalization and frequency response compensation to obtain low-frequency digital audio data.

[0026] Specifically, the input audio signal is digitized at a sampling rate of 96kHz and a bit depth of 24bit to obtain a first digitized audio sequence. In the audio sampling process, a sampling rate of 96kHz means 96,000 samples per second, which is higher than the highest frequency range that the human ear can perceive (about 20kHz). It can ensure high fidelity of the audio signal and is suitable for capturing delicate details of the high-frequency part. At the same time, the bit depth of 24bit provides quantization levels, making the dynamic range very wide, covering from extremely quiet audio signals to extremely loud audio signals, maintaining its realism and delicacy. In this process, the input audio signal undergoes analog-to-digital conversion to generate high-resolution digital audio data, that is, the first digitized audio sequence, represented as a discrete time series: ; in, Indicates The audio signal value of sampling points, is the sampling period, which is equal to the sampling rate The reciprocal of . , ensuring that the spectrum of the audio signal can cover details from low frequency to high frequency. The time base is set and timestamped to obtain the second digitized audio sequence. The timestamp is achieved by adding an accurate time information to each sampling point, which is expressed as: ; in, Represents a sequence containing audio data and time information, corresponds to the sampling point The timestamp of . According to the preset high-frequency and low-frequency thresholds, the second digitized audio sequence is frequency filtered to obtain a high-frequency audio sequence and a low-frequency audio sequence respectively. A high-pass filter and a low-pass filter are used to extract the high-frequency and low-frequency parts respectively. Assume that the preset high-frequency threshold is , the low frequency threshold is , through a high pass filter and low pass filter Get high-frequency and low-frequency audio sequences respectively: ; ; in, represents a high-frequency audio sequence, and Represents a low-frequency audio sequence. Through these filtering operations, the audio signal is divided into two frequency bands. The high-frequency part contains more details, such as the treble part of the instrument, delicate sound quality information, etc., while the low-frequency part is usually drum beats, bass and other information. After completing the frequency separation, the high-frequency and low-frequency audio sequences are normalized and the frequency response is compensated to obtain high-frequency and low-frequency digital audio data respectively. The purpose of signal amplitude normalization is to adjust the amplitude of the signal to a standard range to ensure that the volume remains consistent when played on different devices. Assuming that the normalized amplitude range is set to [-1,1], the normalization process is expressed as: ; ; in, and Respectively represent the normalized high-frequency and low-frequency audio sequences. Normalization is achieved by dividing by the maximum absolute value of the signal so that the amplitude of the signal is between [-1,1] to avoid distortion when the device processes high-level signals. Perform frequency response compensation to make up for the insufficient frequency response characteristics of the device during playback. Since different devices have different response characteristics to different frequencies, for example, some Bluetooth headsets have attenuation in the high-frequency part, while speakers have enhancement in the low-frequency part, so frequency response compensation is required for these devices. Through a digital equalizer, different gains are applied to different frequency bands of the signal. , making the overall frequency response of the device flatter. The compensation process is expressed as: ; ; in, and Respectively represent the compensated high-frequency and low-frequency audio data, and are the gain functions for high and low frequencies respectively, and is a specific gain value, which is set according to the characteristics of the device. For example, if the Bluetooth headset has obvious attenuation in the high frequency part, It is used to increase the energy of high-frequency signals to compensate for this attenuation; similarly, if the speaker has excessive enhancement in the low-frequency part, It is used to appropriately reduce the gain of low frequency. Through signal amplitude normalization and frequency response compensation processing, high-frequency and low-frequency digital audio data are obtained.

[0027] In a specific embodiment, the process of executing step 200 may specifically include the following steps: Start the device broadcast mode based on the Bluetooth 5.0 protocol, scan the signals of surrounding Bluetooth devices, obtain a list of basic device information, and extract the MAC address and Bluetooth signal strength from the list of basic device information to obtain device feature data; According to the device feature data, stereo function identification is performed on the device, and devices with stereo synthesis capability are screened out to obtain a list of candidate devices; Perform audio processing capability detection on the devices in the candidate device list, obtain supported audio codec formats and sampling rate range parameters, and obtain device capability data; Classify the devices according to their capability data, and divide the devices into a Bluetooth headset group and a speaker group, to obtain a grouped device list; Send a connection request command to the device in the grouped device list, establish a Bluetooth data transmission channel, and obtain connection status data; According to the connection status data, a device identifier is assigned to the connected device, audio processing configuration parameters are set, target device audio parameters are obtained, device compatibility verification is performed on the target device audio parameters, and a target audio device list is generated.

[0028] Specifically, based on the Bluetooth 5.0 protocol, the device broadcast mode is started to scan the signals of surrounding Bluetooth devices to obtain a list of basic information of each device. The device broadcast mode is an active signal sending mechanism. The device will periodically send broadcast data packets to the surrounding area to detect surrounding Bluetooth devices through broadcast data packets. Based on the Bluetooth 5.0 protocol, these data packets contain basic information of the device, such as the device name, type, MAC address and Bluetooth signal strength (RSSI). By scanning these signal packets, the basic information of all surrounding Bluetooth devices is extracted, and a list of basic device information is constructed, including the MAC address (Media Access Control address, which uniquely identifies the device) and signal strength of each device. , Indicates The basic information list of the device is further processed to extract the MAC address and Bluetooth signal strength of the device, and obtain the characteristic data of the device, so as to distinguish and locate the surrounding devices and the signal strength. Reflects the distance between the device and the current device, estimated by the following formula: ; in, Indicates the device The distance from the current device, is the signal strength at the reference distance. The calculated distance is used to identify which devices are closer and more suitable for subsequent audio playback synchronization. The stereo function of the device is identified based on the device feature data, and devices with stereo synthesis capabilities are screened out to obtain a list of candidate devices. Determine whether the device supports the stereo function by analyzing the device's protocol version, device type and other features. For example, the Bluetooth 5.0 protocol supports more efficient data transmission and stereo playback. By checking the device's protocol version and functional characteristics, the system can screen out devices with stereo playback capabilities to form a list of candidate devices. Perform audio processing capability detection on the devices in the candidate device list to obtain the audio codec format and sampling rate range parameters supported by each device to obtain the device's capability data. The audio codec format is a key factor in determining the quality and efficiency of audio transmission. Different devices support different formats, such as SBC, AAC, aptX, LDAC, etc., and the sampling rate determines the details and fidelity of the audio. Detect the codec format and sampling rate range supported by each device one by one , and evaluates whether it meets the requirements for stereo synchronous playback based on the formats and sampling rate ranges supported by the device. For example, if the device The supported sampling rates are kHz, and the supported codec formats are SBC, AAC , it is necessary to confirm whether the device can work with other devices according to the requirements of the entire synchronous playback system. Based on the device capability data, the candidate devices are classified and processed, and the devices are divided into Bluetooth headset groups and speaker groups to obtain a grouped device list. The classification criteria are based on the hardware characteristics of the device and its playback capabilities. For example, Bluetooth headsets have good high-frequency response characteristics and are suitable for playing audio data containing more high-frequency components, while speakers have good low-frequency response and are suitable for playing low-frequency signals such as drums and bass. For headset group equipment collection, It is a collection of speaker group devices, and the classification is expressed as follows: Speakers ; in, Indicates the device The category information of the Bluetooth connection is obtained by classifying different devices according to their hardware characteristics for the purpose of subsequent audio signal distribution and synchronization control. After the device is grouped, a connection request instruction is sent to each device in the grouped device list to establish a Bluetooth data transmission channel and obtain connection status data. The Bluetooth connection establishment process includes a handshake protocol between devices, and the security and reliability of transmission are ensured through identity authentication and encryption mechanisms. For equipment The connection status, if , it means that the device has been successfully connected. These connection status data are summarized to confirm which devices are ready for data transmission. When establishing a Bluetooth data transmission channel, the device identifier is assigned to the connected device according to the connection status data, and the corresponding audio processing configuration parameters are set according to the audio processing capability of the device to obtain the audio parameters of the target device. For equipment By assigning an identifier to each device, each device can be uniquely identified and controlled during subsequent data transmission and playback. Set its audio processing configuration parameters, such as selecting the audio codec format and sampling rate suitable for the device to ensure the audio playback quality and synchronization effect. Perform device compatibility verification on the audio parameters of the target device to generate a target audio device list to ensure that all devices can work together in the same synchronous playback environment. The audio codec format, sampling rate, transmission delay and other parameters of each device must be compatible. For example, if the sampling rate range of some devices does not match that of other devices, or some devices cannot support stereo playback, these devices will be excluded from the final target device list. is the final target device list, then Only devices that have been verified for compatibility are included: Compatibility verification passed ; Through the above steps, a target audio device list for stereo synthesis playback is finally obtained.

[0029] In a specific embodiment, the process of executing step 300 may specifically include the following steps: Perform data processing on the codec format and sampling rate range in the target device audio parameters to obtain the buffer requirement data of each device; Allocating the capacity of a primary data buffer to each device based on the buffer demand data to obtain primary buffer configuration data, and allocating the capacity of a backup data buffer to each device based on the buffer demand data to obtain backup buffer configuration data; A monitoring threshold is set for the data volume in the main buffer configuration data. When the data volume in the buffer is lower than the threshold, a data replenishment mechanism is triggered to obtain a buffer control parameter. A timestamp system is established according to the buffer control parameters, a data packet is time-stamped, a data packet timestamp sequence is obtained, a synchronous communication channel between devices is established for the data packet timestamp sequence, a data packet transmission priority is set, and synchronous channel configuration data is obtained; Based on the synchronization channel configuration data, a clock synchronization mechanism is established between devices to obtain clock synchronization data, and device synchronization control data is generated according to the clock synchronization data.

[0030] Specifically, the audio codec format and sampling rate supported by each device are analyzed to calculate the buffer requirement data of each device. The sampling rate is (in Hz), and the bit depth of each sample is (unit: bit), the compression ratio required by the codec format is , the audio data transmission duration is (in seconds), the amount of data required by the buffer It is expressed as: ; in, Indicates the device The required buffer capacity (in bits) is determined by the sampling rate, bit depth, compression ratio, and transmission time. The buffer requirement data for each device is obtained by calculating the audio codec format and sampling rate of each device. These requirement data determine the subsequent buffer capacity configuration to ensure that the audio data can maintain sufficient continuity and stability during playback, and avoid audio interruption or freeze due to insufficient buffer. Based on the buffer requirement data, the capacity of the main data buffer is allocated to each device to obtain the configuration data of the main buffer. The capacity of the main data buffer needs to ensure that the device can play audio smoothly under normal circumstances. Its capacity Set to be able to cache audio data for at least a certain length. For example, the capacity of the main buffer is set to: ; in, is a coefficient greater than 1, which is used to increase the redundancy of the buffer to ensure that the device can continue to play when there is a brief fluctuation in audio transmission. At the same time, a backup data buffer is allocated to each device based on the buffer demand data to obtain the configuration data of the backup buffer. The backup data buffer is used to provide redundancy when the main buffer is insufficient to ensure the continuity of audio playback. The capacity of the backup buffer is set as: ; in, Usually less than The capacity of the backup buffer does not need to be as large as the primary buffer, but it should be sufficient to cope with data shortage in the primary buffer under special circumstances. A monitoring threshold is set for the data volume in the primary buffer configuration data so that when the data volume is below a certain preset threshold, the backup buffer is The data replenishment mechanism is triggered when the buffer is low, and the control parameters of the buffer are obtained. The threshold is set to ensure that when the amount of data in the buffer is low, the system can replenish data in time to avoid playback interruption. The monitoring threshold is set to a certain proportion of the main buffer capacity: ; When the monitoring threshold is triggered, a timestamp system is established according to the buffer control parameters to time-stamp the data packets to be transmitted and obtain the data packet timestamp sequence. The data packet sequence is , then for each data packet Perform timestamp marking and get: ; in, Represents the audio data in the data packet, Indicates the timestamp of the data packet. is the sampling period. The addition of timestamps ensures that each data packet can arrive and play at the correct time during the audio synchronization between devices. After obtaining the data packet timestamp sequence, establish a synchronous communication channel between devices, set the priority of data packet transmission, and obtain the configuration data of the synchronous channel. With equipment The synchronization channel between , then the establishment of the synchronization channel includes adjusting the time deviation of each device to ensure that the time between all devices is consistent. The setting of data packet transmission priority is used to prioritize the transmission of key audio data when network resources are limited, reducing data packet loss and delay caused by insufficient bandwidth. Based on the synchronization channel configuration data, a clock synchronization mechanism is established between devices to obtain clock synchronization data, thereby eliminating the time deviation between devices and ensuring that different devices play the same audio data at the same time point. Set the device and equipment The time difference is , the clock synchronization mechanism is used to adjust the clocks of each device so that: ; In actual implementation, clock synchronization is achieved by fine-tuning the buffer read rate of each device. For example, if a device is detected Relative to device If the time deviation is positive, the device buffer read rate, or slightly increase the device The reading rate of the device is adjusted to eliminate this deviation. The synchronization control data of the device is generated based on the clock synchronization data. The synchronization control data is used to instruct each device how to read, transmit and output data during playback to ensure that all devices can maintain a highly consistent playback state. For example, if the device The synchronization control parameters are The parameter includes the read rate adjustment factor , Timestamp offset correction value Etc., to guide the device to adjust the clock in real time.

[0031] In a specific embodiment, the process of executing step 400 may specifically include the following steps: Segment the high-frequency digital audio data and the low-frequency digital audio data into data packets to obtain an audio data packet sequence, and prioritize the audio data packet sequence based on the device synchronization control data to obtain a data packet transmission queue; According to the data packet transmission queue, the high-frequency digital audio data is distributed to the Bluetooth headset device to obtain the headset transmission data stream, and according to the data packet transmission queue, the low-frequency digital audio data is distributed to the speaker device to obtain the speaker transmission data stream; Performing data packet loss detection on the headphone transmission data stream and the speaker transmission data stream to obtain a data packet loss record, and extracting corresponding redundant data packets from the spare data buffer based on the data packet loss record, performing data supplementation, and obtaining a supplementary data packet sequence; Insert the supplementary data packet sequence into the transmission data stream of the corresponding device, reorder the data packets to obtain a complete transmission sequence, and perform statistical analysis on the data transmission rate and data packet arrival time of each device in the complete transmission sequence to obtain the device audio transmission status.

[0032] Specifically, the high-frequency digital audio data and the low-frequency digital audio data are divided into data packets to obtain an audio data packet sequence. Assume that the high-frequency audio data is and the low frequency audio data is , Represents discrete time sampling points. Divide the audio data into multiple data packets, and set the length of each data packet to Sampling points, get the high-frequency and low-frequency audio data packet sequence: ; ; in, and Respectively represent high-frequency and low-frequency packets, each containing Sampling points. Dividing the audio data into a series of small data packets makes Bluetooth transmission more flexible and helps with prioritization and packet management during transmission. These data packet sequences are prioritized based on the device's synchronization control data to obtain a packet transmission queue. The device synchronization control data is used to indicate the importance of each data packet during transmission. Assume that high-frequency packets have a higher priority because the high-frequency part often contains more detailed information, such as the clarity of speech and the delicate parts of musical instruments, while the low-frequency part has a more lasting and stable impact on the sound quality, so it is played with a slight delay. Assign a priority to each data packet and , making high-frequency packets the priority Based on these priorities, all packets are sorted to generate a packet transmission queue: ; Among them, the function The data packets are sorted according to their priority to ensure that the data packets with higher priority are transmitted first during the transmission process. The sorting mechanism effectively reduces the data packet delay that has a greater impact on the audio quality, thereby improving the overall audio playback quality. According to the generated data packet transmission queue, the high-frequency audio data is distributed to the Bluetooth headset device to obtain the headset transmission data stream. Similarly, the low-frequency audio data is distributed to the speaker device based on the transmission queue to obtain the speaker transmission data stream. Assume that the transmission data stream of the headset is , the transmission data stream of the speaker is , the data flow of headphones and speakers is expressed as: ; ; in, and Represents a unit pulse signal, used to describe the time at which a data packet and The transmission of and Indicates By distributing high-frequency data streams to headphones and low-frequency data streams to speakers, different devices can process the appropriate audio parts according to their own characteristics, thereby optimizing stereo playback. During the audio data transmission process, in order to ensure the integrity of the data, packet loss detection is performed on the transmission data streams of headphones and speakers to find out the audio data packets lost during the transmission process due to signal interference or network congestion. The receiving status of a data packet is and , then the receiving state is expressed as: ; ; By monitoring the receiving status of all data packets, the data packet loss record is obtained. Based on the loss record, the corresponding redundant data packets are extracted from the backup data buffer, and the data is supplemented to obtain the supplementary data packet sequence. Let the supplementary data packet sequence be , for lost data packets, replace them with corresponding data packets in the backup buffer to ensure the integrity of the audio data: ; The role of the supplementary data packet is to use the backup data to supplement the lost part of the main transmission to keep the playback process smooth and coherent. The supplementary data packet sequence is inserted into the transmission data stream of the corresponding device, and the data packets are reordered to obtain a complete transmission sequence. The purpose of reordering is to ensure the temporal consistency of the supplementary data packets and the original data packets to avoid playback distortion caused by the disorder of the data packet sequence. The complete transmission sequence is expressed as: ; in, is the sending time of the supplemented data packet, which is adjusted by reordering to ensure the continuity of playback. In this process, the data transmission rate and data packet arrival time of each device in the complete transmission sequence are statistically analyzed to obtain the audio transmission status of the device. The data transmission rate is expressed as: ; in, and Respectively represent the data transmission rate of headphones and speakers, Indicates the number of sampling points for each data packet, and Represents the bit depth of high-frequency and low-frequency audio data respectively, and The data packet transmission time of the headset and the speaker respectively. By analyzing the data transmission rate and data packet arrival time, we can understand the performance of each device during the transmission process, such as whether there is obvious delay, rate fluctuation and other problems.

[0033] In a specific embodiment, the process of executing step 500 may specifically include the following steps: Parse the arrival timestamp of the data packet in the device audio transmission status to obtain the device time difference data; Based on the device time difference data, a time deviation matrix is ​​constructed, and the time deviation between each device is calculated to obtain the time deviation data; A threshold is determined for the time deviation data, and when the deviation value exceeds a preset target value, a clock drift mark is obtained; Calculate the reading rate compensation value of each device according to the clock drift mark, generate a rate adjustment matrix, and obtain rate compensation data; Adjust the read rate of the main data buffer of the device based on the rate compensation data to obtain adjusted read configuration parameters, perform verification processing on the adjusted read configuration parameters, record the adjustment results, and obtain rate adjustment result data; Based on the rate adjustment result data, the new time deviation between devices is calculated, the synchronization effect is evaluated, and the synchronization evaluation data is obtained. The clock synchronization status of each device is updated according to the synchronization evaluation data to generate the device synchronization status.

[0034] Specifically, the arrival time of the data packet of each device is recorded. Assume that the arrival timestamp of the data packet of each device is and , respectively represent the arrival time of high-frequency and low-frequency audio packets, where is the index of the data packet. By parsing the arrival time of the data packets of each device, the time difference data of each device is obtained. These time differences reflect the clock deviation between devices. For two devices, assuming they are device 1 and device 2, the arrival timestamp of the data packet of device 1 is , the data packet arrival timestamp of device 2 is , the time difference between devices It is expressed as: ; in, For the The time deviation of data packets between devices. By calculating the time difference of all data packets, a set of device time difference data is obtained for subsequent clock synchronization analysis. Based on the time difference data between devices, a time deviation matrix is ​​constructed. , contains the time deviation information of all data packets between devices. Devices, Matrix Elements Indicates the device and equipment In the The time difference of each data packet, the matrix is ​​calculated as follows: ; matrix Each element of represents the clock deviation between different devices. Threshold judgment is performed on the time deviation data to detect clock drift. Clock drift refers to the significant time deviation between the clocks of two devices due to various reasons (such as unstable Bluetooth communication, hardware differences, etc.). When the deviation value Exceeding the preset target value When the clock is drifting, it indicates that there is a clock drift problem. It is expressed as follows: ; if The absolute value of , it means there is clock drift, marked as 1, otherwise 0. By judging the clock drift between all devices, we can identify which devices have clock drift and take corresponding adjustment measures. Based on the clock drift mark, we calculate the reading rate compensation value of each device and generate the rate adjustment matrix , which reflects the rate compensation that each device needs to perform in the case of clock drift. Let the original reading rate of each device be When the clock drift flag is 1, adjust the device's reading rate to calibrate the clock deviation between devices. Rate compensation value Calculated based on the degree of clock drift, assuming that the compensation value is proportional to the deviation, the rate compensation value is expressed as: ; in, is the rate compensation factor, is the time difference between devices. If the time difference is too large, the reading rate of the device needs to be increased; conversely, if the time difference is small, the reading rate is reduced accordingly. By calculating the rate compensation values ​​of all devices, a rate adjustment matrix is ​​generated. , describing the adjusted read rate of each device. Based on the rate compensation data, the read rate of the device's primary data buffer is adjusted. This adjustment is made based on the rate compensation value calculated previously, assuming that the read rate of the device's primary data buffer is , adjusted reading rate It is expressed as: ; In this way, the reading rate of the main data buffer of each device is adjusted according to the time deviation of each device, making the clock synchronization between devices more accurate. The adjusted reading configuration parameters are verified to check whether the adjustment is effective and whether the adjusted rate can meet the synchronization requirements between devices. The verification process monitors the audio playback status of each device in real time, especially observing the synchronization effect and delay of the audio, to determine whether the adjustment result meets the expectations. If the verification is successful, the adjustment result is recorded and the rate adjustment result data is generated. Rate adjustment result data Contains the following: ; These data will serve as the basis for subsequent synchronization evaluation. Based on the rate adjustment result data, calculate the new time deviation between devices and evaluate the synchronization effect. It is expressed as: ; in, It is the time deviation after rate compensation. If the adjusted time deviation is close to 0, it means that the synchronization effect is good and the clocks between devices have become consistent. The data of synchronization effect evaluation reflects the accuracy and stability of clock synchronization between devices. According to the evaluation results, the clock synchronization status of each device is updated and new device synchronization status data is generated. Synchronization status data It is expressed as: ; If the new time deviation If it is small enough and the synchronization status meets the requirements, the device is marked as a synchronization device, otherwise continue to adjust.

[0035] This embodiment also includes the following network adaptive processing steps: performing a periodic signal quality scan on the Bluetooth transmission link every 100ms, obtaining the signal strength indicator RSSI and the bit error rate BER value, and calculating the link blocking rate to obtain the original link quality data; establishing a three-dimensional network evaluation matrix based on the original link quality data, performing weighted calculation on RSSI, BER and blocking rate, setting a network quality level threshold, and obtaining network status scoring data; performing data packet fragmentation processing according to the network status scoring data, adjusting the data packet size to 256 bytes when the network score is lower than 60 points, and adjusting it to 512 bytes when the score is higher than 60 points, and obtaining a dynamic packet segmentation strategy; performing risk prediction on data transmission under the dynamic packet segmentation strategy, calculating data redundancy based on the historical packet loss rate, generating a 0-3 times backup data storage solution, and obtaining data backup parameters; and dividing the main data buffer and the backup data buffer in proportion based on the data backup parameters, with the main buffer accounting for 50%-90% and the backup buffer accounting for 50%-90%. The buffer zone dynamic configuration scheme is 10%-50%, and a buffer zone dynamic configuration scheme is obtained; a four-level data packet priority mechanism is established according to the buffer zone dynamic configuration scheme, and the audio synchronization frame is marked as the highest priority, followed by the control signaling, the ordinary audio data packet, and the redundant data packet as the lowest priority, and a hierarchical transmission strategy is obtained; the hierarchical transmission strategy is applied to the transmission process of high-frequency and low-frequency digital audio data, and the transmission time slots are allocated in order of priority, and the transmission interval compensation value is set to obtain the optimized transmission sequence; the arrival time of the data packets in the optimized transmission sequence is recorded, the transmission success rate and the average delay are counted, and a transmission quality evaluation model is established to obtain the transmission performance data; a Bluetooth channel selection algorithm is constructed based on the transmission performance data, and the quality of 79 channels is sorted, and the top 20 channels are selected to establish the transmission channel to obtain the channel allocation scheme; the data transmission path is updated according to the channel allocation scheme, and the high-frequency and low-frequency digital audio data are proportionally allocated on the selected channels, and the backup channel switching threshold is set to obtain the network transmission control strategy.

[0036] In a specific embodiment, the process of executing step 600 may specifically include the following steps: Perform audio sampling detection on each device according to the device synchronization status, collect parameters including audio loudness, channel balance and frequency response, and obtain device output characteristic data; Calculate the energy distribution of each frequency band in the device output characteristic data to obtain the frequency response compensation parameters; Perform digital equalizer processing on the audio signal based on the frequency response compensation parameters, adjust the gain coefficient of each frequency band, and obtain equalization calibration data; Performing dynamic range control on the audio output gain of the device according to the equalization calibration data to obtain a gain control parameter, and performing feedback compensation calculation on the gain control parameter to obtain a dynamic gain coefficient; Based on the dynamic gain coefficient, the audio signal is compressed in sections to obtain compressed processing data, and the audio output limiting threshold is set according to the compressed processing data, and the signal exceeding the threshold is limited to obtain limiting control data; The limit control data is input into the audio output buffer of the device, and synchronous playback output control is performed to obtain the target synchronous playback audio.

[0037] Specifically, audio sampling detection is performed on each device according to the device synchronization status, and parameters such as audio loudness, channel balance, and frequency response are collected. Audio loudness refers to the intensity of the sound, channel balance reflects the volume difference between the left and right channels, and frequency response refers to the response characteristics of the device output audio signal in different frequency ranges. In the audio sampling detection stage, audio signals are collected from each device and converted into digital signals. For each device, the sampling time is set to , device audio signal The digital signal obtained after sampling is expressed as ,in Represents the index of the sampling point. The audio loudness is obtained by calculating the amplitude of the audio signal, that is: ; in is the loudness, is the number of audio samples, For the The audio signal of the sampling point. Channel balance is obtained by comparing the left and right channel signals. and The audio signals for the left and right channels are balanced. By calculating the ratio of the left and right channel audio signals: ; in, A value close to 1 indicates that the channel balance is normal, a value greater than 1 indicates that the left channel volume is louder, and a value less than 1 indicates that the right channel volume is louder. Frequency response refers to the degree to which the device amplifies or attenuates audio signals of different frequencies. In order to detect the frequency response, the audio signal is Fourier transformed to obtain its spectrum. : ; in, Indicates frequency, is the spectrum in the frequency domain, indicating the strength of the audio signal at different frequencies. The frequency response is expressed as a gain function , which is defined as: ; in, is the spectrum of the reference signal, Indicates the gain of the signal at each frequency. After obtaining the audio output characteristic data of the device, the frequency band energy distribution is calculated to adjust the frequency response characteristics of the device output. In order to optimize the frequency response of the device, the frequency response compensation parameters are calculated according to the energy distribution of the audio signal in different frequency bands. Assume that the frequency band of the audio signal is divided into several sub-bands ( ), by calculating the energy contribution of this frequency band in the spectrum Get the energy of each frequency band: ; By analyzing the energy of different frequency bands, the frequency response compensation parameters are obtained. , represents the compensation amount of each frequency band gain. For each frequency band, the frequency response compensation parameter The calculation formula is: ; in, is the target frequency response gain, is the actual frequency response gain, Indicates the amount of gain that needs to be compensated. Based on the frequency response compensation parameters, a digital equalizer is used to adjust the frequency band gain of the audio signal. The equalizer adjusts the gain coefficient of each frequency band. Correct the frequency response so that the output of the audio signal is more in line with the expected frequency response curve. It is expressed as: ; in, Represents the first The signal of the frequency band, For the Gain coefficient of each frequency band. By adjusting the gain coefficient, the expected frequency response compensation effect can be achieved. According to the equalization calibration data, the dynamic range of the audio output gain of the device is controlled. The output range of the audio signal is limited to a reasonable range to avoid distortion or noise caused by excessive or weak signals. Gain control parameters The calculation of is based on the loudness of the audio signal and the instantaneous signal peak. Assume that the instantaneous peak value of the signal is , according to the preset maximum gain limit and minimum gain limit , adjust the gain value To control the output range of the audio signal. The gain control parameter is expressed as: ; In this way, gain control prevents the signal from exceeding the processing capacity of the device and ensures the quality of the output audio signal. After dynamic range control, the gain control parameters are calculated for feedback compensation. The gain is fine-tuned according to the real-time audio signal conditions to maintain system stability and sound quality. Dynamic gain coefficient Calculated by the following formula: ; in, is the compensation factor, is the peak value of the signal, is the reference peak value, dynamic gain factor Used to adjust the gain of the signal. After obtaining the dynamic gain coefficient, the audio signal is compressed in sections. The dynamic range of the audio signal is compressed to reduce the amplitude of the excessively high signal while keeping the lower signal unaffected. The output signal of the compressed audio signal

[0038] ; in, is the maximum output amplitude after compression processing, The compression process ensures that the output signal does not exceed the set maximum threshold. The audio output clipping threshold is set based on the compressed data. The limiter is used to prevent the signal amplitude from exceeding the range that the device can handle, thus avoiding distortion. Signals exceeding the limiter threshold will be limited to the maximum or minimum value. Limiter control data It is expressed as: ; After the limit control data is input into the audio output buffer of the device, the synchronous playback output control is performed according to the settings of the audio output buffer. By continuously adjusting the audio output parameters and signal processing process of the device, the audio output synchronization of all devices is ensured, and the target synchronous playback audio is finally generated.

[0039] The above describes the method for synchronously playing a Bluetooth headset and a speaker supporting stereo synthesis in the embodiment of the present application. The following describes the device 10 for synchronously playing a Bluetooth headset and a speaker supporting stereo synthesis in the embodiment of the present application. Figure 2 In the embodiment of the present application, an embodiment of a Bluetooth headset and speaker synchronous playback device 10 supporting stereo synthesis includes: The sampling module 11 is used to digitally sample the input audio signal to obtain original digital audio data, and to separate the high frequency and low frequency to obtain high frequency digital audio data and low frequency digital audio data; The identification module 12 is used to scan the peripheral devices and identify the stereo function based on the Bluetooth 5.0 protocol, obtain the target audio device list, establish a Bluetooth connection, and obtain the audio parameters of the target device; The allocation module 13 is used to allocate a primary data buffer and a backup data buffer to each target audio device according to the target device audio parameters, and to establish a synchronization channel based on millisecond timestamps to generate device synchronization control data; The transmission module 14 is used to distribute the high-frequency digital audio data to the Bluetooth headset device for transmission, and distribute the low-frequency digital audio data to the speaker device for transmission, and perform transmission control to obtain the device audio transmission status; The synchronization module 15 is used to monitor the data processing delay of all devices based on the device audio transmission status, and when it is detected that the clock drift between devices exceeds the preset target value, adjust the reading rate of the main data buffer to perform clock synchronization to obtain the device synchronization status; The output module 16 is used to collect the audio output parameters of each device according to the device synchronization status, and dynamically adjust the signal gain and equalization parameters of the device to output the target synchronous playback audio.

[0040] Through the coordinated cooperation of the above components, high-precision digital sampling with a sampling rate of 96kHz and a bit depth of 24bit, combined with high- and low-frequency separation processing, the restoration degree and stereo effect of the audio signal are effectively improved; the device identification and connection mechanism based on the Bluetooth 5.0 protocol is adopted, combined with stereo function screening, to ensure stable and reliable data transmission between devices; through the double buffer design of the main data buffer and the backup data buffer, combined with the millisecond timestamp synchronization mechanism, the data synchronization problem between multiple devices is effectively solved; based on the dynamic data packet distribution strategy and redundant data supplement mechanism, the impact of network fluctuations on audio playback is significantly reduced; by real-time monitoring of device clock drift and dynamically adjusting the buffer reading rate, accurate clock synchronization between devices is achieved; a multi-level audio parameter dynamic adjustment mechanism, including signal gain control and equalization parameter optimization, is adopted to ensure the consistency of audio output between different devices; through device grouping and data distribution optimization, the precise allocation of high-frequency data and low-frequency data is achieved, which improves the overall playback effect of the system.

[0041] See also Figure 3 , Figure 3 This is a schematic block diagram of the structure of an electronic device 300 provided in an embodiment of the present application. The electronic device 300 includes a processor 301 and a memory 302. The processor 301 and the memory 302 are connected via a device bus 303, wherein the memory 302 may include a non-volatile storage medium and an internal memory.

[0042] The non-volatile storage medium can store a computer program. The computer program includes program instructions, and when the program instructions are executed by the processor 301, the processor 301 can execute any of the above-mentioned methods for synchronously playing Bluetooth headsets and speakers supporting stereo synthesis.

[0043] The processor 301 is used to provide computing and control capabilities to support the operation of the entire electronic device 300 .

[0044] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor 301, the processor 301 can execute any of the above-mentioned methods for synchronous playback of Bluetooth headphones and speakers supporting stereo synthesis.

[0045] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a partial structure related to the present application scheme, and does not constitute a limitation on the electronic device 300 involved in the present application scheme. The specific electronic device 300 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0046] It should be understood that the processor 301 may be a central processing unit (CPU), and the processor 301 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0047] It should be noted that technicians in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working process of the electronic device 300 described above can refer to the corresponding process of the aforementioned method for synchronous playback of Bluetooth headphones and speakers supporting stereo synthesis, and will not be repeated here.

[0048] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by one or more processors, the one or more processors implement the method for synchronous playback of Bluetooth headphones and speakers supporting stereo synthesis as provided in an embodiment of the present application.

[0049] The computer-readable storage medium may be an internal storage unit of the electronic device 300 in the aforementioned embodiment, such as a hard disk or memory of the electronic device 300. The computer-readable storage medium may also be an external storage device of the electronic device 300, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped with the electronic device 300.

[0050] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0051] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable an electronic device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0052] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for synchronously playing a Bluetooth headset and a speaker supporting stereo synthesis, characterized in that: The method comprises: Digitally sampling the input audio signal to obtain original digital audio data, and performing high-frequency and low-frequency separation to obtain high-frequency digital audio data and low-frequency digital audio data; Scan the peripheral devices and identify the stereo function based on the Bluetooth 5.0 protocol, obtain the target audio device list, establish a Bluetooth connection, and obtain the audio parameters of the target device; Allocate a main data buffer and a backup data buffer to each target audio device according to the target device audio parameters, establish a synchronization channel based on millisecond timestamps, and generate device synchronization control data; Allocate the high-frequency digital audio data to the Bluetooth headset device for transmission, and at the same time allocate the low-frequency digital audio data to the speaker device for transmission, and perform transmission control to obtain the device audio transmission status; The data processing delay of all devices is monitored based on the audio transmission status of the device, and when it is detected that the clock drift between devices exceeds a preset target value, the reading rate of the main data buffer is adjusted to perform clock synchronization to obtain the device synchronization status; The audio output parameters of each device are collected according to the device synchronization state, and the signal gain and equalization parameters of the device are dynamically adjusted to output the target synchronous playback audio.

2. The method for synchronously playing a Bluetooth headset and a sound box supporting stereo synthesis according to claim 1, characterized in that: The step of digitally sampling the input audio signal to obtain original digital audio data, and performing high-frequency and low-frequency separation to obtain high-frequency digital audio data and low-frequency digital audio data comprises: Performing digital processing on the input audio signal at a sampling rate of 96 kHz and a bit depth of 24 bits to obtain a first digital audio sequence; Setting a time reference for the first digitized audio sequence and performing a time stamp to obtain a second digitized audio sequence; Performing frequency filtering on the second digitized audio sequence according to a preset high-frequency threshold to obtain a high-frequency audio sequence, and performing frequency filtering on the second digitized audio sequence according to a preset low-frequency threshold to obtain a low-frequency audio sequence; The high-frequency audio sequence is subjected to signal amplitude normalization and frequency response compensation to obtain high-frequency digital audio data, and the low-frequency audio sequence is subjected to signal amplitude normalization and frequency response compensation to obtain low-frequency digital audio data.

3. The method for synchronously playing a Bluetooth headset and a sound box supporting stereo synthesis according to claim 2, characterized in that: The method of scanning the peripheral devices and identifying the stereo function based on the Bluetooth 5.0 protocol, obtaining the target audio device list, establishing a Bluetooth connection, and obtaining the audio parameters of the target device includes: Based on the Bluetooth 5.0 protocol, the device broadcast mode is started, and the signal of the surrounding Bluetooth devices is scanned to obtain a list of basic device information, and the MAC address and Bluetooth signal strength are extracted from the list of basic device information to obtain device feature data; According to the device characteristic data, stereo function identification is performed on the device, and devices with stereo synthesis capability are screened out to obtain a candidate device list; Performing audio processing capability detection on the devices in the candidate device list, obtaining supported audio codec formats and sampling rate range parameters, and obtaining device capability data; Classify the devices according to the device capability data, divide the devices into a Bluetooth headset group and a speaker group, and obtain a grouped device list; Send a connection request instruction to the device in the grouped device list, establish a Bluetooth data transmission channel, and obtain connection status data; According to the connection status data, a device identifier is assigned to the connected device, audio processing configuration parameters are set, target device audio parameters are obtained, device compatibility verification is performed on the target device audio parameters, and a target audio device list is generated.

4. The method for synchronously playing a Bluetooth headset and a sound box supporting stereo synthesis according to claim 3, characterized in that: The method of allocating a main data buffer and a standby data buffer to each target audio device according to the target device audio parameters, establishing a synchronization channel based on millisecond timestamps, and generating device synchronization control data includes: Performing data processing on the codec format and sampling rate range in the audio parameters of the target device to obtain buffer requirement data of each device; Allocating primary data buffer capacity to each device based on the buffer demand data to obtain primary buffer configuration data, and allocating backup data buffer capacity to each device based on the buffer demand data to obtain backup buffer configuration data; A monitoring threshold is set for the data volume in the main buffer configuration data, and when the buffer data volume is lower than the threshold, a data supplement mechanism is triggered to obtain a buffer control parameter; Establishing a timestamp system according to the buffer control parameters, time-stamping the data packets to obtain a data packet timestamp sequence, establishing a synchronous communication channel between devices for the data packet timestamp sequence, setting a data packet transmission priority, and obtaining synchronous channel configuration data; Based on the synchronization channel configuration data, a clock synchronization mechanism between devices is established to obtain clock synchronization data, and device synchronization control data is generated according to the clock synchronization data.

5. The method for synchronously playing a Bluetooth headset and a sound box supporting stereo synthesis according to claim 4, characterized in that: The high-frequency digital audio data is allocated to the Bluetooth headset device for transmission, the low-frequency digital audio data is allocated to the speaker device for transmission, and transmission control is performed to obtain the device audio transmission state, including: Performing data packet segmentation on the high-frequency digital audio data and the low-frequency digital audio data to obtain an audio data packet sequence, and prioritizing the audio data packet sequence based on the device synchronization control data to obtain a data packet transmission queue; According to the data packet transmission queue, the high-frequency digital audio data is distributed to a Bluetooth headset device to obtain a headset transmission data stream, and according to the data packet transmission queue, the low-frequency digital audio data is distributed to a speaker device to obtain a speaker transmission data stream; Performing data packet loss detection on the headphone transmission data stream and the speaker transmission data stream to obtain a data packet loss record, and extracting corresponding redundant data packets from the standby data buffer based on the data packet loss record, performing data supplementation, and obtaining a supplementary data packet sequence; The supplementary data packet sequence is inserted into the transmission data stream of the corresponding device, the data packets are reordered to obtain a complete transmission sequence, and the data transmission rate and data packet arrival time of each device in the complete transmission sequence are statistically analyzed to obtain the device audio transmission status.

6. The method for synchronously playing a Bluetooth headset and a sound box supporting stereo synthesis according to claim 5, characterized in that: The data processing delay of all devices is monitored based on the device audio transmission state, and when it is detected that the clock drift between devices exceeds a preset target value, the reading rate of the main data buffer is adjusted to perform clock synchronization to obtain the device synchronization state, including: Parsing the arrival timestamp of the data packet in the audio transmission state of the device to obtain device time difference data; Building a time deviation matrix based on the device time difference data, calculating the time deviation between each device, and obtaining time deviation data; Performing a threshold judgment on the time deviation data, and obtaining a clock drift mark when the deviation value exceeds a preset target value; Calculate the reading rate compensation value of each device according to the clock drift mark, generate a rate adjustment matrix, and obtain rate compensation data; Adjusting the read rate of the main data buffer of the device based on the rate compensation data to obtain adjusted read configuration parameters, performing verification processing on the adjusted read configuration parameters, recording adjustment results, and obtaining rate adjustment result data; Based on the rate adjustment result data, a new time deviation between devices is calculated, and a synchronization effect evaluation is performed to obtain synchronization evaluation data. The clock synchronization state of each device is updated according to the synchronization evaluation data to generate a device synchronization state.

7. The method for synchronously playing a Bluetooth headset and a sound box supporting stereo synthesis according to claim 6, characterized in that: The step of collecting audio output parameters of each device according to the device synchronization state, dynamically adjusting the signal gain and equalization parameters of the device, and outputting the target synchronously played audio includes: Performing audio sampling detection on each device according to the device synchronization state, collecting parameters including audio loudness, channel balance and frequency response, and obtaining device output characteristic data; Calculating the energy distribution of each frequency band in the output characteristic data of the device to obtain frequency response compensation parameters; Performing digital equalizer processing on the audio signal based on the frequency response compensation parameters, adjusting the gain coefficient of each frequency band, and obtaining equalization calibration data; Performing dynamic range control on the audio output gain of the device according to the equalization calibration data to obtain a gain control parameter, and performing feedback compensation calculation on the gain control parameter to obtain a dynamic gain coefficient; Based on the dynamic gain coefficient, the audio signal is subjected to segmented compression processing to obtain compression processing data, and an audio output clipping threshold is set according to the compression processing data, and a signal exceeding the threshold is subjected to clipping processing to obtain clipping control data; The limit control data is input into the audio output buffer of the device to perform synchronous playback output control to obtain the target synchronous playback audio.

8. A Bluetooth headset and speaker synchronous playback device supporting stereo synthesis, characterized in that: The method for synchronously playing a Bluetooth headset and a speaker supporting stereo synthesis according to any one of claims 1 to 7, wherein the device for synchronously playing a Bluetooth headset and a speaker supporting stereo synthesis comprises: The sampling module is used to digitally sample the input audio signal to obtain original digital audio data, and to separate the high frequency and low frequency to obtain high frequency digital audio data and low frequency digital audio data; The identification module is used to scan and identify the stereo function of peripheral devices based on the Bluetooth 5.0 protocol, obtain a list of target audio devices, establish a Bluetooth connection, and obtain audio parameters of the target devices; An allocation module, configured to allocate a primary data buffer and a backup data buffer to each target audio device according to the target device audio parameters, establish a synchronization channel based on millisecond timestamps, and generate device synchronization control data; A transmission module, used to distribute the high-frequency digital audio data to the Bluetooth headset device for transmission, and distribute the low-frequency digital audio data to the speaker device for transmission, and perform transmission control to obtain the device audio transmission status; A synchronization module, configured to monitor the data processing delay of all devices based on the audio transmission status of the device, and when it is detected that the clock drift between devices exceeds a preset target value, adjust the reading rate of the main data buffer to perform clock synchronization to obtain the device synchronization status; The output module is used to collect the audio output parameters of each device according to the device synchronization state, and dynamically adjust the signal gain and equalization parameters of the device to output the target synchronous playback audio.

9. An electronic device, characterized in that: The electronic device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instruction in the memory so that the electronic device executes the method for synchronous playback of a Bluetooth headset and a speaker supporting stereo synthesis as described in any one of claims 1-7.

10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the method for synchronously playing a Bluetooth headset and a speaker supporting stereo synthesis as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Bluetooth audio equipment synchronous playing method and system, Bluetooth audio master equipment and Bluetooth audio slave equipment

    CN111918261A

  • Audio and video synchronization control method and device

    CN113596550A

  • Audio transmission device, audio playing device and audio transmission and synchronization system

    CN115567086A

  • Audio synchronous playing method and related device

    CN117376608A

  • Acoustic conversion device

    WO2011068192A1

Cited By

  • Dual-mode Bluetooth communication switching management method, system and equipment for audio transmission

    CN121218141A

  • Android system USB and host AUDIO double-channel MIC mixed synchronous output method

    CN121349401A

  • Double-main-box wired stereo audio synchronous playing method and related equipment

    CN122372922A