A method and apparatus for improving the sound quality of a speaker
By dividing and envelope modulating the speaker input signal, the problem of insufficient low-frequency reproduction capability of small speakers is solved, improving sound quality, especially the loudness and dynamic changes of low-frequency signals, thus enhancing the user's listening experience.
Patent Information
- Application Number
- CN202110745517.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-30
- Publication Date
- 2026-03-20
- Estimated Expiration
- 2041-06-30
AI Technical Summary
Small speakers have poor low-frequency reproduction capabilities, resulting in insufficient mid-to-low frequency loudness of audio signals and affecting sound quality.
By dividing the input signal of the speaker into frequencies, detecting and modulating the low-frequency transient signal with signal envelope, the loudness and dynamic range of the low-frequency signal are enhanced. In addition, phase compensation and low-pass filtering are combined to reduce the false detection rate. Bass enhancement algorithm and virtual bass processing are applied to improve the mid-low frequency sound effect.
It improves the low-frequency sound effect of the speaker, enhances the sound quality, especially the loudness and dynamic changes of the low-frequency signal, and enhances the user's auditory experience.
Smart Images

Figure CN115567831B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The embodiment of the present application relates to the technical field of media, in particular to a method and device for improving the sound quality of a loudspeaker. BACKGROUND
[0002] With the miniaturization and lightness of multimedia devices, the volume of the loudspeaker embedded in the multimedia devices is strictly limited, and the loudspeaker in many multimedia devices is a small loudspeaker, and the low-frequency playback capability of the small loudspeaker is poor.
[0003] At present, the loudness of the medium and low frequency of the audio signal played by most loudspeakers is insufficient, so that the sound quality of the loudspeaker when playing the audio signal is poor. For users, the medium and low frequency signal in the audio signal plays an important role in hearing, and directly affects the hearing experience of users, therefore, how to improve the low-frequency sound effect of the small loudspeaker is an urgent problem to be solved. SUMMARY
[0004] The embodiment of the present application provides a method and device for improving the sound quality of a loudspeaker, which can improve the low-frequency sound effect of the loudspeaker and improve the sound quality of the loudspeaker.
[0005] To achieve the above object, the embodiment of the present application adopts the following technical scheme:
[0006] In a first aspect, the embodiment of the present application provides a method for improving the sound quality of a loudspeaker, which can be applied to an electronic device with an audio playing function, and the method comprises the following steps: the electronic device performs frequency division on the input signal of the loudspeaker to obtain a first low-frequency input signal and a first high-frequency input signal, the input signal of the loudspeaker is a time domain signal, the first low-frequency input signal comprises the signal lower than a first preset frequency point in the input signal, and the first high-frequency input signal comprises the signal higher than the first preset frequency point in the input signal; and the electronic device performs transient detection on the first low-frequency input signal to determine whether the first low-frequency input signal is a transient signal; if the first low-frequency input signal is a transient signal, the signal envelope modulation is performed on the first low-frequency input signal to obtain a second low-frequency input signal; and then the electronic device determines the output signal of the loudspeaker according to the second low-frequency input signal and the first high-frequency input signal, wherein the starting voltage of the second low-frequency input signal is greater than the starting voltage of the first low-frequency input signal, and the loudness of the second low-frequency input signal is greater than the loudness of the first low-frequency input signal.
[0007] The method for improving the sound quality of a loudspeaker provided in the embodiments of the present application performs transient detection on a low-frequency signal in an input signal, and if the input signal is a transient signal, envelope modulation is used to enhance the transient signal. Since the sound quality of a low-frequency signal in an audio signal played by a loudspeaker is related to the performance of the loudspeaker, and the transient signal in the low-frequency signal usually reflects important information of the audio signal, the transient signal in the low-frequency signal is modulated to improve the loudness of the low-frequency transient signal and adjust the dynamic range of the low-frequency transient signal, so that when the loudspeaker plays the processed audio signal, the low-frequency sound effect of the audio signal is better, that is, the technical solution in the embodiments of the present application can improve the sound quality of the loudspeaker.
[0008] In a possible implementation manner, the method for improving the sound quality of a loudspeaker provided in the embodiments of the present application further includes: performing frequency division on a first high-frequency input signal of the loudspeaker by the electronic device to obtain a first intermediate-frequency input signal and a second high-frequency input signal, the first intermediate-frequency input signal including a signal lower than a second preset frequency point in the first high-frequency input signal, and the second high-frequency input signal including a signal higher than the second preset frequency point in the first high-frequency input signal, the second preset frequency point being higher than the first preset frequency point; and performing transient detection on the first intermediate-frequency input signal by the electronic device to determine whether the first intermediate-frequency input signal is a transient signal; if the first intermediate-frequency input signal is a transient signal, performing signal envelope modulation on the first intermediate-frequency input signal to obtain a second intermediate-frequency input signal, the starting voltage of the second intermediate-frequency input signal being greater than the starting voltage of the first intermediate-frequency input signal, and the loudness of the second intermediate-frequency input signal being greater than the loudness of the first intermediate-frequency input signal.
[0009] The method for determining the output signal of the loudspeaker according to the second low-frequency input signal and the first high-frequency input signal specifically includes: obtaining the output signal of the loudspeaker by the electronic device according to the second low-frequency input signal, the second intermediate-frequency input signal, and the second high-frequency input signal.
[0010] In the embodiments of the present application, the intermediate-frequency signal in the input signal is also subjected to transient detection, and the transient signal is subjected to envelope modulation to enhance the intermediate-frequency signal, thereby improving the sound quality of the loudspeaker as a whole.
[0011] In a possible implementation manner, the first low-frequency input signal is a transient signal, and before the signal envelope modulation is performed on the first low-frequency input signal, the method for improving the sound quality of a loudspeaker provided in the embodiments of the present application further includes: generating a low-frequency auxiliary signal by the electronic device; and adding the low-frequency auxiliary signal to the first low-frequency input signal to obtain a first auxiliary enhanced signal.
[0012] Based on this, the method of performing signal envelope modulation on the first low-frequency input signal to obtain a second low-frequency input signal specifically includes performing signal envelope modulation on a first auxiliary enhancement signal to obtain the second low-frequency input signal.
[0013] In the embodiments of the present application, the first low-frequency input signal is a transient signal, and the loudspeaker of the electronic device is a small loudspeaker, which has weak low-frequency playback capability. In this case, a low-frequency auxiliary signal can be added to the first low-frequency input signal. The low-frequency auxiliary signal serves to assist in enhancing the loudness of the first low-frequency input signal and optimizing the dynamic range of the first low-frequency input signal.
[0014] In a possible implementation, the method of generating the low-frequency auxiliary signal includes generating a first auxiliary signal and performing high-pass filtering on the first auxiliary signal to obtain the low-frequency auxiliary signal. The first auxiliary signal satisfies: signal_h=A×sin(2πf), where signal_h represents the low-frequency auxiliary signal, A represents a signal amplitude influence factor, and f is the center frequency of the loudspeaker. The value range of A can be 10-50, and the specific value can be determined by the system or set by the user, for example, 10, 25, or 50, etc. The value range of f can be a frequency value in the range of 50-150 Hz, and the specific value can be determined by the system or set by the user, for example, f can be 50 Hz, 100 Hz, or 150 Hz, etc. -A
[0015] In a possible implementation, the first low-frequency input signal is a transient signal. Before performing signal envelope modulation on the first low-frequency input signal, the method of improving the sound quality of the loudspeaker provided in the embodiments of the present application further includes performing phase compensation on the first low-frequency input signal by the electronic device to obtain a first phase compensation signal.
[0016] Based on this, the method of performing signal envelope modulation on the first low-frequency input signal to obtain a second low-frequency input signal includes performing signal envelope modulation on the first phase compensation signal by the electronic device to obtain the second low-frequency input signal.
[0017] In the embodiments of the present application, during the process of frequency division and auxiliary enhancement on the input signal by the electronic device, the phase of the first low-frequency input signal can be affected, resulting in a deviation of the phase of the low-frequency input signal, which is no longer linear. Therefore, necessary linear phase compensation is performed on the first low-frequency input signal to correct the phase of the first low-frequency input signal to a linear phase, thereby ensuring the low-frequency sound quality.
[0018] In a possible implementation manner, the method for performing transient detection on the first low-frequency input signal and determining whether the first low-frequency input signal is a transient signal specifically includes: determining transient power and steady-state power of the first low-frequency input signal; determining a transient rate of the first low-frequency input signal according to the transient power and the steady-state power of the first low-frequency input signal; and determining that the first low-frequency input signal is a transient signal if the transient rate of the input signal is greater than a preset transient rate threshold. The transient rate of the first low-frequency input signal satisfies: T r = (R r - 1) 2 × W, where T r represents the transient rate of the first low-frequency input signal, R r represents a ratio of the transient power of the first low-frequency input signal to the steady-state power of the first low-frequency input signal, and W represents a weighting factor, and the value of W is the same as the current power of the first low-frequency input signal.
[0019] In the embodiment of the application, the power of the first low-frequency input signal is the sum of squares of voltage values of all data points contained in the first low-frequency input signal and an average value, the transient power of the first low-frequency input signal can be an average power of continuous n1 signal frames before a current frame, and the steady-state power of the first low-frequency input signal can be an average power of continuous n2 signal frames before the current frame.
[0020] In some implementation manners, to avoid false detection of small signals, some small signals can be masked. Specifically, a masking threshold is set, and when the power of the first low-frequency input signal is less than the masking threshold, the masking threshold is taken as the power of the first low-frequency input signal. That is, P d = max(P d , P th ), where P d represents the power of the first low-frequency input signal, and P th represents the masking threshold. Similarly, the ratio of the transient power of the first low-frequency input signal to the steady-state power of the first low-frequency input signal can also be optimized, specifically R r = max(R r , 1).
[0021] In an implementation manner, after the electronic device obtains the first low-frequency input signal, the electronic device can perform low-pass filtering on the first low-frequency input signal, and then calculate the transient power and the steady-state power of the filtered first low-frequency input signal to further determine whether the first low-frequency input signal is a transient signal or a steady-state signal. In the embodiment of the present application, the first low-frequency input signal is low-pass filtered to obtain a low-frequency input signal in a lower frequency range, and the high-frequency signal that may exist in the first low-frequency input signal can be further reduced through low-pass filtering. On this basis, transient detection is performed on the filtered first low-frequency input signal, which can reduce the false detection rate of transient detection.
[0022] In a possible implementation manner, the method for improving the sound quality of the loudspeaker provided in the embodiment of the present application further includes: performing equalization processing on the first signal by the electronic device to obtain a second signal; the first signal is an initial to-be-played signal input to the loudspeaker; and performing processing on the second signal by using a bass enhancement algorithm to obtain an input signal of the loudspeaker.
[0023] In the embodiment of the present application, the specific method for performing equalization processing on the first signal can be: performing equalization processing on the first signal by using a biquard filter, which can improve the low-frequency frequency response of the loudspeaker. The second signal is processed by using a bass enhancement algorithm, which can improve the low-frequency loudness of the second signal.
[0024] In a possible implementation manner, the method for performing processing on the second signal by using a bass enhancement algorithm to obtain an input signal of the loudspeaker specifically includes: determining, by the electronic device, a gain of a low-frequency shelf filter according to the energy of the low-frequency signal in the second signal, the low-frequency shelf filter being used to control the loudness of the low-frequency signal in the second signal; and filtering the second signal by using the low-frequency shelf filter to obtain the input signal of the loudspeaker.
[0025] The bass enhancement algorithm is used, and the electronic device differentially improves the loudness of low-frequency signals with different energies to different degrees according to the energy of the low-frequency signal in the second signal, that is, different gains are set for low-frequency signals according to the energy of the low-frequency signal, that is, the loudness of the low-frequency signal in the second signal is dynamically and adaptively improved according to the characteristics of the energy of the low-frequency signal in the second signal. In this way, the intelligibility of the low-frequency signal can be improved.
[0026] In a possible implementation, the method for improving the sound quality of a loudspeaker provided by the embodiment of the present application further includes: the electronic device acquires a first displacement prediction model including one or more correction coefficients, the first displacement prediction model being used to simulate the performance of the loudspeaker to predict the displacement of the diaphragm of the loudspeaker, and the one or more correction coefficients being used to control the output of the first displacement prediction model; and adjusting at least one correction coefficient in the first displacement prediction model to obtain a second displacement prediction model; the absolute value of the difference between the predicted displacement output by the second displacement prediction model and the actual displacement of the diaphragm of the loudspeaker is smaller than the absolute value of the difference between the predicted displacement output by the first displacement prediction model and the actual displacement of the diaphragm of the loudspeaker; the actual displacement of the loudspeaker is the actual measurement of the moving distance of the diaphragm relative to the initial position; and the electronic device controls the gain of the output signal of the loudspeaker according to the displacement protection threshold of the loudspeaker and the predicted displacement output by the second displacement prediction model, so that the displacement of the diaphragm when the loudspeaker plays the output signal is smaller than or equal to the displacement protection threshold; the displacement protection threshold is the maximum displacement of the diaphragm of the loudspeaker.
[0027] In the embodiment of the present application, the second displacement prediction model described above more truly reflects the characteristics of the loudspeaker, ensures that the output predicted displacement is more accurate, and thus can more accurately perform displacement protection, thereby realizing maximizing the hardware potential of the loudspeaker and improving the loudness of the loudspeaker under the premise of protecting the displacement of the diaphragm of the loudspeaker.
[0028] In a possible implementation, the method for improving the sound quality of a loudspeaker provided by the embodiment of the present application further includes: the electronic device performs virtual bass processing on the output signal to obtain a virtual bass output signal, the psychological perception low-frequency loudness of the virtual bass output signal being greater than the psychological perception low-frequency loudness of the output signal of the loudspeaker.
[0029] In the embodiment of the present application, virtual bass processing is a method for improving bass sound effect based on psychoacoustics. From the perspective of psychoacoustics, the psychological perception low-frequency loudness of the output signal after the virtual bass processing (i.e., the virtual bass output signal) is greater than the psychological perception low-frequency loudness of the original output signal. In an implementation, the psychological perception low-frequency loudness can be determined according to a psychoacoustic model.
[0030] In a possible implementation, the method for performing virtual bass processing on an output signal of a loudspeaker to obtain a virtual bass output signal specifically includes: performing frequency division processing on the output signal to obtain a first low-frequency output signal and a first high-frequency output signal, the first low-frequency output signal including signals of the output signal that are lower than a third preset frequency point, and the first high-frequency output signal including signals of the output signal that are higher than the third preset frequency point; generating a harmonic signal of the first low-frequency output signal according to the first low-frequency output signal; mixing the harmonic signal and the first low-frequency output signal to obtain a first mixed signal; and performing phase synchronization processing on the first mixed signal and the first high-frequency output signal to obtain a second mixed signal and a second high-frequency output signal, a change amount of a phase of the second mixed signal being equal to a change amount of a phase of the second high-frequency output signal; and obtaining the virtual bass output signal according to the second mixed signal and the second high-frequency output signal.
[0031] In a possible implementation, the method for improving the sound quality of a loudspeaker further includes: adjusting, according to a coil temperature of the loudspeaker, a nonlinear parameter of a first nonlinear compensation model preconfigured in the loudspeaker to obtain a second nonlinear compensation model; and performing signal compensation on an output signal of the loudspeaker by using the second nonlinear compensation model.
[0032] In the embodiments of the present application, the determined second nonlinear parameter of the loudspeaker is a nonlinear parameter corresponding to a current working state of the loudspeaker, that is, a real-time nonlinear parameter, and the accuracy of the second nonlinear parameter is relatively high. Therefore, the signal compensation effect is relatively good when the output signal of the loudspeaker is compensated according to the second nonlinear parameter, and the signal distortion can be effectively reduced, and the sound quality of the loudspeaker can be improved.
[0033] In a second aspect, an electronic device is provided. The electronic device includes a first obtaining module, a first determining module, an envelope modulation module, and a second determining module. The first obtaining module is configured to split an input signal of a loudspeaker to obtain a first low-frequency input signal and a first high-frequency input signal, the input signal of the loudspeaker being a time-domain signal, the first low-frequency input signal including a signal of the input signal that is lower than a first preset frequency point, and the first high-frequency input signal including a signal of the input signal that is higher than the first preset frequency point. The first determining module is configured to perform transient detection on the first low-frequency input signal to determine whether the first low-frequency input signal is a transient signal. The envelope modulation module is configured to perform signal envelope modulation on the first low-frequency input signal to obtain a second low-frequency input signal in a case where the first low-frequency input signal is the transient signal, the second low-frequency input signal having a starting voltage that is greater than a starting voltage of the first low-frequency input signal and a loudness that is greater than a loudness of the first low-frequency input signal. The second determining module is configured to determine an output signal of the loudspeaker based on the second low-frequency input signal and the first high-frequency input signal.
[0034] In a possible implementation, the first obtaining module is further configured to split the first high-frequency input signal of the loudspeaker to obtain a first intermediate-frequency input signal and a second high-frequency input signal, the first intermediate-frequency input signal including a signal of the first high-frequency input signal that is lower than a second preset frequency point, the second high-frequency input signal including a signal of the first high-frequency input signal that is higher than the second preset frequency point, and the second preset frequency point being higher than the first preset frequency point. The first determining module is further configured to perform transient detection on the first intermediate-frequency input signal to determine whether the first intermediate-frequency input signal is a transient signal. The envelope modulation module is further configured to perform signal envelope modulation on the first intermediate-frequency input signal to obtain a second intermediate-frequency input signal in a case where the first intermediate-frequency input signal is the transient signal, the second intermediate-frequency input signal having a starting voltage that is greater than a starting voltage of the first intermediate-frequency input signal and a loudness that is greater than a loudness of the first intermediate-frequency input signal. The second determining module is specifically configured to obtain the output signal of the loudspeaker based on the second low-frequency input signal, the second intermediate-frequency input signal, and the second high-frequency input signal.
[0035] In a possible implementation, the electronic device provided by the embodiments of the present application further includes a generating module and a second obtaining module. The generating module is configured to generate a low-frequency auxiliary signal. The second obtaining module is configured to add the low-frequency auxiliary signal to the first low-frequency input signal to obtain a first auxiliary enhanced signal. The envelope modulation module is specifically configured to perform signal envelope modulation on the first auxiliary enhanced signal to obtain the second low-frequency input signal.
[0036] In one possible implementation, the aforementioned generation module is specifically used to generate a first auxiliary signal, and then perform high-pass filtering on the first auxiliary signal to obtain a low-frequency auxiliary signal. The first auxiliary signal satisfies: signal_h = e -A ×sin(2πf); where signal_h represents the low-frequency auxiliary signal, A represents the signal amplitude influence factor, and f is the center frequency of the loudspeaker.
[0037] In one possible implementation, the electronic device provided in this application embodiment further includes a phase compensation module; the phase compensation module is used to perform phase compensation on the first low-frequency input signal to obtain a first phase compensation signal; the envelope modulation module is specifically used to perform signal envelope modulation on the first phase compensation signal to obtain a second low-frequency input signal.
[0038] In one possible implementation, the first determining module is specifically used to determine the transient power and steady-state power of the first low-frequency input signal; and to determine the instantaneous rate of the first low-frequency input signal based on the transient power and steady-state power; and to determine that the first low-frequency input signal is a transient signal if the transient rate of the input signal is greater than a preset transient rate threshold. The instantaneous rate of the first low-frequency input signal satisfies: T r =(R r -1) 2 ×W, where T r R represents the instantaneous rate of the first low-frequency input signal. r The value of W represents the ratio of the transient power of the first low-frequency input signal to the steady-state power of the first low-frequency input signal. W represents the weighting factor, and the value of W is the same as the current power of the first low-frequency input signal.
[0039] In one possible implementation, the electronic device provided in this application embodiment further includes an equalization processing module and a bass enhancement module; wherein, the equalization processing module is used to perform equalization processing on the first signal to obtain a second signal, the first signal being the initial signal to be played input to the speaker; the bass enhancement module is used to process the second signal using a bass enhancement algorithm to obtain the input signal of the speaker.
[0040] In one possible implementation, the bass enhancement module is specifically used to determine the gain of a low-frequency shelf filter based on the energy of the low-frequency signal in the second signal. The low-frequency shelf filter is used to control the loudness of the low-frequency signal in the second signal. The low-frequency shelf filter is then used to filter the second signal to obtain the input signal of the speaker.
[0041] In a possible implementation, the electronic device provided by the embodiment of the present application further includes a third obtaining module, a first adjusting module, and a control module. The third obtaining module is configured to obtain a first displacement prediction model including one or more correction coefficients, the first displacement prediction model being used to simulate the performance of the loudspeaker to predict the displacement of the diaphragm of the loudspeaker, and the one or more correction coefficients being used to control the output of the first displacement prediction model. The first adjusting module is configured to adjust at least one correction coefficient in the first displacement prediction model to obtain a second displacement prediction model, an absolute value of a difference between a predicted displacement output by the second displacement prediction model and an actual displacement of the diaphragm of the loudspeaker being smaller than an absolute value of a difference between a predicted displacement output by the first displacement prediction model and the actual displacement of the diaphragm of the loudspeaker. The actual displacement of the loudspeaker is an actual measurement of a moving distance of the diaphragm relative to an initial position. The control module is configured to control the gain of the output signal of the loudspeaker according to a displacement protection threshold of the loudspeaker and the predicted displacement output by the second displacement prediction model, so that the displacement of the diaphragm when the loudspeaker plays the output signal is smaller than or equal to the displacement protection threshold, and the displacement protection threshold is the maximum displacement of the diaphragm of the loudspeaker.
[0042] In a possible implementation, the electronic device provided by the embodiment of the present application further includes a virtual bass processing module. The virtual bass processing module is configured to perform virtual bass processing on the output signal to obtain a virtual bass output signal, the psychoacoustic low-frequency loudness of the virtual bass output signal being greater than the psychoacoustic low-frequency loudness of the output signal.
[0043] In a possible implementation, the virtual bass processing module is specifically configured to perform frequency division processing on the output signal to obtain a first low-frequency output signal and a first high-frequency output signal, the first low-frequency output signal including signals of the output signal that are lower than a third preset frequency point, and the first high-frequency output signal including signals of the output signal that are higher than the third preset frequency point; generate a harmonic signal of the first low-frequency output signal according to the first low-frequency output signal; mix the harmonic signal and the first low-frequency output signal to obtain a first mixed signal; and perform phase synchronization processing on the first mixed signal and the first high-frequency output signal to obtain a second mixed signal and a second high-frequency output signal, a change amount of the phase of the second mixed signal being equal to a change amount of the phase of the second high-frequency output signal; and obtain the virtual bass output signal according to the second mixed signal and the second high-frequency output signal.
[0044] In a possible implementation, the electronic device provided by the embodiment of the present application further includes a second adjusting module and a signal compensation module. The second adjusting module is configured to adjust a nonlinear parameter of a first nonlinear compensation model preconfigured in the loudspeaker according to the coil temperature of the loudspeaker to obtain a second nonlinear compensation model. The signal compensation module is configured to perform signal compensation on the output signal of the loudspeaker by using the second nonlinear compensation model.
[0045] In a third aspect, an electronic device is provided, which includes a memory and at least one processor connected with the memory. The memory is configured to store instructions. The instructions stored in the memory are read by the at least one processor, and the method in any one of the first aspect and possible implementation manners thereof is executed.
[0046] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to execute the method in any one of the first aspect and possible implementation manners thereof.
[0047] In a fifth aspect, a computer program product is provided, which includes instructions. When the computer program product is executed on a computer, the computer is caused to execute the method in any one of the first aspect and possible implementation manners thereof.
[0048] In a sixth aspect, a chip is provided, which includes a memory and a processor. The memory is configured to store computer instructions. The processor is configured to call and execute the computer instructions from the memory to execute the method in any one of the first aspect and possible implementation manners thereof.
[0049] It should be understood that the beneficial effects of the second aspect to the sixth aspect of the embodiments of the present application and the corresponding possible implementation manners can refer to the technical effects of the first aspect and the corresponding possible implementation manners described above, and will not be described here. BRIEF DESCRIPTION OF DRAWINGS
[0050] Figure 1 A schematic diagram of a transient signal and a steady-state signal is provided for the embodiments of the present application;
[0051] Figure 2 A block diagram of an audio processing system is provided for the embodiments of the present application;
[0052] Figure 3 A hardware structure schematic diagram of a mobile phone is provided for the embodiments of the present application;
[0053] Figure 4 A method schematic diagram for improving the sound quality of a loudspeaker is provided for the embodiments of the present application;
[0054] Figure 5 Another method schematic diagram for improving the sound quality of a loudspeaker is provided for the embodiments of the present application;
[0055] Figure 6 A principle schematic diagram of envelope modulation is provided for the embodiments of the present application;
[0056] Figure 7 A framework schematic diagram of a loudspeaker system is provided for the embodiments of the present application;
[0057] Figure 8 Another method for improving the sound quality of a loudspeaker provided by the embodiment of the present application is shown in the schematic diagram;
[0058] Figure 9 Another frame of a loudspeaker system provided by the embodiment of the present application is shown in the schematic diagram;
[0059] Figure 10 Another method for improving the sound quality of a loudspeaker provided by the embodiment of the present application is shown in the schematic diagram;
[0060] Figure 11 Another frame of a loudspeaker system provided by the embodiment of the present application is shown in the schematic diagram;
[0061] Figure 12 Another method for improving the sound quality of a loudspeaker provided by the embodiment of the present application is shown in the schematic diagram;
[0062] Figure 13 Another frame of a loudspeaker system provided by the embodiment of the present application is shown in the schematic diagram;
[0063] Figure 14 Another frame of a loudspeaker system provided by the embodiment of the present application is shown in the schematic diagram;
[0064] Figure 15 A flowchart of a low-frequency enhancement algorithm provided by the embodiment of the present application is shown in the schematic diagram;
[0065] Figure 16 Another frame of a loudspeaker system provided by the embodiment of the present application is shown in the schematic diagram;
[0066] Figure 17 Another method for improving the sound quality of a loudspeaker provided by the embodiment of the present application is shown in the schematic diagram;
[0067] Figure 18 Another frame of a loudspeaker system provided by the embodiment of the present application is shown in the schematic diagram;
[0068] Figure 19 Another method for improving the sound quality of a loudspeaker provided by the embodiment of the present application is shown in the schematic diagram;
[0069] Figure 20 Another frame of a loudspeaker system provided by the embodiment of the present application is shown in the schematic diagram;
[0070] Figure 21 Another method for improving the sound quality of a loudspeaker provided by the embodiment of the present application is shown in the schematic diagram;
[0071] Figure 22 Another frame of a loudspeaker system provided by the embodiment of the present application is shown in the schematic diagram;
[0072] Figure 23 A structure diagram of an electronic device provided by an embodiment of the present application Figure 1 ;
[0073] Figure 24 A structure diagram of an electronic device provided by an embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0074] The term "and / or" in the present application is merely used to describe an associated relationship with associated objects, and can represent three relationships, for example, A and / or B can represent three cases of A alone, A and B together, and B alone.
[0075] The terms "first" and "second" and the like in the description and claims of the embodiments of the present application are used to distinguish different objects, and are not used to describe a specific order of the objects. For example, the first low-frequency input signal and the second low-frequency input signal are used to distinguish different input signals, and are not used to describe a specific order of the low-frequency input signals; for example, the first high-frequency input signal and the second high-frequency input signal are used to distinguish different high-frequency input signals, and are not used to describe a specific order of the high-frequency input signals; for example, the first intermediate-frequency input signal and the second intermediate-frequency input signal are used to distinguish different intermediate-frequency input signals, and are not used to describe a specific order of the intermediate-frequency input signals.
[0076] In the embodiments of the present application, the words "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design presented as "exemplary" or "for example" in the embodiments of the present application should not be construed as being superior or more advantageous than other embodiments or design solutions. Rather, the use of "exemplary" or "for example" is intended to present concepts in a concrete manner.
[0077] In the description of the embodiments of the present application, unless otherwise specified, "a plurality of" means two or more. For example, a plurality of correction coefficients means two or more correction coefficients.
[0078] First, some concepts involved in the method and device for improving the sound quality of a loudspeaker provided by the embodiments of the present application are explained.
[0079] Loudness: Loudness is used to measure the degree of sound intensity perceived by human subjective feeling. Generally, under the condition that the frequency of sound is certain, the stronger the sound intensity is, the greater the loudness is. However, loudness is related to frequency, and the loudness can be different under the condition that the sound intensity is the same and the frequency is different. The loudness can be the sound pressure level of an audio signal, and simply, the loudness can also be understood as the volume of the audio signal.
[0080] It should be understood that the technical solutions provided by the embodiments of the present application are to improve the loudness of low-frequency signals in the audio signal to be played by the loudspeaker, so as to improve the sound quality of the loudspeaker.
[0081] Low-frequency dynamic change: refers to the change process from small to large to small, and the subtle dynamic change of the low-frequency signal in the audio signal affects the user's listening. The better low-frequency dynamic change refers to: the low-frequency starting speed is fast, the peak loudness is large, the decay speed is fast, and the better the low-frequency dynamic, the better the subjective listening of the user when playing the audio signal, and the low-frequency detail part in the audio signal can be performed.
[0082] Input signal of the loudspeaker: can also be referred to as input voltage signal, in the embodiments of the present application, the audio signal is processed frame by frame, therefore, in the process of processing the signal frame, the input signal corresponding to the loudspeaker is a signal frame.
[0083] The input signal of the loudspeaker contains M (M is an integer greater than or equal to 1) digital signals, corresponding to n voltage values (also referred to as n points), for example, the input signal U in = [U in (1), U in (2), …, U in (n), …, U in (M)]. In the embodiments of the present application, processing the input signal refers to processing each digital signal in the input signal in turn. In order to facilitate description, the time of inputting the nth digital signal is recorded as t n , the input signal corresponding to t n is recorded as U in (n) or U in (t n ).
[0084] The above loudness and dynamic change can be used to measure the sound quality of the audio signal played by the loudspeaker, especially for small loudspeakers, the low-frequency loudness and dynamic change are the main target of audio signal processing.
[0085] Transient signal and steady-state signal: the signal with short maintenance time and obvious beginning and end is referred to as transient signal; the signal maintained in a small range for a long period of time is referred to as steady-state signal. For example, Figure 1 shows the transient signal and steady-state signal of a section of audio signal.
[0086] The displacement of the loudspeaker refers to the moving distance of the diaphragm of the loudspeaker during the working process of the loudspeaker.
[0087] The displacement of the loudspeaker has an impact on the sound quality of the loudspeaker. When the diaphragm of the loudspeaker is displaced too much, the diaphragm of the loudspeaker can be hit or rubbed, thereby generating noise, and even causing mechanical damage to the loudspeaker. In the embodiments of the present application, the displacement of the loudspeaker can be controlled to improve the sound quality of the loudspeaker.
[0088] Nonlinear parameters of the loudspeaker: The nonlinear parameters of the loudspeaker can include but are not limited to the following parameters:
[0089] Force factor BL(x): refers to the force factor of the magnetic circuit system of the loudspeaker.
[0090] Mechanical stiffness Kms(x): refers to the stiffness of the suspension system of the loudspeaker. Kms(x) can include different coefficients of the first order, the second order, the third order, etc.
[0091] Inductance Le(x): refers to the inductance of the coil of the loudspeaker.
[0092] Damping Rm(v): is the damping coefficient of the loudspeaker. Rm(v) can include different coefficients of the first order, the second order, the third order, etc.
[0093] Wherein, the above x refers to the displacement of the diaphragm of the loudspeaker, and v refers to the speed of the movement of the diaphragm of the loudspeaker.
[0094] It should be noted that the nonlinear parameters of the loudspeaker can change when the working state of the loudspeaker changes. For example, when the coil of the loudspeaker is at different temperatures, Kms(x) changes, and Rm(v) can also change, that is, Kms(x) at different temperatures is different, and Rm(v) at different temperatures is different.
[0095] Nonlinearity of the loudspeaker: The nonlinearity of the loudspeaker is a phenomenon that the output sound quality of the loudspeaker is distorted due to the hardware structure of the loudspeaker (for example, the structural characteristics of the small size and large displacement of the loudspeaker). It can be called nonlinear distortion. Especially when the loudspeaker has a large signal input, the nonlinearity of the loudspeaker is more obvious, and the output signal can generate excessive distortion, affecting the auditory perception.
[0096] In the embodiments of the present application, the nonlinear distortion caused by the hardware of the loudspeaker can be compensated by using the nonlinear parameters of the loudspeaker to improve the sound quality of the loudspeaker.
[0097] At present, the loudness of the audio signal played by most loudspeakers is insufficient, and the dynamic change performance is not good, so that the sound quality of the audio signal played by the loudspeaker is poor. For users, the medium and low frequency signals in the audio signal play an important role in the hearing, and directly affect the hearing experience of the user, therefore, how to improve the low frequency sound effect of the small loudspeaker is a problem to be solved. Some existing methods for improving the sound quality of the loudspeaker involve processing the audio signal from the perspective of displacement protection of the loudspeaker, the perspective of nonlinear compensation, etc., to maximize the hardware potential of the loudspeaker and improve the loudness of the loudspeaker, but the improvement effect of these methods on the sound quality of the loudspeaker still needs to be improved.
[0098] The embodiment of the present application provides a method and device for improving the sound quality of a loudspeaker, which can be applied to an electronic device with a loudspeaker. The electronic device improves the sound quality of the loudspeaker by processing an audio signal to be reproduced (hereinafter referred to as the input signal of the loudspeaker in the embodiment). Specifically, the electronic device splits the input signal of the loudspeaker to obtain a first low-frequency input signal and a first high-frequency input signal; then the electronic device performs transient detection on the first low-frequency input signal of the loudspeaker to determine whether the first low-frequency input signal is a transient signal; if the first low-frequency input signal is a transient signal, the first low-frequency input signal is subjected to signal envelope modulation to obtain a second low-frequency input signal, the starting voltage of the second low-frequency input signal is greater than that of the first low-frequency input signal, and the loudness of the second low-frequency input signal is greater than that of the first low-frequency input signal; finally, the electronic device determines the output signal of the loudspeaker according to the second low-frequency input signal and the first high-frequency input signal. Through the technical solution provided by the embodiment of the present application, the low frequency sound effect of the loudspeaker can be improved, and the sound quality of the loudspeaker can be improved.
[0099] The method for improving the sound quality of the loudspeaker provided by the embodiment of the present application can be applied to an electronic device with an audio external playing function (i.e. with a loudspeaker), such as a mobile phone, a tablet computer, a notebook computer, a smart speaker, a television, etc.
[0100] The method provided by the embodiment of the present application can be used in the scene of using the loudspeaker of the electronic device to make sound. For example, the method for improving the sound quality of the loudspeaker provided by the embodiment of the present application can be applied in the following scenes: music and movie external playing (including single-channel, double-channel and four-channel playing), hands-free calling (including operator phone, network phone, etc.), mobile phone ring (including external playing mode, earphone mode) and game external playing, etc., to maximize the hardware potential of the loudspeaker, improve the low frequency sound effect of the loudspeaker, improve the sound quality of the loudspeaker, so as to improve the subjective experience of the user.
[0101] It should be understood that the method for improving the sound quality of the loudspeaker provided by the embodiment of the present application is mainly completed by the audio processing system in the electronic device, for reference Figure 3The audio processing system mainly includes a digital signal processing (DSP) device and a power amplifier (PA), wherein the DSP is configured to process an input audio signal, and the processed signal is amplified by the PA and finally output to a loudspeaker for playing.
[0102] Taking the above electronic device as a mobile phone as an example, the detailed structure of the mobile phone to which the method for improving the sound quality of the loudspeaker provided in the embodiments of the present application can be applied is described in detail below. Figure 3 A structural diagram of the mobile phone 300 is shown. The mobile phone 300 can include a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna 1, an antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a loudspeaker 370A, a receiver 370B, a microphone 370C, an earphone interface 370D, a sensor module 380, a key 390, a motor 391, an indicator 392, a camera 393, a display screen 394, and a subscriber identification module (SIM) card interface 395, etc. The sensor module 380 can include a pressure sensor 380A, a gyroscope sensor 380B, a barometric pressure sensor 380C, a magnetic sensor 380D, an acceleration sensor 380E, a distance sensor 380F, a proximity light sensor 380G, a fingerprint sensor 380H, a temperature sensor 380J, a touch sensor 380K, an ambient light sensor 380L, a bone conduction sensor 380M, etc.
[0103] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the mobile phone 300. In other embodiments of the present application, the mobile phone 300 can include more or fewer components than those shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0104] The processor 310 can include one or more processing units, for example: the processor 310 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated in one or more processors.
[0105] The controller can be the nerve center and command center of the mobile phone 300. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.
[0106] The processor 310 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. The memory can save instructions or data that the processor 310 has just used or repeatedly uses. If the processor 310 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the processor 310, thereby improving the efficiency of the system.
[0107] In some embodiments, the processor 310 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0108] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 310 can contain multiple sets of I2C bus. The processor 310 can be coupled to the touch sensor 380K, the charger, the flash, the camera 393, etc. through different I2C bus interfaces respectively. For example, the processor 310 can be coupled to the touch sensor 380K through an I2C interface, so that the processor 310 and the touch sensor 380K communicate through the I2C bus interface, and the touch function of the mobile phone 300 is realized.
[0109] The I2S interface can be used for audio communication. In some embodiments, the processor 310 can contain multiple sets of I2S bus. The processor 310 can be coupled to the audio module 370 through the I2S bus, and communication between the processor 310 and the audio module 370 is realized. In some embodiments, the audio module 370 can deliver audio signals to the wireless communication module 360 through the I2S interface, and the function of answering the phone through the Bluetooth earphone is realized.
[0110] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 370 and the wireless communication module 360 can be coupled through the PCM bus interface. In some embodiments, the audio module 370 can also deliver audio signals to the wireless communication module 360 through the PCM interface, and the function of answering the phone through the Bluetooth earphone is realized. The I2S interface and the PCM interface can both be used for audio communication.
[0111] The UART interface is a universal serial data bus, which is used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is usually used to connect the processor 310 and the wireless communication module 360. For example, the processor 310 communicates with the Bluetooth module in the wireless communication module 360 through the UART interface, and the Bluetooth function is realized. In some embodiments, the audio module 370 can deliver audio signals to the wireless communication module 360 through the UART interface, and the function of playing music through the Bluetooth earphone is realized.
[0112] The MIPI interface can be used to connect the processor 310 and the display screen 394, the camera 393 and other peripheral devices. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), and the like. In some embodiments, the processor 310 and the camera 393 communicate through the CSI interface to realize the shooting function of the mobile phone 300. The processor 310 and the display screen 394 communicate through the DSI interface to realize the display function of the mobile phone 300.
[0113] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 310 and the camera 393, the display screen 394, the wireless communication module 360, the audio module 370, the sensor module 380, and the like. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
[0114] The USB interface 330 is an interface that conforms to the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 330 can be used to connect a charger to charge the mobile phone 300, or to transmit data between the mobile phone 300 and a peripheral device. It can also be used to connect a headset to play audio through the headset. The interface can also be used to connect other electronic devices, such as AR devices and the like.
[0115] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the mobile phone 300. In other embodiments of the present application, the mobile phone 300 can also use different interface connection methods or combinations of multiple interface connection methods in the above embodiments.
[0116] The charging management module 340 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 340 can receive charging input from a wired charger through the USB interface 330. In some wireless charging embodiments, the charging management module 340 can receive wireless charging input through the wireless charging coil of the mobile phone 300. The charging management module 340 can charge the battery 342 while also providing power to electronic devices through the power management module 341.
[0117] The power management module 341 is configured to connect the battery 342 and the charging management module 340 to the processor 310. The power management module 341 receives input from the battery 342 and / or the charging management module 340 to power the processor 310, the internal memory 321, the external memory, the display 394, the camera 393, the wireless communication module 360, and the like. The power management module 341 can also be configured to monitor parameters such as the battery capacity, the number of battery cycles, the state of health of the battery (leakage, impedance), and the like. In some embodiments, the power management module 341 can also be disposed in the processor 310. In some embodiments, the power management module 341 and the charging management module 340 can also be disposed in the same device.
[0118] The wireless communication functions of the mobile phone 300 can be implemented by the antenna 1, the antenna 2, the mobile communication module 350, the wireless communication module 360, the modem processor, and the baseband processor, and the like.
[0119] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the mobile phone 300 can be configured to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some embodiments, the antennas can be used in combination with a tuning switch.
[0120] The mobile communication module 350 can provide a solution for wireless communication including 2G / 3G / 4G / 5G and the like applied to the mobile phone 300. The mobile communication module 350 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communication module 350 can receive electromagnetic waves from the antenna 1, filter, amplify, and the like the received electromagnetic waves, and transmit the processed signals to the modem processor for demodulation. The mobile communication module 350 can also amplify signals modulated by the modem processor and convert the signals into electromagnetic waves radiated by the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 350 can be disposed in the processor 310. In some embodiments, at least part of the functional modules of the mobile communication module 350 and at least part of the modules of the processor 310 can be disposed in the same device.
[0121] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 370A, the microphone 370B, etc.), or displays an image or a video through the display screen 394. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 310 and be arranged in the same device as the mobile communication module 350 or other functional modules.
[0122] The wireless communication module 360 can provide wireless communication solutions applied to the mobile phone 300, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), and the like. The wireless communication module 360 can be one or more devices integrated with at least one communication processing module. The wireless communication module 360 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signal, and transmits the processed signal to the processor 310. The wireless communication module 360 can also receive a signal to be transmitted from the processor 310, perform frequency modulation and amplification, and convert it into electromagnetic wave radiation via the antenna 2.
[0123] In some embodiments, antenna 1 and mobile communication module 350 of mobile phone 300 are coupled, and antenna 2 and wireless communication module 360 are coupled, so that mobile phone 300 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include global positioning system (GPS), global navigation satellite system (GLONASS), beidu navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS).
[0124] Mobile phone 300 implements display functions through a GPU, display screen 394, and an application processor, etc. The GPU is a microprocessor for image processing, connected to display screen 394 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 310 can include one or more GPUs that execute program instructions to generate or change display information.
[0125] The display screen 394 is configured to display images, videos, and the like. The display screen 394 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diodes (QLED), or the like. In some embodiments, the mobile phone 300 can include one or N display screens 394, where N is a positive integer greater than 1.
[0126] The mobile phone 300 can implement the photographing function through the ISP, the camera 393, a video codec, a GPU, the display screen 394, and an application processor, and the like.
[0127] The ISP is configured to process the data fed back by the camera 393. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing to convert it into an image visible to the naked eye. The ISP can also optimize the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, the ISP can be arranged in the camera 393.
[0128] The camera 393 is configured to capture still images or videos. An object generates an optical image through a lens and projects it onto a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the mobile phone 300 can include one or N cameras 393, where N is a positive integer greater than 1.
[0129] The digital signal processor is used to process digital signals, in addition to being able to process digital image signals, it can also process other digital signals (such as audio signals, etc.). For example, when the mobile phone 300 is in frequency point selection, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.
[0130] The video codec is used for compressing or decompressing digital video. The mobile phone 300 can support one or more video codecs. In this way, the mobile phone 300 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.
[0131] The NPU is a neural-network (NN) calculation processor, which can quickly process input information by drawing on the structure of biological neural networks, such as drawing on the transmission mode between human brain neurons, and can also continuously self-learn. Through the NPU, the mobile phone 300 can realize intelligent cognitive applications such as image recognition, face recognition, voice recognition, text understanding, etc.
[0132] The external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 300. The external memory card communicates with the processor 310 through the external memory interface 320 to realize data storage functions. For example, music, video, etc. Files are saved in the external memory card.
[0133] The internal memory 321 can be used to store computer executable program codes, which include instructions. The processor 310 executes various functional applications and data processing of the mobile phone 300 by running the instructions stored in the internal memory 321. The internal memory 321 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc. The data storage area can store data created during the use of the mobile phone 300 (such as audio data, a phonebook, etc.), etc. In addition, the internal memory 321 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0134] The mobile phone 300 can realize audio functions through the audio module 370, the speaker 370A, the receiver 370B, the microphone 370C, the earphone interface 370D, and the application processor, etc. For example, music playing, recording, etc.
[0135] The audio module 370 is configured to convert digital audio information into an analog audio signal output, and to convert an analog audio input into a digital audio signal. The audio module 370 can also be configured to encode and decode audio signals. In some embodiments, the audio module 370 can be disposed in the processor 310, or some functional modules of the audio module 370 can be disposed in the processor 310.
[0136] The speaker 370A, also referred to as a "loudspeaker", is configured to convert an audio electrical signal into a sound signal. The mobile phone 300 can listen to music or listen to a hands-free call through the speaker 370A.
[0137] The receiver 370B, also referred to as an "earpiece", is configured to convert an audio electrical signal into a sound signal. When the mobile phone 300 answers a call or a voice message, the receiver 370B can be held close to a human ear to listen to the voice.
[0138] The microphone 370C, also referred to as a "microphone", "sound collector", is configured to convert a sound signal into an electrical signal. When making a call or sending a voice message, a user can speak into the microphone 370C to input a sound signal into the microphone 370C. The mobile phone 300 can be provided with at least one microphone 370C. In other embodiments, the mobile phone 300 can be provided with two microphones 370C, which can be used to collect sound signals and achieve noise reduction. In other embodiments, the mobile phone 300 can be provided with three, four or more microphones 370C, which can be used to collect sound signals, achieve noise reduction, identify the source of the sound, and achieve directional recording, etc.
[0139] The earphone interface 370D is configured to connect a wired earphone. The earphone interface 370D can be a USB interface 330, or a 3.5 mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0140] The pressure sensor 380A is configured to sense a pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 380A can be disposed on the display 394. The pressure sensor 380A can be of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, etc. The capacitive pressure sensor can include at least two parallel plates of conductive material. When a force is applied to the pressure sensor 380A, the capacitance between the electrodes changes. The phone 300 determines the intensity of the pressure based on the change in capacitance. When a touch operation is applied to the display 394, the phone 300 detects the intensity of the touch operation based on the pressure sensor 380A. The phone 300 can also calculate the position of the touch based on the detection signal of the pressure sensor 380A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view short messages is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.
[0141] The gyroscope sensor 380B can be configured to determine the motion attitude of the phone 300. In some embodiments, the angular velocity of the phone 300 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 380B. The gyroscope sensor 380B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 380B detects the angle of shaking of the phone 300, calculates the distance that the lens module needs to compensate based on the angle, and lets the lens offset the shaking of the phone 300 by reverse movement to achieve anti-shake. The gyroscope sensor 380B can also be used for navigation and motion sensing game scenarios.
[0142] The barometric pressure sensor 380C is configured to measure air pressure. In some embodiments, the phone 300 calculates the altitude, assists positioning and navigation based on the air pressure value measured by the barometric pressure sensor 380C.
[0143] The magnetic sensor 380D includes a Hall sensor. The phone 300 can detect the opening and closing of a flip cover or a leather case using the magnetic sensor 380D. In some embodiments, when the phone 300 is a flip phone, the phone 300 can detect the opening and closing of the flip cover based on the magnetic sensor 380D. Further, based on the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the phone 300 can set features such as automatic unlocking of the flip cover.
[0144] The acceleration sensor 380E can detect the magnitude of acceleration of the phone 300 in various directions (typically three axes). When the phone 300 is stationary, the acceleration sensor 380E can detect the magnitude and direction of gravity. The acceleration sensor 380E can also be used to identify the attitude of the electronic device and applied to applications such as landscape / portrait screen switching and pedometers.
[0145] Distance sensor 380F is configured to measure distance. Phone 300 can measure distance by infrared or laser. In some embodiments, phone 300 can take a picture of a scene and utilize distance sensor 380F to measure distance to achieve fast focus.
[0146] Proximity light sensor 380G can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode can be an infrared light emitting diode. Phone 300 emits infrared light outwardly through the light emitting diode. Phone 300 detects infrared reflected light from nearby objects using the photodiode. When sufficient reflected light is detected, phone 300 can determine that there is an object near phone 300. When insufficient reflected light is detected, phone 300 can determine that there is no object near phone 300. Phone 300 can utilize proximity light sensor 380G to detect when a user is holding phone 300 to the ear for a phone call, so that the screen can be automatically turned off to save power. Proximity light sensor 380G can also be used for automatic unlocking and locking of the screen in a holster mode or a pocket mode.
[0147] Ambient light sensor 380L is configured to sense ambient light brightness. Phone 300 can adaptively adjust the brightness of display 394 based on the sensed ambient light brightness. Ambient light sensor 380L can also be used to automatically adjust white balance when taking a picture. Ambient light sensor 380L can also be used in conjunction with proximity light sensor 380G to detect whether phone 300 is in a pocket to prevent accidental touch.
[0148] Fingerprint sensor 380H is configured to capture a fingerprint. Phone 300 can utilize the captured fingerprint characteristics to implement fingerprint unlocking, access application lock, fingerprint picture taking, fingerprint call answering, and the like.
[0149] Temperature sensor 380J is configured to detect temperature. In some embodiments, phone 300 utilizes the temperature detected by temperature sensor 380J to implement temperature handling strategies. For example, when the temperature reported by temperature sensor 380J exceeds a threshold, phone 300 can implement a performance reduction of a processor located near temperature sensor 380J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is below another threshold, phone 300 can heat battery 342 to avoid abnormal shutdown of phone 300 caused by low temperature. In yet other embodiments, when the temperature is below yet another threshold, phone 300 can implement a voltage boost of an output voltage of battery 342 to avoid abnormal shutdown caused by low temperature.
[0150] Touch sensor 380K, also referred to as "touch panel". Touch sensor 380K can be disposed on display screen 394, and touch sensor 380K and display screen 394 together form a touch screen, also referred to as "touch panel". Touch sensor 380K is configured to detect touch operations applied to or near touch sensor 380K. Touch sensor 380K can transmit detected touch operations to application processor to determine touch event types. Visual output related to touch operations can be provided through display screen 394. In other embodiments, touch sensor 380K can also be disposed on the surface of mobile phone 300, in a position different from that of display screen 394.
[0151] Bone conduction sensor 380M can acquire vibration signals. In some embodiments, bone conduction sensor 380M can acquire vibration signals of a human body's vibrating bone block. Bone conduction sensor 380M can also contact a human body's pulse to receive blood pressure pulsation signals. In some embodiments, bone conduction sensor 380M can also be disposed in a headset to form a bone conduction headset. Audio module 370 can analyze voice signals based on vibration signals of a human body's vibrating bone block acquired by bone conduction sensor 380M to implement voice functions. Application processor can analyze heart rate information based on blood pressure pulsation signals acquired by bone conduction sensor 380M to implement heart rate detection functions.
[0152] Keys 390 include power on / off keys, volume keys, and the like. Keys 390 can be mechanical keys. They can also be touch keys. Mobile phone 300 can receive key inputs to generate key signal inputs related to user settings and function control of mobile phone 300.
[0153] Motor 391 can generate vibration prompts. Motor 391 can be used for incoming call vibration prompts and also for touch vibration feedback. For example, touch operations applied to different applications (e.g., taking photos, playing audio, and the like) can correspond to different vibration feedback effects. Touch operations applied to different regions of display screen 394 can also correspond to different vibration feedback effects. Different application scenarios (e.g., time reminders, received messages, alarms, games, and the like) can also correspond to different vibration feedback effects. Touch vibration feedback effects can also be customizable.
[0154] Indicator 392 can be an indicator light, which can be used to indicate charging states, power changes, and also to indicate messages, missed calls, notifications, and the like.
[0155] The SIM card interface 395 is used to connect a SIM card. The SIM card can be inserted into or pulled out of the SIM card interface 395 to realize contact and separation with the mobile phone 300. The mobile phone 300 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 395 can support a Nano SIM card, a Micro SIM card, a SIM card, and the like. The same SIM card interface 395 can simultaneously insert multiple cards. The types of the multiple cards can be the same or different. The SIM card interface 395 can also be compatible with different types of SIM cards. The SIM card interface 395 can also be compatible with external storage cards. The mobile phone 300 interacts with a network through the SIM card to realize functions such as call and data communication. In some embodiments, the mobile phone 300 uses an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the mobile phone 300 and cannot be separated from the mobile phone 300.
[0156] It can be understood that Figure 3 The mobile phone is only used as an example for description, and is not a specific limitation on the structure of the electronic device. In actual applications, the electronic device can include Figure 3 more components, or fewer components than those shown in the figure, and the embodiments of the present application are not limited thereto. Figure 4 It can be understood that, in the embodiments of the present application, the processor of the electronic device (for example, the mobile phone described above), such as a DSP, can execute some or all of the steps in the embodiments of the present application. These steps or operations are only examples, and the embodiments of the present application can also execute other operations or variations of various operations. In addition, each step can be executed in a different order from that presented in the embodiments of the present application, and it is possible that not all operations in the embodiments of the present application are executed. The embodiments of the present application can be implemented independently or in any combination, and the present application is not limited thereto.
[0157] It can be understood that, in the embodiments of the present application, the processor of the electronic device (for example, the mobile phone described above), such as a DSP, can execute some or all of the steps in the embodiments of the present application. These steps or operations are only examples, and the embodiments of the present application can also execute other operations or variations of various operations. In addition, each step can be executed in a different order from that presented in the embodiments of the present application, and it is possible that not all operations in the embodiments of the present application are executed. The embodiments of the present application can be implemented independently or in any combination, and the present application is not limited thereto.
[0158] As shown in the figure, the embodiments of the present application provide a method for improving the sound quality of a loudspeaker, which includes steps 401 to 404. Figure 1
[0159] Step 401, the electronic device splits the input signal of the loudspeaker to obtain a first low-frequency input signal and a first high-frequency input signal.
[0160] It should be understood that, in the embodiments of the present application, the input signal of the loudspeaker processed by the electronic device is a time-domain signal. The first low-frequency input signal includes a signal lower than a first preset frequency point in the input signal, and the first high-frequency input signal includes a signal higher than a second preset frequency point in the input signal.
[0161] For example, the first preset frequency point can be a frequency point in a range of 100-400 Hz, for example, the first preset frequency point can be 100, 200, 250, 300, or 400 Hz, and the like.
[0162] It should be noted that the signal at the first preset frequency point can be included in the first low-frequency input signal, or can be included in the first high-frequency input signal, or can be included in both the first low-frequency input signal and the first high-frequency input signal, and the embodiments of the present application are not limited.
[0163] Optionally, the electronic device can frequency-division the input data through a frequency divider. The frequency divider is essentially a filter, which filters the input signal to obtain a low-frequency signal (referred to as a first low-frequency input signal) and a high-frequency signal (referred to as a first high-frequency input signal) in the input signal.
[0164] Step 402, the electronic device performs transient detection on the first low-frequency input signal of the loudspeaker to determine whether the first low-frequency input signal is a transient signal.
[0165] In the embodiments of the present application, in combination with Figure 4 It can be known that the transient signal is a signal with a large change in signal amplitude. In an audio signal, the transient signal usually contains important information of a section of audio, and therefore, the transient signal can be processed to improve the sound quality.
[0166] Optionally, in combination with Figure 5 As shown in Figure 6 In the embodiments of the present application, the method for the electronic device to perform transient detection on the first low-frequency input signal specifically includes steps 4021-4023.
[0167] Step 4021, the electronic device determines the transient power and the steady-state power of the first low-frequency input signal.
[0168] In the embodiments of the present application, the process of the electronic device to determine the transient power and the steady-state power of the first low-frequency input signal (corresponding to one signal frame) includes:
[0169] First, the electronic device calculates the power of the first low-frequency input signal. It should be understood that the power of the first low-frequency input signal is the square sum of the voltage values of all data points included in the first low-frequency input signal and the average value.
[0170] Secondly, the transient power and the steady power of the first low-frequency input signal are determined according to the power of the current frame and the power of a plurality of frames (the plurality of frames are some historical frames) buffered in the electronic device. The transient power of the first low-frequency input signal can be the average power of the continuous n1 signal frames before the current frame, and the steady power of the first low-frequency input signal can be the average power of the continuous n2 signal frames before the current frame, where n1 is much smaller than n2, for example, n1 is 5 and n2 is 50.
[0171] In step 4022, the electronic device determines the transient rate of the first low-frequency input signal according to the transient power and the steady power of the first low-frequency input signal.
[0172] In the embodiments of the present application, the transient rate of the first low-frequency input signal satisfies:
[0173] T r =(R r -1) 2 ×W
[0174] where T r represents the transient rate of the first low-frequency input signal, R r represents the ratio of the transient power of the first low-frequency input signal to the steady power of the first low-frequency input signal, and W represents the weighting factor.
[0175] Optionally, the ratio of the transient power of the first low-frequency input signal to the steady power of the first low-frequency input signal satisfies: where P s represents the transient power of the current frame, and P w represents the steady power of the current frame. The value of the weighting factor can be the same as the current power of the first low-frequency input signal.
[0176] In some implementations, in order to avoid false detection of small signals, some small signals can be masked. Specifically, a masking threshold is set, and when the power of the first low-frequency input signal is less than the masking threshold, the masking threshold is taken as the power of the first low-frequency input signal. That is, P d =max(P d ,P th ), where P d represents the power of the first low-frequency input signal, and P th represents the masking threshold. Similarly, the ratio of the transient power of the first low-frequency input signal to the steady power of the first low-frequency input signal can also be optimized, specifically R r =max(R r ,1).
[0177] In step 4023, if the transient rate of the input signal is greater than a preset transient rate threshold, the electronic device determines that the input signal is a transient signal, otherwise, the input signal is a steady signal.
[0178] In the embodiments of the present application, if the first low-frequency input signal is a transient signal, the first low-frequency input signal is marked, and the following step 403 is performed to process the first low-frequency input signal; if the first low-frequency input signal is a steady-state signal, the first low-frequency input signal is not processed.
[0179] In an implementation manner, after the electronic device obtains the first low-frequency input signal, the electronic device can perform low-pass filtering on the first low-frequency input signal, and then calculate the transient power and the steady-state power of the filtered first low-frequency input signal to further determine whether the first low-frequency input signal is a transient signal or a steady-state signal. In the embodiments of the present application, the first low-frequency input signal is low-pass filtered to obtain a low-frequency input signal in a lower frequency range, and the high-frequency signal that may exist in the first low-frequency input signal can be further reduced through low-pass filtering. On this basis, transient detection is performed on the filtered first low-frequency input signal, which can reduce the false detection rate of transient detection.
[0180] In step 403, if the first low-frequency input signal is a transient signal, the electronic device performs signal envelope modulation on the first low-frequency input signal to obtain a second low-frequency input signal.
[0181] In the embodiments of the present application, envelope modulation is performed on the audio signal to adjust the starting voltage, loudness and decay speed of the signal, so that the sound quality of the audio signal after envelope modulation is better than that of the audio signal before envelope modulation. It should be understood that the starting voltage refers to the voltage that can make the speaker diaphragm quickly start to vibrate, that is, the starting voltage determines the starting speed of the diaphragm. The starting voltage of the second low-frequency input signal obtained by envelope modulation on the first low-frequency input signal is greater than the starting voltage of the first low-frequency input signal, and the loudness of the second low-frequency input signal is greater than the loudness of the first low-frequency input signal.
[0182] Reference Figure 7 As shown in the principle diagram of envelope modulation, the transient signal waveform change usually includes four stages, which are: starting stage (attack, denoted as A), decay stage (decay, denoted as D), sustain stage (sustain, denoted as S) and release stage (release, denoted as R). Each stage has a certain duration, and each stage corresponds to an adjustment parameter, for example, the adjustment parameters of the starting stage are starting time and starting voltage (target Ratio A), the adjustment parameters of the decay stage are decay time and decay speed (target Radio DR), the adjustment parameters of the sustain stage are sustain time and volume (i.e. amplitude, sustain level), and the adjustment parameters of the release stage are release time and release speed. Optionally, the decay speed and the release speed can be equal.
[0183] It should be understood that envelope modulation of the first low-frequency input signal includes adjusting parameters of the four stages of the first low-frequency input signal, such as adjusting the duration of the above four stages, adjusting at least one of the starting voltage, the volume, and the release speed, so that the starting voltage of the second low-frequency input signal is greater than the starting voltage of the first low-frequency input signal, and the loudness of the second low-frequency input signal is greater than the loudness of the first low-frequency input signal.
[0184] Step 404, the electronic device determines the output signal of the loudspeaker according to the second low-frequency input signal and the first high-frequency input signal.
[0185] In the embodiment of the application, the electronic device starts to split the input signal into a first low-frequency input signal and a first high-frequency input signal, then processes the first low-frequency input signal and does not process the first high-frequency input signal, and finally sums the processed low-frequency input data (i.e. second low-frequency input data) and the first high-frequency input data (which is the inverse process of splitting), thereby completing the processing of the input signal, obtaining the output signal, and further sending the output signal to the loudspeaker for playing.
[0186] Exemplarily, Figure 7 The framework of a loudspeaker system provided by the embodiment of the application is illustrated. As shown in Figure 7 The loudspeaker system includes a splitting unit, a transient detection unit, an envelope modulation unit, and an output unit, wherein the splitting unit is configured to split an input signal to obtain a low-frequency input signal and a high-frequency input signal; the transient detection unit is configured to perform transient detection on the low-frequency input signal; the envelope modulation unit is configured to perform envelope modulation on the low-frequency input signal if the low-frequency input signal is a transient signal; and the output unit is configured to mix the high-frequency input signal and the envelope-modulated low-frequency input signal to obtain an output signal, and input the output signal to a loudspeaker for playing. Figure 4 It can be understood that Figure 5 and Figure 4 steps.
[0187] In the method for improving the sound quality of a loudspeaker provided by the embodiment of the application, the low-frequency signal in the input signal is subjected to transient detection, and if the input signal is a transient signal, envelope modulation is used to enhance the transient signal. Since the sound quality of the low-frequency signal played by the loudspeaker is related to the performance of the loudspeaker, and the transient signal in the low-frequency signal usually reflects important information of the audio signal, the transient signal in the low-frequency signal is modulated to improve the loudness of the low-frequency transient signal and adjust the dynamic range of the low-frequency transient signal, so that when the loudspeaker plays the processed audio signal, the low-frequency sound effect of the audio signal is better, that is, the technical solution of the embodiment of the application can improve the sound quality of the loudspeaker.
[0188] Optionally, in combination with Figure 8 As shown in the method for improving the sound quality of a loudspeaker provided by the embodiments of the present application further includes steps 405 to 407. Figure 9
[0189] Step 405, the electronic device splits the first high-frequency input signal of the loudspeaker to obtain a first medium-frequency input signal and a second high-frequency input signal.
[0190] The first medium-frequency input signal includes signals in the first high-frequency input signal that are lower than a second preset frequency point, and the second high-frequency input signal includes signals in the first high-frequency input signal that are higher than the second preset frequency point, and the second preset frequency point is higher than the first preset frequency point.
[0191] For example, the second preset frequency point can be a frequency point in the range of 1500-2500 Hz, for example, the second preset frequency point can be 1500, 1750, 2000, 2250, or 2500 Hz, etc.
[0192] It should be noted that the signal at the second preset frequency point can be included in the first medium-frequency input signal, or can be included in the second high-frequency input signal, or can be included in both the first medium-frequency input signal and the second high-frequency input signal, and the embodiments of the present application are not limited.
[0193] In the embodiments of the present application, the electronic device can split the input signal into signals of two frequency bands, i.e. the low-frequency input signal and the high-frequency input signal, and further split the high-frequency input signal into a medium-frequency input signal and a new high-frequency input signal.
[0194] Optionally, the electronic device can also directly split the input signal into signals of three frequency bands, i.e. low-frequency signals, medium-frequency signals, and high-frequency signals. That is, when the electronic device starts processing the input signal, the electronic device directly splits the input signal, and the input signal is divided into the first low-frequency input signal, the first medium-frequency input signal, and the second high-frequency input signal.
[0195] Step 406, the electronic device performs transient detection on the first medium-frequency input signal to determine whether the first medium-frequency input signal is a transient signal.
[0196] Step 407, if the first medium-frequency input signal is a transient signal, the signal envelope of the first medium-frequency input signal is modulated to obtain a second medium-frequency input signal.
[0197] Wherein, the starting voltage of the second medium-frequency input signal is greater than the starting voltage of the first medium-frequency input signal, and the loudness of the second medium-frequency input signal is greater than the loudness of the first medium-frequency input signal.
[0198] The method of transient detection and envelope modulation on the first intermediate frequency input signal in steps 406 and 407 is similar to the method of transient detection and envelope modulation on the first low frequency input signal in the above embodiment, and thus the detailed description of steps 406 and 407 can refer to the detailed description of steps 402 and 403 in the above embodiment, which will not be repeated here. It should be noted that the difference between the two is that some parameters set when performing transient detection and envelope modulation may be different.
[0199] Based on steps 405 to 407, in the embodiment of the present application, the method for determining the output signal of the loudspeaker by the electronic device specifically includes step 408, i.e., step 404 is replaced by step 408.
[0200] Step 408, the electronic device determines the output signal of the loudspeaker according to the second low frequency input signal, the second intermediate frequency input signal and the second high frequency input signal.
[0201] Optionally, the electronic device can sum the second low frequency input signal, the second intermediate frequency input signal and the second high frequency input signal to obtain the output signal of the loudspeaker.
[0202] Exemplarily, Figure 9 The framework of another loudspeaker system provided by the embodiment of the present application is illustrated. As shown in Figure 8 The loudspeaker system includes a frequency dividing unit, a first transient detection unit, a first envelope modulation unit, a second transient detection unit, a second envelope modulation unit and an output unit. The frequency dividing unit is configured to divide an input signal to obtain a low frequency input signal, an intermediate frequency input signal and a high frequency input signal. The first transient detection unit is configured to perform transient detection on the low frequency input signal. The first envelope modulation unit is configured to perform envelope modulation on the low frequency input signal in the case that the low frequency input signal is a transient signal. The second transient detection unit is configured to perform transient detection on the intermediate frequency input signal (e.g., step 406). The second envelope modulation unit is configured to perform envelope modulation on the intermediate frequency input signal in the case that the intermediate frequency input signal is a transient signal (e.g., step 407). The output unit is configured to mix the high frequency input signal, the envelope modulated low frequency input signal and the envelope modulated intermediate frequency input signal to obtain an output signal, and input the output signal to a loudspeaker for playing (e.g., step 408).
[0203] In the embodiment of the present application, the intermediate frequency signal in the input signal is also subjected to transient detection and envelope modulation, and the transient signal is subjected to envelope modulation, so that the intermediate frequency signal is enhanced, and the overall sound quality of the loudspeaker is improved.
[0204] Optionally, in combination with Figure 10 As Figure 11As shown, the first low-frequency input signal is a transient signal, and the speaker of the electronic device is a small speaker with weak low-frequency playback capability. In the case of the above, before the signal envelope of the first low-frequency input signal is modulated (i.e., before step 403), the method for improving the sound quality of the speaker provided in the embodiment of the present application further includes steps 409 and 410.
[0205] Step 409, the electronic device generates a low-frequency auxiliary signal.
[0206] In the embodiment of the present application, the role of the low-frequency auxiliary signal is to assist in enhancing the loudness of the first low-frequency input signal and optimizing the dynamic range of the first low-frequency input signal.
[0207] In the embodiment of the present application, the specific method for generating the low-frequency auxiliary signal includes:
[0208] First, a first auxiliary signal is generated. The method for generating the first auxiliary signal can include multiple methods. In one implementation, the first auxiliary signal satisfies:
[0209] signal_h=e -A ×sin(2πf)
[0210] Wherein, signal_h represents the first auxiliary signal, A represents a signal amplitude influence factor, and f is the center frequency of the speaker. The value range of A can be 10-50, and the specific value of A can be determined by the system or set by the user, for example, it can be 10, 25, or 50, etc.; the value range of f can be 50-150 Hz, and the specific value can be determined by the system or set by the user, for example, it can be 50 Hz, 100 Hz, or 150 Hz, etc.
[0211] Second, the first auxiliary signal is high-pass filtered to obtain a low-frequency auxiliary signal.
[0212] In the embodiment of the present application, the electronic device high-pass filters the first auxiliary signal to filter out some signals with excessively low frequencies in the first auxiliary signal to obtain the low-frequency auxiliary signal. In one implementation, the filter frequency of the high-pass filter can be about 1.5 times the center frequency f.
[0213] Step 410, the electronic device adds the low-frequency auxiliary signal to the first low-frequency input signal to obtain a first auxiliary enhanced signal.
[0214] In the embodiment of the present application, adding the low-frequency auxiliary signal to the first low-frequency input signal means summing the first low-frequency input signal and the low-frequency auxiliary signal.
[0215] In an implementation, the electronic device can add a certain proportion of the low-frequency auxiliary signal to the first low-frequency input signal according to the energy of the first low-frequency input signal, for example, if the energy of the first low-frequency input signal is low, a times of the low-frequency auxiliary signal is added to the first low-frequency input signal, 0 < a < 1.
[0216] Based on this, the signal envelope adjustment on the first low-frequency input signal to obtain the second low-frequency input signal (i.e., step 403) is specifically implemented through step 4031:
[0217] Step 4031, the signal envelope of the first auxiliary enhancement signal is modulated to obtain the second low-frequency input signal.
[0218] Exemplarily, Figure 9 is a schematic diagram of another loudspeaker system framework provided by the embodiment of the present application, and the loudspeaker system is in Figure 10 The auxiliary enhancement unit performs the processes of steps 409 to 410 to perform auxiliary enhancement on the first low-frequency input signal.
[0219] Optionally, in combination with Figure 12 As shown in Figure 13 The first low-frequency input signal is a transient signal, and before the signal envelope of the first low-frequency input signal is modulated, the method for improving the sound quality of the loudspeaker provided by the embodiment of the present application can further include step 411.
[0220] Step 411, the electronic device performs phase compensation on the first low-frequency input signal to obtain a first phase compensation signal.
[0221] It should be understood that the first phase compensation signal is the first low-frequency input signal after phase compensation. In the process of frequency division and auxiliary enhancement of the input signal by the electronic device, the phase of the first low-frequency input signal can be affected, resulting in a deviation of the phase of the low-frequency input signal, which is no longer a linear phase. Therefore, necessary linear phase compensation is performed on the first low-frequency input signal to correct the phase of the first low-frequency input signal to a linear phase, thereby ensuring the low-frequency sound quality.
[0222] Specifically, the electronic device calculates the signal (which can be an electrical signal or an acoustic signal) of the test signal processed by the loudspeaker system, and then generates a phase compensation filter (specifically, the coefficient of the phase compensation filter) according to the calculation result of the test signal and the preset standard signal. Then, the phase compensation filter is used to process the first low-frequency input signal to achieve phase compensation of the first low-frequency input signal.
[0223] Based on this, the signal envelope adjustment on the first low-frequency input signal to obtain the second low-frequency input signal (i.e., step 403) is specifically implemented through step 4032.
[0224] Step 4032, the signal envelope modulation is performed on the first phase compensation signal to obtain the second low-frequency input signal.
[0225] Exemplarily, Figure 11 is a schematic diagram of another loudspeaker system framework provided by an embodiment of the present application, and the loudspeaker system is in Figure 14 The schematic loudspeaker system further includes a phase compensation unit. The phase compensation unit performs the linear phase compensation on the first low-frequency input signal according to the process of step 411.
[0226] Optionally, after performing step 410, the electronic device can perform the above-mentioned step 411, i.e., the electronic device performs the phase compensation on the first low-frequency input signal after the auxiliary enhancement, before the envelope modulation on the first low-frequency input signal (step 403). Of course, when the electronic device does not perform the above-mentioned steps 409 to 410, the electronic device can perform step 410 before the envelope modulation on the first low-frequency input signal (step 403) after detecting the first low-frequency input signal (i.e., step 402), which is specifically determined according to actual conditions, and the present application does not make any limitation.
[0227] Up to now, the electronic device completes the transient enhancement processing on the input signal of the loudspeaker, and can improve the low-frequency loudness of the loudspeaker, adjust the dynamic change of the loudspeaker, and improve the sound quality of the loudspeaker.
[0228] It should be noted that before the above-mentioned steps 401 to 404, the electronic device can also process the initial to-be-played signal of the loudspeaker to obtain the input signal for the transient enhancement processing. For example, Figure 15 As shown in the above-mentioned steps 401 to 404, the method for improving the sound quality of the loudspeaker provided by an embodiment of the present application further includes steps 1401 to 1402.
[0229] Step 1401, the electronic device performs the equalization processing on the first signal to obtain the second signal, and the first signal is the initial to-be-played signal input to the loudspeaker.
[0230] The above-mentioned initial to-be-played signal of the loudspeaker can be an audio signal collected by the electronic device, or an audio signal received by the electronic device from other devices, and the present application does not make any specific limitation.
[0231] Optionally, in this embodiment, the specific method for equalizing the first signal described above can be: using a Biquard filter to equalize the first signal, which can improve the low-frequency response of the speaker. The process of using a Biquard filter to process the first signal can be found in the existing working principle of Biquard filters, and will not be detailed here.
[0232] Step 1402: The electronic device uses a bass enhancement algorithm to process the second signal to obtain the input signal for the speaker.
[0233] In this embodiment of the application, the bass enhancement algorithm is used to process the second signal by using a low-frequency shelf filter to filter the second signal and enhance the low-frequency loudness (also known as low-frequency quantity) of the second signal. Specifically, step 1402 includes steps 1402a to 1402b.
[0234] Step 1402a: The electronic device determines the gain of the low-frequency shelf filter based on the energy of the low-frequency signal in the second signal.
[0235] The low-frequency shelf filter is used to control the loudness of the low-frequency signal in the second signal.
[0236] In this embodiment of the application, reference is made to Figure 16 The flowchart of the low-frequency enhancement algorithm shown is as follows: First, the electronic device performs low-pass filtering on the second signal to obtain the low-frequency signal in the second signal; then, the electronic device calculates the ratio of the energy of each point (value) in the low-frequency signal to the total energy of the second signal, that is, calculates the energy ratio of the low-frequency signal.
[0237] Furthermore, the gain of the low-frequency shelving filter is determined based on the energy proportion of the low-frequency signal. Specifically, the base gain of the low-frequency shelving filter is first determined, and then the base gain is smoothed to obtain the final gain of the low-frequency shelving filter.
[0238] Optionally, the smoothing formula for the gain of the low-frequency shelving filter is:
[0239] G_current = G s *a+(1-a)*G_before
[0240] Where G_current represents the gain of the low-frequency shelving filter corresponding to the current frame, 'a' is the smoothing coefficient of the filter gain, and G_before is the filter gain of the previous frame. s This indicates the base gain of the low-frequency shelving filter.
[0241] The methods for determining the fundamental gain of the aforementioned low-frequency shelving filter include:
[0242] For the low frequency signal whose energy ratio is less than or equal to the first threshold value, G s = target, targetG is a preset gain.
[0243] For the low frequency signal whose energy ratio is greater than the first threshold value and less than the second threshold value, G s = targetG - S*(ratio - rth1), wherein S is a gain smoothing coefficient, ratio is the energy ratio of the low frequency signal, and rth1 is the first threshold value.
[0244] For the low frequency signal whose energy ratio is greater than the first threshold value and greater than or equal to the second threshold value, G s = gth*targetG, wherein gth is a gain coefficient.
[0245] In step 1402b, the electronic device filters the second signal using the low frequency shelf filter to obtain an input signal of the loudspeaker.
[0246] Exemplarily, Figure 17 is another schematic diagram of a loudspeaker system provided in an embodiment of the present application, which includes a determination unit, a gain updating unit, and a filtering unit. The determination unit is configured to determine an energy ratio of a low frequency signal in a second signal. The gain updating unit is configured to determine a gain of a low frequency shelf filter according to the energy ratio of the low frequency signal in the second signal. The filtering unit is configured to filter the second signal, and the filtered signal is an input signal of a transient enhancement processing process (i.e., the input signal of the loudspeaker in step 401 described above).
[0247] In the embodiment of the present application, according to the energy of the low frequency signal in the second signal, the loudness of the low frequency signal with different energy is improved to different degrees, that is, different gains are set for the low frequency signal according to the energy of the low frequency signal. As can be seen from the above, in step 1402, the loudness of the low frequency signal in the second signal is dynamically and adaptively improved according to the characteristics of the energy of the low frequency signal in the second signal. In this way, the intelligibility of the low frequency signal can be improved.
[0248] Optionally, in the embodiment of the present application, after the input signal of the loudspeaker is processed by the transient enhancement processing to obtain an output signal of the loudspeaker, the electronic device can further process the output signal to further improve the bass quality of the small loudspeaker. It should be noted that, in order to facilitate description, the output signal obtained after step 404 is uniformly referred to as a first output signal in the following embodiments.
[0249] After step 404, the method for improving the sound quality of the loudspeaker provided in the embodiment of the present application can further include: performing virtual bass processing on the first output signal to obtain a virtual bass output signal.
[0250] It should be understood that the virtual bass processing is a method for improving bass sound effect based on psychoacoustics. From the perspective of psychoacoustics, the psychoacoustic low-frequency loudness of the output signal (i.e., the virtual bass output signal) after the virtual bass processing is greater than the psychoacoustic low-frequency loudness of the first output signal. In an embodiment, the psychoacoustic low-frequency loudness can be determined according to a psychoacoustic model.
[0251] Specifically, as shown in FIG. 17, the method of performing virtual bass processing on the first output signal to obtain a virtual bass output can include steps 1701 to 1705. Figure 18
[0252] Step 1701, the electronic device performs frequency division processing on the first output signal to obtain a first low-frequency output signal and a first high-frequency output signal.
[0253] The first low-frequency output signal includes signals below a third preset frequency point in the first output signal, and the first high-frequency output signal includes signals above the third preset frequency point in the first output signal.
[0254] For example, the third preset frequency point can be a frequency point in the range of 100-400 Hz, for example, the third preset frequency point can be 100, 150, 250, 300 or 400 Hz, etc.
[0255] It should be noted that the signal at the third preset frequency point can be included in the first low-frequency output signal, or can be included in the first high-frequency output signal, or can be included in both the first low-frequency output signal and the first high-frequency output signal, and the embodiments of the present application are not limited.
[0256] Step 1702, the electronic device generates a harmonic signal of the first low-frequency output signal according to the first low-frequency output signal.
[0257] For example, the harmonic signal of the first low-frequency output signal can be generated by using the following formula:
[0258] Signal_out = cos(Coeff d ×Signal_in)-b f ×Signal_in
[0259] Coeff d = a f ×(0.5π-0.8)+0.8
[0260] Wherein, a f and b f are input coefficients, 0 < a f <1, 0 < b f <1, Signal_in is the first low-frequency output signal. Wherein, a f b is used to adjust the proportion of the amplitudes of the harmonic signals of different frequencies. f b is used to adjust the proportion of the total energy of the harmonic signals and the total energy of the first low-frequency output signal (the first low-frequency output signal can also be referred to as a fundamental signal).
[0261] Optionally, the number of the harmonic signals of the first low-frequency output signal and the frequencies of the harmonics can be determined according to actual needs, for example, 3 harmonics of the first low-frequency output signal can be generated, and the frequencies of the harmonics are 3f, 5f and 7f in turn, f being the original frequency of the first low-frequency output signal.
[0262] Step 1703, the electronic device mixes the harmonic signals of the first low-frequency output signal and the first low-frequency output signal to obtain a first mixed signal.
[0263] Optionally, in the embodiments of the present application, the harmonic signals of the first low-frequency output signal and the first low-frequency output signal can be mixed in a certain proportion according to the energy of the signals.
[0264] Optionally, the electronic device can normalize the first low-frequency output signal, generate the harmonic signals according to the normalized first low-frequency output signal, and then mix the generated harmonic signals with the normalized first low-frequency output signal.
[0265] Step 1704, the electronic device performs phase synchronization processing on the first mixed signal and the first high-frequency output signal to obtain a second mixed signal and a second high-frequency output signal, and the change amount of the phase of the second mixed signal is equal to the change amount of the phase of the second high-frequency output signal.
[0266] Step 1705, the electronic device obtains a virtual bass output signal according to the second mixed signal and the second high-frequency output signal.
[0267] Optionally, in the embodiments of the present application, after the electronic device obtains the first mixed signal, the electronic device can first perform band-pass filtering on the first mixed signal to filter out the possible high-frequency signals and low-frequency signal noise components in the first mixed signal, and detect the maximum amplitude of the filtered first mixed signal, and then restore the first mixed signal according to the maximum amplitude (i.e. the inverse process of the above normalization) to obtain a restored first mixed signal. Further, the electronic device performs low-pass filtering on the restored first mixed signal to filter high-frequency noise to obtain a denoised first mixed signal, and finally, a all-pass filter is used to perform phase synchronization on the denoised first mixed signal and the first high-frequency output signal, and thus the virtual bass output signal is obtained.
[0268] Exemplarily, Figure 18A framework of a loudspeaker system is illustrated. As shown in Figure 19 The loudspeaker system includes a frequency division unit, a harmonic generation unit, a signal mixing unit, and a phase synchronization unit. The frequency division unit divides a first output signal. The harmonic generation unit generates a harmonic signal of the divided first low-frequency output signal. The signal mixing unit mixes the harmonic signal with the first low-frequency output signal to obtain a first mixed signal. The phase synchronization unit performs phase synchronization on the first mixed signal and a first high-frequency signal to obtain a second mixed signal and a second high-frequency output signal, and obtains a virtual bass output signal according to the second mixed signal and the second high-frequency output signal.
[0269] Optionally, after the virtual bass processing of the first output signal of the loudspeaker, the electronic device can continue to process (displacement control) the virtual bass output signal to protect the displacement of the diaphragm of the loudspeaker from exceeding the displacement protection threshold of the loudspeaker. It should be noted that, for ease of description, in the following embodiments, the virtual bass output signal is uniformly referred to as a second output signal.
[0270] As shown in Figure 20 After the step 404, the method for improving the sound quality of the loudspeaker provided by the present application can further include steps 1901 to 1903.
[0271] In step 1901, the electronic device obtains a first displacement prediction model including one or more correction coefficients, the correction coefficients being used to control the output of the first displacement prediction model.
[0272] The first displacement prediction model is used to simulate the performance of the loudspeaker to predict the displacement of the diaphragm of the loudspeaker, and the one or more correction coefficients are used to control the output of the first displacement prediction model.
[0273] For example, the first displacement prediction model can satisfy the following expression:
[0274]
[0275] wherein ax0=1, d0=α*spk.Kms*spk.Re, b j =d0+d1+d2, bx2=bx3=-bx0.
[0276] wherein f sis a sampling rate, and a, b, g, and w are correction coefficients. The correction coefficient a can be used to adjust the low-frequency output of the displacement prediction model, the correction coefficient b can be used to adjust the output of the displacement prediction model in a frequency range including the resonance frequency of the loudspeaker, the correction coefficient g can be used to adjust the medium-frequency output of the displacement prediction model, and the correction coefficient w can be used to adjust the full-band output of the displacement prediction model. spk.Bl is the magnetic force coefficient of the loudspeaker in the initial parameters, spk.Kms is the stiffness coefficient of the loudspeaker in the initial parameters, and spk.Rms is the power of the loudspeaker in the initial parameters. ax and bx are coefficients of the generated IIR filter.
[0277] It should be noted that the expression of the first displacement prediction model, the number of correction coefficients included in the first displacement prediction model, and the content controlled by each correction coefficient can be configured according to actual needs, and embodiments of the present application do not make specific limitations thereto.
[0278] Specifically, the content of the first displacement prediction model is different according to different application scenarios, which can include but is not limited to the following several cases:
[0279] Case 1: applied to a scenario of protecting the loudspeaker diaphragm displacement in the development or production debugging stage of the electronic device, the displacement prediction model has not been configured in the electronic device, and the electronic device configures an initial model as the first displacement prediction model in step 1901.
[0280] In case 1, the correction coefficient in the initial model can be 1.
[0281] Further, the displacement prediction model can further include initial parameters, which are parameters related to the hardware characteristics of the loudspeaker in the displacement prediction model. Accordingly, in case 1, it can further include: obtaining an impedance curve of the loudspeaker, and determining the initial parameters of the displacement prediction model according to the impedance curve. The initial parameters are parameters related to the hardware characteristics of the loudspeaker in the displacement prediction model.
[0282] For example, the initial parameters can be the magnetic force coefficient spk.Bl of the loudspeaker, the stiffness coefficient spk.Kms of the loudspeaker, and the power spk.Rms of the loudspeaker.
[0283] For example, the initial parameters can be the magnetic force coefficient spk.Bl of the loudspeaker, the stiffness coefficient spk.Kms of the loudspeaker, and the power spk.Rms of the loudspeaker.
[0284] The preset input signal can be a specific noise signal or other signals, which is not limited. For example, the voltage and the corresponding current signal of the loudspeaker within a certain time period can be collected, Fourier transform can be performed, and the impedance curve can be obtained by dividing the voltage frequency spectrum by the current frequency spectrum.
[0285] Case 2, applied to the scenario of protecting the displacement of the diaphragm of the loudspeaker in the development or production debugging stage of the electronic device, the initial model is configured in the electronic device but the correction coefficient has not been adjusted, and the electronic device obtains the configured initial model as the first displacement prediction model in step 1901.
[0286] Case 3, applied to the scenario of protecting the displacement of the diaphragm of the loudspeaker in the use stage after the electronic device is shipped, the first displacement prediction model can be the displacement prediction model stored in the electronic device for predicting the displacement of the diaphragm of the loudspeaker when step 1901 is performed. The first displacement prediction model configured in the electronic device can be the displacement prediction model obtained after correction in case 1 or case 2.
[0287] Step 1902, the electronic device adjusts at least one correction coefficient in the first displacement prediction model to obtain a second displacement prediction model, and the absolute value of the difference between the predicted displacement output by the second displacement prediction model and the actual displacement of the diaphragm of the loudspeaker is smaller than the absolute value of the difference between the predicted displacement output by the first displacement prediction model and the actual displacement of the diaphragm of the loudspeaker.
[0288] The actual displacement of the diaphragm of the loudspeaker is the actual measurement value of the moving distance of the diaphragm of the loudspeaker relative to the initial position.
[0289] It can be understood that the second displacement prediction model is obtained by adjusting the correction coefficient of the first displacement prediction model, and the expression of the second displacement prediction model is the same as that of the first displacement prediction model.
[0290] Specifically, the actual displacement of the loudspeaker can be measured, and then the correction coefficient in the first displacement prediction model is repeatedly adjusted according to the correction coefficient adjustment rule to obtain the second displacement prediction model.
[0291] For example, the actual displacement of the diaphragm of the loudspeaker can be measured by laser, or other methods can also be used to measure the actual displacement of the diaphragm of the loudspeaker, which is not limited in the embodiments of the present application.
[0292] It should be understood that the content of the correction coefficient adjustment rule can be configured according to actual needs, and the embodiments of the present application do not make specific limitations.
[0293] For example, the correction coefficient adjustment rule can be: configuring an adjustment step for each correction coefficient, and adjusting each correction coefficient according to the adjustment step in a preset correction coefficient adjustment order until the second displacement prediction model is obtained.
[0294] For example, the correction coefficient adjustment rule can be: comparing the predicted displacement output by the first displacement prediction model with the actual displacement of the diaphragm when the loudspeaker plays the input signal input into the first displacement prediction model, searching for a preset corresponding relationship according to the size relationship between the two, and obtaining the content of the adjusted correction coefficient and the adjustment value. In the prediction corresponding relationship, different predicted displacements and actual displacements are stored, and different size relationships correspond to the correction coefficients and adjustment values that need to be adjusted.
[0295] In step 1903, the electronic device controls the gain of the second output signal according to the displacement protection threshold of the loudspeaker and the predicted displacement output by the second displacement prediction model, so that the diaphragm displacement of the loudspeaker when playing the second output signal is less than or equal to the displacement protection threshold.
[0296] Optionally, the displacement protection threshold of the loudspeaker is the maximum displacement of the diaphragm of the loudspeaker.
[0297] In a possible implementation, in the case where the predicted displacement is greater than or equal to the displacement protection threshold, the electronic device attenuates the second output signal as a whole, so that the diaphragm displacement of the loudspeaker when playing the second output signal is less than or equal to the displacement protection threshold of the loudspeaker.
[0298] In another possible implementation, based on the principle that the displacement of the loudspeaker is mainly generated by low-frequency signals, when the predicted displacement is greater than or equal to the displacement protection threshold, the low-frequency signals in the second output signal can be suppressed by a high-pass filter, and the gain of the second output signal of the loudspeaker is controlled by the medium and high-frequency signals, so as to reduce the displacement of the loudspeaker while ensuring the loudness of the loudspeaker. Specifically, the electronic device determines the frequency parameter of the high-pass filter according to the predicted displacement output by the second displacement prediction model, and then filters the second output signal by using the high-pass filter, so that the diaphragm displacement of the loudspeaker when playing the second output signal is less than or equal to the displacement protection threshold of the loudspeaker.
[0299] In the embodiment of the application, the specific method in which the electronic device determines the frequency parameter of the high-pass filter according to the predicted displacement output by the second displacement prediction model is: the electronic device filters the predicted displacement output by the second displacement prediction model by using n sets of frequency parameters; two sets of frequency parameters are selected, which are located on both sides of the displacement protection threshold and have the minimum absolute value of the difference from the displacement protection threshold; and a first frequency parameter is selected as the frequency parameter of the high-pass filter in the frequency parameter interval including the two sets of frequency parameters. The passbands of the n sets of frequency parameters are different, and n is greater than 2.
[0300] The specific values of the n sets of frequency parameters can be configured according to actual application experience, and the embodiment of the application will not be described again.
[0301] It should be understood that, in the frequency parameter interval including the two groups of frequency parameters, the first frequency parameter can be selected to be a passband of a high-pass filter indicated by the first frequency parameter, which is located between passbands of high-pass filters indicated by the two groups of frequency parameters.
[0302] In a possible implementation, in the frequency parameter interval including the two groups of frequency parameters, the first frequency parameter can be selected by selecting a middle value of the two groups of frequency parameters as the first frequency parameter.
[0303] For example, in the frequency parameter interval including the two groups of frequency parameters, the middle value of the two groups of frequency parameters can be selected as the first frequency parameter, which can be implemented by selecting an average value of center frequencies of the two groups of frequency parameters as a center frequency of the first frequency parameter to obtain the first frequency parameter. Alternatively, an average value of start frequencies of the two groups of frequency parameters can be selected as a start frequency of the first frequency parameter to obtain the first frequency parameter. Alternatively, an average value of stop frequencies of the two groups of frequency parameters can be selected as a stop frequency of the first frequency parameter to obtain the first frequency parameter.
[0304] In another possible implementation, in the frequency parameter interval including the two groups of frequency parameters, the first frequency parameter can be selected by interpolating between the two groups of frequency parameters to obtain a plurality of groups of candidate frequency parameters, and selecting, as the first frequency parameter, a candidate frequency parameter of the plurality of groups of candidate frequency parameters that has a minimum absolute value of a difference between a filtered output value of a predicted displacement output by the second displacement prediction model and the displacement protection threshold.
[0305] Optionally, the interpolation between the two groups of frequency parameters can be implemented by interpolating center frequencies of the two groups of frequency parameters, or interpolating start frequencies of the two groups of frequency parameters, or interpolating stop frequencies of the two groups of frequency parameters.
[0306] In a possible implementation, when interpolating between the two groups of frequency parameters, a preset number of values can be interpolated, or interpolation can be performed according to a preset frequency interval, or interpolation can be performed in other manners, which are not limited by embodiments of the present application.
[0307] In another possible implementation, when interpolating between the two groups of frequency parameters, interpolation can be repeatedly performed until a candidate frequency parameter that has a difference between a filtered output value of a predicted displacement output by the second displacement prediction model and the displacement protection threshold is obtained as the first frequency parameter.
[0308] In the embodiments of the present application, the second displacement prediction model reflects the characteristics of the loudspeaker more truly, ensures that the output predicted displacement is more accurate, and thus can more accurately perform displacement protection, thereby maximizing the hardware potential of the loudspeaker and improving the loudness of the loudspeaker under the premise of protecting the displacement of the loudspeaker diaphragm.
[0309] Optionally, in the embodiments of the present application, the electronic device can also collect the loudspeaker current and voltage, obtain the impedance curve, then extract the resonance frequency f0 of the loudspeaker, and calculate the real-time mechanical stiffness Kms of the loudspeaker according to the resonance frequency f0 and the vibration mass Mms, where Mms is an inherent hardware parameter of the loudspeaker; and then the electronic device updates Kms in the currently used displacement prediction model (i.e., the second displacement prediction model) to the real-time Kms, Kms = (2 * π * f0) 2 *Mms.
[0310] Further, as the temperature of the loudspeaker increases, the displacement of the loudspeaker diaphragm for the same signal will also increase. In the embodiments of the present application, the electronic device can also correct the frequency parameter of the high-pass filter for filtering the second output signal according to the temperature, to ensure that the control of the second output signal conforms to the current characteristics of the loudspeaker, and thus ensure the improvement of the loudness of the loudspeaker.
[0311] Specifically, first, the electronic device determines the real-time temperature of the loudspeaker according to the impedance of the loudspeaker.
[0312] Optionally, the real-time temperature T of the loudspeaker can satisfy the following expression: σ is the temperature rise coefficient, Re is the impedance of the loudspeaker, Re0 is the impedance of the loudspeaker at room temperature, and T0 is the preset room temperature. σ and Re are inherent parameters of the loudspeaker.
[0313] Second, the electronic device determines the frequency correction coefficient according to the real-time temperature of the loudspeaker.
[0314] Wherein, the frequency correction coefficient Coeff satisfies the following expression:
[0315] The parameters in the expression satisfied by the frequency correction coefficient Coeff are all preset values, for example, T hot is the hot state temperature threshold, T cold is the cold state temperature threshold, and Coeff0 is the initial frequency correction coefficient. The specific values of the preset values are not limited in the embodiments of the present application. The frequency correction coefficient Coeff is the frequency offset, or the passband offset.
[0316] Finally, the electronic device corrects the frequency parameter of the filtering according to the frequency correction coefficient, and filters the second output signal according to the corrected frequency parameter. The correction of the frequency parameter of the filtering according to the frequency correction coefficient refers to shifting the passband of the high-pass filter indicated by the frequency parameter of the filtering by the value of the frequency correction coefficient to obtain the corrected frequency parameter.
[0317] Exemplarily, Figure 20 A framework of a loudspeaker system provided by an embodiment of the present application is shown. As Figure 21 shown, the loudspeaker system includes a displacement prediction model (a second displacement prediction model after adjustment of the correction parameter), a gain control unit, a determination unit, a power amplifier unit (an amplifier), a temperature calculation unit, and a temperature correction unit. The second output signal is input into the displacement prediction model, and a predicted displacement is output. The determination unit determines a frequency parameter of a high-pass filter, and the gain control unit controls the gain of the second output signal and then inputs the second output signal into the power amplifier unit. The power amplifier unit converts the digital signal into an analog signal and then inputs the analog signal into the loudspeaker for playing. The temperature calculation unit calculates the real-time temperature of the loudspeaker, and the temperature correction unit determines a frequency correction coefficient and inputs the frequency correction coefficient into the gain control unit. The gain control unit corrects the frequency parameter of the filtering according to the frequency correction coefficient, and the corrected frequency parameter is used to control the gain of the second output signal.
[0318] Optionally, in the embodiment of the present application, the electronic device performs steps 1901 to 1903 to control the gain of the second output signal of the loudspeaker to protect the displacement of the loudspeaker, and the electronic device can further process the output signal to reduce signal distortion, thereby further improving the sound quality of the loudspeaker. It should be noted that, for ease of description, the output signal obtained after step 1903 is uniformly referred to as a third output signal in the following embodiments.
[0319] As Figure 22 shown, after step 1902, the method for improving the sound quality of the loudspeaker provided by the embodiment of the present application can further include steps 2101 to 2102.
[0320] Step 2101, the electronic device adjusts the nonlinear parameter of the first nonlinear compensation model pre-configured in the loudspeaker according to the coil temperature of the loudspeaker to obtain a second nonlinear compensation model.
[0321] It should be understood that the nonlinear compensation model of the loudspeaker corresponds to a plurality of nonlinear parameters, and determining the nonlinear compensation model of the loudspeaker means obtaining the nonlinear parameters of the loudspeaker. In the embodiment of the present application, the nonlinear parameters of the loudspeaker include at least one of the force factor BL, the mechanical stiffness Kms, the inductance Le, and the damping Rm of the loudspeaker.
[0322] The nonlinear parameters of the pre-configured nonlinear compensation model in the loudspeaker are referred to as first nonlinear parameters, and the nonlinear parameters of the obtained second nonlinear compensation model of the loudspeaker are referred to as second nonlinear parameters.
[0323] In the embodiment of the application, the coil temperature of the loudspeaker can be determined according to the direct current resistance of the loudspeaker. The relationship between the coil temperature (also referred to as voice coil temperature) of the loudspeaker and the direct current resistance of the coil of the loudspeaker is as follows:
[0324]
[0325] wherein T is the coil temperature of the loudspeaker (with the same meaning as the real-time temperature of the loudspeaker described above), R is the direct current resistance of the coil of the loudspeaker, η is the temperature rise coefficient, and R0 is the direct current resistance of the coil at the calibration temperature, which is usually calibrated at 25 degrees Celsius.
[0326] Optionally, the method for adjusting the nonlinear parameters of the pre-configured nonlinear compensation model in the loudspeaker according to the coil temperature of the loudspeaker specifically comprises: interpolating the pre-configured nonlinear parameters (i.e. the first nonlinear parameters) according to the temperature of the coil of the loudspeaker to obtain the second nonlinear parameters of the loudspeaker.
[0327] Taking the mechanical stiffness Kms in the nonlinear parameters as an example, the process of interpolating the first nonlinear parameters is described.
[0328] Firstly, the characteristic curves of the nonlinear parameters Kms at different temperatures of the coil of the loudspeaker are obtained. The characteristic curves of the Kms are curves reflecting the relationship between the stiffness coefficient of the loudspeaker and the displacement of the loudspeaker. For example, 10 characteristic curves of the Kms from 10 degrees Celsius to 55 degrees Celsius are obtained at intervals of 5 degrees Celsius, and the data of the 10 characteristic curves are stored.
[0329] Secondly, the characteristic curves of the nonlinear parameters Kms are linearly interpolated according to the temperature of the coil of the loudspeaker, the temperature threshold 1 and the temperature threshold 2 to obtain a target characteristic curve (which can be understood as an estimation result of the characteristic curve of the third nonlinear parameters). The temperature threshold 2 is greater than the temperature threshold 1, and the third nonlinear parameters can be understood as the nonlinear parameters corresponding to the current temperature of the coil of the loudspeaker.
[0330] For example, the temperature of the coil of the loudspeaker is denoted as T, the temperature threshold 1 is denoted as T min , and the temperature threshold 2 is denoted as T max .
[0331] If T min , the characteristic curve corresponding to T min is taken as the target characteristic curve.
[0332] If T > T max , T max is obtained. The corresponding characteristic curve is taken as a target characteristic curve.
[0333] If T min ≤ T ≤ T max , according to the temperature of the voice coil of the loudspeaker, T min is obtained. The corresponding characteristic curve and the corresponding characteristic curve of T max are linearly interpolated to generate a target characteristic curve.
[0334] Finally, the target characteristic curve is polynomially fitted to obtain each coefficient of the polynomial corresponding to the target characteristic curve, and the each coefficient has a one-to-one corresponding relationship with the nonlinear parameter. In this way, the second nonlinear parameter of the loudspeaker can be determined according to the each coefficient of the polynomial.
[0335] For example, for the nonlinear parameter Kms, it is assumed that the fitted binomial is as follows:
[0336] f(x) = a0 + a1x + a2x 2 +a3x 3 +a4x 4
[0337] wherein the coefficient a1 corresponds to the first-order coefficient of the nonlinear parameter Kms, the coefficient a2 corresponds to the second-order coefficient of the nonlinear parameter Kms, the coefficient a2 corresponds to the third-order coefficient of the nonlinear parameter Kms, and the coefficient a4 corresponds to the fourth-order coefficient of the nonlinear parameter Kms.
[0338] For other types of parameters in the nonlinear parameter, such as Rm(v), the above-mentioned similar linear interpolation method can also be used to obtain, and the embodiments of the present application will not be described in detail.
[0339] Optionally, the characteristic curve of the nonlinear parameter can be in the form of a table, or can be in other forms of data or files, and the embodiments of the present application are not limited.
[0340] It should be understood that the nonlinear parameter of the loudspeaker can be real-time changeable, for example, the nonlinear parameter changes with the change of the voice coil temperature of the loudspeaker. In the embodiments of the present application, the first nonlinear parameter of the loudspeaker is interpolated according to the current temperature of the loudspeaker, so that the nonlinear parameter of the loudspeaker can be adjusted in real time to obtain the second nonlinear parameter, and the accuracy of the second nonlinear parameter is higher.
[0341] It should be understood that the nonlinear parameter of the loudspeaker can also change with the change of the displacement of the loudspeaker. In the embodiments of the present application, a similar linear interpolation method can be used to determine the displacement of the loudspeaker according to the direct current resistance of the loudspeaker, and then the first nonlinear parameter of the loudspeaker is interpolated according to the displacement of the loudspeaker to obtain the second nonlinear parameter of the loudspeaker, so as to obtain the nonlinear model of the loudspeaker.
[0342] In step 2102, the electronic device performs signal compensation on the output signal by using the second nonlinear model.
[0343] In the embodiments of the present application, since the second nonlinear parameter of the loudspeaker is accurately determined, the signal compensation effect is good when the third output signal is compensated according to the second nonlinear parameter, which can effectively reduce signal distortion and improve the sound quality of the loudspeaker.
[0344] Optionally, the method for improving the sound quality of the loudspeaker provided in the embodiments of the present application further includes filtering the compensated third output signal.
[0345] In the embodiments of the present application, the compensated third output signal can be filtered by using a wave trap, the speed of the diaphragm of the loudspeaker near the resonance frequency can be adjusted, and then the distortion of the output signal can be reduced, which can effectively improve the sound quality of the loudspeaker.
[0346] As described above, in the embodiments of the present application, a series of processes can be performed on the audio signal to be played by the loudspeaker, such as equalization processing, bass enhancement, transient enhancement, virtual bass processing, displacement control, and nonlinear compensation. Optionally, for some large-size loudspeakers with strong low-frequency capability, the above-mentioned virtual bass processing and / or nonlinear compensation process can not be performed.
[0347] An exemplary, Figure 22 A framework schematic diagram of a loudspeaker system provided in the embodiments of the present application is shown, as shown in Figure 23 As shown, the loudspeaker system can include an equalization processing module, a bass enhancement module, a transient enhancement module, a virtual bass module, a displacement control module, and a nonlinear compensation module. The equalization processing module is used to perform the above-mentioned step 1401, the bass enhancement module is used to perform the above-mentioned step 1402, the transient enhancement module is used to perform the above-mentioned steps 401 to 404, the virtual bass module is used to perform the above-mentioned steps 1701 to 1705, the displacement control module is used to perform the steps 1901 to 1903, and the nonlinear compensation module is used to perform the above-mentioned steps 2101 to 2102.
[0348] Correspondingly, the embodiment of the present application provides an electronic device, which can be divided into functional modules according to the above method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The integrated module can be realized in the form of hardware or in the form of a software functional module. It should be noted that the division of the modules in the embodiment of the present application is illustrative, and is only a logical functional division. In actual implementation, another division mode can be used.
[0349] In the case of dividing each functional module according to each function, Figure 23 A possible structural schematic diagram of the electronic device involved in the above embodiment is shown. As shown in the figure, Figure 24 The electronic device includes a first acquisition module 2301, a first determination module 2302, an envelope modulation module 2303, and a second determination module 2304.
[0350] The first acquisition module 2301 is configured to frequency-division of an input signal of a loudspeaker to obtain a first low-frequency input signal and a first high-frequency input signal. The input signal of the loudspeaker is a time-domain signal. The first low-frequency input signal includes a signal lower than a first preset frequency point in the input signal. The first high-frequency input signal includes a signal higher than the first preset frequency point in the input signal. For example, step 401 in the above method embodiment is performed.
[0351] The first determination module 2032 is configured to perform transient detection on the first low-frequency input signal to determine whether the first low-frequency input signal is a transient signal. For example, step 402 (including steps 4021 to 4023) in the above method embodiment is performed.
[0352] The envelope modulation module 2303 is configured to perform signal envelope modulation on the first low-frequency input signal to obtain a second low-frequency input signal in the case that the first low-frequency input signal is a transient signal. The starting voltage of the second low-frequency input signal is greater than the starting voltage of the first low-frequency input signal, and the loudness of the second low-frequency input signal is greater than the loudness of the first low-frequency input signal. For example, step 403 in the above method embodiment is performed.
[0353] The second determination module 2304 is configured to determine an output signal of the loudspeaker according to the second low-frequency input signal and the first high-frequency input signal. For example, step 404 in the above method embodiment is performed.
[0354] Optionally, the first obtaining module 2301 is further configured to split the first high-frequency input signal of the loudspeaker to obtain a first mid-frequency input signal and a second high-frequency input signal, the first mid-frequency input signal including signals of the first high-frequency input signal that are lower than a second preset frequency point, and the second high-frequency input signal including signals of the first high-frequency input signal that are higher than the second preset frequency point, and the second preset frequency point is higher than the first preset frequency point, for example, performing step 405 in the foregoing method embodiment.
[0355] The first determining module 2302 is further configured to perform transient detection on the first mid-frequency input signal to determine whether the first mid-frequency input signal is a transient signal, for example, performing step 406 in the foregoing method embodiment.
[0356] The envelope modulation module 2303 is further configured to perform signal envelope modulation on the first mid-frequency input signal to obtain a second mid-frequency input signal in a case where the first mid-frequency input signal is a transient signal, the second mid-frequency input signal having a start voltage that is higher than that of the first mid-frequency input signal and a loudness that is higher than that of the first mid-frequency input signal, for example, performing step 407 in the foregoing method embodiment.
[0357] The second determining module 2304 is specifically configured to obtain an output signal of the loudspeaker according to the second low-frequency input signal, the second mid-frequency input signal, and the second high-frequency input signal, for example, performing step 408 in the foregoing method embodiment.
[0358] Optionally, the electronic device provided in the embodiment of the present application further includes a generating module 2305 and a second obtaining module 2306. The generating module 2305 is configured to generate a low-frequency auxiliary signal, for example, performing step 409 in the foregoing method embodiment. The second obtaining module 2306 is configured to add the low-frequency auxiliary signal to the first low-frequency input signal to obtain a first auxiliary enhancement signal, for example, performing step 410 in the foregoing method embodiment. The envelope modulation module 2303 is specifically configured to perform signal envelope modulation on the first auxiliary enhancement signal to obtain the second low-frequency input signal, for example, performing step 4031 in the foregoing method embodiment.
[0359] Optionally, the electronic device provided in the embodiment of the present application further includes a phase compensation module 2307, which is configured to perform phase compensation on the first low-frequency input signal to obtain a first phase compensation signal, for example, performing step 411 in the foregoing method embodiment. The envelope modulation module 2303 is specifically configured to perform signal envelope modulation on the first phase compensation signal to obtain the second low-frequency input signal, for example, performing step 4032 in the foregoing method embodiment.
[0360] Optionally, the electronic device provided by the embodiment of the present application further comprises an equalization processing module 2308 and a bass enhancement module 2309. The equalization processing module 2308 is configured to perform equalization processing on the first signal to obtain a second signal, the first signal being an initial to-be-played signal input to the loudspeaker, for example, performing step 1401 in the above method embodiment. The bass enhancement module 2309 is configured to process the second signal by using a bass enhancement algorithm to obtain an input signal of the loudspeaker, for example, performing step 1402 (including steps 1402a to 1402b) in the above method embodiment.
[0361] Optionally, the electronic device provided by the embodiment of the present application further comprises a third acquisition module 2310, a first adjustment module 2311, and a control module 2312. The third acquisition module 2310 is configured to acquire a first displacement prediction model comprising one or more correction coefficients, the first displacement prediction model being used to simulate the performance of the loudspeaker to predict the displacement of the diaphragm of the loudspeaker, the one or more correction coefficients being used to control the output of the first displacement prediction model, for example, performing step 1901 in the above method embodiment. The first adjustment module 2311 is configured to adjust at least one correction coefficient in the first displacement prediction model to obtain a second displacement prediction model, the absolute value of the difference between the predicted displacement output by the second displacement prediction model and the actual displacement of the diaphragm being less than the absolute value of the difference between the predicted displacement output by the first displacement prediction model and the actual displacement of the diaphragm of the loudspeaker; the actual displacement of the diaphragm of the loudspeaker being the actual measured value of the movement distance of the diaphragm of the loudspeaker relative to the initial position, for example, performing step 1902 in the above method embodiment. The control module 2312 is configured to control the gain of the output signal according to the displacement protection threshold of the loudspeaker and the predicted displacement output by the second displacement prediction model, so that the displacement of the diaphragm when the loudspeaker plays the output signal is less than or equal to the displacement protection threshold; the displacement protection threshold being the maximum displacement of the diaphragm of the loudspeaker, for example, performing step 1903 in the above method embodiment.
[0362] Optionally, the electronic device provided by the embodiment of the present application further comprises a virtual bass processing module 2313, which is configured to perform virtual bass processing on the output signal of the loudspeaker to obtain a virtual bass output signal, the psychoacoustic low-frequency loudness of the virtual bass output signal being greater than the psychoacoustic low-frequency loudness of the output signal of the loudspeaker, for example, performing steps 1701 to 1705 in the above method embodiment.
[0363] Optionally, the electronic device provided by the embodiments of the present application further includes a second adjustment module 2314 and a signal compensation module 2315. The second adjustment module 2314 is configured to adjust the nonlinear parameter of the first nonlinear compensation model pre-configured in the loudspeaker according to the coil temperature of the loudspeaker to obtain a second nonlinear compensation model, for example, performing step 2101 in the above method embodiments. The signal compensation module 2315 is configured to perform signal compensation on the output signal by using the second nonlinear compensation model, for example, performing step 2102 in the above method embodiments.
[0364] The various modules of the above electronic device can also be used to perform other actions in the above method embodiments, and all related contents of the steps involved in the above method embodiments can be referred to the function description of the corresponding functional modules, which will not be repeated here.
[0365] In the case of using integrated units, Figure 24 Another possible structural schematic diagram of the electronic device involved in the above embodiments is shown. As Figure 24 shown, the electronic device provided by the embodiments of the present application can include a processing module 2401 and a communication module 2402. The processing module 2401 can be used to control and manage the actions of the electronic device, for example, the processing module 2401 can be used to support the electronic device to perform steps 401 to 411, steps 1701 to 1705, steps 1901 to 1903, steps 2101 to 2102 in the above method embodiments, and / or other processes for the technology described herein. The communication module 2402 can be used to support the communication of the electronic device with other network entities. Optionally, as Figure 3 shown, the electronic device can further include a storage module 2403 for storing the program code and data of the device.
[0366] The processing module 2001 can be a processor or a controller (for example, it can be the above-mentioned Figure 3The processor 310 shown can be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, transistor logic device, a hardware component, or any combination thereof. It can implement or execute various exemplary logical blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of the present application. The processor can also be a combination of computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication module 2402 can be a transceiver, transceiver circuit, or communication interface (for example, it can be the above-mentioned Figure 1 The mobile communication module 350 or the wireless communication module 360 shown can be the communication module 2402. The storage module 2403 can be a memory (for example, it can be the above-mentioned
[0367] When the processing module 2401 is a processor, the communication module 2402 is a transceiver, and the storage module 2403 is a memory, the processor, the transceiver, and the memory can be connected through a bus. The bus can be a peripheral component interconnect (PCI) bus or an extended Industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0368] For more details of the functions of the modules included in the above electronic device, please refer to the description in the above various method embodiments, which will not be repeated here.
[0369] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between each of the embodiments can be mutually referred to. Each of the embodiments focuses on the differences from other embodiments.
[0370] In the above embodiments, all or part can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, all or part generates the processes or functions in the embodiments of the present application. The computer can be a general purpose computer, a special purpose computer, a computer network or other programmable apparatus. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another, for example, the computer instructions can be transferred from one website, computer, server or data center to another via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a magnetic disk, a magnetic tape), an optical medium (such as a digital video disc (DVD)), or a semiconductor medium (such as a solid state drive (SSD)), etc.
[0371] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
[0372] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed each other can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0373] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0374] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present alone, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0375] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part of the prior art that contributes to the technical solutions or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: a flash memory, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk, and various program code storage media.
[0376] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any change or replacement within the technical scope disclosed in the present application should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of improving the sound quality of a loudspeaker, characterized by, The method comprises: frequency dividing an input signal of the loudspeaker to obtain a first low-frequency input signal and a first high-frequency input signal, the input signal of the loudspeaker being a time-domain signal, the first low-frequency input signal comprising signals lower than a first preset frequency point in the input signal, and the first high-frequency input signal comprising signals higher than the first preset frequency point in the input signal; performing transient detection on the first low-frequency input signal to determine whether the first low-frequency input signal is a transient signal, comprising: determining transient power and steady-state power of the first low-frequency input signal based on power of a current frame and power of a plurality of historical frames, and classifying the current frame of the low-frequency input signal as a transient part or a steady-state part in the first low-frequency input signal based on the determined power; if the first low-frequency input signal is a transient signal, performing signal envelope modulation on the first low-frequency input signal to obtain a second low-frequency input signal, the starting voltage of the second low-frequency input signal being greater than the starting voltage of the first low-frequency input signal, and the loudness of the second low-frequency input signal being greater than the loudness of the first low-frequency input signal; if the first low-frequency input signal is a steady-state signal, not processing it; and determining an output signal of the loudspeaker according to the second low-frequency input signal and the first high-frequency input signal.
2. The method of claim 1, wherein, The method further comprises: frequency dividing the first high-frequency input signal of the loudspeaker to obtain a first medium-frequency input signal and a second high-frequency input signal, the first medium-frequency input signal comprising signals lower than a second preset frequency point in the first high-frequency input signal, and the second high-frequency input signal comprising signals higher than the second preset frequency point in the first high-frequency input signal, the second preset frequency point being higher than the first preset frequency point; performing transient detection on the first medium-frequency input signal to determine whether the first medium-frequency input signal is a transient signal; if the first medium-frequency input signal is a transient signal, performing signal envelope modulation on the first medium-frequency input signal to obtain a second medium-frequency input signal, the starting voltage of the second medium-frequency input signal being greater than the starting voltage of the first medium-frequency input signal, and the loudness of the second medium-frequency input signal being greater than the loudness of the first medium-frequency input signal; the determining of the output signal of the loudspeaker according to the second low-frequency input signal and the first high-frequency input signal comprises: obtaining the output signal of the loudspeaker according to the second low-frequency input signal, the second medium-frequency input signal, and the second high-frequency input signal.
3. The method according to claim 1 or 2, characterized in that, The first low-frequency input signal is a transient signal, and before the signal envelope modulation on the first low-frequency input signal, the method further comprises: generating a low-frequency auxiliary signal; adding the low-frequency auxiliary signal in the first low-frequency input signal to obtain a first auxiliary enhancement signal; the signal envelope modulation on the first low-frequency input signal to obtain a second low-frequency input signal comprises: performing signal envelope modulation on the first auxiliary enhancement signal to obtain the second low-frequency input signal.
4. The method of claim 3, wherein, The generation of the low-frequency auxiliary signal comprises: generating a first auxiliary signal, the first auxiliary signal satisfying: Wherein, signal_h represents the first auxiliary signal, A represents a signal amplitude influence factor, is the center frequency of the loudspeaker; high-pass filtering the first auxiliary signal to obtain the low-frequency auxiliary signal.
5. The method according to claim 1 or 2, characterized in that, The first low-frequency input signal is a transient signal, and before the signal envelope modulation is performed on the first low-frequency input signal, the method further comprises: performing phase compensation on the first low-frequency input signal to obtain a first phase compensated signal; The signal envelope modulation on the first low-frequency input signal to obtain a second low-frequency input signal comprises: performing signal envelope modulation on the first phase compensated signal to obtain the second low-frequency input signal.
6. The method of claim 1 or 2, wherein, The transient detection on the first low-frequency input signal to determine whether the first low-frequency input signal is a transient signal comprises: determining the transient power and the steady-state power of the first low-frequency input signal; determining a momentary rate of the first low-frequency input signal according to a transient power and a steady-state power of the first low-frequency input signal; the momentary rate of the first low-frequency input signal satisfies: wherein, represents the momentary rate of the first low-frequency input signal, represents a ratio of the transient power of the first low-frequency input signal to the steady-state power of the first low-frequency input signal, W represents a weighting factor, W a value of the weighting factor is same as a current power of the first low-frequency input signal; If the instantaneous rate of the input signal is greater than a preset instantaneous rate threshold, the first low-frequency input signal is determined as a transient signal.
7. The method of claim 1 or 2, wherein, The method further comprises: performing equalization processing on a first signal to obtain a second signal; the first signal is an initial to-be-played signal input to the loudspeaker; using a bass enhancement algorithm to process the second signal to obtain an input signal of the loudspeaker.
8. The method of claim 7, wherein, The processing of the second signal using the bass enhancement algorithm to obtain the input signal of the loudspeaker comprises: determining the gain of a low-frequency shelf filter according to the energy of the low-frequency signal in the second signal, the low-frequency shelf filter being used to control the loudness of the low-frequency signal in the second signal; filtering the second signal using the low-frequency shelf filter to obtain the input signal of the loudspeaker.
9. The method of claim 1 or 2, wherein, The method further comprises: obtaining a first displacement prediction model comprising one or more correction coefficients, the first displacement prediction model being used to simulate the performance of the loudspeaker to predict the displacement of the diaphragm of the loudspeaker, the one or more correction coefficients being used to control the output of the first displacement prediction model; adjusting at least one correction coefficient in the first displacement prediction model to obtain a second displacement prediction model; the absolute value of the difference between the predicted displacement output by the second displacement prediction model and the actual displacement of the diaphragm is less than the absolute value of the difference between the predicted displacement output by the first displacement prediction model and the actual displacement; the actual displacement is the actual measured value of the movement distance of the diaphragm relative to the initial position; controlling the gain of the output signal according to the displacement protection threshold of the loudspeaker and the predicted displacement output by the second displacement prediction model, so that the diaphragm displacement of the loudspeaker when playing the output signal is less than or equal to the displacement protection threshold; the displacement protection threshold is the maximum displacement of the diaphragm.
10. The method of claim 1 or 2, wherein, The method further comprises: performing virtual bass processing on the output signal to obtain a virtual bass output signal; the psychoacoustic low-frequency loudness of the virtual bass output signal is greater than the psychoacoustic low-frequency loudness of the output signal.
11. The method of claim 10, wherein, The virtual bass processing on the output signal to obtain a virtual bass output signal comprises: frequency-divide the output signal to obtain a first low-frequency output signal and a first high-frequency output signal, the first low-frequency output signal comprising signals in the output signal lower than a third preset frequency point, and the first high-frequency output signal comprising signals in the output signal higher than the third preset frequency point; generate a harmonic signal of the first low-frequency output signal according to the first low-frequency output signal; mix the harmonic signal and the first low-frequency output signal to obtain a first mixed signal; perform phase synchronization processing on the first mixed signal and the first high-frequency output signal to obtain a second mixed signal and a second high-frequency output signal, a change amount of a phase of the second mixed signal being equal to a change amount of a phase of the second high-frequency output signal; obtain the virtual bass output signal according to the second mixed signal and the second high-frequency output signal.
12. The method of claim 1 or 2, wherein, The method further comprises: adjusting a nonlinear parameter of a first nonlinear compensation model pre-configured in the loudspeaker according to a coil temperature of the loudspeaker to obtain a second nonlinear compensation model; performing signal compensation on the output signal by using the second nonlinear compensation model.
13. An electronic device, comprising: comprise: a first obtaining module, a first determining module, an envelope modulation module, and a second determining module; the first obtaining module is configured to frequency-divide an input signal of a loudspeaker included in the electronic device to obtain a first low-frequency input signal and a first high-frequency input signal, the input signal of the loudspeaker being a time-domain signal, the first low-frequency input signal comprising signals in the input signal lower than a first preset frequency point, and the first high-frequency input signal comprising signals in the input signal higher than the first preset frequency point; the first determining module is configured to perform transient detection on the first low-frequency input signal to determine whether the first low-frequency input signal is a transient signal; the first determining module is further configured to determine a transient power and a steady-state power of the first low-frequency input signal based on a power of a current frame and powers of a plurality of historical frames, and classify the current frame of the low-frequency input signal as a transient part or a steady-state part in the first low-frequency input signal based on the determined powers; the envelope modulation module is configured to perform signal envelope modulation on the first low-frequency input signal to obtain a second low-frequency input signal if the first low-frequency input signal is a transient signal, the starting voltage of the second low-frequency input signal being greater than the starting voltage of the first low-frequency input signal, and the loudness of the second low-frequency input signal being greater than the loudness of the first low-frequency input signal; if the first low-frequency input signal is a steady-state signal, the first low-frequency input signal is not processed; and the second determining module is configured to determine an output signal of the loudspeaker according to the second low-frequency input signal and the first high-frequency input signal.
14. The electronic device of claim 13, wherein The first obtaining module is further configured to split a first high-frequency input signal of the loudspeaker to obtain a first intermediate-frequency input signal and a second high-frequency input signal; the first intermediate-frequency input signal comprises signals of the first high-frequency input signal that are lower than a second preset frequency point, and the second high-frequency input signal comprises signals of the first high-frequency input signal that are higher than the second preset frequency point; the second preset frequency point is higher than the first preset frequency point. The first determining module is further configured to perform transient detection on the first intermediate-frequency input signal to determine whether the first intermediate-frequency input signal is a transient signal. The envelope modulation module is further configured to perform signal envelope modulation on the first intermediate-frequency input signal to obtain a second intermediate-frequency input signal in a case where the first intermediate-frequency input signal is a transient signal; the second intermediate-frequency input signal has a start voltage that is higher than a start voltage of the first intermediate-frequency input signal, and has a loudness that is higher than a loudness of the first intermediate-frequency input signal. The second determining module is specifically configured to obtain an output signal of the loudspeaker according to the second low-frequency input signal, the second intermediate-frequency input signal, and the second high-frequency input signal.
15. The electronic device of claim 13 or 14, wherein, The electronic device further comprises a generating module and a second obtaining module. The generating module is configured to generate a low-frequency auxiliary signal. The second obtaining module is configured to add the low-frequency auxiliary signal to the first low-frequency input signal to obtain a first auxiliary enhancement signal. The envelope modulation module is specifically configured to perform signal envelope modulation on the first auxiliary enhancement signal to obtain the second low-frequency input signal.
16. The electronic device of claim 15, wherein The generating module is specifically configured to generate a first auxiliary signal, and perform high-pass filtering on the first auxiliary signal to obtain the low-frequency auxiliary signal. The first auxiliary signal satisfies: Wherein signal_h represents the first auxiliary signal, A represents a signal amplitude influence factor, is the center frequency of the loudspeaker.
17. The electronic device of claim 13 or 14, wherein, The electronic device further comprises a phase compensation module. The phase compensation module is configured to perform phase compensation on the first low-frequency input signal to obtain a first phase compensation signal. The envelope modulation module is specifically configured to perform signal envelope modulation on the first phase compensation signal to obtain the second low-frequency input signal.
18. The electronic device of claim 13 or 14, wherein The first determining module is specifically configured to determine a transient power and a steady-state power of the first low-frequency input signal, determine a transient rate of the first low-frequency input signal according to the transient power and the steady-state power of the first low-frequency input signal, and determine that the first low-frequency input signal is a transient signal in a case where the transient rate of the input signal is greater than a preset transient rate threshold. the instantaneous rate of the first low frequency input signal satisfies: wherein, represents the instantaneous rate of the first low frequency input signal, represents the ratio of the transient power of the first low frequency input signal to the steady state power of the first low frequency input signal, W represents a weighting factor, W the value of the weighting factor is the same as the current power of the first low frequency input signal.
19. The electronic device of claim 13 or 14, wherein, The electronic device further comprises an equalization processing module and a bass enhancement module. The equalization processing module is configured to perform equalization processing on a first signal to obtain a second signal; the first signal is an initial to-be-played signal input to the loudspeaker. The bass enhancement module is configured to process the second signal by using a bass enhancement algorithm to obtain an input signal of the loudspeaker.
20. The electronic device of claim 19, wherein the bass enhancement module is specifically configured to determine a gain of a low shelf filter according to an energy of a low frequency signal in the second signal, the low shelf filter being used to control a loudness of the low frequency signal in the second signal, and filter the second signal using the low shelf filter to obtain the input signal of the loudspeaker. The electronic device further comprises a third obtaining module, a first adjusting module and a control module.
21. The electronic device of claim 13 or 14, wherein, The third obtaining module is configured to obtain a first displacement prediction model comprising one or more correction coefficients, the first displacement prediction model being used to simulate a performance of the loudspeaker to predict a displacement of a diaphragm of the loudspeaker, the one or more correction coefficients being used to control an output of the first displacement prediction model. The first adjusting module is configured to adjust at least one correction coefficient in the first displacement prediction model to obtain a second displacement prediction model, an absolute value of a difference between a predicted displacement output by the second displacement prediction model and an actual displacement of the diaphragm being smaller than an absolute value of a difference between a predicted displacement output by the first displacement prediction model and the actual displacement, the actual displacement being a moving distance actual measurement of the diaphragm relative to an initial position. The control module is configured to control a gain of the output signal according to a displacement protection threshold of the loudspeaker and the predicted displacement output by the second displacement prediction model, so that a diaphragm displacement of the loudspeaker when playing the output signal is smaller than or equal to the displacement protection threshold, the displacement protection threshold being a maximum displacement of the diaphragm. The electronic device further comprises a virtual bass processing module.
22. The electronic device of claim 13 or 14, wherein, The virtual bass processing module is configured to perform virtual bass processing on the output signal to obtain a virtual bass output signal, a psychoacoustic low frequency loudness of the virtual bass output signal being greater than a psychoacoustic low frequency loudness of the output signal.
23. The electronic device of claim 22, wherein the virtual bass processing module is specifically configured to perform frequency division processing on the output signal to obtain a first low frequency output signal and a first high frequency output signal, the first low frequency output signal comprising signals in the output signal lower than a third preset frequency point, and the first high frequency output signal comprising signals in the output signal higher than the third preset frequency point; generate a harmonic signal of the first low frequency output signal according to the first low frequency output signal; mix the harmonic signal and the first low frequency output signal to obtain a first mixed signal; and perform phase synchronization processing on the first mixed signal and the first high frequency output signal to obtain a second mixed signal and a second high frequency output signal, a change amount of a phase of the second mixed signal being equal to a change amount of a phase of the second high frequency output signal; and further obtain the virtual bass output signal according to the second mixed signal and the second high frequency output signal. The electronic device further comprises a second adjusting module and a signal compensation module. 24. The electronic device of claim 13 or 14, wherein, The second adjusting module is configured to adjust a nonlinear parameter of a first nonlinear compensation model pre-configured in the loudspeaker according to a coil temperature of the loudspeaker to obtain a second nonlinear compensation model. The signal compensation module is configured to perform signal compensation on the output signal by using the second nonlinear compensation model.
25. An electronic device, comprising: A computer device, including a memory and at least one processor connected with the memory, wherein the memory is configured to store instructions, and the instructions are read by the at least one processor to perform the method in any one of claims 1 to 12.
26. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method in any one of claims 1 to 12.
Citation Information
Patent Citations
Acoustic correction apparatus
CN1402956A