Mobile phone loudspeaker self-detection method and system and mobile phone loudspeaker
Through self-detection methods and systems, speaker abnormalities are identified and current control data is adjusted, which solves the problem of the vibration frequency of mobile phone speakers not matching the sound frequency, and improves sound quality and device performance.
Patent Information
- Application Number
- CN202410918083.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-09-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing mobile phone speaker detection technology cannot effectively identify and adjust the vibration frequency and sound frequency caused by the driving circuit, which affects the sound quality and device performance.
By obtaining test audio data, determine the normal sounding area, extract abnormal audio frames, calculate abnormal scores and frequency difference scores, establish a compensation factor relationship curve, adjust the current control data to compensate for the vibration frequency of the speaker, and achieve speaker self-detection and frequency matching.
It effectively eliminates the problem of the speaker vibration frequency not matching the sound frequency, improves the sound quality to close to the standard sound quality, and enhances the performance of the equipment.
Smart Images

Figure CN118632180A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of loudspeakers, and more specifically, to a mobile phone loudspeaker self-detection method, system and mobile phone loudspeaker. Background Art
[0002] With the rapid development of mobile communication technology and the popularity of smart phones, mobile phones have become an indispensable part of people's lives. As one of the important components of mobile phones, speakers play a vital role in providing audio output, realizing multimedia playback, voice calls and other functions. However, due to defects in the design or manufacturing process of the speaker, as well as possible problems in the driving circuit, the vibration frequency of the speaker often does not match the sound frequency, which in turn affects the user experience and the overall performance of the device.
[0003] In the design and manufacturing process of loudspeakers, the selection of diaphragm materials, structural optimization, and the precision of manufacturing processes will directly affect their performance. As a key component of loudspeaker sound, the diaphragm's material physical properties, thickness, hardness, etc. will affect the frequency response and sound quality of the loudspeaker. If the diaphragm material is not properly selected or the structural design is unreasonable, it may cause the loudspeaker to produce unnecessary vibrations when sounding, causing the vibration frequency to be inconsistent with the sound frequency, thus affecting the clarity and fidelity of the audio.
[0004] In addition to problems with the speaker itself, problems with the drive circuit may also cause the vibration frequency of the speaker to be inconsistent with the sound frequency. The drive circuit is a bridge connecting the audio signal source and the speaker. Its main function is to convert the audio signal into an electrical signal suitable for the speaker. If the drive circuit is not designed properly or the components are not properly selected, the output electrical signal may not match the characteristics of the speaker, which in turn affects the vibration frequency and sound frequency of the speaker.
[0005] Existing speaker detection technology mainly collects test audio signals played by the speaker by sending audio signals of different frequencies to the speaker, and processes and analyzes them. By comparing with the preset normal value, it is determined whether the working state of the speaker is normal, and whether further inspection and repair are required, without considering the cause of the speaker failure. For example, whether the problem of the drive circuit can be adjusted by adjusting the configuration parameters of the speaker drive circuit to adjust the speaker vibration frequency so that the actual sound frequency of the speaker is close to or equal to the normal sound frequency.
[0006] Therefore, the prior art has defects and is in urgent need of improvement. Summary of the invention
[0007] In view of the above problems, the purpose of the present invention is to provide a mobile phone speaker self-detection method, system and mobile phone speaker, which can realize self-detection of the sound quality of the mobile phone speaker, and use a compensation factor to compensate the current control data of the abnormal sound quality part, so that the abnormal sound quality of the compensated abnormal audio frequency is closer to the standard sound quality.
[0008] A first aspect of the present invention provides a mobile phone speaker self-detection method, comprising: Acquire test audio data; the test audio data is audio data with a specific volume and frequency change; Determine a normal sounding area by using a standard audio curve of the test audio data; Acquire first actual audio data and a first audio curve emitted by the speaker based on the test audio data, and extract a first abnormal audio frame from the first audio curve that is not in a normal sound emission area; Determine a first audio frame in a standard audio curve and a second audio frame in a first audio curve according to first control data of the first abnormal audio frame; Calculate the curve similarity of the first abnormal audio frame and the second audio frame with the corresponding first audio frame, determine a first abnormal score of the first abnormal audio frame and a second abnormal score of the second audio frame, and determine the second abnormal audio frame according to the difference between the second abnormal score and the first abnormal score; Determine the first audio data according to the first abnormal audio frame, determine the lowest audio frame or the highest audio frame in the first audio data as the third audio frame, and calculate the first frequency difference score through the first abnormal audio frame and the third audio frame; determine the second audio data according to the second abnormal audio frame, determine the lowest audio frame or the highest audio frame in the second audio data as the fourth audio frame, and calculate the second frequency difference score through the second abnormal audio frame and the fourth audio frame; Determine a relationship curve between the frequency difference score and the abnormality score according to the first abnormality score of the first abnormal audio frame, the first frequency difference score, the second abnormality score of the second abnormal audio frame, and the second frequency difference score, and determine a compensation factor according to the relationship curve between the frequency difference score and the abnormality score; adjusting the current control data corresponding to the audio frame to be compensated having the same audio frequency as the first abnormal audio frame by using the compensation factor; The second actual audio data of the speaker sound is obtained based on the adjusted current control data, and the speaker detection data is determined according to the frame number ratio of the first abnormal audio frame in the second actual audio data.
[0009] In this solution, determining the normal sounding area by using the standard audio curve of the test audio data includes: Multiplying the standard audio curve of the test audio data by the influence factor q1 to obtain a second audio curve; Multiplying the standard audio curve of the test audio data by the influence factor q2 to obtain a third audio curve; An area between the second audio curve and the third audio curve is determined as a normal voicing area.
[0010] In this solution, the step of acquiring first actual audio data and a first audio curve produced by a speaker based on the test audio data, and extracting a first abnormal audio frame from the first audio curve that is not in a normal sound production area includes: generating current control data according to the test audio data; Controlling the speaker to produce sound through the current control data; Acquire first actual audio data played by the speaker through the microphone module, and draw a first audio curve of audio change amplitude and frequency; Analyze the first audio curve based on the normal sound emission area, mark the first audio curve that is not in the normal sound emission area, and obtain one or more fourth audio curves; One or more first abnormal audio frames are determined by analyzing the fourth audio data.
[0011] In this solution, the determining the first audio frame in the standard audio curve and the second audio frame in the first audio curve according to the first control data of the first abnormal audio frame includes: determining first control data based on a first sound emission time of a first abnormal audio frame; Marking the current control data according to the first control data to obtain one or more second sounding times; intercepting a first or a plurality of first audio frames in a standard audio curve according to a first sound emission time and a second sound emission time; One or more second audio frames are intercepted from the first audio curve according to the second utterance time.
[0012] In this solution, the first abnormal audio frame and the second audio frame are respectively subjected to curve similarity calculation with the corresponding first audio frame, a first abnormal score of the first abnormal audio frame and a second abnormal score of the second audio frame are determined, and the second abnormal audio frame is determined according to the score difference between the second abnormal score and the first abnormal score, including: comparing the first abnormal audio frame with the corresponding first audio frame based on the first utterance time, and determining a first abnormality score of the first abnormal audio frame; comparing the second audio frame with the corresponding first audio frame based on the second utterance time, and determining a second abnormality score of the second audio frame; Calculating a score difference between a second abnormality score of the second audio frame and a first abnormality score of the first abnormal audio frame, and determining a second audio frame whose score difference is less than a preset score threshold as a second abnormal audio frame; When there is no corresponding second abnormal audio frame for the first abnormal audio frame, the abnormal mark of the first abnormal audio frame is cancelled.
[0013] In this solution, the method of determining the first audio data according to the first abnormal audio frame, determining the lowest audio frame or the highest audio frame in the first audio data as the third audio frame, and calculating the first frequency difference score through the first abnormal audio frame and the third audio frame; determining the second audio data according to the second abnormal audio frame, determining the lowest audio frame or the highest audio frame in the second audio data as the fourth audio frame, and calculating the second frequency difference score through the second abnormal audio frame and the fourth audio frame includes: According to the first abnormal audio frame P m1 and first n audio frames to determine first audio data; According to the second abnormal audio frame P m2 and the first n audio frames to determine the second audio data; The lowest audio frame whose frequency is lower than the first abnormal audio frame m1 or the highest audio frame whose frequency is higher than the first abnormal audio frame m1 in the first audio data is determined as the third audio frame P m1-a ; The lowest audio frame whose frequency is lower than the second abnormal audio frame m2 or the highest audio frame whose frequency is higher than the second abnormal audio frame m2 in the second audio data is determined as the fourth audio frame P m2-b ; Calculate the first abnormal audio frame P m1 and the third audio frame P m1-a The first abnormal audio frame P is determined by the ratio of the audio frequency difference and the utterance time difference. m1 The first frequency difference score c m1 ; Calculate the second abnormal audio frame P m2 and the fourth audio frame P m2-b The ratio of the audio frequency difference and the utterance time difference is used to determine the second abnormal audio frame P m2 The second frequency difference score c m2 .
[0014] This plan also includes: The first abnormal audio frame P m1 The first frequency difference score c m1 The calculation method is expressed as: ; Among them, Q m1 and Qm1-a The first abnormal audio frame P m1 and the third audio frame P m1-a The audio frequency, t m1 and t m1-a The first abnormal audio frame P m1 and the third audio frame P m1-a The time of utterance; The second abnormal audio frame P m2 The second frequency difference score c m2 The calculation method is expressed as: ; Among them, Q m2 and Q m2-b The second abnormal audio frame P m2 and the fourth audio frame P m2-b The audio frequency, t m2 and t m2-b The second abnormal audio frame P m2 and the fourth audio frame P m2-b The time of utterance.
[0015] In this solution, the relationship curve between the frequency difference score and the abnormality score is determined according to the first abnormality score of the first abnormal audio frame, the first frequency difference score, the second abnormality score of the second abnormal audio frame, and the second frequency difference score, and the compensation factor is determined by the relationship curve between the frequency difference score and the abnormality score, including: Create a coordinate image with the X-axis being the frequency difference score and the Y-axis being the anomaly score; According to the first abnormal audio frame P m1 The first anomaly score p m1 and the first frequency difference score c m1 , the second abnormal audio frame P m2 The second anomaly score p m2 and the second frequency difference score c m2 Determine multiple coordinate data; Performing curve fitting on the plurality of coordinate data, determining influencing factors k1, k2 and k3, and drawing a relationship curve between the frequency difference score and the abnormality score; ; Among them, c is the frequency difference score, p is the anomaly score, k1, k2 and k3 are all influencing factors; Determine the compensation factor k4 based on the relationship curve between the frequency difference score and the abnormality score; ; Among them, c b is the maximum difference score of the audio frame, p bis the anomaly score corresponding to the maximum difference score of the audio frame, c a is the frequency difference score of the audio frame to be compensated, p a is the abnormality score of the audio frame to be compensated.
[0016] A second aspect of the present invention provides a mobile phone speaker self-detection system, comprising: A data acquisition module, used for acquiring test audio data; An abnormal audio frame analysis module is used to determine a normal sound emission area through a standard audio curve of the test audio data; obtain first actual audio data and a first audio curve emitted by a speaker based on the test audio data, and extract a first abnormal audio frame from the first audio curve that is not in the normal sound emission area; determine a first audio frame in the standard audio curve and a second audio frame in the first audio curve according to first control data of the first abnormal audio frame; perform curve similarity calculation on the first abnormal audio frame and the second audio frame respectively with the corresponding first audio frame, determine a first abnormal score of the first abnormal audio frame and a second abnormal score of the second audio frame, and determine a second abnormal audio frame according to the difference between the second abnormal score and the first abnormal score; a compensation factor calculation module, configured to determine the first audio data according to the first abnormal audio frame, determine the lowest audio frame or the highest audio frame in the first audio data as the third audio frame, and calculate the first frequency difference score through the first abnormal audio frame and the third audio frame; determine the second audio data according to the second abnormal audio frame, determine the lowest audio frame or the highest audio frame in the second audio data as the fourth audio frame, and calculate the second frequency difference score through the second abnormal audio frame and the fourth audio frame; determine a relationship curve between the frequency difference score and the abnormal score according to the first abnormal score of the first abnormal audio frame, the first frequency difference score, the second abnormal score of the second abnormal audio frame, and the second frequency difference score, and determine the compensation factor through the relationship curve between the frequency difference score and the abnormal score; a data adjustment module, configured to adjust the current control data corresponding to the audio frame to be compensated having the same audio frequency as the first abnormal audio frame by using the compensation factor; The audio verification module is used to obtain second actual audio data of the speaker based on the adjusted current control data, and determine the speaker detection data according to the frame number ratio of the first abnormal audio frame in the second actual audio data.
[0017] A third aspect of the present invention provides a mobile phone speaker, which includes a mobile phone speaker self-detection method program. When the mobile phone speaker self-detection method program is executed by a processor, the steps of the mobile phone speaker self-detection method as described above are implemented.
[0018] The present invention discloses a mobile phone speaker self-detection method, system and mobile phone speaker, the method comprising: determining a normal sounding area by testing a standard audio curve of audio data; obtaining a first audio curve of the speaker sounding, extracting a first abnormal audio frame from the first audio curve that is not in the normal sounding area; determining a first audio frame in the standard audio curve and a second audio frame in the first audio curve; calculating a first abnormal score of the first abnormal audio frame and a second abnormal score of the second audio frame, and determining the second abnormal audio frame according to the score difference; determining a compensation factor according to the first abnormal audio frame and the second abnormal audio frame; adjusting the audio frame to be compensated by the compensation factor; and determining the speaker detection data based on the proportion of the number of frames of the first abnormal audio frame in the second actual audio data. The present invention compensates the vibration frequency of the speaker by the compensation factor, and eliminates the abnormal sounding problem of the speaker caused by the inconsistency between the vibration frequency and the sounding frequency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A flow chart of a mobile phone speaker self-detection method provided by the present invention is shown; Figure 2 A flow chart showing a method for determining a normal vocalization area provided by the present invention is shown; Figure 3 A flow chart of a first abnormal audio frame extraction method provided by the present invention is shown; Figure 4 A block diagram of a mobile phone speaker self-detection system provided by the present invention is shown. DETAILED DESCRIPTION
[0020] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0021] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0022] Figure 1 A flow chart of a mobile phone speaker self-detection method provided by the present invention is shown.
[0023] like Figure 1 As shown, the present invention discloses a mobile phone speaker self-detection method, comprising: S102, obtaining test audio data; the test audio data is audio data with a specific volume and frequency change; S104, determining a normal sounding area by testing a standard audio curve of the audio data; S106, acquiring first actual audio data and a first audio curve emitted by the speaker based on the test audio data, and extracting a first abnormal audio frame from the first audio curve that is not in a normal sound emission area; S108, determining a first audio frame in the standard audio curve and a second audio frame in the first audio curve according to the first control data of the first abnormal audio frame; S110, performing curve similarity calculation on the first abnormal audio frame and the second audio frame respectively with the corresponding first audio frame, determining a first abnormal score of the first abnormal audio frame and a second abnormal score of the second audio frame, and determining the second abnormal audio frame according to the difference between the second abnormal score and the first abnormal score; S112, determining the first audio data according to the first abnormal audio frame, determining the lowest audio frame or the highest audio frame in the first audio data as the third audio frame, and calculating the first frequency difference score through the first abnormal audio frame and the third audio frame; determining the second audio data according to the second abnormal audio frame, determining the lowest audio frame or the highest audio frame in the second audio data as the fourth audio frame, and calculating the second frequency difference score through the second abnormal audio frame and the fourth audio frame; S114, determining a relationship curve between the frequency difference score and the abnormality score according to the first abnormality score of the first abnormal audio frame, the first frequency difference score, the second abnormality score of the second abnormal audio frame, and the second frequency difference score, and determining a compensation factor according to the relationship curve between the frequency difference score and the abnormality score; S116, adjusting the current control data corresponding to the audio frame to be compensated having the same audio frequency as the first abnormal audio frame by using the compensation factor; S118, obtaining second actual audio data produced by the speaker based on the adjusted current control data, and determining speaker detection data according to a frame ratio of the first abnormal audio frame in the second actual audio data.
[0024] According to an embodiment of the present invention, the 20Hz-20kHz frequency band that can be heard by the human ear is divided into seven frequency bands: extremely low frequency (20Hz-40Hz), low frequency (40Hz-80Hz), medium-low frequency (80Hz-160Hz), medium frequency (160Hz-1280Hz), medium-high frequency (1280Hz-2560Hz), high frequency (2560Hz-5120Hz) and extremely high frequency (5120Hz-20000Hz). Select multiple test audio frequencies in each frequency band (such as selecting 20Hz, 30Hz and 40Hz as test audio frequencies in extremely low frequency (20Hz-40Hz), and generate test audio data through random combination by the system. In the test audio data, each test audio frequency appears at least four times. The volume of each test audio frequency is the same by default, such as 50dB.
[0025] The standard audio curve of the test audio data (the horizontal axis of the standard audio curve is time and the vertical axis is sound intensity) is changed by influencing factors q1 and q2, and the area formed by the second audio curve, the third audio curve and the start and end times of the test audio data is determined as the normal sending area.
[0026] Generate current control data according to the audio frequency and volume of the test audio data, control the speaker to make sound by adjusting the current intensity and the rate of change, obtain the first actual audio data played by the speaker through the microphone module, and determine the first audio curve by digital signal processing. Determine the first audio curve that is not in the normal sound emission area as the fourth audio curve, and determine the audio frame in the fourth audio curve as the first abnormal audio frame. The first abnormal audio frame can be an audio frame or a combined audio frame obtained by combining multiple audio frames.
[0027] The frame number ratio of the first abnormal audio frame in the first actual audio data is calculated, and when the frame number ratio of the first abnormal audio frame in the first actual audio data is greater than the first preset audio frame ratio threshold set by the system, it is determined that the current speaker is abnormal. Conversely, by analyzing the relevant data of the first abnormal audio frame, the volume compensation is performed by adjusting the movement amplitude and frequency of the voice coil when some audio frames are sounded.
[0028] The first control data is determined according to the first sounding time of the first abnormal audio frame, and the sounding time corresponding to the control data identical to the first control data in the current control data is determined as the second sounding time. The first audio frame in the standard audio curve and the second audio frame in the first audio curve are determined respectively by the first sounding time and the second sounding time. The curve similarities of the first abnormal audio frame and the second audio frame with the corresponding first audio frame are calculated respectively by the curve similarity calculation method preset by the system, and the first abnormal score of the first abnormal audio frame and the second abnormal score of the second audio frame are determined based on the maximum curve similarity, and the score difference between the second abnormal score and the first abnormal score is compared with the preset score threshold, and the second audio frame whose score difference is less than the preset score threshold is determined as the second abnormal audio frame.
[0029] The first abnormal audio frame P is converted into a frame according to the number of audio frames n set by the system. m1 and the first n audio frames to determine the first audio data, and by analyzing the audio frequencies of the audio frames in the first audio data, determine the lowest audio frame whose frequency is lower than the first abnormal audio frame m1 or the highest audio frame whose frequency is higher than the first abnormal audio frame m1, and determine it as the third audio frame P m1-a According to the first abnormal audio frame P m1 and the third audio frame P m1-a The first abnormal audio frame P is determined by the ratio of the audio frequency difference and the utterance time difference. m1 The first frequency difference score c m1 According to the first abnormal audio frame P m1 The first frequency difference score c m1 The calculation method of the second abnormal audio frame P m2 The second frequency difference score c m2. A coordinate image is established with the X axis being the frequency difference score and the Y axis being the abnormality score. The coordinate data obtained by the abnormality score and the frequency difference score of the abnormal audio frame (the first abnormal audio frame and the second abnormal audio frame) is substituted into the coordinate image, and the relationship curve between the frequency difference score and the abnormality score is determined by curve fitting the coordinate data in the coordinate image. The maximum difference score and the corresponding abnormality score are determined by the relationship curve between the frequency difference score and the abnormality score, and the compensation factor k4 of the current abnormal audio frame is calculated by combining the frequency difference score and the abnormality score of the current abnormal audio frame. Since audio frames with the same audio frequency may be affected by the change amplitude of the audio frequency of the previous audio frame, the compensation factor k4 of each audio frame to be compensated, that is, the abnormal audio frame, is calculated in turn, and the compensation factor k4 of each audio frame to be compensated is used to compensate the corresponding voice coil movement amplitude and frequency of the audio frame to be compensated, and the corresponding first control data is adjusted to obtain the adjusted current control data. The speaker is controlled to make sound again by the adjusted current control data, and the speaker detection data is determined by calculating the proportion of the first abnormal audio frame to the total audio frames in the second actual audio data. When the proportion of the first abnormal audio frame in the second actual audio data to the total number of audio frames is greater than the second preset audio frame proportion threshold set by the system, it is determined that the current speaker is abnormal. Otherwise, the relationship curve between the first abnormal frequency difference score and the abnormal score of each first abnormal audio frame is saved. When the speaker has a sound audio with the same frequency as the first abnormal audio frame during use, the supplementary factor of the sound audio is determined by the corresponding relationship curve between the first abnormal frequency difference score and the abnormal score, so that the actual sound frequency of the speaker is close to or equal to the normal sound frequency.
[0030] The mobile phone speaker self-detection can be performed by the mobile phone speaker based on a detection device before leaving the factory, or by the user downloading a corresponding program through the mobile phone to perform the mobile phone speaker self-detection.
[0031] Figure 2 A flow chart of the method for determining a normal vocalization area provided by the present invention is shown.
[0032] like Figure 2 As shown, according to an embodiment of the present invention, determining a normal sounding area by testing a standard audio curve of audio data includes: S202, multiplying the standard audio curve of the test audio data by the influence factor q1 to obtain a second audio curve; S204, multiplying the standard audio curve of the test audio data by the influence factor q2 to obtain a third audio curve; S206: Determine a region between the second audio curve and the third audio curve as a normal sound emission region.
[0033] It should be noted that the influencing factors q1 and q2 are set by those skilled in the art according to actual needs. Affected by the testing environment (type of testing equipment, ambient temperature and humidity, etc.), the audio curve of the actual audio data generated by the speaker during the playback of the test audio data may deviate from the standard audio curve. By setting the normal sound emission area, the actual audio data whose difference between the audio curve and the standard audio curve is within a certain fluctuation range is determined as normal sound emission. The normal sound emission area is the second audio curve, the third audio curve, the start time and end time of the test audio data or the area enclosed.
[0034] Figure 3 A flow chart of a first abnormal audio frame extraction method provided by the present invention is shown.
[0035] like Figure 3 As shown, according to an embodiment of the present invention, obtaining first actual audio data and a first audio curve emitted by a speaker based on test audio data, and extracting a first abnormal audio frame from the first audio curve that is not in a normal sound emission area includes: S302, generating current control data according to the test audio data; S304, controlling the speaker to produce sound through the current control data; S306, obtaining first actual audio data played by the speaker through the microphone module, and drawing a first audio curve of audio change amplitude and frequency; S308, analyzing the first audio curve based on the normal sound emission area, marking the first audio curve that is not in the normal sound emission area, and obtaining one or more fourth audio curves; S310, determining one or more first abnormal audio frames by analyzing the fourth audio data.
[0036] It should be noted that, by testing the audio data and the hardware configuration of the speaker to be tested, the amplitude and frequency of the voice coil movement when the speaker plays the test audio data are determined, and the current control data including the adjustment of the current intensity and the rate of change are determined. The current control data is used to control the movement of the speaker voice coil so that the speaker makes a sound. The first actual audio data played by the speaker is collected through the microphone module and converted into an electrical signal. The collected electrical signal is amplified, filtered, and processed, and then the signal is analyzed using digital signal processing technology to extract key parameters such as the frequency and volume of the signal, and the first audio curve of the audio change amplitude and frequency is drawn. The first audio curve is compared with the normal sounding area, and the part of the first audio curve outside the normal sounding area is determined as the fourth audio curve. By extracting the audio frames in the fourth audio curve, one or more first abnormal audio frames are determined.
[0037] According to an embodiment of the present invention, determining a first audio frame in a standard audio curve and a second audio frame in a first audio curve according to first control data of a first abnormal audio frame includes: determining first control data based on a first sound emission time of a first abnormal audio frame; Marking the current control data according to the first control data to obtain one or more second sounding times; intercepting a first or a plurality of first audio frames in a standard audio curve according to a first sound emission time and a second sound emission time; One or more second audio frames are intercepted from the first audio curve according to the second utterance time.
[0038] It should be noted that the first sounding time of the first abnormal audio frame is determined by the first audio curve, and the corresponding first control data is determined in the current control data based on the first sounding time. According to the first control data, the current control data is traversed, and the sounding time corresponding to the control data that is the same as the first control data is determined as the second sounding time. According to the first sounding time and the second sounding time, the first or more first audio frames are intercepted in the standard audio curve, and each corresponding first audio frame is marked by the first sounding time and the second sounding time. According to the second sounding time, one or more second audio frames are intercepted in the first audio curve, and each corresponding second audio frame is marked by the second sounding time.
[0039] According to an embodiment of the present invention, a first abnormal audio frame and a second audio frame are respectively subjected to curve similarity calculation with the corresponding first audio frame, a first abnormal score of the first abnormal audio frame and a second abnormal score of the second audio frame are determined, and the second abnormal audio frame is determined according to the score difference between the second abnormal score and the first abnormal score, including: comparing the first abnormal audio frame with the corresponding first audio frame based on the first utterance time, and determining a first abnormality score of the first abnormal audio frame; comparing the second audio frame with the corresponding first audio frame based on the second utterance time, and determining a second abnormality score of the second audio frame; Calculating a score difference between a second abnormality score of the second audio frame and a first abnormality score of the first abnormal audio frame, and determining a second audio frame whose score difference is less than a preset score threshold as a second abnormal audio frame; When there is no corresponding second abnormal audio frame for the first abnormal audio frame, the abnormal mark of the first abnormal audio frame is cancelled.
[0040] It should be noted that the first curve similarity of the first abnormal audio frame at the first utterance time and the corresponding first audio frame, and the second curve similarity of each second audio frame at the second utterance time and the corresponding first audio frame are calculated respectively by the system preset curve similarity calculation method (such as dynamic time warping, Manhattan distance, etc.). The first abnormal score is the difference between the maximum curve similarity and the first curve similarity, and the second abnormal score is the difference between the maximum curve similarity and the second curve similarity. When the score difference between the second abnormal score of the second audio frame and the first abnormal score of the first abnormal audio frame is less than the preset score threshold, the second audio frame is determined to be the second abnormal audio frame. Among them, the preset score threshold is set by those skilled in the art according to actual needs. There are at least 3 second audio frames corresponding to the first abnormal audio frame in the test audio data. When there is no corresponding second abnormal audio frame for the first abnormal audio frame, the first abnormal audio frame is determined to be a false detection, and the abnormal mark of the first abnormal audio frame is cancelled.
[0041] According to an embodiment of the present invention, determining first audio data according to a first abnormal audio frame, determining the lowest audio frame or the highest audio frame in the first audio data as a third audio frame, and calculating a first frequency difference score through the first abnormal audio frame and the third audio frame; determining second audio data according to a second abnormal audio frame, determining the lowest audio frame or the highest audio frame in the second audio data as a fourth audio frame, and calculating a second frequency difference score through the second abnormal audio frame and the fourth audio frame, includes: According to the first abnormal audio frame P m1 and first n audio frames to determine first audio data; According to the second abnormal audio frame P m2 and the first n audio frames to determine the second audio data; The lowest audio frame whose frequency is lower than the first abnormal audio frame m1 or the highest audio frame whose frequency is higher than the first abnormal audio frame m1 in the first audio data is determined as the third audio frame P m1-a ; The lowest audio frame whose frequency is lower than the second abnormal audio frame m2 or the highest audio frame whose frequency is higher than the second abnormal audio frame m2 in the second audio data is determined as the fourth audio frame P m2-b ; Calculate the first abnormal audio frame P m1 and the third audio frame P m1-a The first abnormal audio frame P is determined by the ratio of the audio frequency difference and the utterance time difference. m1 The first frequency difference score c m1 ; Calculate the second abnormal audio frame P m2 and the fourth audio frame P m2-b The ratio of the audio frequency difference and the utterance time difference is used to determine the second abnormal audio frame P m2The second frequency difference score c m2 .
[0042] It should be noted that the value of n is set by the system, and the initial value of n is 5. By analyzing the audio frequencies of the audio frames in the first audio data, the lowest audio frame whose frequency is lower than the first abnormal audio frame m1 and the highest audio frame whose frequency is higher than the first abnormal audio frame m1 are determined respectively. When the lowest audio frame and the highest audio frame exist in the first audio data at the same time, the lowest audio frame or the highest audio frame closest to the first abnormal audio frame m1 is determined as the third audio frame P m1-a Based on the third audio frame P m1-a The analysis method determines the fourth audio frame P m2-b .
[0043] Wherein, a and b are both integers less than or equal to n.
[0044] According to an embodiment of the present invention, it also includes: The first abnormal audio frame P m1 The first frequency difference score c m1 The calculation method is expressed as: ; Among them, Q m1 and Q m1-a The first abnormal audio frame P m1 and the third audio frame P m1-a The audio frequency, t m1 and t m1-a The first abnormal audio frame P m1 and the third audio frame P m1-a The time of utterance; The second abnormal audio frame P m2 The second frequency difference score c m2 The calculation method is expressed as: ; Among them, Q m2 and Q m2-b The second abnormal audio frame P m2 and the fourth audio frame P m2-b The audio frequency, t m2 and t m2-b The second abnormal audio frame P m2 and the fourth audio frame P m2-b The time of utterance.
[0045] It should be noted that the audio frame rate of the audio frame is determined by the test audio data corresponding to the sounding time of the audio frame, and the first abnormal audio frame P is determined by calculating the absolute value of the audio frequency difference between the first abnormal audio frame and the third audio frame. m1and the third audio frame P m1-a The audio frequency difference is calculated by calculating the first abnormal audio frame P m1 and the third audio frame P m1-a The time difference of the utterance time determines the first abnormal audio frame P m1 and the third audio frame P m1-a Based on the first abnormal audio frame P m1 and the third audio frame P m1-a The second abnormal audio frame P is determined by the calculation method of the audio frequency difference and the sound time difference m2 The second frequency difference score c m2 The audio frequency difference and the sound time difference.
[0046] According to an embodiment of the present invention, a relationship curve between a frequency difference score and an abnormality score is determined according to a first abnormality score of a first abnormal audio frame, a first frequency difference score, a second abnormality score of a second abnormal audio frame, and a second frequency difference score, and a compensation factor is determined according to the relationship curve between the frequency difference score and the abnormality score, including: Create a coordinate image with the X-axis being the frequency difference score and the Y-axis being the anomaly score; According to the first abnormal audio frame P m1 The first anomaly score p m1 and the first frequency difference score c m1 , the second abnormal audio frame P m2 The second anomaly score p m2 and the second frequency difference score c m2 Determine multiple coordinate data; Perform curve fitting on multiple coordinate data, determine the influencing factors k1, k2 and k3, and draw the relationship curve between the frequency difference score and the abnormal score; ; Among them, c is the frequency difference score, p is the anomaly score, k1, k2 and k3 are all influencing factors; Determine the compensation factor k4 based on the relationship curve between the frequency difference score and the abnormality score; ; Among them, c b is the maximum difference score of the audio frame, p b is the anomaly score corresponding to the maximum difference score of the audio frame, c a is the frequency difference score of the audio frame to be compensated, p a is the abnormality score of the audio frame to be compensated.
[0047] It should be noted that the abnormal audio frame P m The coordinate data of the first abnormal audio frame and the second abnormal audio frame can be used (cm , p m ) means, where c m is the abnormal audio frame P m The frequency difference score, p m is the abnormal audio frame P m To ensure the accuracy of the relationship curve between the frequency difference score and the abnormality score, the supplementary coordinate data can be determined based on the abnormality score and the frequency difference score of the second audio frame corresponding to the first abnormal audio frame, and the final relationship curve between the frequency difference score and the abnormality score can be determined by curve fitting the supplementary coordinate data, the coordinate data of the first abnormal audio frame and the second abnormal audio frame. The maximum difference score c of the audio frame is determined by the relationship curve between the frequency difference score and the abnormality score. b , and the corresponding anomaly score p b , combined with each audio frame to be compensated P a The frequency difference score c of the first abnormal audio frame and the second abnormal audio frame a and the anomaly score p a Calculate the corresponding compensation factor k4.
[0048] Figure 4 A block diagram of a mobile phone speaker self-detection system provided by the present invention is shown.
[0049] like Figure 4 As shown, the second aspect of the present invention provides a mobile phone speaker self-detection system, comprising: A data acquisition module, used for acquiring test audio data; An abnormal audio frame analysis module is used to determine a normal sound emission area through a standard audio curve of test audio data; obtain first actual audio data and a first audio curve emitted by a speaker based on the test audio data, and extract a first abnormal audio frame from the first audio curve that is not in the normal sound emission area; determine a first audio frame in the standard audio curve and a second audio frame in the first audio curve according to first control data of the first abnormal audio frame; perform curve similarity calculation on the first abnormal audio frame and the second audio frame respectively with the corresponding first audio frame, determine a first abnormal score of the first abnormal audio frame and a second abnormal score of the second audio frame, and determine a second abnormal audio frame according to the difference between the second abnormal score and the first abnormal score; A compensation factor calculation module, used to determine the first audio data according to the first abnormal audio frame, determine the lowest audio frame or the highest audio frame in the first audio data as the third audio frame, and calculate the first frequency difference score through the first abnormal audio frame and the third audio frame; determine the second audio data according to the second abnormal audio frame, determine the lowest audio frame or the highest audio frame in the second audio data as the fourth audio frame, and calculate the second frequency difference score through the second abnormal audio frame and the fourth audio frame; determine a relationship curve between the frequency difference score and the abnormal score according to the first abnormal score of the first abnormal audio frame, the first frequency difference score, the second abnormal score of the second abnormal audio frame, and the second frequency difference score, and determine the compensation factor through the relationship curve between the frequency difference score and the abnormal score; A data adjustment module, used for adjusting the current control data corresponding to the audio frame to be compensated having the same audio frequency as the first abnormal audio frame by using a compensation factor; The audio verification module is used to obtain second actual audio data of the speaker based on the adjusted current control data, and determine the speaker detection data according to the frame number ratio of the first abnormal audio frame in the second actual audio data.
[0050] A third aspect of the present invention provides a mobile phone speaker, which includes a mobile phone speaker self-detection method program. When the mobile phone speaker self-detection method program is executed by a processor, the steps of the mobile phone speaker self-detection method as described above are implemented.
[0051] The information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals (including but not limited to signals transmitted between user terminals and other devices, etc.) involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions. For example, the "test audio data" involved in this disclosure are all obtained with full authorization.
[0052] The present invention discloses a mobile phone speaker self-detection method, system and mobile phone speaker, the method comprising: determining a normal sounding area by testing a standard audio curve of audio data; obtaining a first audio curve of the speaker sounding, extracting a first abnormal audio frame from the first audio curve that is not in the normal sounding area; determining a first audio frame in the standard audio curve and a second audio frame in the first audio curve; calculating a first abnormal score of the first abnormal audio frame and a second abnormal score of the second audio frame, and determining the second abnormal audio frame according to the score difference; determining a compensation factor according to the first abnormal audio frame and the second abnormal audio frame; adjusting the audio frame to be compensated by the compensation factor; and determining the speaker detection data based on the proportion of the number of frames of the first abnormal audio frame in the second actual audio data. The present invention compensates the vibration frequency of the speaker by the compensation factor, and eliminates the abnormal sounding problem of the speaker caused by the inconsistency between the vibration frequency and the sounding frequency.
[0053] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0054] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0055] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0056] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0057] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
Claims
1. A mobile phone speaker self-detection method, characterized in that: include: Acquire test audio data; the test audio data is audio data with a specific volume and frequency change; Determine a normal sounding area by using a standard audio curve of the test audio data; Acquire first actual audio data and a first audio curve emitted by the speaker based on the test audio data, and extract a first abnormal audio frame from the first audio curve that is not in a normal sound emission area; Determine a first audio frame in a standard audio curve and a second audio frame in a first audio curve according to first control data of the first abnormal audio frame; Calculate the curve similarity of the first abnormal audio frame and the second audio frame with the corresponding first audio frame, determine a first abnormal score of the first abnormal audio frame and a second abnormal score of the second audio frame, and determine the second abnormal audio frame according to the difference between the second abnormal score and the first abnormal score; Determine the first audio data according to the first abnormal audio frame, determine the lowest audio frame or the highest audio frame in the first audio data as the third audio frame, and calculate the first frequency difference score through the first abnormal audio frame and the third audio frame; Determine the second audio data according to the second abnormal audio frame, determine the lowest audio frame or the highest audio frame in the second audio data as the fourth audio frame, and calculate the second frequency difference score through the second abnormal audio frame and the fourth audio frame; Determine a relationship curve between the frequency difference score and the abnormality score according to the first abnormality score of the first abnormal audio frame, the first frequency difference score, the second abnormality score of the second abnormal audio frame, and the second frequency difference score, and determine a compensation factor according to the relationship curve between the frequency difference score and the abnormality score; adjusting the current control data corresponding to the audio frame to be compensated having the same audio frequency as the first abnormal audio frame by using the compensation factor; Based on the adjusted current control data, second actual audio data produced by the speaker is obtained, and the speaker detection data is determined according to the frame number ratio of the first abnormal audio frame in the second actual audio data.
2. The mobile phone speaker self-detection method according to claim 1, characterized in that: The determining the normal sounding area by using the standard audio curve of the test audio data comprises: Multiplying the standard audio curve of the test audio data by the influence factor q1 to obtain a second audio curve; Multiplying the standard audio curve of the test audio data by the influence factor q2 to obtain a third audio curve; An area between the second audio curve and the third audio curve is determined as a normal voicing area.
3. The mobile phone speaker self-detection method according to claim 1, characterized in that: The step of acquiring first actual audio data and a first audio curve emitted by a speaker based on the test audio data, and extracting a first abnormal audio frame from the first audio curve that is not in a normal sound emission area, comprises: generating current control data according to the test audio data; Controlling the speaker to produce sound through the current control data; Acquire first actual audio data played by the speaker through the microphone module, and draw a first audio curve of audio change amplitude and frequency; Analyze the first audio curve based on the normal sound emission area, mark the first audio curve that is not in the normal sound emission area, and obtain one or more fourth audio curves; One or more first abnormal audio frames are determined by analyzing the fourth audio data.
4. The mobile phone speaker self-detection method according to claim 3, characterized in that: The determining the first audio frame in the standard audio curve and the second audio frame in the first audio curve according to the first control data of the first abnormal audio frame comprises: determining first control data based on a first sound emission time of a first abnormal audio frame; Marking the current control data according to the first control data to obtain one or more second sounding times; intercepting a first or a plurality of first audio frames in a standard audio curve according to a first utterance time and a second utterance time; One or more second audio frames are intercepted from the first audio curve according to the second utterance time.
5. The mobile phone speaker self-detection method according to claim 4, characterized in that: The method of performing curve similarity calculation on the first abnormal audio frame and the second audio frame respectively with the corresponding first audio frame, determining a first abnormal score of the first abnormal audio frame and a second abnormal score of the second audio frame, and determining the second abnormal audio frame according to a score difference between the second abnormal score and the first abnormal score, comprises: comparing the first abnormal audio frame with the corresponding first audio frame based on the first utterance time, and determining a first abnormality score of the first abnormal audio frame; comparing the second audio frame with the corresponding first audio frame based on the second utterance time, and determining a second abnormality score of the second audio frame; Calculating a score difference between a second abnormality score of the second audio frame and a first abnormality score of the first abnormal audio frame, and determining a second audio frame having a score difference less than a preset score threshold as a second abnormal audio frame; When there is no corresponding second abnormal audio frame for the first abnormal audio frame, the abnormal mark of the first abnormal audio frame is cancelled.
6. The mobile phone speaker self-detection method according to claim 1, characterized in that: determining the first audio data according to the first abnormal audio frame, determining the lowest audio frame or the highest audio frame in the first audio data as the third audio frame, and calculating the first frequency difference score through the first abnormal audio frame and the third audio frame; Determining second audio data according to the second abnormal audio frame, determining the lowest audio frame or the highest audio frame in the second audio data as a fourth audio frame, and calculating a second frequency difference score through the second abnormal audio frame and the fourth audio frame, including: According to the first abnormal audio frame P m1 and first n audio frames to determine first audio data; According to the second abnormal audio frame P m2 and the first n audio frames to determine the second audio data; The lowest audio frame whose frequency is lower than the first abnormal audio frame m1 or the highest audio frame whose frequency is higher than the first abnormal audio frame m1 in the first audio data is determined as the third audio frame P m1-a ; The lowest audio frame whose frequency is lower than the second abnormal audio frame m2 or the highest audio frame whose frequency is higher than the second abnormal audio frame m2 in the second audio data is determined as the fourth audio frame P m2-b ; Calculate the first abnormal audio frame P m1 and the third audio frame P m1-a The first abnormal audio frame P is determined by the ratio of the audio frequency difference and the utterance time difference. m1 The first frequency difference score c m1 ; Calculate the second abnormal audio frame P m2 and the fourth audio frame P m2-b The ratio of the audio frequency difference and the utterance time difference is used to determine the second abnormal audio frame P m2 The second frequency difference score c m2 .
7. The mobile phone speaker self-detection method according to claim 6, characterized in that: Also includes: The first abnormal audio frame P m1 The first frequency difference score c m1 The calculation method is expressed as: ; Among them, Q m1 and Q m1-a The first abnormal audio frame P m1 and the third audio frame P m1-a The audio frequency, t m1 and t m1-a The first abnormal audio frame P m1 and the third audio frame P m1-a The time of utterance; The second abnormal audio frame P m2 The second frequency difference score c m2 The calculation method is expressed as: ; Among them, Q m2 and Q m2-b The second abnormal audio frame P m2 and the fourth audio frame P m2-b The audio frequency, t m2 and t m2-b The second abnormal audio frame P m2 and the fourth audio frame P m2-b The time of utterance.
8. The mobile phone speaker self-detection method according to claim 1, characterized in that: The method of determining a relationship curve between a frequency difference score and an abnormality score according to a first abnormality score of a first abnormal audio frame, a first frequency difference score, a second abnormality score of a second abnormal audio frame, and a second frequency difference score, and determining a compensation factor according to the relationship curve between the frequency difference score and the abnormality score includes: Create a coordinate image with the X-axis being the frequency difference score and the Y-axis being the anomaly score; According to the first abnormal audio frame P m1 The first anomaly score p m1 and the first frequency difference score c m1 , the second abnormal audio frame P m2 The second anomaly score p m2 and the second frequency difference score c m2 Determine multiple coordinate data; Performing curve fitting on the plurality of coordinate data, determining influencing factors k1, k2 and k3, and drawing a relationship curve between the frequency difference score and the abnormality score; ; Among them, c is the frequency difference score, p is the anomaly score, k1, k2 and k3 are all influencing factors; Determine the compensation factor k4 based on the relationship curve between the frequency difference score and the abnormality score; ; Among them, c b is the maximum difference score of the audio frame, p b is the anomaly score corresponding to the maximum difference score of the audio frame, c a is the frequency difference score of the audio frame to be compensated, p a is the abnormality score of the audio frame to be compensated.
9. A mobile phone speaker self-detection system, used to implement the mobile phone speaker self-detection method according to any one of claims 1 to 8, characterized in that: include: A data acquisition module, used for acquiring test audio data; The abnormal audio frame analysis module is used to determine the normal sound emission area through the standard audio curve of the test audio data; obtain the first actual audio data and the first audio curve emitted by the speaker based on the test audio data, and extract the first abnormal audio frame from the first audio curve that is not in the normal sound emission area; Determine a first audio frame in a standard audio curve and a second audio frame in a first audio curve according to first control data of the first abnormal audio frame; Calculate the curve similarity of the first abnormal audio frame and the second audio frame with the corresponding first audio frame, determine a first abnormal score of the first abnormal audio frame and a second abnormal score of the second audio frame, and determine the second abnormal audio frame according to the difference between the second abnormal score and the first abnormal score; a compensation factor calculation module, configured to determine first audio data according to the first abnormal audio frame, determine a lowest audio frame or a highest audio frame in the first audio data as a third audio frame, and calculate a first frequency difference score through the first abnormal audio frame and the third audio frame; Determine the second audio data according to the second abnormal audio frame, determine the lowest audio frame or the highest audio frame in the second audio data as the fourth audio frame, and calculate the second frequency difference score through the second abnormal audio frame and the fourth audio frame; Determine a relationship curve between the frequency difference score and the abnormality score according to the first abnormality score of the first abnormal audio frame, the first frequency difference score, the second abnormality score of the second abnormal audio frame, and the second frequency difference score, and determine a compensation factor according to the relationship curve between the frequency difference score and the abnormality score; a data adjustment module, configured to adjust the current control data corresponding to the audio frame to be compensated having the same audio frequency as the first abnormal audio frame by using the compensation factor; The audio verification module is used to obtain second actual audio data of the speaker based on the adjusted current control data, and determine the speaker detection data according to the frame number ratio of the first abnormal audio frame in the second actual audio data.
10. A mobile phone speaker, characterized in that: The mobile phone speaker includes a mobile phone speaker self-detection method program. When the mobile phone speaker self-detection method program is executed by a processor, the steps of a mobile phone speaker self-detection method as described in any one of claims 1 to 8 are implemented.
