Loudspeaker quality detection method based on time-frequency domain peak-valley feature learning
Through the method based on time-frequency domain peak and valley feature learning, the automated quality inspection speaker solves the problems of manual quality inspection fatigue and difficulty in recruiting workers, and achieves efficient and reliable quality inspection results.
Patent Information
- Application Number
- CN202210693485.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-17
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2042-06-17
AI Technical Summary
Existing speaker quality inspection methods rely on human hearing, which is prone to fatigue, resulting in reduced detection accuracy, difficulty in recruiting workers, high costs and low efficiency.
A method based on time-frequency domain peak and valley feature learning is adopted to collect speaker sound wave data, extract time domain and frequency domain features, establish a quality inspection feature database, and realize automated quality inspection.
It improves the reliability and efficiency of quality inspection, reduces the risk of manual misinspection, solves the problem of difficulty in recruiting workers, and reduces costs.
Smart Images

Figure CN115052241B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of loudspeaker quality detection methods based on time-frequency domain peak-valley feature learning, and in particular to a loudspeaker quality detection method based on time-frequency domain peak-valley feature learning. Background Art
[0002] With the booming development of industries like mobile phones, iPads, and laptops, electroacoustic components like speakers, as key components, are in high demand. Improving speaker production efficiency and quality is therefore crucial. For speaker products, a crucial production step is finished product quality inspection. Currently, most quality inspections are conducted manually by listening to standard audio played through the speakers to determine if there is noise. This method, on the one hand, can cause auditory fatigue due to long hours of work, compromising quality inspection accuracy. On the other hand, the tedious nature of this inspection process makes it difficult to recruit qualified inspectors.
[0003] Therefore, the present invention provides a speaker quality detection method based on time-frequency domain peak-valley feature learning to solve the above problems. Summary of the Invention
[0004] The purpose of the present invention is to develop intelligent product quality inspection technology for speakers to replace manual inspection methods. On the one hand, it can ensure the reliability of long-term product quality inspection and avoid erroneous detection due to manual fatigue; on the other hand, it can solve the problem of difficulty in recruiting workers for this process and reduce costs and improve efficiency.
[0005] The present invention provides a loudspeaker quality detection method based on time-frequency domain peak-valley feature learning, which includes the following steps S100: collecting sample sound wave data; S200: extracting peak and valley features and sound wave frequency domain features of a sound wave time domain waveform from the sample sound wave data, and establishing a sound wave quality inspection feature database based on a learning method of sound wave time-frequency domain feature thresholds; S300: acquiring sound wave data of a loudspeaker to be detected, extracting sound wave peak and valley and amplitude-frequency features from the sound wave data of the loudspeaker to be detected, and inputting the extracted sound wave peak and valley and amplitude-frequency features into the sound wave quality inspection feature database for matching. When the features match, the product is inspected as qualified, and when the features do not match, the product is inspected as unqualified.
[0006] In some embodiments, in step S200, extracting peak and valley features of the acoustic wave time domain waveform from the sample acoustic wave data comprises the following steps:
[0007] S210: Let the coordinates of each discrete positive point of the sound wave curve be (n, f(n)), where n = 1, 2, 3, ..., N, N is the total number of points, and when the mth point is the vertex, the following conditions must be met:
[0008]
[0009] The final vertex is represented as (m, p(m)), where m = 1, 2, 3, ..., M, and M is the sum of the fixed points;
[0010] S220: The point with the largest distance between adjacent vertices is recorded as the segmentation point s of the two periodic waveforms. The total number of segmentation points extracted is h. Let the distance between adjacent vertices be w. The distance between two adjacent points of the mth point is defined as w. m =p(m)-p(m-1).
[0011] In some embodiments, in step S220, a threshold ω is set, and only when w>ω is it extracted as a segmentation point s; a segmentation point amplitude threshold λ is set, and when y<λ, it is extracted as a segmentation point s, where y is the sample waveform amplitude, and the total number of segmentation points extracted from the sample h>2; an amplitude threshold ψ is set, and when the amplitude y>ψ, it is a positive sample, and when y<ψ, it is a negative sample.
[0012] In some embodiments, in step S220, the segmentation point s is extracted as follows:
[0013] S221: Extract candidate vertices p with amplitudes less than λ and calculate the distance w between the candidate vertex p and its adjacent points p ;
[0014] S222: Extract the amplitude w of all vertices in the neighborhood k of point p k ;
[0015] S223: Determine w p Is it greater than w k , when w p Greater than w k When , point p is identified as the dividing point s, when w p Less than or equal to w k When extracting p k The point is taken as a new candidate vertex and steps S221 to S223 are repeated.
[0016] In some embodiments, in step S200, extracting the acoustic wave frequency domain features from the sample acoustic wave data includes the following steps:
[0017] S230: Performing fast Fourier transform on the sound wave data to obtain a frequency domain graph;
[0018] S240: extracting the frequency amplitude values v1 and v2 of the secondary frequency from the frequency domain graph, and setting the frequency amplitude threshold δ;
[0019] S250: When v1>v2 and v1>δ are satisfied at the same time, the product is determined to be qualified.
[0020] In some embodiments, in step S200, the learning method based on the sound wave time-frequency domain feature threshold value establishes a sound wave quality inspection feature database, including the following steps:
[0021] extracting all vertexes p(m) from sample sound wave data;
[0022] extracting a set of segmentation points s from sample sound wave data, and obtaining the total number of segmentation points h;
[0023] when h>2, extracting a vertex with the minimum amplitude absolute value y in a period region from sample sound wave data, and when h<2, adjusting the threshold value ω and the segmentation point amplitude threshold value λ;
[0024] when the amplitude absolute value y is greater than ψ, performing fast Fourier transform on the sample sound wave data to obtain a frequency domain graph, and extracting a frequency amplitude v1 of a secondary frequency from the frequency domain graph, and when the amplitude absolute value y is less than ψ, adjusting the amplitude threshold value ψ;
[0025] when v1 is greater than δ, successfully establishing the sound wave quality inspection feature database, and when v1 is less than δ, adjusting the frequency amplitude threshold value δ.
[0026] In some embodiments, the sound wave quality inspection feature database at least includes the characteristic parameters ω, h, λ, ψ, and δ.
[0027] An embodiment of the present application provides a loudspeaker quality detection method based on time-frequency domain peak-valley feature learning, which analyzes a large amount of qualified and unqualified loudspeaker output sound data for quality detection, extracts their time domain and frequency domain features, and learns and establishes a sound wave quality inspection feature database, and then compares and analyzes the sound feature data of an input loudspeaker to be detected, so as to realize the qualified and unqualified judgment of the product, complete the quality inspection task, replace the artificial detection mode, guarantee the reliability of long-time quality detection, avoid false detection caused by artificial fatigue, solve the problem of difficult recruitment in the process, and reduce cost and improve efficiency.
[0028] Other features and advantages of the present application will be described in the following description, and some will become apparent from the description, or will be learned from the practice of the present application. The purposes and other advantages of the present application can be achieved and obtained by the structures specifically pointed out in the description, claims, etc. BRIEF DESCRIPTION OF DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings described below are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor; in the following description, the positional relationship described in the drawings is the direction of the components drawn in the drawings as the reference, unless otherwise specified.
[0030] Figure 1 Figure 1 is a flowchart of a loudspeaker quality detection method based on time-frequency domain peak-valley feature learning according to the present application;
[0031] Figure 2 Figure 2 is a time-domain waveform diagram of unqualified products and qualified products;
[0032] Figure 3 Figure 3 is an enlarged diagram of the A area of the unqualified products in Figure 2; Figure 2
[0033] Figure 4 Figure 4 is an enlarged diagram of the A area of the qualified products in Figure 2; Figure 2
[0034] Figure 5 is a flowchart of the selection of the segmentation point; Figure 5
[0035] Figure 6 Figure 6 is a frequency-domain diagram of unqualified products and qualified products;
[0036] Figure 7 Figure 7 is a flowchart of establishing a sound wave quality inspection feature database;
[0037] Figure 8 Figure 8 is a flowchart of feature matching based on the sound wave quality inspection feature database. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all the embodiments; the technical features designed in different embodiments of the present application can be combined with each other as long as they do not conflict with each other; based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0039] In the description of the present application, it needs to be understood that the terms "center", "transverse", "upper", "lower", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or components referred to must have a particular orientation or be constructed and operated in a particular orientation, therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second" are only for description purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined with "first", "second" can be explicitly or implicitly included one or more features. In the description of the present application, unless otherwise stated, the meaning of "multiple" is two or more. In addition, the term "comprising" and any variation thereof means "at least including".
[0040] Please refer to Figure 1 , Figure 1 is a flowchart of the loudspeaker quality detection method based on time-frequency domain peak-valley feature learning of the present application. To achieve at least one of the advantages or other advantages, an embodiment of the present application provides a loudspeaker quality detection method based on time-frequency domain peak-valley feature learning. As shown in the figure, the loudspeaker quality detection method based on time-frequency domain peak-valley feature learning can include the following steps:
[0041] S100: collecting sample sound wave data;
[0042] S200: extracting peak-valley features of sound wave time domain waveform graph and sound wave frequency domain features from the sample sound wave data, establishing a sound wave quality inspection feature database based on a sound wave time-frequency domain feature threshold learning method;
[0043] S300: obtaining sound wave data of a loudspeaker to be detected, extracting sound wave peak-valley and amplitude-frequency features from the sound wave data of the loudspeaker to be detected, inputting the extracted sound wave peak-valley and amplitude-frequency features to the sound wave quality inspection feature database for matching, when the features match, the product is inspected as qualified, when the features do not match, the product is inspected as unqualified.
[0044] In some embodiments, in the time domain, the positive and negative sample waveform graphs are as shown in Figures 2 to 4 , Figure 3 is Figure 2 an enlarged view of the A area of the unqualified product in Figure 4 is Figure 2 an enlarged view of the A area of the qualified product. First, the same periodic sound signal is input to the loudspeaker, and the output sound wave data is approximately as shown in the positive and negative samples, wherein the positive sample is a qualified loudspeaker and the negative sample is an unqualified loudspeaker. From Figure 2It can be seen that the peaks and troughs, as well as the spacing between peaks and troughs, within a period of positive and negative samples are different. Therefore, the peak and trough features of the positive and negative samples can be extracted as quality inspection indicators. Therefore, in step S200, extracting the peak and trough features of the acoustic wave time domain waveform from the sample acoustic wave data includes the following steps:
[0045] S210: Let the coordinates of each discrete positive point of the sound wave curve be (n, f(n)), where n = 1, 2, 3, ..., N, N is the total number of points, and when the mth point is the vertex, the following conditions must be met:
[0046]
[0047] The final vertex is represented as (m, p(m)), where m = 1, 2, 3, ..., M, and M is the sum of the fixed points;
[0048] S220: The point with the largest distance between adjacent vertices is recorded as the segmentation point s of the two periodic waveforms. The total number of segmentation points extracted is h. Let the distance between adjacent vertices be w. The distance between two adjacent points of the mth point is defined as w. m =p(m)-p(m-1). Specifically, from Figure 2 It can be seen that within a waveform cycle extending from the highest peak to both sides, the distance between its vertices changes from dense to sparse, and the point with the largest distance between adjacent vertices is the dividing point s between the two periodic waveforms. In addition, in general, the distance between positive samples is larger than that between negative samples. Let the distance between adjacent vertices be w, and the distance between two adjacent points of the mth vertex is defined as w m =p(m)-p(m-1). The method of extracting the segmentation points s will be described later. Suppose the total number of segmentation points extracted is h.
[0049] Because the sample's vertex spacing at the segmentation point s is relatively large, a threshold value ω can be set. Only when w>ω is a sample extracted as a candidate segmentation point s. The amplitudes of the positive and negative sample segmentation points differ, with the positive sample waveform amplitude being greater than the negative sample waveform amplitude |y|. Therefore, a segmentation point amplitude threshold value λ can be set. When |y|<λ, the sample is extracted as a segmentation point. Positive samples can certainly read multiple cycles of data, meaning the number of segmentation points extracted is h>2. That is, in step S220, a threshold value ω is set. Only when w>ω is a sample extracted as a segmentation point s. A segmentation point amplitude threshold value λ is set. Only when y<λ is a sample extracted as a segmentation point s. Where y is the sample waveform amplitude, the total number of segmentation points extracted from the sample is h>2.
[0050] Set an amplitude threshold ψ. When the amplitude y>ψ, it is a positive sample. When y<ψ, it is a negative sample. Specifically, extract a periodic waveform data consisting of all points between two adjacent segmentation points s1 and s2. As shown in the figure, in one period, the vertex amplitude y of the negative sample in area A is smaller than the positive sample. Therefore, an amplitude threshold ψ can be defined. When the amplitude y>ψ of the point is a positive sample, when y>ψ, it is a negative sample.
[0051] In time domain analysis, the main quality inspection features that can be extracted are: the distance w between adjacent vertices, the absolute value of the amplitude of the sound wave |y|, and the total number of sound wave segmentation points h.
[0052] like Figure 5 As shown, in step S220, the method for extracting the segmentation point s is as follows:
[0053] S221: Extract candidate vertices p with amplitudes less than λ and calculate the distance w between the candidate vertex p and its adjacent points p ;
[0054] S222: Extract the amplitude wk of all vertices in the neighborhood k of point p;
[0055] S223: Determine w p Is it greater than w k , when w p Greater than w k When , point p is identified as the dividing point s, when w p Less than or equal to w k When extracting p k The point is taken as a new candidate vertex and steps S221 to S223 are repeated.
[0056] In step S200, extracting the sound wave frequency domain features from the sample sound wave data includes the following steps:
[0057] S230: Performing fast Fourier transform on the sound wave data to obtain a frequency domain graph;
[0058] S240: extracting the frequency amplitude values v1 and v2 of the secondary frequency from the frequency domain graph, and setting the frequency amplitude threshold δ;
[0059] S250: When v1>v2 and v1>δ are satisfied at the same time, the product is determined to be qualified.
[0060] Specifically, since the negative samples are interfered by noise, their frequency domain characteristics are different from those of the positive samples. Figure 2 The spectrum obtained by fast Fourier transform of the sound wave data in is as follows Figure 6 As shown. Figure 6The amplitude distribution patterns of the minor frequencies v1 and v2 of the positive and negative samples differ. The amplitude v1 of the lower-frequency component is greater than the amplitude v2 of the higher-frequency component, i.e., v1 > v2. Furthermore, v1 of the positive sample is significantly larger, so an appropriate amplitude threshold δ is set. If v1 > δ, the sample passes, and if v1 < δ, the sample fails.
[0061] In the frequency domain analysis, the main quality inspection features that can be extracted are: the relationship between the amplitudes v1 and v2 of the secondary frequencies and the threshold δ of v1.
[0062] In some embodiments, as Figure 7 As shown, in step S200, establishing an acoustic wave quality inspection feature database based on a learning method of acoustic wave time-frequency domain feature thresholds includes the following steps:
[0063] Extract all vertices p(m) from the sample sound wave data;
[0064] Extract a segmentation point set s from the sample sound wave data and obtain the total number of segmentation points h;
[0065] When h>2, the vertex with the smallest absolute amplitude value y in a periodic area is extracted from the sample sound wave data. When h<2, the threshold ω and the segmentation point amplitude threshold λ are adjusted.
[0066] When the absolute value of the amplitude y is greater than ψ, the sample sound wave data is fast Fourier transformed to obtain a frequency domain graph, and the frequency amplitude v1 of the secondary frequency is extracted from the frequency domain graph. When the absolute value of the amplitude y is less than ψ, the amplitude threshold ψ is adjusted;
[0067] When v1 is greater than δ, the acoustic quality inspection feature database is successfully established. When v1 is less than δ, the frequency threshold δ is adjusted.
[0068] That is, the learned feature values include the distance w between adjacent vertices required to extract the acoustic wave cycle segmentation points, the segmentation point amplitude threshold λ, and the number of segmentation points h; the lowest vertex amplitude threshold ψ within a cycle; and the amplitude threshold δ of the secondary frequency in the acoustic wave frequency domain analysis. In addition, a similar method is used for feature threshold learning for negative samples, which will not be repeated here. In some embodiments, the acoustic wave quality inspection feature database includes at least the feature parameters ω, h, λ, ψ, and δ.
[0069] like Figure 8 As shown in the figure, the quality inspection of loudspeakers is mainly completed through feature matching of the feature library. First, the vertex data information of the sound wave to be inspected is extracted, including the vertex amplitude and the distance between vertices, and feature matching is performed based on the segmentation point feature value of the feature library. A period of data is segmented when the total number of extracted segmentation points h>2 is satisfied, otherwise the quality inspection is unqualified; secondly, similar data is extracted within a period of data. Figure 2The vertex with the smallest amplitude in the valley area of A is found, and the amplitude of this point is matched with the amplitude threshold ψ of the feature library. When y>ψ, it is qualified, otherwise it is an unqualified product. Finally, the sound wave data is fast Fourier transformed to extract the amplitude of the transformed secondary frequency as shown in Figure 6 The v1 and v2 shown are matched with the feature library parameters. If v1>v2 and v1>δ are satisfied, the product is qualified, otherwise it is unqualified. If both conditions are met, the product is qualified.
[0070] To sum up, an embodiment of the present invention provides a speaker quality detection method based on time-frequency domain peak and valley feature learning, which performs quality detection by analyzing the sound data output by a large number of qualified and unqualified speakers, extracting their time domain and frequency domain features, and learning the features to establish a sound wave quality inspection feature database, and then uses the sound wave quality inspection feature database to compare and analyze the sound feature data of the input speaker to be tested, thereby realizing the qualified and unqualified judgment of the product and completing the quality inspection task, thereby replacing the manual inspection method, ensuring the reliability of long-term product quality inspection, avoiding erroneous detection caused by manual fatigue, solving the problem of difficulty in recruiting workers for this process, and reducing costs and improving efficiency.
[0071] In addition, those skilled in the art should understand that, although there are many problems in the prior art, each embodiment or technical solution of the present invention may be improved in only one or several aspects, without having to simultaneously solve all the technical problems listed in the prior art or background art. Those skilled in the art should understand that any content not mentioned in a claim should not be construed as limiting the claim.
[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A speaker quality detection method based on time-frequency domain peak-valley feature learning, characterized by: The speaker quality detection method based on time-frequency domain peak-valley feature learning includes the following steps: S100: collecting sample sound wave data; S200: extracting peak and valley features of the acoustic wave time domain waveform and acoustic wave frequency domain features from the sample acoustic wave data, and establishing an acoustic wave quality inspection feature database based on a learning method of acoustic wave time and frequency domain feature thresholds; S300: Acquire sound wave data of the speaker to be tested, extract sound wave peaks and valleys and amplitude-frequency features from the sound wave data of the speaker to be tested, input the extracted sound wave peaks and valleys and amplitude-frequency features into the sound wave quality inspection feature database for matching. When the features match, the product is inspected as qualified; when the features do not match, the product is inspected as unqualified. In step S200, extracting peak and valley features of the acoustic wave time domain waveform from the sample acoustic wave data includes the following steps: S210: Let the coordinates of each discrete positive point of the sound wave curve be (n, f(n)), where n = 1, 2, 3, ..., N, N is the total number of points, and when the mth point is the vertex, the following conditions must be met: The final vertex is represented as (m, p(m)), where m = 1, 2, 3, ..., M, and M is the sum of the fixed points; S220: The point with the largest distance between adjacent vertices is recorded as the segmentation point s of the two periodic waveforms. The total number of segmentation points extracted is h. Let the distance between adjacent vertices be w. The distance between two adjacent points of the mth point is defined as w. m =p(m)-p(m-1); In step S220, a threshold value ω is set, and only when w>ω is it extracted as a segmentation point s. A segmentation point amplitude threshold value λ is set, and when y<λ, it is extracted as a segmentation point s, where y is the amplitude of the sample waveform, and the total number of segmentation points extracted from the sample h>2; an amplitude threshold value ψ is set, and when the amplitude y>ψ, it is a positive sample, and when y<ψ, it is a negative sample; In step S220, the segmentation point s is extracted as follows: S221: Extract candidate vertices p with amplitudes less than λ and calculate the distance w between the candidate vertex p and its adjacent points p ; S222: Extract the amplitude w of all vertices in the neighborhood k of point p k ; S223: Determine w p Is it greater than w k , when w p Greater than w k When , point p is identified as the dividing point s, when w p Less than or equal to w k When extracting p k The point is taken as a new candidate vertex, and steps S221 to S223 are repeated; In step S200, extracting the sound wave frequency domain features from the sample sound wave data includes the following steps: S230: Performing fast Fourier transform on the sound wave data to obtain a frequency domain graph; S240: extracting the frequency amplitude values v1 and v2 of the secondary frequency from the frequency domain graph, and setting the frequency amplitude threshold δ; S250: When v1>v2 and v1>δ are both satisfied, the product is determined to be qualified; In step S200, establishing an acoustic wave quality inspection feature database based on a learning method of acoustic wave time-frequency domain feature thresholds includes the following steps: Extract all vertices p(m) from the sample sound wave data; Extract a segmentation point set s from the sample sound wave data and obtain the total number of segmentation points h; When h>2, the vertex with the smallest absolute amplitude value y in a periodic area is extracted from the sample sound wave data. When h<2, the threshold ω and the segmentation point amplitude threshold λ are adjusted. When the absolute value of the amplitude y is greater than ψ, the sample sound wave data is fast Fourier transformed to obtain a frequency domain graph, and the frequency amplitude v1 of the secondary frequency is extracted from the frequency domain graph. When the absolute value of the amplitude y is less than ψ, the amplitude threshold ψ is adjusted; When v1 is greater than δ, the acoustic quality inspection feature database is successfully established. When v1 is less than δ, the frequency threshold δ is adjusted.
Citation Information
Patent Citations
Microphone fault detection method and device, electronic equipment and storage medium
CN111263284A
Method and device for detecting quality of moving-coil loudspeaker
CN114627891A