Audio playing device detection method and apparatus, readable medium, and electronic device

By segmenting, extracting features, and clustering predictions from the audio data of audio playback devices, the problem of high cost and low efficiency in audio playback device testing is solved, achieving efficient and low-cost speaker quality testing.

CN115934997BActive Publication Date: 2026-07-24TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2021-09-30
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing technologies for testing audio playback devices are costly and inefficient, and cannot perform large-scale testing of speaker quality.

Method used

By acquiring the audio data to be tested, dividing it into multiple segments, extracting features and performing clustering prediction, and using a preset classification library to match and determine whether the device is normal or abnormal, the reliance on precision instruments is reduced.

Benefits of technology

It improves detection accuracy and efficiency, reduces detection costs, and eliminates the need for specialized precision instruments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115934997B_ABST
    Figure CN115934997B_ABST
Patent Text Reader

Abstract

The application discloses a kind of detection method, device, readable medium and electronic equipment of audio playing equipment, the method comprises: obtaining the audio data to be measured played by the audio playing equipment to be measured;According to the preset segmentation duration, the audio data to be measured is divided, and a plurality of audio segments to be measured are obtained;Extract the audio feature to be measured of audio segment to be measured, and the audio feature to be measured is clustered and predicted, and the prediction result of audio segment to be measured is obtained;According to prediction result, matching is carried out in preset classification library, to determine the predicted category of audio segment to be measured;According to the predicted category of a plurality of audio segments to be measured, the detection result of audio playing equipment to be measured is determined, and detection result includes normal equipment and abnormal equipment.The application embodiment can be applied to cloud technology, artificial intelligence, intelligent transportation, auxiliary driving and various scenes.The technical scheme provided by the application embodiment refines detection data, improves detection precision and accuracy, and has fast calculation speed, effectively improves detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer and data processing technology, and specifically relates to a detection method, apparatus, readable medium, and electronic device for an audio playback device. Background Technology

[0002] Many devices nowadays have audio playback capabilities. Audio playback is actually achieved through speakers installed within the device. When these speakers are damaged, audio playback problems arise, such as static, weak sound intensity, and stuttering. Currently, device manufacturers typically test speaker quality by randomly selecting a number of speakers from the supplier's finished product batches and conducting individual acoustic tests in an audio laboratory. The failure rate of these sampled speakers is then used to extrapolate the overall failure rate of the supplier's entire supply. However, this method, using specialized audio laboratories, requires sophisticated equipment, which is typically expensive. Furthermore, the laboratory environment is limited, and the testing cycle is long, limiting it to small-batch verification rather than large-scale testing.

[0003] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0004] The purpose of this application is to provide a method, apparatus, readable medium, and electronic device for detecting audio playback devices, so as to solve the problems of high cost and low efficiency in detecting audio playback devices.

[0005] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.

[0006] According to one aspect of the embodiments of this application, a method for detecting an audio playback device is provided, comprising:

[0007] Acquire the audio data to be tested played by the audio playback device under test;

[0008] The audio data to be tested is divided into multiple audio segments according to a preset segment duration.

[0009] Extract the audio features of the audio segment to be tested, and perform cluster prediction on the audio features to be tested to obtain the prediction result of the audio segment to be tested. The prediction result includes the predicted cluster center corresponding to the audio features to be tested.

[0010] The predicted category of the audio segment to be tested is determined by matching the predicted results in a preset classification library. The preset classification library includes a mapping relationship between preset cluster centers and cluster categories, and the cluster categories include normal categories and abnormal categories.

[0011] The detection result of the audio playback device under test is determined based on the predicted categories of multiple audio segments under test, and the detection result includes normal devices and abnormal devices.

[0012] According to one aspect of the embodiments of this application, a detection device for an audio playback device is provided, comprising:

[0013] The test data acquisition module is used to acquire the test audio data played by the audio playback device under test;

[0014] The test data segmentation module is used to divide the test audio data according to a preset segment duration to obtain multiple test audio segments;

[0015] The feature extraction and prediction module is used to extract the audio features to be tested from the audio segment to be tested, and to perform cluster prediction on the audio features to be tested to obtain the prediction result of the audio segment to be tested. The prediction result includes the predicted cluster center corresponding to the audio features to be tested.

[0016] The category matching module is used to match the prediction results in a preset classification library to determine the predicted category of the audio segment to be tested; the preset classification library includes a mapping relationship between preset cluster centers and cluster categories, and the cluster categories include normal categories and abnormal categories;

[0017] The detection result determination module is used to determine the detection result of the audio playback device under test based on the predicted categories of multiple audio segments under test, and the detection result includes normal devices and abnormal devices.

[0018] In one embodiment of this application, the feature extraction and prediction module includes:

[0019] The feature extraction unit is used to extract features from the audio segment to be tested based on multiple preset sampling numbers to obtain multiple audio features to be tested.

[0020] The clustering prediction unit is used to concatenate the multiple audio features to be tested into clustering features, and perform clustering prediction on the clustering features to be clustered using a preset clustering model to obtain the prediction result of the audio segment to be tested.

[0021] In one embodiment of this application, the category matching module is specifically used to: determine the similarity between the predicted cluster center and each preset cluster center in the preset classification library; and take the cluster category corresponding to the preset cluster center with the minimum similarity as the predicted category of the audio segment to be tested.

[0022] In one embodiment of this application, the feature to be clustered is a multi-dimensional feature; the clustering prediction unit is specifically used to: perform clustering prediction on the feature to be clustered using a preset clustering model to obtain the predicted cluster center corresponding to each dimension of the feature to be clustered;

[0023] Accordingly, the category matching module is specifically used to: match the predicted cluster centers corresponding to each dimension of the feature to be clustered in a preset classification library to determine the predicted category corresponding to each dimension of the feature to be clustered; and determine the predicted category of the audio segment based on the predicted category corresponding to each dimension of the feature to be clustered.

[0024] In one embodiment of this application, the apparatus further includes:

[0025] The sample data acquisition module is used to acquire sample audio data;

[0026] The sample data segmentation module is used to segment the sample audio data according to a preset segment duration to obtain multiple sample audio segments;

[0027] The sample feature extraction module is used to extract sample audio features from multiple sample audio segments to form a training sample set, wherein the sample audio features are multi-dimensional features;

[0028] The cluster center setting module is used to set the number of cluster centers of the clustering model according to the dimension of the sample audio features;

[0029] The model training module is used to perform cluster training on the training sample set based on the number of cluster centers to obtain a preset clustering model.

[0030] In one embodiment of this application, the training sample set includes positive sample audio features and negative sample audio features, wherein the number of cluster centers corresponding to the positive sample audio features is equal to the number of cluster centers corresponding to the negative sample audio features.

[0031] In one embodiment of this application, the apparatus further includes:

[0032] The library building module is used to obtain multiple sample cluster centers and cluster categories corresponding to each sample cluster center according to the preset clustering model; to use the sample cluster centers as the preset cluster centers, and to build the preset classification library according to the mapping relationship between the preset cluster centers and the cluster categories.

[0033] In one embodiment of this application, the feature extraction unit is specifically used to: extract sampling points of the preset number of samples from the audio segment to be tested to form the temporal features of the audio to be tested; convert the temporal features of the audio to be tested into the frequency domain features of the audio to be tested, and perform feature extraction on the frequency domain features of the audio to be tested to obtain the audio features to be tested.

[0034] In one embodiment of this application, the test data acquisition module is specifically used to: acquire the dual-channel audio data of the audio playback device under test; convert the dual-channel audio data into mono audio data, and use the mono audio data as the test audio data.

[0035] In one embodiment of this application, the test data segmentation module is specifically used to: divide the test audio data according to a preset segment duration to obtain multiple audio data blocks; when the decibel value of the audio data block meets a preset condition, the audio data block is used as the test audio segment.

[0036] In one embodiment of this application, the apparatus further includes:

[0037] The data cleaning module is used to clean the audio data to be tested in order to remove invalid audio data, including noise data and missing audio values.

[0038] In one embodiment of this application, the detection result determination module is specifically used to: determine a first number of audio segments to be tested whose predicted result is normal and a second number of audio segments to be tested whose predicted result is abnormal; if the first number is greater than the second number, then the detection result of the audio playback device to be tested is determined to be a normal device; if the first number is less than the second number, then the detection result of the audio playback device to be tested is determined to be an abnormal device.

[0039] According to one aspect of the embodiments of this application, a computer-readable medium is provided, on which a computer program is stored, which, when executed by a processor, implements the audio playback device detection method as described in the above technical solutions.

[0040] According to one aspect of the embodiments of this application, an electronic device is provided, the electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor executes the executable instructions to cause the electronic device to perform the audio playback device detection method as described in the above technical solutions.

[0041] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the audio playback device detection method as described in the above technical solutions.

[0042] In the technical solution provided in this application embodiment, the audio data to be tested is divided into multiple audio segments for detection, which refines the detection data and improves the detection precision and accuracy. The audio features of the audio segments to be tested are extracted for cluster prediction, and the predicted category is determined by matching the prediction results in a preset classification library. The matching method is simple, the calculation speed is fast, and the detection efficiency is effectively improved. At the same time, the technical solution provided in this application embodiment does not require specialized precision instruments, greatly reducing the hardware requirements of the detection process and thus reducing detection costs.

[0043] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0044] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0045] Figure 1 An exemplary system architecture block diagram illustrating the application of the technical solution of this application is shown schematically.

[0046] Figure 2 A flowchart illustrating the detection method for an audio playback device provided in an embodiment of this application is shown schematically.

[0047] Figure 3 A flowchart illustrating step 230 provided in an embodiment of this application is shown schematically.

[0048] Figure 4 The flowchart illustrating the modeling process of the preset clustering model provided in the embodiments of this application is shown in the illustration.

[0049] Figure 5 The flowchart illustrating the process of establishing a preset clustering model and a preset classification library provided in one embodiment of this application is shown in the illustration.

[0050] Figure 6 The flowchart illustrating the creation of a preset clustering model and a preset classification library is shown schematically.

[0051] Figure 7 The illustration schematically shows a method for detecting an audio playback device provided in one embodiment of this application.

[0052] Figure 8 A schematic block diagram of the detection device for an audio playback device provided in an embodiment of this application is shown.

[0053] Figure 9 A schematic diagram of a computer system architecture suitable for implementing the embodiments of this application is shown. Detailed Implementation

[0054] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.

[0055] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.

[0056] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0057] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0058] Figure 1 An exemplary system architecture block diagram illustrating the application of the technical solution of this application is shown schematically.

[0059] like Figure 1As shown, the system architecture 100 may include terminal device 110, network 120, and server 130. Terminal device 110 may include, but is not limited to, smartphones, tablets, laptops, desktop computers, smart voice interaction devices, smart home appliances, in-vehicle terminals, etc. Server 130 may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Network 120 may be a communication medium of various connection types capable of providing a communication link between terminal device 110 and server 130, such as a wired communication link or a wireless communication link. This invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, and assisted driving.

[0060] Depending on the implementation requirements, the system architecture in this application embodiment can have any number of terminal devices, networks, and servers. For example, server 130 can be a server group composed of multiple server devices. In addition, the technical solutions provided in this application embodiment can be applied to terminal device 110, or to server 130, or can be implemented jointly by terminal device 110 and server 130. This application does not impose any special limitations on this.

[0061] In one embodiment of this application, the audio playback device detection method provided in this application embodiment is executed by server 130. Server 130 is used to receive the audio data to be tested played by the audio playback device to be tested sent by terminal device 110, and to detect the audio playback device to be tested based on the audio data to be tested. Accordingly, the audio playback device detection device is generally set in server 130.

[0062] For example, terminal device 110 is an audio playback device under test. Terminal device 110 sends its self-playing audio data under test to server 130. After obtaining the audio data under test played by the audio playback device under test, server 130 divides the audio data under test into multiple audio segments according to a preset segment duration; then it extracts the audio features of the audio segments under test and performs cluster prediction on the audio features under test to obtain the prediction results of the audio segments under test. The prediction results include the predicted cluster centers corresponding to the audio features under test; then it matches the prediction results in a preset classification library to determine the predicted category of the audio segments under test; the preset classification library includes the mapping relationship between preset cluster centers and cluster categories, and the cluster categories include normal categories and abnormal categories; finally, it determines the detection result of the audio playback device under test based on the predicted categories of multiple audio segments under test, and the detection result includes normal devices and abnormal devices.

[0063] In one embodiment of this application, it will be readily understood by those skilled in the art that the audio playback device detection method provided in this embodiment can also be executed by the terminal device 110. Correspondingly, the audio playback device detection device can also be disposed in the terminal device 110, and this exemplary embodiment does not impose any special limitations on this. For example, in one exemplary embodiment, the terminal device 110 acquires the audio data to be tested played by the audio playback device under test; then extracts the audio features to be tested from the audio segments to be tested, and performs clustering prediction on the audio features to be tested; then matches the prediction results in a preset classification library to determine the predicted category of the audio segments to be tested; finally, the detection result of the audio playback device under test is determined based on the predicted categories of multiple audio segments to be tested.

[0064] In one embodiment of this application, the technical solution provided in this application can be implemented using cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology applied based on the cloud computing business model. It can form a resource pool, be used on demand, and is flexible and convenient. Cloud computing technology will become an important support. The backend services of technical network systems require a large amount of computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the Internet industry, in the future, every item may have its own identification mark, which will need to be transmitted to the backend system for logical processing. Data of different levels will be processed separately, and various industry data will all require strong system support, which can only be achieved through cloud computing.

[0065] For example, after acquiring the audio data played by the audio playback device under test, cloud computing is used to segment the audio data, extract features, perform cluster prediction, classify and match data, and determine the detection results. Cloud computing is a computing model that distributes computing tasks across a resource pool composed of a large number of computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." From the user's perspective, resources in the "cloud" are infinitely scalable, readily available, on-demand, expandable, and pay-as-you-go.

[0066] As a provider of fundamental cloud computing capabilities, we establish cloud resource pools (referred to as cloud platforms, generally called IaaS (Infrastructure as a Service) platforms) and deploy various types of virtual resources within these pools for external customers to choose from. The cloud resource pool primarily includes: computing devices (virtualized machines containing operating systems), storage devices, and network devices.

[0067] Based on logical function, a PaaS (Platform as a Service) layer can be deployed on top of the IaaS (Infrastructure as a Service) layer, and a SaaS (Software as a Service) layer can be deployed on top of the PaaS layer. Alternatively, SaaS can be deployed directly on top of IaaS. PaaS is a platform for running software, such as databases and web containers. SaaS refers to various types of business software, such as web portals and bulk SMS senders. Generally speaking, SaaS and PaaS are upper layers compared to IaaS.

[0068] In one embodiment of this application, the technical solution provided in this application can be implemented using Artificial Intelligence (AI) technology. Artificial Intelligence (AI) is a theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results. In other words, artificial intelligence is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.

[0069] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0070] For example, after acquiring the audio data played by the audio playback device under test, machine learning (ML) is used to extract features, perform cluster prediction, classify and match data, and determine the detection results. Machine learning is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory, among others. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.

[0071] The detection method for the audio playback device provided in this application will be described in detail below with reference to specific embodiments.

[0072] Figure 2 The flowchart illustrating the detection method for an audio playback device provided in an embodiment of this application is shown schematically. This method can be executed by a terminal device, such as... Figure 1 The terminal device 110 shown; this method can also be executed via a server, such as Figure 1 Server 130 is shown. (As shown) Figure 2 As shown, the audio playback device detection method provided in this application embodiment includes steps 210 to 250, as detailed below:

[0073] Step 210: Obtain the audio data to be tested played by the audio playback device under test.

[0074] Specifically, the audio playback device under test refers to a device equipped with an audio playback device (such as a speaker), such as a mobile phone or other electronic device with audio playback functionality, that needs to be tested. The audio data under test is the audio data normally played by the audio playback device of the audio playback device under test.

[0075] In one embodiment of this application, the audio playback device under test may be a speaker unit, and the audio data under test may be the audio data obtained by configuring the speaker unit into an auxiliary testing tool for audio playback.

[0076] In one embodiment of this application, the audio data to be tested played by different audio playback devices may differ. For example, some devices are equipped with only one speaker, and the audio data to be tested played by such devices is typically mono data. Some devices, in order to improve the user experience, are equipped with two speakers, each playing an audio signal, and the two speakers can play audio simultaneously; the audio data to be tested played by such devices is typically stereo data.

[0077] When the audio data played by the device under test is mono, it can be directly used as the audio data to be tested. When the audio data played by the device under test is stereo, it needs to be converted to mono and used as the audio data to be tested. This allows subsequent steps to process the mono data directly, reducing the complexity of the data to be processed later.

[0078] In one embodiment of this application, the two-channel data typically includes two mono data streams. After conversion, one of the mono data streams can be selected as the audio data to be tested; alternatively, the two mono data streams can be combined into a single mono data stream, and the combined mono data stream can be used as the audio data to be tested. The combination method can be to overwrite the other mono data stream with one mono data stream, or to splice the two mono data streams together to obtain the combined mono data stream.

[0079] In one embodiment of this application, after converting two-channel data into two-channel mono data, each mono data point can be associated with a corresponding channel or speaker. For example, the mono data obtained from the conversion of two-channel data includes left channel data and right channel data, with the left channel data corresponding to the left speaker and the right channel data corresponding to the right speaker. Thus, by subsequently detecting which channel's mono data, the quality of the speaker corresponding to that channel can be determined. Furthermore, identifiers can be set to determine the corresponding channel or speaker of the converted mono data. For example, identifier 1 represents the mono data played by the left speaker, and identifier 2 represents the mono data played by the right speaker.

[0080] In one embodiment of this application, due to factors such as the playback environment of the audio playback device under test, some invalid audio data may be present in the audio data played by the device. Invalid audio data includes, for example, ambient noise, or missing audio values ​​caused by pauses during playback. Therefore, after obtaining the audio data to be tested, data cleaning can be performed to remove invalid audio data. This results in audio data that more closely matches the audio playback device under test, thereby improving the detection accuracy of the audio playback device under test.

[0081] Step 220: Divide the audio data to be tested into multiple audio segments according to the preset segment duration.

[0082] Specifically, the audio data to be tested is a sequence of audio signals arranged in a time series. Dividing the audio data into segments according to preset durations involves segmenting the time series signal into multiple audio segments to be tested. The duration of each audio segment is the preset duration. The preset duration affects the number of audio segments to be tested, which in turn affects the accuracy of the detection. Therefore, the preset duration can be determined based on the desired number of audio segments. For example, if the audio data to be tested is 30 seconds long, and 10 audio segments are desired, the preset duration can be set to 3 seconds.

[0083] In one embodiment of this application, the preset segment duration can also be set directly based on the duration of the audio segment to be tested. In this case, there may be situations where the duration of the audio data to be tested cannot be divided evenly by the preset segment duration. In such cases, a padding operation can be performed on the last audio segment to be tested, that is, the portion of the audio segment to be tested that is not long enough to be filled with a preset value. For example, if the duration of the audio data to be tested is 40 seconds, the preset segment duration is set to 3 seconds, and the last audio segment to be tested is the audio signal from 39 seconds to 40 seconds of the audio data to be tested, and this audio segment is missing 2 seconds of content, then the content between 40 seconds and 42 seconds of the audio segment to be tested is filled with the preset audio signal (e.g., directly padding with zeros), thereby avoiding audio segments to be tested with different durations.

[0084] In one embodiment of this application, after the audio data to be tested is divided, it can be further processed according to the detection requirements. Specifically, the audio data to be tested is divided according to a preset segment duration to obtain multiple audio data blocks. When the decibel value of an audio data block meets a preset condition, the audio data block is used as the audio segment to be tested. For example, if it is necessary to remove silent segments, the preset condition for the decibel value of an audio data block to meet the condition is that the decibel value of the audio data block is lower than a silence threshold (e.g., -60dB). Another example is that if it is only necessary to detect the quality of the audio playback device under test when playing within a certain decibel range, then the preset condition for the decibel value of an audio data block to meet the condition is that the decibel value of the audio data block is within the preset decibel range.

[0085] In one embodiment of this application, the processing of the decibel value of the audio data block can also be performed during the data cleaning stage, and this embodiment of the application does not impose any restrictions.

[0086] Step 230: Extract the audio features of the audio segment to be tested, and perform cluster prediction on the audio features to be tested to obtain the prediction result of the audio segment to be tested. The prediction result includes the predicted cluster center corresponding to the audio features to be tested.

[0087] Specifically, the audio features to be tested are obtained by feature extraction from the audio segment. For example, the average decibel value of the audio segment can be used as the decibel feature. Clustering is the process of dividing a chaotic set of objects into multiple classes composed of similar objects. Objects within the same class have small differences, while objects in different classes have larger differences, and each class has a unique cluster center, which represents that class. Cluster prediction involves processing the audio features to be tested using a trained clustering model to obtain a prediction result corresponding to that audio feature. This prediction result includes the predicted cluster center corresponding to the audio feature.

[0088] In one embodiment of this application, such as Figure 3 As shown, step 230 may further include steps 310 to 320, specifically:

[0089] Step 310: Extract features from the audio segments to be tested based on multiple preset sampling numbers to obtain multiple audio features to be tested.

[0090] Specifically, during feature extraction, the audio segment to be tested is first sampled based on a preset number of samples to obtain sampled audio signals. Then, feature extraction is performed on the sampled audio signals to obtain the audio features to be tested. One preset number of samples corresponds to one audio feature to be tested.

[0091] In one embodiment of this application, multiple audio features can be obtained by extracting features from the audio segment under test based on different feature extraction conditions. For example, feature extraction based on the decibel mean yields the decibel mean of the audio segment under test; feature extraction based on the decibel median yields the median of the audio segment under test.

[0092] In one embodiment of this application, the process of feature extraction of the audio segment to be tested includes: extracting a number of sampling points of a preset number from the audio segment to be tested to form the temporal features of the audio segment to be tested; converting the temporal features of the audio segment to be tested into the frequency features of the audio segment to be tested, and extracting features from the frequency features of the audio segment to be tested to obtain the audio features to be tested.

[0093] Specifically, the audio segment to be tested is a series of audio signals arranged in a time sequence, which is a time-domain signal. The signal formed by extracting a preset number of sampling points from it is also a time-domain signal, denoted as the time-domain feature of the audio to be tested. After obtaining the time-domain feature of the audio to be tested, it is transformed into the frequency domain to obtain the frequency-domain feature of the audio to be tested. Then, the corresponding frequency-domain features are extracted in the frequency domain as the audio features to be tested.

[0094] In one embodiment of this application, the method for converting the time-domain features of the audio under test into the frequency-domain features of the audio under test can be by performing a Fourier Transform (FT) or a Fast Fourier Transform (FFT) on the time-domain features of the audio under test. The audio features under test can be mel128 features or MFCC (Mel Frequency Cepstral Coefficient) features.

[0095] For example, the feature extraction process for the audio segment under test includes mel128 feature extraction and MFCC feature extraction. Specifically, mel128 feature extraction is performed with an FFT size of 4096 (Fast Fourier Transform sample size). MFCC feature extraction is performed with an FFT size of 2048. Here, FFT size is equivalent to the preset sample size.

[0096] Both mel128 and MFCC features are multidimensional features; mel128 features are 128-dimensional, while MFCC features are typically 13-dimensional. After extracting mel128 or MFCC features, the quantization scale of each dimension may be inconsistent. In such cases, the extracted features can be standardized or normalized to ensure a uniform quantization scale for each dimension (e.g., ensuring that the values ​​of each dimension are within the range of 0 to 1). For example, after extracting mel128 features with an FFT size of 4096, the mel128 features can be standardized. Similarly, after extracting MFCC features with an FFT size of 2048, the MFCC features can be standardized.

[0097] It is understandable that the audio feature to be tested can also be other features of the audio segment to be tested, such as frequency features, waveform features, signal strength, power features, IMFCC (Inverse Mel Frequency Cepstral Coefficient), etc.

[0098] Step 320: Concatenate multiple audio features to be tested into clustering features, and perform clustering prediction on the clustering features using a preset clustering model to obtain the prediction results of the audio segments to be tested.

[0099] Specifically, when performing clustering prediction, multiple audio features to be tested are first concatenated into clustering features, and then the clustering features are input into a preset clustering model to perform clustering prediction and obtain the corresponding prediction results.

[0100] In one embodiment of this application, a preset clustering model performs clustering prediction on the features to be clustered as a whole, and the output prediction result is the predicted cluster center corresponding to the features to be clustered.

[0101] In one embodiment of this application, the concatenated feature to be clustered is actually a multi-dimensional feature. A preset clustering model can perform cluster prediction on each dimension of the feature to be clustered, thereby obtaining the predicted cluster centers corresponding to each dimension of the feature to be clustered. One dimension of the feature to be clustered can refer to a test audio feature, or it can refer to a single dimension of a test audio feature. For example, the feature to be clustered is composed of mel128 features and MFCC features (assuming the MFCC feature is 13-dimensional). If the type of the test audio feature is used as the dimension of the feature to be clustered, then the feature to be clustered has two dimensions, namely the mel128 feature and the MFCC feature. If the dimension of the test audio feature is used as the dimension of the feature to be clustered, then the feature to be clustered has 161 dimensions.

[0102] In one embodiment of this application, such as Figure 4 As shown, before performing clustering prediction on the audio features to be tested, steps 410 to 450 are included, specifically:

[0103] Step 410: Obtain sample audio data.

[0104] Specifically, the sample audio data includes positive sample data and negative sample data. Positive sample data is the audio data played by a normal speaker unit, while negative sample data is the audio data played by an abnormal speaker unit. Generally, the number of positive sample data is equal to the number of negative sample data.

[0105] In one embodiment of this application, the sample audio data includes audio data obtained by sampling audio information played by a sample audio playback device at different frequencies. The sample audio playback device can be stereo or mono. If the sample audio playback device is stereo, the collected sample audio data is stereo data, which needs to be converted into mono data. For example, 16-bit stereo data is obtained by sampling at frequencies of 48kHz, 32kHz, and 16kHz respectively, and then the stereo data is converted into mono data to obtain the sample audio data. Here, 16 bits means that the data size of each sample is 16 bits.

[0106] Step 420: Divide the sample audio data according to the preset segment duration to obtain multiple sample audio segments.

[0107] Specifically, the sample audio data is a series of audio signals arranged in a time sequence. Dividing the sample audio data according to a preset segment duration means segmenting the time-series signal in time to obtain multiple sample audio segments, each with a duration of the preset segment duration. For example, the preset segment duration is 3 seconds.

[0108] Step 430: Extract the sample audio features of multiple sample audio segments to form a training sample set. The sample audio features are multi-dimensional features.

[0109] Specifically, after obtaining the sample audio segments, features are extracted from each sample audio segment to obtain the corresponding sample audio features. All sample audio features constitute the training sample set. For example, mel128 features are extracted with an FFT size of 4096 and then standardized; MFCC features are extracted with an FFT size of 2048 and then standardized. Both the standardized mel128 and MFCC features are sample audio features, or they can be concatenated to form the sample audio features. Since the sample audio features include both positive and negative sample data, the corresponding training sample set includes both positive and negative sample audio features.

[0110] In one embodiment of this application, before extracting the sample audio features, the sample audio data can be cleaned to remove invalid audio data, and a silence threshold can be set to remove sample audio segments below the silence threshold.

[0111] In one embodiment of this application, when extracting sample audio features to form a training sample set, labels can be set for the categories of the sample audio features (positive sample audio features or negative sample audio features). For example, positive sample audio features can be labeled as label 1, and negative sample audio features can be labeled as label 0. In this way, the clustering category corresponding to the sample audio features can also be determined by the labels.

[0112] Step 440: Set the number of cluster centers for the clustering model according to the dimensions of the sample audio features.

[0113] Preferably, the number of cluster centers is equal to the dimension of the sample audio features, so that each dimension of the audio features can be clustered. Simultaneously, the number of cluster centers corresponding to positive sample audio features is equal to the number of cluster centers corresponding to negative sample audio features, ensuring that positive and negative samples have the same voting basis when determining the clustering results. Optionally, the number of cluster centers can also be less than the number of sample audio features. For example, the number of cluster centers can be set to 5000.

[0114] Step 450: Perform cluster training on the training sample set based on the number of cluster centers to obtain the preset clustering model.

[0115] Specifically, cluster training involves dividing the features in the training sample set into multiple categories, with the number of cluster centers equal to the number of samples in each category. Samples within each category have similar audio features, while samples from different categories exhibit significant differences in audio features. The trained clustering model is the pre-defined clustering model.

[0116] In one embodiment of this application, the clustering model employs an unsupervised network model and is trained using the K-means++ algorithm. Assuming the training sample set contains n data samples and the number of cluster centers is k, K-means++ clustering training refers to dividing these n data samples into k (k≤n) sets such that the within-cluster sum of squares (Within-Cluster Sum of Squares) is minimized within each set. In other words, the goal is to find a set S that satisfies the following formula: i :

[0117]

[0118] Where x represents the sample data in the training sample set, μ i Let set S i The mean of all data in the dataset.

[0119] In one embodiment of this application, during training, the model hyperparameters max_iter(1000) and n_init(10) are set. max_iter(1000) represents the maximum number of iterations of 1000 (the specific value can be set according to actual needs), and n_init(10) represents the number of initializations of 10 (the specific value can be set according to actual needs). The trained model can be stored as a pkl format file.

[0120] Continue to refer to Figure 2 Step 240: Match the predicted results in the preset classification library to determine the predicted category of the audio segment to be tested; the preset classification library includes the mapping relationship between preset cluster centers and cluster categories, and the cluster categories include normal categories and abnormal categories.

[0121] Specifically, the preset classification library mainly defines the mapping relationship between preset cluster centers and cluster categories. There are multiple preset cluster centers, and the cluster categories include two types: normal categories and abnormal categories. One cluster category can correspond to multiple preset cluster centers. Matching the prediction results within the preset classification library involves determining the preset cluster center in the library corresponding to the predicted cluster center of the audio feature to be tested, and then using the cluster category corresponding to that preset cluster center as the predicted category of the audio feature to be tested.

[0122] In one embodiment of this application, when a preset clustering model performs clustering prediction on the features to be clustered as a whole, a predicted cluster center is obtained. The matching step in the preset classification library is as follows: determining the similarity between the predicted cluster center and each preset cluster center in the preset classification library; and using the cluster category corresponding to the preset cluster center with the lowest similarity as the predicted category of the audio segment to be tested.

[0123] Specifically, the similarity between predicted cluster centers and preset cluster centers can be represented by the distance between them. For example, the distance between the predicted cluster centers and preset cluster centers can be calculated using the DTW (Dynamic Time Warping) algorithm, and this distance can be used as the similarity. Alternatively, the cosine similarity between the predicted cluster centers and preset cluster centers can also be used as the similarity. After determining the similarity between the predicted cluster centers and each preset cluster center, the smaller the similarity, the closer or more similar the predicted cluster center is to the corresponding preset cluster center. Therefore, the cluster category corresponding to the preset cluster center with the lowest similarity can be used as the predicted category of the audio segment to be tested.

[0124] In one embodiment of this application, when a preset clustering model performs cluster prediction on each dimension of the feature to be clustered, the predicted cluster center corresponding to each dimension of the feature to be clustered is obtained. The matching step in the preset classification library is as follows: matching the predicted cluster center corresponding to each dimension of the feature to be clustered in the preset classification library to determine the predicted category corresponding to each dimension of the feature to be clustered; and determining the predicted category of the audio segment based on the predicted category corresponding to each dimension of the feature to be clustered.

[0125] Specifically, after obtaining the predicted cluster centers for each dimension of the features to be clustered, the predicted cluster centers for each dimension are matched against a preset classification library. This involves calculating the similarity between the predicted cluster center for each dimension and each preset cluster center in the library, and then using the cluster type with the lowest similarity as the predicted category for that dimension. Finally, a voting process can be performed on the predicted categories for each dimension to determine the predicted category of the audio segment. For example, the number of dimensional features predicted as normal (referred to as the normal number) and the number of dimensional features predicted as abnormal (referred to as the abnormal number) are counted. When the normal number is greater than the abnormal number, the normal category is used as the predicted category for the audio segment; when the normal number is less than the abnormal number, the abnormal category is used as the predicted category for the audio segment.

[0126] In one embodiment of this application, before matching in a preset classification library based on the prediction results, the method further includes: obtaining multiple sample cluster centers corresponding to the training sample set and the cluster categories corresponding to each sample cluster center according to a preset clustering model; using the sample cluster centers as preset cluster centers, and establishing a preset classification library based on the mapping relationship between the preset cluster centers and the cluster categories.

[0127] Specifically, a well-trained clustering model can output multiple sample cluster centers corresponding to the training sample set. At the same time, based on the labels of the audio features of the samples in the training sample set, the cluster category corresponding to the sample cluster center can be determined. By establishing a mapping relationship between the sample cluster centers and the cluster categories, a preset classification library is obtained, and the sample cluster centers are the preset cluster centers in the preset classification library.

[0128] In one embodiment of this application, Figure 5 The flowchart illustrating an embodiment of this application for establishing a preset clustering model and a preset classification library is shown. The specific process is as follows: S510, Obtain sample audio data: This sample audio data includes positive sample data (normal speaker audio waveform) and negative sample data (abnormal audio waveform 1, abnormal audio waveform 2). S520, Feature extraction: Divide the sample audio data according to the preset segment duration to obtain multiple sample audio segments, and extract the sample audio features corresponding to each sample audio segment. S530, Select an appropriate window length and step size to convert the audio time series signal into frequency domain features. This step can use Fourier transform, where the window length and step size are parameters required for Fourier transform. S540, Analyze the characteristics and patterns based on the audio features of each genre, and extract effective features. Each genre refers to each sample audio data; this step constructs a training sample set from the sample audio features. S550, Select a suitable network model. This embodiment uses the Kmeans++ model. S560, Train the network model and obtain weights. Train the model using the training sample set. S570, Deploy the model and provide services. S580 classifies audio and outputs metrics: speaker category (normal, abnormal) and confidence level.

[0129] In one embodiment of this application, Figure 6The flowchart illustrating the establishment of a preset clustering model and a preset classification library is shown. The process mainly includes: S610, Image Data Acquisition: Acquiring a certain number of sample audio data, including positive and negative samples. S620, Image Feature Data Processing: Dividing the sample audio data according to preset segment durations to obtain multiple sample audio segments, and extracting the sample audio features corresponding to each sample audio segment to form a training sample set. S630, Median Filtering: Performing median filtering on the training sample set to eliminate isolated noise points. S640, K-means Clustering Training: Training the training sample set using the K-means++ algorithm. S650, Library Construction: Establishing a preset classification library based on the prediction results and clustering types output by the trained clustering model on the training sample set.

[0130] Continue to refer to Figure 2 Step 250: Determine the detection result of the audio playback device under test based on the predicted categories of multiple audio segments under test. The detection result includes normal devices and abnormal devices.

[0131] Specifically, after determining the predicted category of each audio segment in the audio data to be tested, a voting process is performed on the predicted category of each audio segment to determine the detection result of the audio data to be tested, which is also the detection result of the audio playback device to be tested.

[0132] In one embodiment of this application, the voting process for the predicted category of each audio segment to be tested specifically includes: determining a first number of audio segments to be tested whose predicted result is a normal category and a second number of audio segments to be tested whose predicted result is an abnormal category; if the first number is greater than the second number, the detection result of the audio playback device to be tested is determined to be a normal device; if the first number is less than the second number, the detection result of the audio playback device to be tested is determined to be an abnormal device.

[0133] Specifically, when the first quantity is greater than the second quantity, it indicates that most of the audio data under test is normal audio data, thus confirming that the audio playback device under test is a normal device. When the first quantity is less than the second quantity, it indicates that most of the audio data under test is abnormal audio data, thus confirming that the audio playback device under test is an abnormal device.

[0134] In one embodiment of this application, the voting process for predicting the category of each audio segment to be tested can also be as follows: when the first number of audio segments predicted as normal audio playback devices is greater than a preset threshold, the detection result of the audio playback device to be tested is determined to be a normal audio playback device; when the first number of audio segments predicted as normal audio playback devices is less than the preset threshold, the detection result of the audio playback device to be tested is determined to be an abnormal audio playback device. That is, when the amount of normal audio data in the audio data to be tested reaches a certain amount, the audio playback device to be tested is considered to be a normal device; otherwise, the audio playback device to be tested is considered to be an abnormal device. This judgment method does not need to consider the number of audio segments to be tested in the abnormal category, resulting in a smaller number of statistical counts.

[0135] In the technical solution provided in this application embodiment, the audio data to be tested is divided into multiple audio segments for detection, which refines the detection data and improves the detection precision and accuracy. The audio features of the audio segments to be tested are extracted for cluster prediction, and the predicted category is determined by matching the prediction results in a preset classification library. The matching method is simple, the calculation speed is fast, and the detection efficiency is effectively improved. Furthermore, the technical solution provided in this application embodiment does not require specialized precision instruments, greatly reducing the hardware requirements of the detection process and thus reducing detection costs. Moreover, the technical solution of this application can detect defective products before the individual speaker unit is put into use, and can also detect assembled equipment, making it convenient to operate and widely applicable.

[0136] In one embodiment of this application, Figure 7 The illustration schematically depicts a detection method for an audio playback device provided in an embodiment of this application. The method includes: S710, image data acquisition: acquiring audio data to be tested. S720, image feature data processing: dividing the audio data to be tested into multiple audio segments according to a preset segment duration, and extracting the audio features corresponding to each audio segment. S730, median filtering: performing median filtering on the multiple audio features to be tested to eliminate isolated noise points in the audio features. S740, PAA (Piecewise Aggregate Approximation): performing cluster prediction on the audio features to be tested to obtain prediction results for the audio segments, including the predicted cluster centers corresponding to the audio features. S750, DTW (Dynamic Time Warping): calculating the distance between the predicted cluster centers and each preset cluster center in a preset classification library according to the DTW algorithm, and using the cluster category corresponding to the minimum distance as the predicted category of the audio segment to be tested. S760, Return Result: Based on the predicted categories of multiple audio segments to be tested, a vote is taken, and the category with the most votes is the detection result of the audio playback device to be tested.

[0137] It should be noted that although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0138] The following describes an embodiment of the apparatus described in this application, which can be used to execute the detection method for the audio playback device in the above embodiments of this application. Figure 8 A schematic block diagram of the detection device for an audio playback device provided in an embodiment of this application is shown. Figure 8 As shown, the detection device for an audio playback device provided in this application embodiment includes:

[0139] The test data acquisition module 810 is used to acquire the test audio data played by the test audio playback device;

[0140] The test data segmentation module 820 is used to segment the test audio data according to a preset segment duration to obtain multiple test audio segments;

[0141] The feature extraction and prediction module 830 is used to extract the audio features to be tested from the audio segment to be tested, and to perform cluster prediction on the audio features to be tested to obtain the prediction result of the audio segment to be tested. The prediction result includes the predicted cluster center corresponding to the audio features to be tested.

[0142] The category matching module 840 is used to perform matching in a preset classification library based on the prediction result to determine the predicted category of the audio segment to be tested; the preset classification library includes a mapping relationship between preset cluster centers and cluster categories, and the cluster categories include normal categories and abnormal categories;

[0143] The detection result determination module 850 is used to determine the detection result of the audio playback device under test based on the predicted categories of multiple audio segments under test, and the detection result includes normal devices and abnormal devices.

[0144] In one embodiment of this application, the feature extraction and prediction module 830 includes:

[0145] The feature extraction unit is used to extract features from the audio segment to be tested based on multiple preset sampling numbers to obtain multiple audio features to be tested.

[0146] The clustering prediction unit is used to concatenate the multiple audio features to be tested into clustering features, and perform clustering prediction on the clustering features to be clustered using a preset clustering model to obtain the prediction result of the audio segment to be tested.

[0147] In one embodiment of this application, the category matching module 840 is specifically used to: determine the similarity between the predicted cluster center and each preset cluster center in the preset classification library; and use the cluster category corresponding to the preset cluster center with the minimum similarity as the predicted category of the audio segment to be tested.

[0148] In one embodiment of this application, the feature to be clustered is a multi-dimensional feature; the clustering prediction unit is specifically used to: perform clustering prediction on the feature to be clustered using a preset clustering model to obtain the predicted cluster center corresponding to each dimension of the feature to be clustered;

[0149] Accordingly, the category matching module 840 is specifically used to: match the predicted cluster centers corresponding to each dimension of the feature to be clustered in a preset classification library to determine the predicted category corresponding to each dimension of the feature to be clustered; and determine the predicted category of the audio segment based on the predicted category corresponding to each dimension of the feature to be clustered.

[0150] In one embodiment of this application, the apparatus further includes:

[0151] The sample data acquisition module is used to acquire sample audio data;

[0152] The sample data segmentation module is used to segment the sample audio data according to a preset segment duration to obtain multiple sample audio segments;

[0153] The sample feature extraction module is used to extract sample audio features from multiple sample audio segments to form a training sample set, wherein the sample audio features are multi-dimensional features;

[0154] The cluster center setting module is used to set the number of cluster centers of the clustering model according to the dimension of the sample audio features;

[0155] The model training module is used to perform cluster training on the training sample set based on the number of cluster centers to obtain a preset clustering model.

[0156] In one embodiment of this application, the training sample set includes positive sample audio features and negative sample audio features, wherein the number of cluster centers corresponding to the positive sample audio features is equal to the number of cluster centers corresponding to the negative sample audio features.

[0157] In one embodiment of this application, the apparatus further includes:

[0158] The library building module is used to obtain multiple sample cluster centers and cluster categories corresponding to each sample cluster center according to the preset clustering model; to use the sample cluster centers as the preset cluster centers, and to build the preset classification library according to the mapping relationship between the preset cluster centers and the cluster categories.

[0159] In one embodiment of this application, the feature extraction unit is specifically used to: extract sampling points of the preset number of samples from the audio segment to be tested to form the temporal features of the audio to be tested; convert the temporal features of the audio to be tested into the frequency domain features of the audio to be tested, and perform feature extraction on the frequency domain features of the audio to be tested to obtain the audio features to be tested.

[0160] In one embodiment of this application, the test data acquisition module 810 is specifically used to: acquire the dual-channel audio data of the audio playback device under test; convert the dual-channel audio data into mono audio data, and use the mono audio data as the test audio data.

[0161] In one embodiment of this application, the test data segmentation module 820 is specifically used to: divide the test audio data according to a preset segment duration to obtain multiple audio data blocks; when the decibel value of the audio data block meets a preset condition, the audio data block is used as the test audio segment.

[0162] In one embodiment of this application, the apparatus further includes:

[0163] The data cleaning module is used to clean the audio data to be tested in order to remove invalid audio data, including noise data and missing audio values.

[0164] In one embodiment of this application, the detection result determination module 850 is specifically used to: determine a first number of audio segments to be tested whose predicted result is normal and a second number of audio segments to be tested whose predicted result is abnormal; if the first number is greater than the second number, then the detection result of the audio playback device to be tested is determined to be a normal device; if the first number is less than the second number, then the detection result of the audio playback device to be tested is determined to be an abnormal device.

[0165] The specific details of the detection device for the audio playback device provided in the various embodiments of this application have been described in detail in the corresponding method embodiments, and will not be repeated here.

[0166] Figure 9 A schematic block diagram of a computer system architecture for implementing an electronic device according to embodiments of the present application is shown.

[0167] It should be noted that, Figure 9 The computer system 900 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0168] like Figure 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 902 or programs loaded from storage section 908 into random access memory (RAM). The RAM 903 also stores various programs and data required for system operation. The CPU 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output interface 905 (I / O interface) is also connected to the bus 904.

[0169] The following components are connected to the input / output interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a local area network card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output interface 905 as needed. A removable medium 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 910 as needed so that computer programs read from it can be installed into the storage section 908 as needed.

[0170] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 909, and / or installed from removable medium 911. When the computer program is executed by central processing unit 901, it performs various functions defined in the system of this application.

[0171] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or process a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be processed by any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0172] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0173] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0174] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application.

[0175] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.

[0176] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for detecting an audio playback device, characterized in that, include: Acquire the audio data to be tested played by the audio playback device under test; the audio playback device under test includes a speaker unit, and the audio data to be tested is the audio data obtained by configuring the speaker unit into an auxiliary testing tool for audio playback; The audio data to be tested is divided into multiple audio segments according to a preset segment duration. For each audio segment to be tested: based on each preset sampling number among multiple preset sampling numbers, extract sampling points equal to the preset sampling number from the audio segment to be tested to form the temporal features of the audio segment to be tested; convert the temporal features of the audio segment to be tested into frequency features of the audio segment to be tested, and perform feature extraction on the frequency features of the audio segment to be tested to obtain the audio features corresponding to the preset sampling number; concatenate multiple audio features to be tested into clustering features, and perform clustering prediction on the features of each dimension of the features to be clustered using a preset clustering model to obtain the predicted cluster centers corresponding to each dimension of the features to be clustered; The preset clustering model is obtained by training an unsupervised network model with the number of cluster centers set according to the dimensions of the sample audio features. The sample audio features include positive sample audio features and negative sample audio features, and the number of cluster centers corresponding to the positive sample audio features is equal to the number of cluster centers corresponding to the negative sample audio features. The preset clustering model is obtained through the following process: acquiring sample audio data; dividing the sample audio data according to a preset segment duration to obtain multiple sample audio segments; extracting sample audio features from multiple sample audio segments to form a training sample set, wherein the sample audio features are multi-dimensional features; setting the number of cluster centers for the clustering model according to the dimensions of the sample audio features; and performing clustering training on the training sample set based on the number of cluster centers to obtain the preset clustering model. The predicted cluster centers corresponding to each dimension of the features to be clustered are matched in a preset classification library to determine the predicted category of the audio segment to be tested; the preset classification library includes a mapping relationship between preset cluster centers and cluster categories, and the cluster categories include normal categories and abnormal categories; The speaker category and the corresponding confidence level are determined based on the predicted categories of multiple audio segments to be tested, wherein the speaker category includes normal and abnormal.

2. The method for detecting audio devices according to claim 1, characterized in that, The predicted category of the audio segment to be tested is determined by matching the predicted results against a preset classification library, including: Determine the similarity between the predicted cluster center and each preset cluster center in the preset classification library; The cluster category corresponding to the preset cluster center with the minimum similarity is used as the predicted category of the audio segment to be tested.

3. The detection method for an audio playback device according to claim 1, characterized in that, The features to be clustered are multi-dimensional features; Clustering prediction is performed on the features to be clustered using a preset clustering model to obtain the prediction result of the audio segment to be tested, including: By using a preset clustering model to predict the clustering of the features to be clustered, the predicted cluster centers corresponding to each dimension of the features to be clustered are obtained. Accordingly, based on the prediction results, a matching process is performed in a preset classification library to determine the predicted category of the audio segment to be tested, including: The predicted cluster centers corresponding to each dimension of the feature to be clustered are matched in a preset classification library to determine the predicted category corresponding to each dimension of the feature to be clustered. The predicted category of the audio segment is determined based on the predicted category corresponding to each dimension of the feature to be clustered.

4. The detection method for an audio playback device according to claim 1, characterized in that, The training sample set includes positive sample audio features and negative sample audio features, and the number of cluster centers corresponding to the positive sample audio features is equal to the number of cluster centers corresponding to the negative sample audio features.

5. The detection method for an audio playback device according to claim 1, characterized in that, Before calculating the similarity between the predicted cluster center prediction results for each dimension of the feature to be clustered and each preset cluster center in the preset classification library, the method further includes: Based on the preset clustering model, multiple sample cluster centers and cluster categories corresponding to each sample cluster center are obtained from the training sample set. The sample cluster centers are used as the preset cluster centers, and the preset classification library is established according to the mapping relationship between the preset cluster centers and the cluster categories.

6. The detection method for an audio playback device according to claim 1, characterized in that, Acquire the audio data to be tested played by the audio playback device under test, including: Acquire the dual-channel audio data of the audio playback device under test; The stereo audio data is converted into mono audio data, and the mono audio data is used as the audio data to be tested.

7. The detection method for an audio playback device according to claim 1, characterized in that, The audio data to be tested is divided into multiple audio segments according to a preset segment duration, including: The audio data to be tested is divided into multiple audio data blocks according to a preset segment duration; When the decibel value of the audio data block meets the preset conditions, the audio data block is used as the audio segment to be tested.

8. The method for detecting audio devices according to claim 1, characterized in that, Before dividing the audio data to be tested according to the preset segment duration, the method further includes: Data cleaning is performed on the audio data to be tested to remove invalid audio data, including noise data and missing audio values.

9. The detection method for an audio playback device according to claim 1, characterized in that, Determining the speaker category based on the predicted categories of multiple audio segments to be tested includes: Determine the first number of audio segments to be tested that are predicted to be in the normal category and the second number of audio segments to be tested that are predicted to be in the abnormal category; If the first quantity is greater than the second quantity, then the speaker category is determined to be normal; If the first quantity is less than the second quantity, then the speaker category is determined to be abnormal.

10. A detection device for an audio playback device, characterized in that, include: The test data acquisition module is used to acquire the test audio data played by the test audio playback device; the test audio playback device includes a speaker unit, and the test audio data is the audio data obtained by configuring the speaker unit into an auxiliary testing tool for audio playback; The test data segmentation module is used to divide the test audio data according to a preset segment duration to obtain multiple test audio segments; The feature extraction and prediction module is used for each audio segment to be tested: based on each preset sampling number among multiple preset sampling numbers, extracting sampling points of the preset sampling number from the audio segment to be tested to form the temporal features of the audio segment to be tested; converting the temporal features of the audio segment to be tested into frequency features of the audio segment to be tested, and performing feature extraction on the frequency features of the audio segment to be tested to obtain the audio features to be tested corresponding to the preset sampling number; concatenating multiple audio features to be tested into clustering features, and performing clustering prediction on the features of each dimension of the features to be clustered using a preset clustering model to obtain the predicted cluster centers corresponding to each dimension of the features to be clustered; The preset clustering model is obtained by training an unsupervised network model with the number of cluster centers set according to the dimensions of the sample audio features. The sample audio features include positive sample audio features and negative sample audio features, and the number of cluster centers corresponding to the positive sample audio features is equal to the number of cluster centers corresponding to the negative sample audio features. The preset clustering model is obtained through the following process: acquiring sample audio data; dividing the sample audio data according to a preset segment duration to obtain multiple sample audio segments; extracting sample audio features from multiple sample audio segments to form a training sample set, wherein the sample audio features are multi-dimensional features; setting the number of cluster centers for the clustering model according to the dimensions of the sample audio features; and performing clustering training on the training sample set based on the number of cluster centers to obtain the preset clustering model. The category matching module is used to match the predicted cluster centers corresponding to each dimension of the feature to be clustered in a preset classification library to determine the predicted category of the audio segment to be tested; the preset classification library includes a mapping relationship between preset cluster centers and cluster categories, and the cluster categories include normal categories and abnormal categories; The detection result determination module is used to determine the speaker category and the confidence level corresponding to the speaker category based on the predicted categories of multiple audio segments to be tested, wherein the speaker category includes normal and abnormal.

11. A computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the detection method for an audio playback device according to any one of claims 1 to 9.

12. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor executes the executable instructions to cause the electronic device to perform the detection method for the audio playback device according to any one of claims 1 to 9.

13. A computer program product, characterized in that, The computer program product or computer program includes computer instructions stored in a computer-readable storage medium; The processor of the computer device reads the computer instructions from a computer-readable storage medium, and executes the computer instructions to cause the computer device to perform the detection method of the audio playback device according to any one of claims 1 to 9.