Bluetooth sound burst detection method and device, computer device and storage medium

By generating control commands, monitoring state changes, acquiring audio signals and extracting transient feature vectors, and combining adaptive thresholds and dynamic window adjustments, the subjective and missed detection problems of Bluetooth speaker pop sound detection are solved, achieving efficient and accurate pop sound detection.

CN122160709APending Publication Date: 2026-06-05SHENZHEN FENGHEYUAN TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN FENGHEYUAN TECH
Filing Date
2026-05-09
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In existing technologies, Bluetooth speaker pop detection relies on manual listening tests, which are highly subjective, inefficient, and prone to missed detections. It is also difficult to accurately capture transient changes in pop sounds in complex scenarios with multiple devices.

Method used

By acquiring test actions to generate control commands, listening to state change signals, acquiring audio signals with high precision, extracting transient feature vectors, and judging pops based on feature vectors and thresholds, combined with adaptive threshold adjustment and dynamic window adjustment mechanisms, we can ensure high-sensitivity detection of changes in the audio path.

Benefits of technology

It improves the sensitivity and accuracy of pop sound detection, enabling precise capture of pop sounds in complex scenarios with multiple devices, reducing missed detections, and enhancing detection efficiency and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122160709A_ABST
    Figure CN122160709A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of Bluetooth sound burst detection method, device, computer equipment and storage medium, method includes: obtaining the test action corresponding to target test scene;According to test action generation control command;Send control command to the Bluetooth sound to be measured, trigger the audio path change of Bluetooth sound;Listen to the state change signal of Bluetooth sound to be measured;When state change signal is listened to, according to target test scene, trigger high sensitivity detection time window, in high sensitivity detection time window, the high-precision audio signal of audio signal output by Bluetooth sound is collected, and high-precision audio signal is obtained;High-precision audio signal is extracted, and obtains transient feature vector;According to transient feature vector and burst judgment threshold, judge whether there is burst.The present application can improve the automation and sensitivity of burst detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of testing, and more particularly to a method, apparatus, computer device, and storage medium for detecting popping sounds in Bluetooth speakers. Background Technology

[0002] With the development of wireless audio technology, Bluetooth speaker products have been widely used in home entertainment, outdoor audio playback, and multi-device interconnection scenarios.

[0003] Bluetooth speaker products typically support basic functions such as playback control, volume adjustment, mode switching, and Bluetooth connection management, and are gradually expanding to more complex application scenarios such as simultaneous playback across multiple devices and broadcast audio. During the operation of these functions, the audio signal path may undergo changes such as reconstruction, buffer reset, clock synchronization adjustment, or amplifier state switching. When the signal experiences transient changes, transient impact sounds can easily occur, commonly referred to in the industry as "pops" or "cracks." Pops not only affect the user's listening experience but may also reflect the stability of the system's timing control, audio buffer management, and amplifier drive strategy. Therefore, thorough verification of pop issues is crucial in the pre-mass production stage.

[0004] In existing technologies, the detection of popping sounds mainly relies on manual listening tests. Testers subjectively judge whether popping sounds exist by performing operations such as starting and stopping playback, adjusting volume, and switching modes.

[0005] Existing methods for detecting popping sounds are highly dependent on individual auditory sensitivity, are subjective, inefficient, and prone to missed detections. Summary of the Invention

[0006] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, the present invention provides a Bluetooth speaker popping sound detection method, device, computer equipment and storage medium.

[0007] In a first aspect, the present invention provides a method for detecting popping sounds in a Bluetooth speaker, the method comprising: Obtain the test actions corresponding to the target test scenario; Generate control commands based on the test actions; Send the control command to the Bluetooth speaker under test to trigger a change in the audio path of the Bluetooth speaker; Listen for status change signals of the Bluetooth speaker under test; Upon detecting the state change signal, a high-sensitivity detection time window is triggered according to the target test scenario. During the high-sensitivity detection time window, the audio signal output by the Bluetooth speaker is acquired with high precision to obtain a high-precision audio signal. Feature extraction is performed on the high-precision audio signal to obtain transient feature vectors; Based on the transient feature vector and the popping sound judgment threshold, it is determined whether a popping sound exists.

[0008] Optionally, after determining whether a popping sound exists based on the transient feature vector and the popping sound threshold, the method further includes: The popping sound judgment threshold is dynamically adjusted based on historical detection data; The historical detection data refers to the range of normal transient peak values ​​in multiple target test scenarios.

[0009] Optionally, the step of extracting features from the high-precision audio signal to obtain a transient feature vector includes: The frame length is obtained based on the target test scenario and the preset sampling rate; According to the frame length, the high-precision audio signal is divided into multiple subframes, and the frame length of each subframe is the frame length. Acquire the peak value, instantaneous peak amplitude, short-time energy change rate, transient pulse duration, and amplitude abrupt change state of adjacent sampling points within each subframe; Get the average peak value, maximum peak value, and number of times the peak value exceeds the first threshold within each subframe; The transient feature vector is obtained based on the instantaneous peak amplitude, the short-term energy change rate, the transient pulse duration, the amplitude abrupt change state of adjacent sampling points, the average peak value, the maximum peak value, and the number of times the peak value exceeds the first threshold.

[0010] Optionally, obtain the peak value within each subframe, including: Obtain the absolute amplitude of each sampling point within each subframe; The maximum absolute amplitude is taken as the peak value; Obtaining the duration of the transient pulse includes: The duration for which the absolute amplitude of the sampling point continuously exceeds the second threshold is taken as the duration of the transient pulse; Obtaining the short-time energy change rate includes: The first difference between the audio energy of the current subframe and the audio energy of the previous subframe is obtained as the short-time energy change rate.

[0011] Optionally, obtaining the amplitude change state of the adjacent sampling points includes: Obtain the second difference between the absolute amplitude of the current sampling point and the absolute amplitude of the previous sampling point; If the second difference is greater than or equal to the third threshold, the current sampling point is marked as a transient anomaly. If the second difference is less than the third threshold, the current sampling point is marked as transient normal.

[0012] Optionally, determining whether a popping sound exists based on the transient feature vector and the popping sound judgment threshold includes: Based on the target test scenario, the corresponding scenario dynamic threshold is obtained as the popping sound judgment threshold; If the transient feature vector exceeds the pop sound judgment threshold, then a pop sound is determined to exist.

[0013] Optionally, when detecting multiple interactive Bluetooth speakers, the method further includes: Continuously pre-buffer audio data and acquire buffered data; Upon detecting the state change signal, the high-sensitivity detection time window is triggered according to the target test scenario. During the high-sensitivity detection time window, the audio signals output by multiple Bluetooth speakers are collected with high precision to obtain the high-precision audio signals. The buffered data and the high-precision audio signal are combined into a merged signal; Perform transient feature pre-analysis on the merged signal to obtain the time of audio transient occurrence; Set a transient timestamp at the moment the audio transient occurs; The high-sensitivity detection time window is adjusted according to the transient timestamp, so that the start time of the high-sensitivity detection time window is earlier than the first transient timestamp.

[0014] Secondly, a Bluetooth speaker popping sound detection device is provided, employing the method described in any of the preceding claims, the device comprising: The motion control module is used to acquire test actions corresponding to the target test scenario, and also to generate control commands based on the test actions, send the control commands to the Bluetooth speaker under test, and trigger changes in the audio path of the Bluetooth speaker. The event monitoring module is used to monitor the status change signals of the Bluetooth speaker under test; The audio acquisition module is used to, upon detecting the state change signal, trigger a high-sensitivity detection time window according to the target test scenario, and perform high-precision acquisition of the audio signal output by the Bluetooth speaker within the high-sensitivity detection time window to obtain a high-precision audio signal. The signal analysis module is used to extract features from the high-precision audio signal and obtain transient feature vectors; The pop sound detection module is used to determine whether a pop sound exists based on the transient feature vector and the pop sound detection threshold.

[0015] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described in any of the preceding claims.

[0016] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the preceding claims.

[0017] This invention provides a method, apparatus, computer device, and storage medium for detecting popping sounds in Bluetooth speakers. The method includes: acquiring a test action corresponding to a target test scenario; generating a control command based on the test action; sending the control command to the Bluetooth speaker under test to trigger a change in the audio path of the Bluetooth speaker; monitoring a state change signal of the Bluetooth speaker under test; upon detecting the state change signal, triggering a high-sensitivity detection time window according to the target test scenario, and performing high-precision acquisition of the audio signal output by the Bluetooth speaker within the high-sensitivity detection time window to obtain a high-precision audio signal; extracting features from the high-precision audio signal to obtain a transient feature vector; and determining whether a popping sound exists based on the transient feature vector and a popping sound judgment threshold. In this embodiment of the invention, detection within a high-sensitivity detection time window can improve detection sensitivity, and testing according to different target test scenarios can better determine whether a popping sound exists. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 The diagram shown illustrates the application environment of the Bluetooth speaker popping sound detection method according to an embodiment of the present invention. Figure 2 The diagram shown is a flowchart of the Bluetooth speaker popping sound detection method according to an embodiment of the present invention. Figure 3 The diagram shown is a structural block diagram of the Bluetooth speaker popping sound detection device according to an embodiment of the present invention. Figure 4 The diagram shown is an internal structural diagram of the Bluetooth speaker popping sound detection device in an embodiment of the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] Figure 1 This is a diagram illustrating the application environment of a Bluetooth speaker popping sound detection method in one embodiment. (Refer to...) Figure 1 This Bluetooth speaker popping sound detection method is applied to a Bluetooth speaker popping sound detection system. The system includes a Bluetooth speaker 110 and a Bluetooth speaker popping sound detection device 120. The Bluetooth speaker 110 and the Bluetooth speaker popping sound detection device 120 are connected via wired or wireless means. The Bluetooth speaker popping sound detection device 120 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0023] like Figure 2 As shown, in one embodiment, a method for detecting popping sounds in a Bluetooth speaker is provided. This embodiment mainly applies this method to the above-mentioned... Figure 1 Let's take the Bluetooth speaker popping detection device 120 as an example.

[0024] Reference Figure 2 The Bluetooth speaker popping sound detection method specifically includes the following steps: Step 210: Obtain the test actions corresponding to the target test scenario; In this embodiment of the invention, before performing popping sound detection on the Bluetooth speaker, the test environment can be initialized first, and a communication connection can be established with the Bluetooth speaker under test. The communication connection with the Bluetooth speaker can be wired or wireless.

[0025] In this embodiment of the invention, a target test scenario can be set before performing popping sound detection on the Bluetooth speaker. The target test scenario can be a scenario such as playing a specific audio file, adjusting the volume, or switching modes. Popping sounds may occur in different test scenarios, but the probability and conditions of popping sounds are different, so they need to be detected separately.

[0026] Step 220: Generate control commands based on the test actions.

[0027] Control commands can include operations such as starting playback, stopping playback, adjusting volume, or switching modes, to simulate real-world usage scenarios and induce changes in the audio path.

[0028] Step 230: Send the control command to the Bluetooth speaker under test to trigger a change in the audio path of the Bluetooth speaker; Step 240: Listen to the status change signal of the Bluetooth speaker under test; The status change signal can be the status change signal corresponding to key states such as playback start, stop, sudden volume change, mode switching, Bluetooth connection establishment / disconnection, and audio stream reconstruction.

[0029] State change signals can be monitored by the event listening module.

[0030] Step 250: After the state change signal is detected, a high-sensitivity detection time window is triggered according to the target test scenario. The audio signal output by the Bluetooth speaker is collected with high precision within the high-sensitivity detection time window to obtain a high-precision audio signal. The audio signal can be acquired by an audio acquisition module. During the high-sensitivity detection time window, the audio acquisition module will acquire the audio signal with higher sampling resolution and accuracy.

[0031] In one embodiment of the present invention, the target test scenario includes multiple event types, that is, the high-sensitivity detection time window can be set with different durations according to different event types.

[0032] A highly sensitive detection window is activated when a specific event occurs. The duration of this window is dynamically adaptive, intelligently adjusting based on the characteristics of the triggering event, thus optimizing the allocation of detection resources and the comprehensiveness of detection. Some transient events (such as sudden volume changes) may only produce pops for a very short time; in this case, a shorter window is sufficient, avoiding unnecessary resource consumption. However, other complex events (such as Bluetooth connection establishment or audio stream reconstruction) may involve lengthy system initialization or state transition processes, and potential pops may occur over a longer period. In these cases, a longer window is required to ensure no missed detections. This adaptive duration setting improves detection efficiency and accuracy, ensuring optimal capture of pops in various complex scenarios.

[0033] For example, when the system detects a "playback start complete" event, it immediately initiates a high-sensitivity detection window with a preset duration (e.g., 500 milliseconds). When the system detects a "volume jump event," the high-sensitivity detection window may be set to 200 milliseconds because its transient process is usually short; while when a "Bluetooth connection establishment event" is detected, considering the complexity of the Bluetooth protocol stack and audio path establishment, the high-sensitivity detection window may be set to 1000 milliseconds to ensure coverage of all possible popping sound events.

[0034] Step 260: Extract features from the high-precision audio signal to obtain transient feature vectors; Step 270: Determine whether a popping sound exists based on the transient feature vector and the popping sound judgment threshold.

[0035] In this embodiment of the invention, a test action corresponding to the target test scenario is acquired, a control command is generated based on the test action, and the control command is sent to the Bluetooth speaker under test to trigger an audio path change in the Bluetooth speaker. The state change signal of the Bluetooth speaker under test is monitored. Upon detecting the state change signal, a high-sensitivity detection time window is triggered according to the target test scenario. Within this high-sensitivity detection time window, the audio signal output by the Bluetooth speaker is acquired with high precision to obtain a high-precision audio signal. Feature extraction is performed on the high-precision audio signal to obtain a transient feature vector. Based on the transient feature vector and a popping sound judgment threshold, it is determined whether a popping sound exists. In this embodiment of the invention, detection within a high-sensitivity detection time window can improve detection sensitivity, and testing according to different target test scenarios can better determine whether a popping sound exists.

[0036] In this embodiment of the invention, step 260, which involves extracting features from the high-precision audio signal to obtain a transient feature vector, includes: The frame length is obtained based on the target test scenario and the preset sampling rate; According to the frame length, the high-precision audio signal is divided into multiple subframes, and the frame length of each subframe is the frame length. Acquire the peak value, instantaneous peak amplitude, short-time energy change rate, transient pulse duration, and amplitude abrupt change state of adjacent sampling points within each subframe; Get the average peak value, maximum peak value, and number of times the peak value exceeds the first threshold within each subframe; The transient feature vector is obtained based on the instantaneous peak amplitude, the short-term energy change rate, the transient pulse duration, the amplitude abrupt change state of adjacent sampling points, the average peak value, the maximum peak value, and the number of times the peak value exceeds the first threshold.

[0037] In this embodiment of the invention, the instantaneous peak amplitude refers to the maximum absolute amplitude of the sampling points within each frame as the peak value, combined with the peak sequence updated in real time by the sliding window.

[0038] In this embodiment of the invention, the shorter the frame length and the higher the sampling rate, the easier it is to capture effective information. However, the amount of data collected is larger, and the amount of subsequent data processing is larger, which means the detection speed is slower.

[0039] The sampling rate and frame length settings also need to be matched. A high sampling rate combined with a long frame length results in a larger amount of data collected per frame; conversely, a low sampling rate combined with a short frame length results in too little data collected per frame to capture effective information. In this embodiment of the invention, a reasonable frame length is set according to the sampling rate, typically between 1 and 5 Ms.

[0040] In this embodiment of the invention, obtaining the peak value within each subframe includes: Obtain the absolute amplitude of each sampling point within each subframe; The maximum absolute amplitude is taken as the peak value; Obtaining the duration of the transient pulse includes: The duration for which the absolute amplitude of the sampling point continuously exceeds the second threshold is taken as the duration of the transient pulse.

[0041] In this embodiment of the invention, obtaining the short-time energy change rate includes: The first difference between the audio energy of the current subframe and the audio energy of the previous subframe is obtained as the short-time energy change rate.

[0042] The short-time energy change rate can be obtained as follows: △E = Ecurrent - Eprev △E is the short-time energy change rate, Ecurrent is the audio energy of the current subframe, and Eprev is the audio energy of the previous subframe.

[0043] In this embodiment of the invention, the short-time energy change rate can be used to detect transient impacts. The duration of the transient pulse can be used to distinguish between normal volume changes and popping signals.

[0044] In this embodiment of the invention, obtaining the amplitude change state of the adjacent sampling points includes: Obtain the second difference between the absolute amplitude of the current sampling point and the absolute amplitude of the previous sampling point; If the second difference is greater than or equal to the third threshold, the current sampling point is marked as a transient anomaly. If the second difference is less than the third threshold, the current sampling point is marked as transient normal.

[0045] The second difference between the absolute amplitude of the current sampling point and the absolute amplitude of the previous sampling point can be obtained in the following way: D2[n] = |x[n] - x[n - 1] D2[n] is the second difference, x[n] is the absolute amplitude of the current sampling point, and x[n - 1] is the absolute amplitude of the previous sampling point.

[0046] The first threshold, second threshold, and third threshold mentioned above in this invention are parameters corresponding to the target test scenario. The first threshold, second threshold, and third threshold are all essentially thresholds; they are simply referred to as "first," "second," etc., for distinction. The first threshold, second threshold, or third threshold corresponding to different target test scenarios may be the same or different.

[0047] The transient feature vector in this embodiment of the invention is formed by combining the above features, and can be used as input for popping sound judgment.

[0048] In this embodiment of the invention, step 270, determining whether a popping sound exists based on the transient feature vector and the popping sound judgment threshold, includes: Based on the target test scenario, the corresponding scenario dynamic threshold is obtained as the popping sound judgment threshold; If the transient feature vector exceeds the pop sound judgment threshold, then a pop sound is determined to exist.

[0049] The test results can be saved and a report generated, which includes whether a popping sound was present. If a popping sound was present, the report will include the time, intensity, and type of the popping sound, for subsequent analysis and tracing. If no popping sound was present, the test results can be used as historical test data for this test scenario.

[0050] In this embodiment of the invention, after determining whether a popping sound exists based on the transient feature vector and the popping sound judgment threshold, i.e. after step 270, the method further includes: The popping sound judgment threshold is dynamically adjusted based on historical detection data; The historical detection data refers to the range of normal transient peak values ​​in multiple target test scenarios.

[0051] In this embodiment of the invention, the pop sound judgment threshold is dynamically adjusted based on historical detection data. This historical data includes samples that have already been excluded as pop sounds, thus ensuring the accuracy and robustness of the threshold. In this embodiment, the historical detection data can statistically analyze the range of normal transient peak values ​​in 1000 pop-free tests within this detection scenario.

[0052] In one embodiment of the present invention, the method further includes an abnormal data alarm with an adaptive threshold generation mechanism.

[0053] When continuous abnormal data is detected to exceed the reasonable statistical range, the system can pause threshold updates and issue an alarm, which can increase the robustness of the system, prevent the threshold mechanism from being contaminated by continuous erroneous data, and significantly improve the reliability and stability of the adaptive threshold generation mechanism.

[0054] In actual testing, if the Bluetooth speaker under test has a serious defect, or if there is continuous interference in the testing environment, it may cause continuous popping sounds or abnormal signals. If the threshold generation mechanism still attempts to adapt under such circumstances, the threshold may be incorrectly raised or lowered, thus affecting the accuracy of subsequent detection. By pausing threshold updates and issuing an alarm, the system can promptly detect and alert to fundamental problems in the testing environment or the device under test, preventing threshold contamination, ensuring the validity of the threshold and the accuracy of the detection results, and reducing false positives or false negatives caused by incorrect thresholds.

[0055] Suppose that during long-term loop testing, the threshold for normal transient peak values ​​is set to X based on historical data. If, in 10 consecutive "playback start" operations, the popping sound detection module detects transient peak values ​​far exceeding X (e.g., reaching 2X or 3X), and these abnormal data continue to occur even after excluding the constraint of a single abnormal sample, the system will determine that this falls under the category of "continuous abnormal data exceeding the reasonable statistical range." At this point, the system will pause further updates to the threshold and issue an alert to the tester, such as displaying "Warning: The device under test continues to produce severe popping sounds; threshold updates have been paused. Please check the device or test environment," thereby preventing the threshold from being incorrectly raised by these continuous abnormal data.

[0056] In this embodiment of the invention, in modern Bluetooth speaker products, users may simultaneously connect to multiple audio source devices (such as mobile phones and tablets), or combine speakers with other Bluetooth speakers to form a multi-room system (such as TWS pairing and Auracast broadcasting), and frequently perform complex operations such as audio source switching, device pairing / dispairing, volume synchronization / asynchronous adjustment, and audio stream redirection between different devices. These operations will cause frequent reconstruction of the audio path, rapid switching of the amplifier state, and complex interactions of the Bluetooth protocol stack, which can easily generate imperceptible popping sounds during transient processes.

[0057] This solution generates test actions based on the target test scenario, simulating various complex user interactions in a multi-device environment, such as quickly switching Bluetooth audio sources, performing TWS networking and disbanding, and switching audio output between different speakers. Simultaneously, it captures system state change events triggered by these complex operations in real time, such as Bluetooth connection establishment / disconnection, audio stream redirection completion, and TWS pairing success / failure. Once such an event is detected, an event-triggered high-sensitivity detection time window mechanism is immediately activated, ensuring that the audio acquisition module acquires audio signals with high precision during these critical transient moments, the signal analysis module finely extracts transient features, and, combined with dynamic thresholds provided by the adaptive threshold generation module, the pop sound detection module performs high-sensitivity pop sound identification. This solves the problems of existing technologies, which mainly rely on manual testing in complex multi-device scenarios, leading to cumbersome operations, difficulty in accurately capturing state changes, and the strong transient nature of pop sounds, resulting in missed detections, low efficiency, and inconsistent results.

[0058] However, in the specific application scenarios of multi-device interconnection and complex audio routing mentioned above, this solution faces a unique technical problem: the asynchronous nature of the logical state change events captured by the event monitoring module and the transient changes of the actual audio path inside the tested speaker in time.

[0059] The problem arises because when a system involves complex interactions between multiple Bluetooth devices (such as multiple audio source devices or multiple Bluetooth speakers), such as switching playback from phone A to phone B, or performing TWS speaker networking / disbanding operations, these operations are often distributed and asynchronous processes. Event monitoring modules typically obtain "state change events" through protocol stack event interfaces or control command feedback interfaces. These events reflect the completion of logical state transitions at the system level. However, there may be a variable and uncertain time delay between the completion of the logical state transition and the actual physical transient change occurring in the audio path (such as the DAC or amplifier) ​​within the tested Bluetooth speaker, ultimately reflected in the acoustic output.

[0060] For example, when the "Bluetooth connection established" event is captured by the monitoring module, the amplifier inside the speaker may not yet be fully stable, or the decoding and resampling process of the audio stream may still be in progress. This could cause the actual pop transient to occur a short time after the event is reported. In multi-device scenarios, this latency is further complicated and uncertain due to factors such as communication protocols between devices, processing capabilities, network congestion, and different device firmware versions. If the high-sensitivity detection time window is activated only based on the immediate triggering of the event, then when the actual audio transient change occurs, the detection window may have already been activated for some time, or even closed. This could lead to the inability to accurately capture the start point of the pop or miss the entire pop event, thereby reducing the effectiveness of high-sensitivity detection and increasing the risk of missed detection. This temporal asynchrony is a unique challenge in complex multi-device interaction scenarios, requiring the system not only to identify events but also to accurately predict or perceive the precise time point of the actual audio transient after the event occurs.

[0061] To address the asynchrony issue between logical state change events and actual audio transient changes in complex multi-device interaction scenarios, this invention proposes a transient event timing calibration and dynamic window adjustment mechanism to ensure that the high-sensitivity detection time window can accurately align with the actual audio transient occurrence time.

[0062] When detecting multiple interactive Bluetooth speakers in the method of this embodiment of the invention, the method further includes: Continuously pre-buffer audio data and acquire buffered data; Upon detecting the state change signal, the high-sensitivity detection time window is triggered according to the target test scenario. During the high-sensitivity detection time window, the audio signals output by multiple Bluetooth speakers are collected with high precision to obtain the high-precision audio signals. The buffered data and the high-precision audio signal are combined into a merged signal; Perform transient feature pre-analysis on the merged signal to obtain the time of audio transient occurrence; Set a transient timestamp at the moment the audio transient occurs; The high-sensitivity detection time window is adjusted according to the transient timestamp, so that the start time of the high-sensitivity detection time window is earlier than the first transient timestamp.

[0063] In this embodiment of the invention, continuous audio data pre-buffering can be low-power, low-resolution audio data pre-buffering. Different devices have different power consumption and sampling resolution. Low power consumption and low resolution are relative to the current device and can typically be set to less than 10% or 10%-15% of the current device's rated power. Low resolution can be 10%-20% of the current device's preset sampling frequency.

[0064] In this embodiment of the invention, audio data one second before the event occurs can be cached. When the event monitoring module detects any state change event, the system immediately instructs the audio acquisition module to continue acquiring audio data at high resolution and high precision, and merges it with the buffered data to form a merged signal covering a longer period before and after the event (e.g., one second before the event to three seconds after the event).

[0065] Pre-buffering ensures that transient pops that may occur before the event occur can also be captured. Extended acquisition provides sufficient time margin for subsequent transient localization to handle the variable delay between the logical event and the actual audio transient.

[0066] In this embodiment of the invention, a transient feature pre-analysis is performed immediately after the merged signal is obtained. This pre-analysis employs a relatively relaxed but efficient algorithm (e.g., a fast scan based on short-term energy mutations and peak amplitude change rates) to identify the most significant audio transient occurrences within the data segment and assign them precise transient timestamps. The transient timestamp represents the starting point or the point of most drastic change in the actual audio path, rather than the reporting time of a logical event.

[0067] This pre-analysis shifts the triggering of high-sensitivity detection from relying on logical events to relying on the physical characteristics of the actual audio signal. By analyzing the audio data itself, it proactively identifies the precise time point at which popping sounds are most likely to occur, thus overcoming the uncertainty caused by the delay in logical event reporting.

[0068] After setting a transient timestamp at the moment the audio transient occurs, the high-sensitivity detection time window is adjusted according to the transient timestamp so that the start time of the high-sensitivity detection time window is earlier than the first transient timestamp.

[0069] For example, if a logical event is reported at time T0, but the actual audio transient is located at T0 + 250ms, then the high-sensitivity detection window will start at T0 + 240ms (slightly earlier than the transient point) and continue for the preset detection duration. Furthermore, the duration of the high-sensitivity detection window can be fine-tuned based on the duration or intensity of the transient to ensure complete coverage of the entire transient process.

[0070] This dynamic placement and adjustment ensures that highly sensitive detection strategies (such as increasing sampling resolution and lowering the pop detection threshold) can accurately target the critical moments of actual audio transients. It concentrates detection resources where they are most needed, greatly improving the accuracy and sensitivity of pop capture and effectively solving the problem of missed detections caused by temporal asynchrony.

[0071] During multiple test cycles, the average time offset and its fluctuation range between a specific logical event (e.g., "TWS networking complete") and the actual audio transient timestamp are recorded. This historical data is stored and used for predictive adjustments to the high-sensitivity detection window in subsequent tests. For example, for events with a known average delay of 200ms, the system can start pre-analysis 200ms before the logical event is reported or directly adjust the start time of the high-sensitivity window.

[0072] By learning from historical data, the system can establish a temporal mapping relationship between logical events and physical transients. This enables the system to more intelligently and efficiently predict and align high-sensitivity detection windows when facing repetitive and complex interaction scenarios, further improving the robustness and efficiency of automated detection.

[0073] The method of this invention can effectively solve the specific technical problem of time asynchrony between logical events and actual audio transients in complex multi-device interaction scenarios, ensuring that the high-sensitivity detection window always accurately covers the critical moment when popping occurs, thereby significantly improving the accuracy and reliability of automated detection of popping in Bluetooth speakers.

[0074] The above-mentioned Bluetooth speaker popping detection method is derived using the unique technical features of Bluetooth speaker popping detection methods, and achieves the beneficial effect of solving the technical problems mentioned in the background art.

[0075] In this embodiment of the invention, the above-described method and process can be executed by the test process management module to automatically execute the test process according to a preset test script.

[0076] This module is a component of the automated testing platform in the core technical solution. As an upper-level coordinator, it is responsible for orchestrating and executing the entire automated testing process for popping sound detection.

[0077] The core contribution of this module lies in automating and streamlining the entire pop detection process. The various modules in the core technical solution (such as motion control, audio acquisition, and pop detection) provide the basic capabilities required for detection, while the test process management module integrates these capabilities and automatically executes the process steps of the method described in this embodiment of the invention according to a preset test script. This greatly improves testing efficiency, ensures test repeatability, and supports long-term automated operation, solving the problems of low efficiency and inconsistent processes in manual testing.

[0078] This invention also provides a Bluetooth speaker popping sound detection device, which applies the method described above, such as... Figure 3 As shown, the device includes: The motion control module 310 is used to acquire test actions corresponding to the target test scenario, and is also used to generate control commands based on the test actions, send the control commands to the Bluetooth speaker under test, and trigger changes in the audio path of the Bluetooth speaker. Event monitoring module 320 is used to monitor the status change signals of the Bluetooth speaker under test; The audio acquisition module 330 is used to, upon detecting the state change signal, trigger a high-sensitivity detection time window according to the target test scenario, and perform high-precision acquisition of the audio signal output by the Bluetooth speaker within the high-sensitivity detection time window to obtain a high-precision audio signal. The signal analysis module 340 is used to extract features from the high-precision audio signal and obtain transient feature vectors; The pop sound detection module 350 is used to determine whether a pop sound exists based on the transient feature vector and the pop sound detection threshold.

[0079] In this embodiment of the invention, the device further includes an adaptive threshold generation module, used for: The popping sound judgment threshold is dynamically adjusted based on historical detection data; The historical detection data refers to the range of normal transient peak values ​​in multiple target test scenarios.

[0080] In this embodiment of the invention, the audio acquisition module 330 is further used for: The frame length is obtained based on the target test scenario and the preset sampling rate; According to the frame length, the high-precision audio signal is divided into multiple subframes, and the frame length of each subframe is the frame length. Acquire the peak value, instantaneous peak amplitude, short-time energy change rate, transient pulse duration, and amplitude abrupt change state of adjacent sampling points within each subframe; Get the average peak value, maximum peak value, and number of times the peak value exceeds the first threshold within each subframe; The transient feature vector is obtained based on the instantaneous peak amplitude, the short-term energy change rate, the transient pulse duration, the amplitude abrupt change state of adjacent sampling points, the average peak value, the maximum peak value, and the number of times the peak value exceeds the first threshold.

[0081] In this embodiment of the invention, the audio acquisition module 330 is further used for: Obtain the absolute amplitude of each sampling point within each subframe; The maximum absolute amplitude is taken as the peak value; In this embodiment of the invention, the audio acquisition module 330 is further used for: The duration for which the absolute amplitude of the sampling point continuously exceeds the second threshold is taken as the duration of the transient pulse; In this embodiment of the invention, the audio acquisition module 330 is further used for: The first difference between the audio energy of the current subframe and the audio energy of the previous subframe is obtained as the short-time energy change rate.

[0082] In this embodiment of the invention, the audio acquisition module 330 is further used for: Obtain the second difference between the absolute amplitude of the current sampling point and the absolute amplitude of the previous sampling point; If the second difference is greater than or equal to the third threshold, the current sampling point is marked as a transient anomaly. If the second difference is less than the third threshold, the current sampling point is marked as transient normal.

[0083] In this embodiment of the invention, the pop sound detection module 350 is further used for: Based on the target test scenario, the corresponding scenario dynamic threshold is obtained as the popping sound judgment threshold; If the transient feature vector exceeds the pop sound judgment threshold, then a pop sound is determined to exist.

[0084] In this embodiment of the invention, "first difference" and "second difference" are intermediate parameters, essentially the difference between two identical parameters. For example, the first difference is the difference in audio energy, and the second difference is the difference in absolute amplitude. For ease of description and distinction, "first" and "second" are used in this document.

[0085] When the popping sound detection module 350 detects multiple Bluetooth speakers simultaneously, the audio acquisition module 330 is also used for: Continuously pre-buffer low-power, low-resolution audio data and acquire buffered data; Upon detecting the state change signal, the high-sensitivity detection time window is triggered according to the target test scenario. The audio signal output by the Bluetooth speaker is then acquired with high precision within the high-sensitivity detection time window. The buffered data and the high-precision audio signal are combined into a merged signal; Perform transient feature pre-analysis on the merged signal to obtain the time of audio transient occurrence; Set a transient timestamp at the moment the audio transient occurs; The high-sensitivity detection time window is adjusted according to the transient timestamp, so that the start time of the high-sensitivity detection time window is earlier than the first transient timestamp.

[0086] In this embodiment of the invention, the device further includes a test process management module, which is used to automatically execute the test process according to a preset test script.

[0087] This module is a component of the automated testing platform in the core technical solution. As a higher-level coordinator, it is responsible for orchestrating and executing the entire automated testing process for popping sound detection. It works in conjunction with the motion control module 310 and the event monitoring module 320 in the core technical solution to ensure the orderly execution of the testing steps.

[0088] The core contribution of this module lies in automating and streamlining the entire pop detection process. The various modules in the core technical solution (such as motion control, audio acquisition, and pop detection) provide the basic capabilities required for detection, while the test process management module integrates these capabilities and automatically executes the process steps of the method described in this embodiment of the invention according to a preset test script. This greatly improves testing efficiency, ensures test repeatability, and supports long-term automated operation, solving the problems of low efficiency and inconsistent processes in manual testing.

[0089] The specific process executed by this test process management module. For example, this module will first execute "initialize the test environment", then load "load the target test scenario", then instruct "action control module 310 to trigger test actions" and continuously listen to the state changes of "event listening module 320". When a specific event (state change signal) is detected, a high-sensitivity detection window is triggered, and subsequent steps such as audio acquisition, signal analysis, pop sound judgment and data recording are coordinated until the entire test script is completed or the preset number of cycles are executed.

[0090] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the following method: acquiring a test action corresponding to a target test scenario; generating a control command based on the test action; sending the control command to a Bluetooth speaker under test to trigger an audio path change in the Bluetooth speaker; monitoring a state change signal of the Bluetooth speaker under test; upon detecting the state change signal, triggering a high-sensitivity detection time window based on the target test scenario, performing high-precision acquisition of the audio signal output by the Bluetooth speaker within the high-sensitivity detection time window to obtain a high-precision audio signal; extracting features from the high-precision audio signal to obtain a transient feature vector; and determining whether a popping sound exists based on the transient feature vector and a popping sound judgment threshold.

[0091] This invention also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the following method: acquiring a test action corresponding to a target test scenario; generating a control command based on the test action; sending the control command to a Bluetooth speaker under test to trigger an audio path change in the Bluetooth speaker; monitoring a state change signal of the Bluetooth speaker under test; upon detecting the state change signal, triggering a high-sensitivity detection time window based on the target test scenario, performing high-precision acquisition of the audio signal output by the Bluetooth speaker within the high-sensitivity detection time window to obtain a high-precision audio signal; performing feature extraction on the high-precision audio signal to obtain a transient feature vector; and determining whether a popping sound exists based on the transient feature vector and a popping sound judgment threshold.

[0092] The above-mentioned Bluetooth speaker popping sound detection method achieves the beneficial effect of solving the technical problems mentioned in the background art.

[0093] Figure 2 This is a flowchart illustrating a Bluetooth speaker popping sound detection method in one embodiment. It should be understood that, although... Figure 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0094] Figure 4 An internal structural diagram of a computer device in one embodiment is shown. Specifically, this computer device may be... Figure 1 The Bluetooth speaker popping noise detection device 120 in the middle. For example... Figure 4As shown, the computer device includes a processor, memory, network interface, input device, and display screen connected via a system bus. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement a Bluetooth speaker pop-out detection method. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to implement the Bluetooth speaker pop-out detection method. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0095] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device to which the present invention is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0096] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0097] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0098] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.

Claims

1. A method for detecting popping sounds in a Bluetooth speaker, characterized in that, The method includes: Obtain the test actions corresponding to the target test scenario; Generate control commands based on the test actions; Send the control command to the Bluetooth speaker under test to trigger a change in the audio path of the Bluetooth speaker; Listen for status change signals of the Bluetooth speaker under test; Upon detecting the state change signal, a high-sensitivity detection time window is triggered according to the target test scenario. During the high-sensitivity detection time window, the audio signal output by the Bluetooth speaker is acquired with high precision to obtain a high-precision audio signal. Feature extraction is performed on the high-precision audio signal to obtain transient feature vectors; Based on the transient feature vector and the pop sound judgment threshold, it is determined whether a pop sound exists; After determining whether a popping sound exists based on the transient feature vector and the popping sound threshold, the method further includes: The popping sound judgment threshold is dynamically adjusted based on historical detection data; The historical detection data refers to the range of normal transient peak values ​​in multiple target test scenarios. The step of extracting features from the high-precision audio signal to obtain transient feature vectors includes: The frame length is obtained based on the target test scenario and the preset sampling rate. Based on the frame length, the high-precision audio signal is divided into multiple subframes, and the length of each subframe is the frame length. The peak value, instantaneous peak amplitude, short-time energy change rate, transient pulse duration, and amplitude abrupt change state of adjacent sampling points are obtained within each subframe. Obtain the average peak value, maximum peak value, and number of times the peak value exceeds the first threshold within each subframe. The transient feature vector is obtained based on the instantaneous peak amplitude, the short-term energy change rate, the transient pulse duration, the amplitude abrupt change state of adjacent sampling points, the average peak value, the maximum peak value, and the number of times the peak value exceeds the first threshold.

2. The method according to claim 1, characterized in that, Obtain the peak value within each subframe, including: Obtain the absolute amplitude of each sampling point within each subframe; The maximum absolute amplitude is taken as the peak value; Obtaining the duration of the transient pulse includes: The duration for which the absolute amplitude of the sampling point continuously exceeds the second threshold is taken as the duration of the transient pulse; Obtaining the short-time energy change rate includes: The first difference between the audio energy of the current subframe and the audio energy of the previous subframe is obtained as the short-time energy change rate.

3. The method according to claim 1, characterized in that, Obtaining the amplitude change state of the adjacent sampling points includes: Obtain the second difference between the absolute amplitude of the current sampling point and the absolute amplitude of the previous sampling point; If the second difference is greater than or equal to the third threshold, the current sampling point is marked as a transient anomaly. If the second difference is less than the third threshold, the current sampling point is marked as transient normal.

4. The method according to claim 1, characterized in that, The step of determining whether a popping sound exists based on the transient feature vector and the popping sound threshold includes: Based on the target test scenario, the corresponding scenario dynamic threshold is obtained as the popping sound judgment threshold; If the transient feature vector exceeds the pop sound judgment threshold, then a pop sound is determined to exist.

5. The method according to claim 1, characterized in that, When testing multiple interactive Bluetooth speakers, the method further includes: Continuously pre-buffer audio data and acquire buffered data; Upon detecting the state change signal, the high-sensitivity detection time window is triggered according to the target test scenario. During the high-sensitivity detection time window, the audio signals output by multiple Bluetooth speakers are collected with high precision to obtain the high-precision audio signals. The buffered data and the high-precision audio signal are combined into a merged signal; Perform transient feature pre-analysis on the merged signal to obtain the time of audio transient occurrence; Set a transient timestamp at the moment the audio transient occurs; The high-sensitivity detection time window is adjusted according to the transient timestamp, so that the start time of the high-sensitivity detection time window is earlier than the first transient timestamp.

6. A Bluetooth speaker popping sound detection device, characterized in that, The apparatus comprising the method of any one of claims 1 to 5, wherein the method comprises: The motion control module is used to acquire test actions corresponding to the target test scenario, and also to generate control commands based on the test actions, send the control commands to the Bluetooth speaker under test, and trigger changes in the audio path of the Bluetooth speaker. The event monitoring module is used to monitor the status change signals of the Bluetooth speaker under test; The audio acquisition module is used to, upon detecting the state change signal, trigger a high-sensitivity detection time window according to the target test scenario, and perform high-precision acquisition of the audio signal output by the Bluetooth speaker within the high-sensitivity detection time window to obtain a high-precision audio signal. The signal analysis module is used to extract features from the high-precision audio signal and obtain transient feature vectors; The pop sound detection module is used to determine whether a pop sound exists based on the transient feature vector and the pop sound detection threshold.

7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 5.