Audio signal processing method and device, electronic equipment and readable storage medium
By detecting the audio characteristic parameters of the speaker, determining the load status, and performing audio compensation processing, the problem of inconsistent sound effects after electronic devices are covered with protective cases is solved, and the overall listening consistency of the audio signal is improved.
Patent Information
- Application Number
- CN202611334634.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-06
AI Technical Summary
When electronic devices are covered with protective cases, the phase of the audio signal output by the speaker may change, resulting in an inconsistent overall listening experience and affecting the sound quality.
By detecting the audio characteristic parameters of the electronic device's speakers, the load state is determined, and audio compensation parameters are determined based on the load state. The audio signal output by the speakers is then processed to reduce the audio parameter differences between speakers.
It improves the sound quality of electronic devices and reduces the probability of inconsistencies in stereo imaging, spatial perception, and overall listening experience between speakers.
Smart Images

Figure CN123053153A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of audio technology, specifically relating to an audio signal processing method, apparatus, electronic device, and readable storage medium. Background Technology
[0002] Currently, in order to enhance the low-frequency performance of electronic devices, protective cases have emerged to complement these devices. These protective cases are equipped with sound outlet channels, which can connect with some of the sound outlets of the electronic device when the protective case is on. This can change the acoustic load of the speaker on the electronic device that is opposite to the sound outlet, thereby improving low-frequency performance.
[0003] However, after an electronic device is covered with a protective case, the overall sound quality may differ from that before the case was used, which could affect the sound effect and result in a poorer sound quality. Summary of the Invention
[0004] The purpose of this application is to provide an audio signal processing method, apparatus, electronic device, and readable storage medium that can solve the problem of poor sound quality in electronic devices.
[0005] In a first aspect, embodiments of this application provide an audio signal processing method, which includes: an electronic device determining the load state of a first speaker based on N audio characteristic parameters of the first speaker of the electronic device, wherein the audio characteristic parameters are related to the vibration mass of the first speaker and N is a positive integer; determining an audio compensation parameter corresponding to the load state based on the load state; and processing the audio signal to be output by the first speaker based on the audio compensation parameter.
[0006] Secondly, embodiments of this application provide an audio signal processing apparatus, comprising: a determining module, configured to determine the load state of a first loudspeaker based on N audio characteristic parameters of the first loudspeaker, wherein the audio characteristic parameters are related to the vibration mass of the first loudspeaker, and N is a positive integer; and to determine audio compensation parameters corresponding to the load state based on the load state. A processing module, configured to process the audio signal to be output by the first loudspeaker based on the audio compensation parameters determined by the determining module.
[0007] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions implementing the steps of the method as described in the first aspect when executed by the processor.
[0008] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method as described in the first aspect.
[0009] Fifthly, embodiments of this application provide a chip including a processor and a communication interface coupled to the processor, the processor being used to run programs or instructions to implement the steps of the method as described in the first aspect.
[0010] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the steps of the method as described in the first aspect.
[0011] In this embodiment of the application, the electronic device can determine the load state of the first speaker based on N audio characteristic parameters of the first speaker of the electronic device. The audio characteristic parameters are related to the vibration quality of the first speaker. Based on the load state, the electronic device can determine the audio compensation parameters corresponding to the load state. Thus, the electronic device can process the audio signal to be output by the first speaker based on the audio compensation parameters. Since the audio characteristic parameters are related to the vibration quality of the first speaker, and the vibration quality of the first speaker is related to the connectivity between the sound outlet of the electronic device (i.e., the sound outlet opposite to the first speaker) and the sound outlet channel of the protective case, the electronic device can accurately reflect the connectivity between the sound outlet of the electronic device (i.e., the sound outlet opposite to the first speaker) and the sound outlet channel of the protective case by determining the load state based on the N audio characteristic parameters related to the vibration quality of the first speaker. Therefore, the electronic device can first determine the audio compensation parameters corresponding to the load state, i.e., the audio compensation parameters applicable to the connectivity, and then process the audio signal to be output by the first speaker according to the audio compensation parameters to reduce the difference between the audio parameters of the audio signal output by the first speaker and the audio signals output by other speakers. This can reduce the probability of the overall listening experience of the electronic device's speakers being inconsistent with the overall listening experience before wearing the protective case, thereby improving the sound effect of the electronic device. Attached Figure Description
[0012] Figure 1 This is one of the schematic flowcharts of the audio signal processing method provided in the embodiments of this application;
[0013] Figure 2 This is a second schematic flowchart of the audio signal processing method provided in the embodiments of this application;
[0014] Figure 3 This is the third flowchart illustrating the audio signal processing method provided in the embodiments of this application;
[0015] Figure 4This is a schematic diagram of the system architecture of the electronic device in the audio signal processing method provided in the embodiments of this application;
[0016] Figure 5 This is the fourth flowchart illustrating the audio signal processing method provided in the embodiments of this application;
[0017] Figure 6 This is a schematic diagram of the audio signal processing device provided in the embodiments of this application;
[0018] Figure 7 This is one of the hardware structure diagrams of the electronic device provided in the embodiments of this application;
[0019] Figure 8 This is the second schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0020] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0021] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0022] The terms "at least one," "at least one of," etc., used in the specification and claims of this application refer to any one, any two, or a combination of two or more of the included items. For example, at least one of a, b, and c can mean: "a," "b," "c," "a and b," "a and c," "b and c," and "a, b, and c," where a, b, and c can be single or multiple. Similarly, "at least two" refers to two or more items, and its meaning is similar to that of "at least one."
[0023] Currently, in order to enhance the low-frequency performance of electronic devices, protective cases (such as acoustic protective cases) have emerged to complement these devices. These protective cases are equipped with sound outlet channels, which can connect with some of the sound outlets of the electronic device when the device is wearing the protective case. This can change the acoustic load of the speaker on the electronic device that is opposite to the sound outlet, thereby improving low-frequency performance.
[0024] However, in practical application, the applicant found that when the electronic device is covered with a protective case, the phase of the audio signal output by the speaker opposite the aforementioned sound outlet may change. This may cause the phase of the audio signal output by the remaining speaker of the electronic device to be mismatched with that of the speaker opposite the aforementioned sound outlet. As a result, the overall sound quality of the electronic device may be inconsistent with that before the protective case was applied, which may affect the sound effect of the electronic device and thus lead to poor sound quality.
[0025] To address the aforementioned technical problems, embodiments of this application provide an audio signal processing method, apparatus, electronic device, and readable storage medium. The following, in conjunction with the accompanying drawings, provides a detailed description of the audio signal processing method, apparatus, electronic device, and readable storage medium provided by the embodiments of this application through specific examples and application scenarios.
[0026] It should be noted that the audio signal processing method provided in this application can be executed by electronic devices such as mobile phones, tablets, laptops, PDAs, and in-vehicle electronic devices. Some embodiments of this application use electronic devices as the executing entity to illustrate the audio signal processing method provided in this application.
[0027] The audio signal processing method provided in this application can be applied to scenarios where users use electronic devices.
[0028] One specific application scenario is when a user uses an electronic device to output audio signals through a speaker.
[0029] Figure 1 A flowchart illustrating the audio signal processing method provided in an embodiment of this application is shown. Figure 1 As shown, the audio signal processing method provided in this application embodiment may include the following steps 101 to 103.
[0030] Step 101: The electronic device determines the load state of the first speaker based on N audio characteristic parameters of the first speaker of the electronic device.
[0031] In this embodiment of the application, the above-mentioned audio characteristic parameters are related to the vibration quality of the first speaker, and N is a positive integer.
[0032] In some embodiments of this application, the number of the first speakers can be at least one, and the first speaker can be a speaker of the electronic device located at a predetermined position, for example, the first speaker can be a speaker of the electronic device located at the bottom of the electronic device.
[0033] It is understood that the predetermined position can be the position relative to the sound output channel of the protective case when the electronic device is wearing a protective case. The protective case may include, but is not limited to, an acoustic protective case.
[0034] It should be noted that the bottom of the aforementioned electronic device can be understood as the bottom of the electronic device when the user holds and uses it, for example, the side of the electronic device where the charging port is located.
[0035] In some embodiments of this application, the aforementioned vibrational mass can be understood as the mass of air propelled by the vibration of the speaker diaphragm when the speaker is in operation. This vibrational mass can also be understood as the acoustic load of the speaker.
[0036] In some embodiments of this application, the above-mentioned audio characteristic parameters may be positively or negatively correlated with the vibration quality of the first loudspeaker.
[0037] In some embodiments of this application, the above-mentioned audio feature parameters include at least one of the following:
[0038] Quality factor;
[0039] Resonant frequency;
[0040] Back electromotive force parameter;
[0041] Frequency response characteristic parameters.
[0042] In some examples, when the acoustic load on the first loudspeaker increases (e.g., the sound outlet opposite the first loudspeaker is connected to the sound outlet channel), the equivalent mechanical compliance of the first loudspeaker decreases, leading to an increase in the resonant frequency. Simultaneously, due to this decrease in mechanical compliance, the height and shape of the peak in the impedance curve of the first loudspeaker change, and the quality factor Q increases. Conversely, if the acoustic load on the first loudspeaker decreases, the resonant frequency decreases, and the quality factor Q decreases.
[0043] In some examples, when the acoustic load of the first loudspeaker changes (e.g., the sound outlet opposite the first loudspeaker is connected to or no longer connected to the sound outlet channel), the mechanical impedance of the first loudspeaker changes, and the amplitude and phase of the diaphragm velocity change accordingly, resulting in real-time changes in the amplitude of the back electromotive force, the time-domain waveform, and the phase difference with the input signal.
[0044] In some examples, the frequency response characteristics (i.e., frequency response parameters) of the radiated sound pressure change when the acoustic load of the first loudspeaker changes (e.g., the sound outlet opposite the first loudspeaker is connected to the sound outlet channel).
[0045] It is understandable that each audio characteristic parameter will change when the acoustic load of the first loudspeaker changes (for example, when the sound outlet opposite the first loudspeaker is connected to the sound outlet channel).
[0046] It should be noted that the above-mentioned audio characteristic parameters may also include other parameters, such as diaphragm displacement and diaphragm velocity. This application embodiment does not limit these parameters, and those skilled in the art can set them according to their needs.
[0047] Thus, since each of the N audio characteristic parameters can include at least one of the following: quality factor, resonant frequency, back electromotive force parameter, and frequency response characteristic parameter, and each of these parameters is related to the vibration quality of the first speaker, the electronic device can accurately determine the load state of the first speaker based on this parameter, thereby accurately knowing the connectivity between the sound outlet and the sound channel opposite to the first speaker. Therefore, in subsequent steps, the electronic device can obtain audio compensation parameters applicable to this connectivity and accurately process the audio signal to be output by the first speaker based on these audio compensation parameters. This can further reduce the difference in audio parameters between the audio signal output by the first speaker and the audio signal output by other speakers, thereby further reducing the probability of inconsistencies in the stereo image, spatial sense, and overall listening experience of the electronic device's speakers.
[0048] In some embodiments of this application, combined with Figure 1 ,like Figure 2 As shown, step 101 above can be specifically implemented through step 101a below.
[0049] Step 101a: Under the condition that the detection conditions are met, the electronic device determines the load status based on N audio characteristic parameters.
[0050] In this embodiment of the application, the detection conditions include at least one of the following:
[0051] Electronic device detected to be powered on;
[0052] The screen of the electronic device was detected to be lit;
[0053] Electronic device unlocked;
[0054] A predetermined audio signal is output through the first speaker;
[0055] The volume corresponding to the first speaker changes;
[0056] The preset timed detection cycle has been reached.
[0057] In some examples, the predetermined audio signal mentioned above may include, but is not limited to, at least one of the following: any audio signal, a short-time test signal.
[0058] The aforementioned short-time test signal can be understood as an audio signal used for testing with a duration less than or equal to a duration threshold. It can be understood that because the electronic device can output a short-time test signal, it ensures that N audio characteristic parameters are calculated while making it difficult for the user to perceive the first speaker outputting an audio signal, thus reducing the user's perception of sudden changes.
[0059] In some examples, the change in volume corresponding to the first speaker can be understood as the change in volume corresponding to the first speaker within a preset time period being greater than or equal to the volume threshold.
[0060] In some examples, the aforementioned timed detection cycle can be used for periodic background detection of electronic devices. This timed detection cycle can be pre-configured by the device or set by the user.
[0061] It is understood that, under the condition that the detection conditions are met, the electronic device can perform the above steps 101 to 103 to process the audio signal to be output by the first speaker.
[0062] Thus, since the detection conditions include at least one of the following: detecting that the electronic device is powered on, detecting that the screen of the electronic device is lit, detecting that the electronic device is unlocked, outputting a predetermined audio signal through the first speaker, the volume of the first speaker changes, and the preset timed detection period is reached, the detection conditions cover a variety of scenarios in which users will use the first speaker to listen to audio. Therefore, when the electronic device processes the audio signal to be output by the first speaker, it can accurately determine the load state based on N audio characteristic parameters and process the audio signal to be output by the first speaker according to the audio compensation parameters. This can reduce the difference between the audio parameters of the audio signal output by the first speaker and the audio signals output by other speakers when the user listens to audio, thereby reducing the probability of inconsistencies in the stereo image, spatial sense, and overall listening experience of the electronic device's speakers when the user listens to audio.
[0063] In some embodiments of this application, the electronic device may first acquire N audio feature parameters, and then determine the load state of the first speaker based on the N audio feature parameters.
[0064] In some examples, the electronic device can calculate N audio characteristic parameters based on the electrical signal of the first speaker when the first speaker outputs an audio signal; or, the electronic device can control the first speaker to output a short-time test signal and calculate N audio characteristic parameters based on the electrical signal of the first speaker.
[0065] In some embodiments of this application, the electronic device may first perform a sliding average processing on N audio feature parameters to obtain smoothed N audio feature parameters, and then determine the load state of the first speaker based on the smoothed N audio feature parameters.
[0066] In some embodiments of this application, step 101 can be implemented by step 101b or step 101c as described below.
[0067] Step 101b: When the N audio feature parameters meet the first judgment condition, the electronic device determines the load state as the first state.
[0068] In this embodiment of the application, the first state is used to characterize that the first sound outlet of the electronic device is connected to the sound outlet channel of the protective case of the electronic device; the first sound outlet is opposite to the first speaker.
[0069] It is understandable that the first state mentioned above can indicate that the electronic device is wearing a protective case.
[0070] In some examples, the first condition mentioned above includes at least one of the following:
[0071] The N audio feature parameters include at least one quality factor, and the value of a first number of quality factors among the at least one quality factor is greater than or equal to a first factor threshold;
[0072] The N audio feature parameters include at least one resonant frequency, and a second number of resonant frequencies among the at least one resonant frequency are all offset from the reference frequency.
[0073] Optionally, the value of the first quantity can be a positive integer less than or equal to N. This first quantity can be set by the user or pre-configured by the device. For example, the first quantity can be 5. Of course, the first quantity can also be other values, and this embodiment does not limit this. The second quantity can be a positive integer less than or equal to N. This second quantity can be set by the user or pre-configured by the device. For example, the second quantity can be 10. Of course, the second quantity can also be other values, and this embodiment does not limit this. The second quantity can be the same as or different from the first quantity.
[0074] Optionally, the aforementioned first factor threshold can be set by the user or pre-configured by the device.
[0075] Optionally, the aforementioned predetermined offset may include, but is not limited to, at least one of the following: offset in a predetermined direction, offset by a predetermined magnitude.
[0076] Optionally, the aforementioned reference frequency can be set by the user or pre-configured by the device.
[0077] Optionally, if the value of a first number of quality factors among at least one quality factor is greater than or equal to a first factor threshold, it can be considered that a large number of quality factors among the at least one quality factor collected by the electronic device have higher values. That is, the quality factor of the first speaker has a larger value over a longer period of time, which means that the acoustic load of the first speaker has a larger value over a longer period of time. It can be considered that the sound outlet of the first speaker may be connected to the sound outlet channel. In other words, the electronic device may be wearing an acoustic protective cover. Therefore, the electronic device can determine the above-mentioned load state as the first state.
[0078] It is understood that in the embodiments of this application, a first quantity can be set as a judgment threshold to determine whether the number of quality factors with higher values among at least one quality factor is large, so as to determine whether the quality factor of the first speaker has a large value over a longer period of time, thereby facilitating the determination of whether the above-mentioned load state is the first state.
[0079] Optionally, if there is a predetermined offset between the second number of resonant frequencies among at least one resonant frequency and the reference frequency, it can be considered that a large number of resonant frequencies among the at least one resonant frequencies collected by the electronic device have undergone a predetermined offset, that is, the resonant frequency of the first speaker has undergone a predetermined offset over a long period of time. It can be considered that the sound outlet of the first speaker may be connected to the sound outlet channel. In other words, the electronic device may be wearing an acoustic protective cover. Therefore, the electronic device can determine the above-mentioned load state as the first state.
[0080] It is understood that in the embodiments of this application, a second quantity can be set as a judgment threshold to determine whether the number of resonant frequencies that have undergone a predetermined shift in at least one resonant frequency is large, so as to determine whether the resonant frequency of the first speaker has undergone a predetermined shift in a longer period of time, thereby facilitating the determination of whether the above-mentioned load state is the first state.
[0081] Thus, since the specific conditions of the first judgment condition are specified in the embodiments of this application, the electronic device can accurately determine whether the load state is the first state according to the specific conditions. This facilitates the electronic device to accurately process the audio signal to be output by the first speaker in subsequent steps according to the audio compensation parameters applicable to the connectivity situation. This can further reduce the difference between the audio parameters of the audio signal output by the first speaker and the audio signals output by other speakers. In this way, the probability of inconsistency between the stereo image, spatial sense and overall listening experience of the electronic device's speakers can be further reduced.
[0082] As can be seen from the above, since the electronic device can accurately determine whether the load state is the first state based on whether the N audio feature parameters meet the first judgment condition, without having to make other judgments, the complexity of the judgment can be reduced, thereby reducing the computational complexity of the electronic device.
[0083] Furthermore, since the first judgment condition can also be combined with the quality factor and resonant frequency, that is, multiple characteristic parameters can be used for joint judgment. This can improve the accuracy of determining the specific state of the load and enhance the robustness of identifying the load state under different models, different protective sleeve batches, and different temperature and humidity environments.
[0084] In some examples, step 101b above can be specifically implemented through steps 101b1 and 101b2 as described below.
[0085] Step 101b1: When N audio feature parameters meet the first judgment condition, the electronic device acquires P audio feature parameters.
[0086] In this embodiment, P is a positive integer.
[0087] Optionally, P can be the same as or different from N.
[0088] Optionally, the electronic device can calculate P audio characteristic parameters based on the electrical signal of the first speaker when the first speaker outputs an audio signal; or, the electronic device can control the first speaker to output a short-time test signal and calculate P audio characteristic parameters based on the electrical signal of the first speaker.
[0089] It is understandable that the time it takes for an electronic device to obtain P audio feature parameters is later than the time it takes to obtain N audio feature parameters.
[0090] Step 101b2: When the P audio feature parameters meet the third judgment condition, the electronic device determines the load state as the first state.
[0091] In this embodiment of the application, the third judgment condition mentioned above includes at least one of the following:
[0092] The P audio feature parameters include at least one quality factor, and the value of a first number of quality factors among the at least one quality factor is greater than or equal to a first factor threshold.
[0093] The P audio feature parameters include at least one resonant frequency, and a second number of resonant frequencies among the at least one resonant frequency are all offset from the reference frequency.
[0094] Optionally, if the value of a first number of quality factors among at least one quality factor is greater than or equal to a first factor threshold, it can be considered that after the N audio feature parameters satisfy the first judgment condition, the value of the quality factor of the first speaker is still large for a relatively long period of time. In other words, the value of the acoustic load of the first speaker is still large for a relatively long period of time. It can be considered that the sound outlet of the first speaker is more likely to be connected to the sound outlet channel. That is to say, the electronic device is more likely to be wearing an acoustic protective cover. Therefore, the electronic device can determine the above load state as the first state.
[0095] It is understood that in the embodiments of this application, a first quantity can be set as a judgment threshold to determine whether the number of quality factors with higher values among the P audio feature parameters is still relatively large, so as to determine whether the quality factor of the first speaker is still relatively large over a long period of time, thereby avoiding misjudgment caused by instantaneous disturbances. For example, if the value of at least one first quantity of quality factors is greater than or equal to the first factor threshold, the accuracy of determining whether the load state is the first state can be improved.
[0096] Optionally, if there is a predetermined offset between the second number of resonant frequencies and the reference frequency in at least one resonant frequency, it can be considered that after the N audio characteristic parameters meet the first judgment condition, the resonant frequency of the first speaker still has a predetermined offset over a long period of time. It can be considered that the sound outlet of the first speaker is likely to be connected to the sound outlet channel. In other words, the electronic device is likely to be wearing an acoustic protective cover. Therefore, the electronic device can determine that the above-mentioned load state is the first state.
[0097] It is understood that in the embodiments of this application, a second quantity can be set as a judgment threshold to determine whether the number of resonant frequencies that have undergone predetermined shifts among the P audio feature parameters is still relatively large, so as to determine whether the resonant frequency of the first speaker has still undergone predetermined shifts over a long period of time, thereby avoiding misjudgment caused by instantaneous disturbances. For example, at least one second quantity of resonant frequencies has a predetermined shift between itself and the reference frequency, thereby improving the accuracy of determining whether the load state is the first state.
[0098] Thus, it can be seen that, given that N audio feature parameters meet the first judgment condition, the electronic device can also acquire P audio feature parameters and combine the P audio feature parameters with the third judgment condition to determine whether the load state is the first state or the second state again, instead of directly determining the load state as the first state when N audio feature parameters meet the first judgment condition. In other words, the electronic device can determine the specific state of the load state through multiple judgments, thereby improving the accuracy of determining the load state.
[0099] In this embodiment of the application, step 101b2 can be replaced by step 101b3.
[0100] Step 101b3: When the P audio feature parameters meet the fourth judgment condition, the electronic device determines the load state to be the second state.
[0101] In this embodiment of the application, the fourth judgment condition mentioned above includes at least one of the following:
[0102] The P audio feature parameters include at least one quality factor, and the value of the third number of quality factors among the at least one quality factor is less than the second factor threshold;
[0103] The P audio feature parameters include at least one resonant frequency, and there is no predetermined offset between the fourth number of resonant frequencies and the reference frequency.
[0104] Optionally, the value of the third quantity can be a positive integer less than or equal to P. This third quantity can be set by the user or pre-configured by the device. For example, the third quantity can be 2. Of course, the third quantity can also be other values, and this embodiment does not limit this. The third quantity can be the same as or different from the first quantity. Similarly, the fourth quantity can be a positive integer less than or equal to P. This fourth quantity can be set by the user or pre-configured by the device. For example, the fourth quantity can be 4. Of course, the fourth quantity can also be other values, and this embodiment does not limit this. The fourth quantity can be the same as or different from the second quantity, and the fourth quantity can be the same as or different from the third quantity.
[0105] Optionally, the second factor threshold can be set by the user or pre-configured by the device, and the second factor threshold can be less than the first factor threshold.
[0106] As can be seen from the above, electronic devices can employ a dual image stabilization judgment method and a dual threshold hysteresis mechanism to avoid misjudgments. The dual image stabilization judgment method can be understood as the judgment method performed by the first, third, and fourth judgment conditions in the above embodiments, and the dual threshold hysteresis mechanism can be understood as the judgment method performed by the first and second factor thresholds in the above embodiments.
[0107] Optionally, if the value of the third number of quality factors in at least one quality factor is less than the second factor threshold, it can be considered that after the N audio feature parameters meet the first judgment condition, the value of the quality factor of the first speaker becomes smaller. In other words, the previous misjudgment may have been caused by data jitter, and the electronic device may not have been wearing an acoustic protective cover. Therefore, the electronic device can determine that the above load state is the second state.
[0108] It is understood that in this embodiment of the application, a third quantity can be set as a judgment threshold to determine whether the number of higher quality factors among the P audio feature parameters is still small, so as to determine whether the quality factor of the first speaker is still small over a long period of time. In this way, the P audio feature parameters include at least one quality factor, and the value of the third quantity of quality factors among the at least one quality factor is less than the second factor threshold. It can be considered that the number of higher quality factors among the P audio feature parameters is small. That is to say, the misjudgment that may have occurred due to the influence of instantaneous disturbances can be determined. Thus, the above-mentioned load state can be determined as the second state, thereby improving the accuracy of determining whether the load state is the first state.
[0109] Optionally, if there is no predetermined offset between the fourth number of resonant frequencies and the reference frequency in at least one resonant frequency, it can be considered that after the N audio characteristic parameters meet the first judgment condition, the resonant frequency of the first speaker no longer undergoes a predetermined offset. In other words, the previous misjudgment may have been caused by data jitter, and the electronic device may not have been wearing an acoustic protective cover. Therefore, the electronic device can determine that the above-mentioned load state is the second state.
[0110] It is understood that in the embodiments of this application, a fourth quantity can be set as a judgment threshold to determine whether the number of resonant frequencies that have undergone predetermined shifts among the P audio feature parameters is still small. In this way, if the P audio feature parameters include at least one resonant frequency, and there is no predetermined shift between the fourth quantity of resonant frequencies among the at least one resonant frequency and the reference frequency, it can be considered that the number of resonant frequencies that have undergone predetermined shifts among the P audio feature parameters is small. That is to say, the misjudgment that may have occurred due to the influence of instantaneous disturbances can be determined to be the second state, thereby improving the accuracy of determining whether the load state is the first state.
[0111] Optionally, if the P audio feature parameters do not meet the third judgment condition and do not meet the fourth judgment condition, the electronic device may execute the above steps 101b1 and 101b2, or steps 101b1 and 101b3 again.
[0112] Thus, it can be seen that, given that N audio feature parameters meet the first judgment condition, the electronic device can also acquire P audio feature parameters and combine the P audio feature parameters with the third judgment condition to determine whether the load state is the first state or the second state again, instead of directly determining the load state as the first state when N audio feature parameters meet the first judgment condition. In other words, the electronic device can determine the specific state of the load state through multiple judgments, thereby improving the accuracy of determining the load state.
[0113] Step 101c: When the N audio feature parameters meet the second judgment condition, the electronic device determines the load state as the second state.
[0114] In this embodiment of the application, the second state is used to indicate that the first sound outlet is not connected to the sound outlet channel of the protective sleeve.
[0115] It is understandable that the aforementioned second state can indicate that the electronic device is not wearing a protective case.
[0116] In some examples, the second condition mentioned above includes at least one of the following:
[0117] The N audio feature parameters include at least one quality factor, and the value of the third number of quality factors among the at least one quality factor is less than the second factor threshold;
[0118] The N audio characteristic parameters include at least one resonant frequency, and there is no predetermined offset between the fourth number of resonant frequencies and the reference frequency.
[0119] It is understandable that the third and fourth quantities mentioned above are positive integers less than or equal to N.
[0120] Optionally, if the value of the third number of quality factors in at least one quality factor is less than the second factor threshold, it can be considered that the quality factor of the first speaker is small over a longer period of time. In other words, the acoustic load of the first speaker is small over a longer period of time. It can be considered that the sound outlet of the first speaker may not be connected to the sound outlet channel. That is, the electronic device may not be wearing an acoustic protective cover. Therefore, the electronic device can determine that the above load state is the second state.
[0121] Optionally, if there is no predetermined offset between the fourth number of resonant frequencies in at least one resonant frequency and the reference frequency, it can be assumed that the resonant frequency of the first speaker has not shifted predeterminedly over a longer period of time. It can be assumed that the sound outlet of the first speaker may not be connected to the sound outlet channel. In other words, the electronic device may not be wearing an acoustic protective cover. Therefore, the electronic device can determine that the above-mentioned load state is the second state.
[0122] Thus, since the embodiments of this application specify the specific conditions of the second judgment condition, the electronic device can accurately determine whether the load state is the second state according to the specific conditions. This facilitates the electronic device to accurately process the audio signal to be output by the first speaker in subsequent steps according to the audio compensation parameters applicable to the connectivity situation. This can further reduce the difference between the audio parameters of the audio signal output by the first speaker and the audio signals output by other speakers. In this way, the probability of inconsistency between the stereo image, spatial sense and overall listening experience of the electronic device's speakers can be further reduced.
[0123] As can be seen from the above, since the electronic device can accurately determine whether the load state is the second state based on whether the N audio feature parameters meet the second judgment condition, without having to make other judgments, the complexity of the judgment can be reduced, thereby reducing the computational complexity of the electronic device.
[0124] In some examples, step 101c above can be specifically implemented through steps 101c1 and 101c2 as described below.
[0125] Step 101c1: When N audio feature parameters meet the second judgment condition, the electronic device acquires Y audio feature parameters.
[0126] In this embodiment of the application, Y is a positive integer.
[0127] Optionally, Y and N can be the same or different.
[0128] Optionally, the electronic device can calculate Y audio characteristic parameters based on the electrical signal of the first speaker when the first speaker outputs an audio signal; or, the electronic device can control the first speaker to output a short-time test signal and calculate Y audio characteristic parameters based on the electrical signal of the first speaker.
[0129] It is understandable that the time it takes for the electronic device to obtain Y audio feature parameters is later than the time it takes to obtain N audio feature parameters.
[0130] Step 101c2: When the Y audio feature parameters meet the fifth judgment condition, the electronic device determines the load state to be the second state.
[0131] In this embodiment of the application, the fifth judgment condition mentioned above includes at least one of the following:
[0132] The Y audio feature parameters include at least one quality factor, and the value of the third number of quality factors among the at least one quality factor is less than the second factor threshold;
[0133] The Y audio feature parameters include at least one resonant frequency, and there is no predetermined offset between the fourth number of resonant frequencies among the at least one resonant frequency and the reference frequency.
[0134] It is understandable that the third and fourth quantities mentioned above are positive integers less than or equal to Y.
[0135] Optionally, if the value of the third number of quality factors in at least one quality factor is less than the second factor threshold, it can be considered that the quality factor of the first speaker is still small over a longer period of time. In other words, the acoustic load of the first speaker is still small over a longer period of time. It can be considered that the sound outlet of the first speaker may not be connected to the sound outlet channel. That is, the electronic device may not be wearing an acoustic protective cover. Therefore, the electronic device can determine that the above load state is the second state.
[0136] Optionally, if there is no predetermined offset between the fourth number of resonant frequencies in at least one resonant frequency and the reference frequency, it can be assumed that the resonant frequency of the first speaker has not shifted predeterminedly over a longer period of time. It can be assumed that the sound outlet of the first speaker may not be connected to the sound outlet channel. In other words, the electronic device may not be wearing an acoustic protective cover. Therefore, the electronic device can determine that the above-mentioned load state is the second state.
[0137] Thus, it can be seen that, when N audio feature parameters meet the second judgment condition, the electronic device can also obtain Y audio feature parameters, and combine the Y audio feature parameters with the fifth judgment condition to determine whether the load state is the first state or the second state again, instead of directly determining the load state as the second state when N audio feature parameters meet the second judgment condition. In other words, the electronic device can determine the specific state of the load state through multiple judgments, thereby improving the accuracy of determining the load state.
[0138] In this embodiment of the application, step 101c2 can also be replaced by step 101c3.
[0139] Step 101c3: When the Y audio feature parameters meet the sixth judgment condition, the electronic device determines the load state as the first state.
[0140] In this embodiment of the application, the sixth judgment condition mentioned above includes at least one of the following:
[0141] The Y audio feature parameters include at least one quality factor, and the value of a first number of quality factors among the at least one quality factor is greater than or equal to a first factor threshold.
[0142] The Y audio feature parameters include at least one resonant frequency, and a second number of resonant frequencies among the at least one resonant frequency have a predetermined offset from the reference frequency.
[0143] Optionally, if the Y audio feature parameters do not meet the fifth judgment condition and do not meet the sixth judgment condition, the electronic device may execute the above steps 101c1 and 101c2, or steps 101c1 and 101c3 again.
[0144] Thus, it can be seen that, when N audio feature parameters meet the second judgment condition, the electronic device can also obtain Y audio feature parameters, and combine the Y audio feature parameters with the sixth judgment condition to determine whether the load state is the first state or the second state again, instead of directly determining the load state as the second state when N audio feature parameters meet the second judgment condition. In other words, the electronic device can determine the specific state of the load state through multiple judgments, thereby improving the accuracy of determining the load state.
[0145] Step 102: The electronic device determines the audio compensation parameters corresponding to the load state based on the load state.
[0146] In some embodiments of this application, the above-mentioned audio compensation parameters include at least one of the following:
[0147] Phase compensation parameters;
[0148] Delay parameters;
[0149] Equalize EQ parameters;
[0150] Gain compensation parameters;
[0151] Dynamic range parameter;
[0152] Stereo balance parameters;
[0153] All-pass filter parameters.
[0154] Thus, it can be seen that since the audio compensation parameters can include at least one of phase compensation parameters, delay parameters, equalization (EQ) parameters, gain compensation parameters, dynamic range parameters, stereo balance parameters, and all-pass filter parameters, that is, at least one parameter related to the phase of the audio signal, in subsequent steps, the electronic device can process the audio signal to be output by the first speaker according to the at least one parameter, so that the phase of the audio signal to be output by the first speaker matches the phase of the audio signals to be output by the other speakers of the electronic device. Therefore, the difference between the audio parameters of the audio signal output by the first speaker and the audio signals output by the other speakers can be reduced, thereby reducing the probability of inconsistencies in the stereo image, spatial sense, and overall listening experience of the electronic device's speakers. In this way, the sound effect of the electronic device can be improved.
[0155] In some embodiments of this application, multiple correspondences are pre-set in the electronic device. These correspondences are the correspondences between states and compensation parameters. Thus, the electronic device can first determine a state that matches the load state from multiple states in the multiple correspondences, and then determine a compensation parameter corresponding to that state as an audio compensation parameter.
[0156] It should be noted that for the explanation of the above compensation parameters, please refer to the specific description of the audio compensation parameters in the above embodiments, and this application embodiment will not repeat it here.
[0157] Step 103: The electronic device processes the audio signal to be output by the first speaker according to the audio compensation parameters.
[0158] In some embodiments of this application, the electronic device may employ a first method to process the audio signal to be output by the first speaker according to audio compensation parameters.
[0159] The first method can be any of the following: immediate switching method, gradual switching method, or cross-fade-in / fade-out switching method.
[0160] In some examples, when the first mode is the immediate switching mode, the electronic device can directly use the audio compensation parameters to process the audio signal to be output by the first speaker and output the processed audio signal.
[0161] In some examples, when the first mode is a gradual switching mode, the electronic device can determine at least one compensation parameter according to a preset step size and audio compensation parameters, and use the at least one compensation parameter sequentially at a preset time interval to process the audio signal to be output by the first speaker, and output the processed audio signal.
[0162] For example, assuming the audio compensation parameters include delay parameter 20, the electronic device can determine at least one delay parameter, such as 5, 10, 15, or 20, according to preset step sizes 5 and 20. The electronic device can first use delay parameter 5 to process the audio signal to be output by the first speaker and output the processed audio signal. Then, after a preset time interval (e.g., 2 seconds), it can use delay parameter 10 to process the audio signal to be output by the first speaker and output the processed audio signal. Then, after a preset time interval (e.g., 2 seconds), it can use delay parameter 15 to process the audio signal to be output by the first speaker and output the processed audio signal. Finally, after a preset time interval (e.g., 2 seconds), it can use delay parameter 20 to process the audio signal to be output by the first speaker and output the processed audio signal.
[0163] It is understandable that using a gradual transition can further reduce the user's perception of abrupt change.
[0164] In some examples, where the first method involves crossfade-in / fade-out switching, the electronic device can first divide the audio signal to be output by the first speaker into two links, such as link A and link B. Link A is processed using audio compensation parameters, and link B is processed using audio compensation parameters. Then, the first speaker can simultaneously output the audio signals from links A and B. During the output process, within a preset time window, the volume of link A gradually decreases to 0, while the volume of link B increases from 0 to a first volume. This first volume can be the initial volume corresponding to link A.
[0165] It is understandable that using crossfade-in and crossfade-out switching can minimize the discontinuity or phase anomaly caused by changes in the filter structure, allowing the audio signals of link A and link B to blend naturally, which can further reduce the user's perception of abrupt changes.
[0166] This application provides an audio signal processing method. An electronic device can determine the load state of a first speaker based on N audio characteristic parameters of the first speaker, where the audio characteristic parameters are related to the vibration quality of the first speaker. Based on the load state, an audio compensation parameter corresponding to the load state is determined, so that the electronic device can process the audio signal to be output by the first speaker based on the audio compensation parameter. Since the audio characteristic parameters are related to the vibration quality of the first speaker, and the vibration quality of the first speaker is related to the connectivity between the sound outlet of the electronic device (i.e., the sound outlet opposite to the first speaker) and the sound outlet channel of the protective case, the electronic device can accurately reflect the connectivity between the sound outlet of the electronic device (i.e., the sound outlet opposite to the first speaker) and the sound outlet channel of the protective case by determining the load state based on the N audio characteristic parameters related to the vibration quality of the first speaker. Therefore, the electronic device can first determine the audio compensation parameters corresponding to the load state, i.e., the audio compensation parameters applicable to the connectivity, and then process the audio signal to be output by the first speaker according to the audio compensation parameters to reduce the difference between the audio parameters of the audio signal output by the first speaker and the audio signals output by other speakers. This can reduce the probability of the overall listening experience of the electronic device's speakers being inconsistent with the overall listening experience before wearing the protective case, thereby improving the sound effect of the electronic device.
[0167] In some embodiments of this application, combined with Figure 1 ,like Figure 3 As shown, prior to step 101 above, the audio signal processing method provided in this application embodiment may further include steps 201 and 202 as described below.
[0168] Step 201: The electronic device acquires the electrical signal of the first speaker through the intelligent power amplifier of the electronic device.
[0169] In some examples, the aforementioned electrical signal may include, but is not limited to, at least one of the following: current signal, voltage signal.
[0170] Step 202: The electronic device determines N audio characteristic parameters based on the electrical signal.
[0171] In some examples, for any one of the N audio characteristic parameters, where one audio characteristic parameter includes the quality factor and / or the resonant frequency, the electronic device can first calculate the impedance curve of the first speaker based on the above electrical signal, and extract the quality factor and / or the resonant frequency from the impedance curve.
[0172] It should be noted that when the audio feature parameters include other parameters, the explanation of how the electronic device determines the audio feature parameters based on the electrical signal can be found in the specific descriptions in related technologies, and will not be repeated here in the embodiments of this application.
[0173] Thus, it can be seen that since the electronic device can collect the electrical signal of the first speaker through the intelligent power amplifier and determine N audio characteristic parameters based on the electrical signal, the electronic device can process the audio signal to be output by the first speaker based on the N audio characteristic parameters and the audio compensation parameters applicable to the connection between the sound outlet and the sound channel opposite to the first speaker, without adding additional hardware (such as Hall effect devices, NFC modules, mechanical switches, etc.). Therefore, the sound effect of the electronic device can be improved while ensuring that the overall cost and structural complexity of the device are not increased.
[0174] The following will use two different examples to illustrate the audio signal processing method provided in the embodiments of this application.
[0175] Example 1: Identify load status and switch audio compensation parameters based on quality factor.
[0176] 1. Application Scenarios
[0177] Taking a mobile phone as an example, this embodiment applies to a smartphone with dual speakers (such as the electronic device in the above embodiment). The sound outlet corresponding to the lower speaker of the phone (such as the first speaker in the above embodiment) can be connected to a protective case with a sound outlet channel (also called a sound guide channel, acoustic channel, or resonant channel). When the protective case is worn, it changes the acoustic load of the lower speaker, enhancing the low frequencies, but at the same time causes a change in the phase response of the lower speaker, resulting in a phase mismatch with the upper speaker.
[0178] To solve this problem, the phone has two pre-set compensation parameters:
[0179] ① First compensation parameter: used for bare metal state (e.g., the second state in the above embodiment);
[0180] ② Second compensation parameter: used for the state of wearing a protective case (e.g., the first state in the above embodiment).
[0181] It is understood that the mobile phone has two pre-set correspondences: the first compensation parameter and the bare phone state (correspondence 1), and the second compensation parameter and the state with a protective case (correspondence 2). It should be noted that the mobile phone can also have more pre-set correspondences, such as the third compensation parameter and the state with other types of protective cases (correspondence 3), etc., which will not be elaborated upon in this embodiment.
[0182] The second compensation parameters include at least phase compensation parameters for the lower speaker, and may further include EQ, delay, and gain compensation parameters.
[0183] 2. System Structure Diagram
[0184] like Figure 4 As shown in the embodiments of this application, the mobile phone may include an audio processing unit (DSP), a smart power amplifier (PA) (including an I / V feedback module), and a first speaker. The sound outlet of the first speaker may be connected to the sound output channel (i.e., the phone may be equipped with an acoustic protective case) or not connected to the sound output channel (i.e., the phone may not be equipped with an acoustic protective case). The smart power amplifier (PA) can obtain the electrical signal from the first speaker through the I / V feedback module, determine N audio characteristic parameters based on the electrical signal, and determine whether the phone is in a bare state or with a protective case based on the N audio characteristic parameters. This allows the DSP to process the audio signal to be output from the first speaker using corresponding compensation parameters.
[0185] 3. Method and Steps Illustration
[0186] Assuming the phone is in an unlocked state, such as Figure 5 As shown, the audio signal processing method provided in this application embodiment may include the following steps:
[0187] S1. Collect feedback signals.
[0188] During audio playback on the mobile phone, or at specific detection times, the intelligent power amplifier (PA) collects electrical signals (such as voltage and current signals) from the lower speaker.
[0189] S2. Extract N audio feature parameters.
[0190] For example, taking audio characteristic parameters including quality factor, the mobile phone can calculate the impedance curve of the first speaker based on voltage and current signals, and extract the quality factor from the impedance curve.
[0191] In this implementation case, when the protective cover is worn, the quality factor value increases significantly compared to the bare state due to the change in the acoustic load of the lower speaker.
[0192] S3, Parameter Preprocessing.
[0193] To reduce the impact of instantaneous disturbances, the quality factor values obtained from continuous detection are processed by moving average to obtain a smoothed quality factor.
[0194] S4, Image Stabilization Detection.
[0195] The mobile phone can obtain P audio feature parameters if N audio feature parameters meet the first judgment condition, and determine that the mobile phone is in a protective case state if the P audio feature parameters meet the third judgment condition; or, determine that the mobile phone is in an unprotected state if the P audio feature parameters meet the fourth judgment condition.
[0196] S5, parameter switching.
[0197] In one scenario, if it is determined that the phone is in a protective case, the phone can switch to the second compensation parameter. In this case, the DSP can use the second compensation parameter to process the audio signal to be output from the first speaker.
[0198] In another scenario, if it is determined that the phone is still in an unsecured state, the phone can continue to use the first compensation parameters to process the audio signal to be output by the first speaker.
[0199] S6, Audio Output.
[0200] The DSP outputs the audio signal, after being processed by the corresponding compensation parameters, to the intelligent power amplifier (PA), which then emits sound through the first speaker.
[0201] Example 2: Identifying the wearing status of a protective case based on multiple features.
[0202] In Example 1, using only the quality factor may still be affected by prototype differences or environmental factors. Therefore, this implementation case adopts multi-feature joint identification. For example, each of the above N audio feature parameters may include the quality factor and the resonant frequency.
[0203] It should be noted that the specific steps to be performed on the mobile phone can be referred to the specific description in Example 1, and will not be repeated here in the embodiments of this application.
[0204] As can be seen from the above, this application has at least the following beneficial effects:
[0205] 1. No additional hardware costs required.
[0206] This application directly utilizes the existing voltage / current feedback capability of the smart power amplifier (PA) to achieve protective case identification, without the need to add additional hardware such as Hall effect devices, NFC modules, or mechanical switches, thus reducing the overall cost and structural complexity.
[0207] 2. Can automatically detect the protective case wearing status.
[0208] The phone can automatically determine whether to wear a specific protective case based on the actual acoustic load changes of the speaker, eliminating the need for users to manually switch modes and improving ease of use.
[0209] 3. Able to automatically switch the corresponding audio compensation parameters
[0210] Upon detecting the presence of a protective case, the system automatically invokes an audio parameter set optimized for the case-wearing state. This allows for phase compensation, delay compensation, and EQ correction for the lower speaker, thereby improving the consistency of the phone's different speakers.
[0211] 4. The recognition scheme has high robustness.
[0212] By introducing mechanisms such as time windows, anti-shake voting, dual-threshold hysteresis, and smoothing filtering, the probability of misjudgment caused by factors such as hand occlusion, desktop reflection, and instantaneous environmental changes can be reduced, and frequent switching of parameters can be avoided.
[0213] It should be noted that each of the above method embodiments, or various possible implementations of each method embodiment, can be executed individually or in combination of any two or more. The specific implementation can be determined according to actual usage requirements, and this application embodiment does not impose any restrictions on this.
[0214] The audio signal processing method provided in this application can be executed by an audio signal processing device. This application uses an audio signal processing device executing the audio signal processing method as an example to illustrate the audio signal processing device provided in this application.
[0215] Figure 6 This is a schematic diagram of an audio signal processing device provided in an embodiment of this application. Figure 6 As shown, the audio signal processing device 300 may include a determination module 301 and a processing module 302.
[0216] The determining module 301 is used to determine the load state of the first speaker based on N audio characteristic parameters of the first speaker in the audio signal processing device 300. These audio characteristic parameters are related to the vibration mass of the first speaker, and N is a positive integer. The determining module 301 is also used to determine audio compensation parameters corresponding to the load state. The processing module 302 is used to process the audio signal to be output by the first speaker based on the audio compensation parameters determined by the determining module 301.
[0217] This application provides an audio signal processing device. Since the audio characteristic parameters are related to the vibration quality of the first speaker, and the vibration quality of the first speaker is related to the connectivity between the sound outlet of the audio signal processing device (i.e., the sound outlet opposite to the first speaker) and the sound outlet channel of the protective cover, the audio signal processing device can accurately reflect the connectivity between the sound outlet of the audio signal processing device (i.e., the sound outlet opposite to the first speaker) and the sound outlet channel of the protective cover by determining the load state based on N audio characteristic parameters related to the vibration quality of the first speaker. Therefore, the audio signal processing device can first determine the audio compensation parameters corresponding to the load state, i.e., the audio compensation parameters applicable to the connectivity, and then process the audio signal to be output by the first speaker according to the audio compensation parameters to reduce the difference between the audio parameters of the audio signal output by the first speaker and the audio signals output by other speakers. This can reduce the probability of the overall listening experience of the audio signal processing device's speaker being inconsistent with the overall listening experience before wearing the protective cover, thereby improving the sound effect of the audio signal processing device.
[0218] In some embodiments of this application, the above-mentioned audio characteristic parameters include at least one of the following: quality factor; resonant frequency; back electromotive force parameter; frequency response characteristic parameter.
[0219] In some embodiments of this application, the audio compensation parameters include at least one of the following: phase compensation parameters; delay parameters; equalization (EQ) parameters; gain compensation parameters; dynamic range parameters; stereo balance parameters; and all-pass filter parameters.
[0220] In some embodiments of this application, the determining module 301 is specifically used to determine the load state as a first state when N audio feature parameters meet the first judgment condition; or, to determine the load state as a second state when N audio feature parameters meet the second judgment condition; wherein, the first state is used to indicate that the first sound outlet of the audio signal processing device 300 is connected to the sound outlet channel of the protective cover of the audio signal processing device 300; the second state is used to indicate that the first sound outlet is not connected to the sound outlet channel of the protective cover; the first sound outlet is opposite to the first speaker.
[0221] In some embodiments of this application, the first judgment condition mentioned above includes at least one of the following: the N audio feature parameters include at least one quality factor, and the value of a first number of quality factors among the at least one quality factor is greater than or equal to a first factor threshold; the N audio feature parameters include at least one resonant frequency, and a second number of resonant frequencies among the at least one resonant frequency have a predetermined offset from the reference frequency.
[0222] In some embodiments of this application, the second judgment condition mentioned above includes at least one of the following: the N audio feature parameters include at least one quality factor, and the value of a third number of quality factors among the at least one quality factor is less than the second factor threshold; the N audio feature parameters include at least one resonant frequency, and there is no predetermined offset between a fourth number of resonant frequencies and the reference frequency among the at least one resonant frequency.
[0223] In some embodiments of this application, the determining module 301 is specifically used to obtain P audio feature parameters, where P is a positive integer; and to determine the load state as a first state when the P audio feature parameters satisfy a third judgment condition; wherein the third judgment condition includes at least one of the following: the P audio feature parameters include at least one quality factor, and the value of a first number of quality factors among the at least one quality factor is greater than or equal to a first factor threshold; the P audio feature parameters include at least one resonant frequency, and a second number of resonant frequencies among the at least one resonant frequency have a predetermined offset from the reference frequency.
[0224] In some embodiments of this application, the determining module 301 is further configured to determine the load state as the second state when the P audio feature parameters satisfy the fourth judgment condition; wherein the fourth judgment condition includes at least one of the following: the P audio feature parameters include at least one quality factor, and the value of a third number of quality factors among the at least one quality factor is less than the second factor threshold; the P audio feature parameters include at least one resonant frequency, and there is no predetermined offset between the fourth number of resonant frequencies among the at least one resonant frequency and the reference frequency.
[0225] In some embodiments of this application, the determining module 301 is specifically used to obtain Y audio feature parameters, where Y is a positive integer; and to determine the load state as the second state when the Y audio feature parameters satisfy a fifth judgment condition; wherein the fifth judgment condition includes at least one of the following: the Y audio feature parameters include at least one quality factor, and the value of a third number of quality factors among the at least one quality factor is less than a second factor threshold; the Y audio feature parameters include at least one resonant frequency, and there is no predetermined offset between a fourth number of resonant frequencies and a reference frequency among the at least one resonant frequency.
[0226] In some embodiments of this application, the determining module 301 is further configured to determine the load state as a first state when the Y audio feature parameters satisfy a sixth judgment condition; wherein the sixth judgment condition includes at least one of the following: the Y audio feature parameters include at least one quality factor, and the value of a first number of quality factors among the at least one quality factor is greater than or equal to a first factor threshold; the Y audio feature parameters include at least one resonant frequency, and a second number of resonant frequencies among the at least one resonant frequency have a predetermined offset from the reference frequency.
[0227] In some embodiments of this application, the audio signal processing device 300 provided in this application may further include: a acquisition module, configured to acquire the electrical signal of the first speaker through the intelligent power amplifier of the audio signal processing device 300 before the determining module 301 determines the load state of the first speaker based on N audio characteristic parameters of the first speaker of the audio signal processing device 300; and determine N audio characteristic parameters based on the electrical signal.
[0228] In some embodiments of this application, the determination module 301 is specifically used to determine the load state based on N audio feature parameters when the detection conditions are met. The detection conditions include at least one of the following: the audio signal processing device 300 is detected to be powered on; the screen of the audio signal processing device 300 is detected to be lit; the audio signal processing device 300 is detected to be unlocked; a predetermined audio signal is output through the first speaker; the volume of the first speaker changes; and a preset timed detection cycle is reached.
[0229] The audio signal processing device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the scope of the device.
[0230] The audio signal processing device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system.
[0231] The audio signal processing device provided in this application embodiment can achieve... Figures 1 to 5 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0232] In some embodiments of this application, such as Figure 7 As shown, this application embodiment also provides an electronic device 400, including a processor 401 and a memory 402. The memory 402 stores a program or instructions that can run on the processor 401. When the program or instructions are executed by the processor 401, they implement the various steps of the above-described audio signal processing method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0233] It should be noted that the electronic devices in the embodiments of this application include the aforementioned mobile electronic devices and non-mobile electronic devices.
[0234] Figure 8 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0235] The electronic device 500 includes, but is not limited to, components such as: radio frequency unit 501, network module 502, audio output unit 503, input unit 504, sensor 505, display unit 506, user input unit 507, interface unit 508, memory 509, and processor 510.
[0236] Those skilled in the art will understand that the electronic device 500 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 510 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 8 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0237] The processor 510 is configured to determine the load state of the first speaker based on N audio characteristic parameters of the first speaker of the electronic device, wherein the audio characteristic parameters are related to the vibration mass of the first speaker and N is a positive integer; and to determine the audio compensation parameters corresponding to the load state based on the load state; and to process the audio signal to be output by the first speaker based on the audio compensation parameters.
[0238] This application provides an electronic device. Since the audio characteristic parameters are related to the vibration quality of the first speaker, and the vibration quality of the first speaker is related to the connectivity between the sound outlet of the electronic device (i.e., the sound outlet opposite to the first speaker) and the sound outlet channel of the protective case, the electronic device can accurately reflect the connectivity between the sound outlet of the electronic device (i.e., the sound outlet opposite to the first speaker) and the sound outlet channel of the protective case by determining the load state based on N audio characteristic parameters related to the vibration quality of the first speaker. Therefore, the electronic device can first determine the audio compensation parameters corresponding to the load state, i.e., the audio compensation parameters applicable to the connectivity, and then process the audio signal to be output by the first speaker according to the audio compensation parameters to reduce the difference between the audio parameters of the audio signal output by the first speaker and the audio signals output by other speakers. This can reduce the probability of the overall listening experience of the electronic device's speakers being inconsistent with the overall listening experience before wearing the protective case, thereby improving the sound effect of the electronic device.
[0239] In some embodiments of this application, the processor 510 is specifically used to determine the load state as a first state when N audio feature parameters meet a first judgment condition; or, to determine the load state as a second state when N audio feature parameters meet a second judgment condition; wherein the first state is used to indicate that the first sound outlet of the electronic device is connected to the sound outlet channel of the protective case of the electronic device; the second state is used to indicate that the first sound outlet is not connected to the sound outlet channel of the protective case; the first sound outlet is opposite to the first speaker.
[0240] In some embodiments of this application, the processor 510 is specifically used to acquire P audio feature parameters, where P is a positive integer; and to determine the load state as a first state when the P audio feature parameters satisfy a third judgment condition; wherein the third judgment condition includes at least one of the following: the P audio feature parameters include at least one quality factor, and the value of a first number of quality factors among the at least one quality factor is greater than or equal to a first factor threshold; the P audio feature parameters include at least one resonant frequency, and a second number of resonant frequencies among the at least one resonant frequency have a predetermined offset from the reference frequency.
[0241] In some embodiments of this application, the processor 510 is further configured to determine the load state as a second state when the P audio feature parameters satisfy a fourth judgment condition; wherein the fourth judgment condition includes at least one of the following: the P audio feature parameters include at least one quality factor, and the value of a third number of quality factors among the at least one quality factor is less than a second factor threshold; the P audio feature parameters include at least one resonant frequency, and there is no predetermined offset between the fourth number of resonant frequencies among the at least one resonant frequency and the reference frequency.
[0242] In some embodiments of this application, the processor 510 is specifically used to acquire Y audio feature parameters, where Y is a positive integer; and to determine the load state as a second state when the Y audio feature parameters satisfy a fifth judgment condition; wherein the fifth judgment condition includes at least one of the following: the Y audio feature parameters include at least one quality factor, and the value of a third number of quality factors among the at least one quality factor is less than a second factor threshold; the Y audio feature parameters include at least one resonant frequency, and there is no predetermined offset between a fourth number of resonant frequencies and a reference frequency among the at least one resonant frequency.
[0243] In some embodiments of this application, the processor 510 is further configured to determine the load state as a first state when the Y audio feature parameters satisfy a sixth judgment condition; wherein the sixth judgment condition includes at least one of the following: the Y audio feature parameters include at least one quality factor, and the value of a first number of quality factors among the at least one quality factor is greater than or equal to a first factor threshold; the Y audio feature parameters include at least one resonant frequency, and a second number of resonant frequencies among the at least one resonant frequency have a predetermined offset from the reference frequency.
[0244] In some embodiments of this application, the processor 510 is further configured to acquire the electrical signal of the first speaker through the intelligent power amplifier of the electronic device before determining the load state of the first speaker based on the N audio characteristic parameters of the first speaker of the electronic device; and determine the N audio characteristic parameters based on the electrical signal.
[0245] In some embodiments of this application, the processor 510 is specifically used to determine the load state based on N audio feature parameters when detection conditions are met. The detection conditions include at least one of the following: detecting that the electronic device is powered on; detecting that the screen of the electronic device is lit up; detecting that the electronic device is unlocked; outputting a predetermined audio signal through the first speaker; the volume of the first speaker changes; and a preset timed detection period is reached.
[0246] It should be understood that, in this embodiment, the input unit 504 may include a graphics processing unit (GPU) 5041 and a microphone 5042. The GPU 5041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 506 may include a display panel 5061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 507 includes at least one of a touch panel 5071 and other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 may include a touch detection device and a touch controller. Other input devices 5072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0247] The memory 509 can be used to store software programs and various data. The memory 509 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 509 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 509 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0248] Processor 510 may include one or more processing units; optionally, processor 510 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 510.
[0249] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described audio signal processing method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.
[0250] The processor mentioned above is the processor in the electronic device described in the above embodiments. The readable storage medium mentioned above includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0251] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described audio signal processing method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0252] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0253] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the audio signal processing method embodiments described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0254] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0255] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0256] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. An audio signal processing method, characterized in that, include: The load state of the first speaker is determined based on N audio characteristic parameters of the first speaker of the electronic device. The audio characteristic parameters are related to the vibration mass of the first speaker, and N is a positive integer. Based on the load state, determine the audio compensation parameters corresponding to the load state; The audio signal to be output by the first speaker is processed according to the audio compensation parameters.
2. The method according to claim 1, characterized in that, The audio feature parameters include at least one of the following: Quality factor; Resonant frequency; Back electromotive force parameter; Frequency response characteristic parameters.
3. The method according to claim 1, characterized in that, The audio compensation parameters include at least one of the following: Phase compensation parameters; Delay parameters; Equalize EQ parameters; Gain compensation parameters; Dynamic range parameter; Stereo balance parameters; All-pass filter parameters.
4. The method according to claim 1, characterized in that, The step of determining the load state of the first speaker based on N audio characteristic parameters of the first speaker of the electronic device includes: If the N audio feature parameters satisfy the first judgment condition, the load state is determined to be the first state; or, If the N audio feature parameters satisfy the second judgment condition, the load state is determined to be the second state; Wherein, the first state is used to indicate that the first sound outlet of the electronic device is connected to the sound outlet channel of the protective case of the electronic device; the second state is used to indicate that the first sound outlet is not connected to the sound outlet channel of the protective case; the first sound outlet is opposite to the first speaker.
5. The method according to claim 4, characterized in that, The first judgment condition includes at least one of the following: The N audio feature parameters include at least one quality factor, and the value of a first number of the quality factors is greater than or equal to a first factor threshold. The N audio feature parameters include at least one resonant frequency, and a second number of the at least one resonant frequency have a predetermined offset from the reference frequency.
6. The method according to claim 1, characterized in that, Before determining the load state of the first speaker based on N audio characteristic parameters of the first speaker of the electronic device, the method further includes: The electrical signal of the first speaker is acquired by the intelligent power amplifier of the electronic device; Based on the electrical signal, N audio feature parameters are determined.
7. The method according to claim 1, characterized in that, The step of determining the load state of the first speaker based on N audio characteristic parameters of the first speaker of the electronic device includes: Under the condition that the detection conditions are met, the load state is determined based on N audio feature parameters, wherein the detection conditions include at least one of the following: The electronic device was detected to be powered on; The screen of the electronic device was detected to be lit; The electronic device was detected to be unlocked; A predetermined audio signal is output through the first speaker; The volume corresponding to the first speaker changes; The preset timed detection cycle has been reached.
8. An audio signal processing device, characterized in that, include: The determining module is configured to determine the load state of the first loudspeaker based on N audio characteristic parameters of the first loudspeaker of the audio signal processing device, wherein the audio characteristic parameters are related to the vibration mass of the first loudspeaker and N is a positive integer; and to determine the audio compensation parameters corresponding to the load state based on the load state. The processing module is used to process the audio signal to be output by the first speaker according to the audio compensation parameters determined by the determining module.
9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the method as described in any one of claims 1 to 7.
10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1 to 7.
