Audio signal processing method and system, sound box and storage medium
By performing delay processing and automatic gain control on the speaker signal, combined with dynamic range compression, the problem of speaker distortion at high volumes is solved, ensuring that the signal is output within the power range that the speaker can withstand, thus improving sound quality.
Patent Information
- Application Number
- CN202211262683.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-14
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-10-14
AI Technical Summary
Existing speakers suffer from distortion at high volumes, especially during signal amplification due to clipping distortion caused by response time.
By delaying the transient audio signal, automatic gain control is applied when the signal exceeds a preset threshold, and dynamic range compression is performed to obtain a steady-state signal to avoid distortion.
It achieves the avoidance of transient signal distortion at high volumes, ensuring that the steady-state signal power output by the speaker is within an acceptable range, thereby improving sound quality and user experience.
Smart Images

Figure CN115550798B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of sound boxes, and in particular to an audio signal processing method and system, a sound box and a storage medium. BACKGROUND
[0002] With the development of sound boxes towards miniaturization, sound boxes on the market are increasingly pursuing small size and large volume, and the essential needs of sound boxes, i.e., sound quality, are ignored. After receiving an audio source, a sound box performs audio effect processing and signal amplification on the audio source, and then plays the sound through a loudspeaker. However, when the current sound box performs audio effect processing on the audio source, due to the need for a certain reaction time in the processing process, the signal output after signal amplification will appear to be clipped and distorted at a large volume. Therefore, many existing sound boxes have the problem of distortion at a large volume. SUMMARY
[0003] The main purpose of the present application is to provide an audio signal processing method and system, a sound box and a storage medium, which aims to solve the technical problem of distortion of a sound box at a large volume in the prior art.
[0004] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:
[0005] In a first aspect, the present application provides an audio signal processing method applied to a sound box, wherein the sound box is arranged on a terminal device, and the method comprises:
[0006] acquiring a transient audio signal;
[0007] performing delay processing on the transient audio signal to obtain a delayed audio signal;
[0008] when a transient value of the delayed audio signal exceeds a preset threshold, performing automatic gain processing on the delayed audio signal to obtain a gain audio signal;
[0009] performing dynamic range compression on the gain audio signal to obtain a first steady-state signal;
[0010] playing the first steady-state signal through the sound box.
[0011] Optionally, in the above-mentioned audio signal processing method, the delay processing on the transient audio signal to obtain a delayed audio signal comprises:
[0012] acquiring a volume adjustment signal generated by a user performing a volume increase operation;
[0013] performing delay processing on the transient audio signal according to the volume adjustment signal to obtain a delayed audio signal.
[0014] Optionally, in the audio signal processing method, the delay processing on the transient audio signal to obtain a delay audio signal comprises:
[0015] The transient audio signal is divided into multiple segments to obtain multiple segmented audio signals.
[0016] For each segmented audio signal, delay processing is performed to obtain a corresponding delay audio signal.
[0017] Optionally, in the audio signal processing method, after the step of performing automatic gain processing on the delay audio signal to obtain a gain audio signal when the transient value of the delay audio signal exceeds a preset threshold, the method further comprises:
[0018] For each segmented audio signal, a corresponding gain audio signal is determined.
[0019] The gain audio signals corresponding to all segmented audio signals are superimposed to obtain a superimposed audio signal.
[0020] The dynamic range compression on the gain audio signal to obtain a first steady-state signal comprises:
[0021] The dynamic range compression on the superimposed audio signal to obtain the first steady-state signal.
[0022] Optionally, in the audio signal processing method, the automatic gain processing on the delay audio signal to obtain a gain audio signal when the transient value of the delay audio signal exceeds a preset threshold comprises:
[0023] Judging whether the transient value of the delay audio signal exceeds a preset threshold.
[0024] If the transient value of the delay audio signal exceeds the preset threshold, performing automatic gain processing on the delay audio signal to obtain a gain audio signal.
[0025] If the transient value of the delay audio signal does not exceed the preset threshold, directly performing dynamic range compression on the delay audio signal to obtain the first steady-state signal.
[0026] Optionally, in the audio signal processing method, in the step of performing automatic gain processing on the delay audio signal to obtain a gain audio signal when the transient value of the delay audio signal exceeds a preset threshold, the automatic gain calculation formula involved is:
[0027]
[0028] wherein G represents the automatic gain value; A represents the transient value of the delay audio signal; A ref represents the preset threshold.
[0029] Optionally, in the audio signal processing method, the playing the first steady-state signal through the sound box comprises:
[0030] power-amplifying the first steady-state signal to obtain a second steady-state signal;
[0031] playing the second steady-state signal through a loudspeaker of the sound box.
[0032] In a second aspect, the present application provides an audio signal processing system applied to a sound box, the system comprising:
[0033] a signal obtaining module configured to obtain a transient audio signal;
[0034] a delay processing module configured to perform delay processing on the transient audio signal to obtain a delayed audio signal;
[0035] an automatic gain module configured to perform automatic gain processing on the delayed audio signal to obtain a gain audio signal when a transient value of the delayed audio signal exceeds a preset threshold value;
[0036] a steady-state processing module configured to perform dynamic range compression on the gain audio signal to obtain a first steady-state signal;
[0037] an audio playing module configured to play the first steady-state signal through the sound box.
[0038] In a third aspect, the present application provides a sound box, the sound box comprising a processor and a memory, the memory storing a signal processing program, the signal processing program being executed by the processor to implement the audio signal processing method as described above.
[0039] In a fourth aspect, the present application provides a computer-readable storage medium, the storage medium storing a computer program, the computer program being executed by one or more processors to implement the audio signal processing method as described above.
[0040] The one or more technical solutions provided by the present application can have the following advantages or at least achieve the following technical effects:
[0041] The application provides an audio signal processing method and system, a sound box and a storage medium. The method comprises the following steps: performing time delay processing on a transient audio signal to obtain a time delay audio signal; performing automatic gain processing on the time delay audio signal whose transient value exceeds a preset threshold to obtain a gain audio signal; and performing dynamic range compression on the gain audio signal to obtain a first steady-state signal. The first steady-state signal is played through the sound box, so that the transient signal is not distorted, and the steady-state signal power output to the loudspeaker of the sound box is within the rated power range of the sound box. BRIEF DESCRIPTION OF DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of these drawings.
[0043] Figure 1 The flowchart of the first embodiment of the audio signal processing method of the present application;
[0044] Figure 2 The hardware structure diagram of the sound box related to the present application;
[0045] Figure 3 The relationship diagram between signal gain and time in the prior art;
[0046] Figure 4 The comparison diagram of the input signal and the output signal of the sound box in the prior art;
[0047] Figure 5 The output signal diagram in the prior art;
[0048] Figure 6 The input signal diagram of the prior art in the comparative experiment;
[0049] Figure 7 The steady-state signal diagram of the prior art in the comparative experiment;
[0050] Figure 8 The output signal diagram of the prior art in the comparative experiment;
[0051] Figure 9 The transient audio signal diagram of step S100 in the embodiment of the audio signal processing method of the present application;
[0052] Figure 10 The gain audio signal diagram of step S300 in the embodiment of the audio signal processing method of the present application;
[0053] Figure 11 The first steady-state signal schematic diagram for step S400 in the embodiment of the audio signal processing method of the present application;
[0054] Figure 12 The second steady-state signal schematic diagram for step S510 in the embodiment of the audio signal processing method of the present application;
[0055] Figure 13 The functional module schematic diagram of the first embodiment of the audio signal processing system of the present application;
[0056] Figure 14 The detailed connection schematic diagram of the first embodiment of the audio signal processing system of the present application.
[0057] The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0058] In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative work fall within the protection scope of the present application.
[0059] It should be noted that in the present application, the terms "comprising", "containing" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or system that comprises a list of elements not only includes those elements, but also includes other elements not expressly listed or inherent to such process, method, article or system. Without more limitations, the elements defined by the statement "comprise" do not exclude the presence of other identical elements in the process, method, article or system comprising the element. In addition, in the present application, if there is a description of "first", "second", etc., the description of "first", "second", etc. is only for the purpose of description, and cannot be understood as indicating or implying the relative importance of the indicated technical features or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can be explicitly or implicitly included at least one of the features. In the present application, the suffix such as "module", "component" or "unit" used to represent elements is only for the convenience of the description of the present application, and has no specific meaning. Therefore, "module", "component" or "unit" can be mixed. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances. In addition, the technical solutions of various embodiments can be combined with each other, but it is based on the fact that the technical solutions can be realized by those skilled in the art. When the combination of technical solutions contradicts each other or cannot be realized, it should be considered that the combination of technical solutions does not exist, and is not within the scope of protection required by the present application.
[0060] With the improvement of people's living standards, people often relax their bodies and minds and cultivate their sentiments through music during their leisure and rest. Since large-size sound box equipment occupies a large space and is inconvenient to carry, small-size sound box equipment that meets the listening environment or extreme environment has become the first choice of everyone, which also promotes the development of sound boxes to small size.
[0061] Through analysis of the prior art, it is found that at present, sound boxes on the market are increasingly pursuing small size and large volume, and the essential demand of sound boxes and sound quality are ignored. After receiving the sound source, the sound box processes the sound source and amplifies the signal, and then plays the sound through the loudspeaker. However, when the current sound box processes the sound source, due to the need for a certain reaction time (Attack Time) in the processing process, the signal output after signal amplification will appear clipping distortion under large volume. Therefore, many existing sound boxes have "zizi" sound and distortion problem at large volume.
[0062] In view of the technical problem of distortion of sound boxes at large volume in the prior art, the present application provides an audio signal processing method, and the general idea is as follows:
[0063] The transient audio signal is acquired, delay processing is performed on the transient audio signal to obtain a delay audio signal, automatic gain processing is performed on the delay audio signal to obtain a gain audio signal when a transient value of the delay audio signal exceeds a preset threshold, dynamic range compression is performed on the gain audio signal to obtain a first steady-state signal, and the first steady-state signal is played through a sound box.
[0064] The technical solution achieves the purpose of playing the signal received by the sound box after processing, and avoids distortion of the transient signal. The transient signal of the audio can be ensured not to be distorted, and the steady-state signal power output to the loudspeaker of the sound box can be ensured to be within the rated power range that the sound box can withstand.
[0065] The audio signal processing method, system, sound box and storage medium provided by the application will be described in detail below with reference to the accompanying drawings, specific embodiments and implementation manners.
[0066] Embodiment one
[0067] Referring to Figure 1 the flowchart, the first embodiment of the audio signal processing method is proposed, and the audio signal processing method is applied to a sound box. The sound box is arranged on a terminal device.
[0068] The terminal device can be a television, a computer, an embedded industrial computer or other electronic devices with an external speaker function. The sound box refers to a device that converts the audio signal of the terminal device into sound. As shown in Figure 2 the hardware structure diagram of the sound box. The sound box can include a processor 1001, such as a CPU (Central Processing Unit, central processor), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005 and a loudspeaker 1006.
[0069] Specifically, the communication bus 1002 is used to realize the connection and communication between the components; the user interface 1003 is used to connect the client and communicate data with the client. The user interface 1003 can include an output unit, such as a display screen, and an input unit, such as a keyboard; the network interface 1004 is used to connect the background server and communicate data with the background server. The network interface 1004 can include an input / output interface, such as a standard wired interface, a wireless interface, such as a Wi-Fi interface; the memory 1005 is used to store various types of data. These data can include, for example, instructions of any application program or method in the sound box, and application program related data. The memory 1005 can be a high-speed RAM memory or a stable memory, such as a magnetic disk memory; optionally, the memory 1005 can also be a storage device independent of the processor 1001. Continue to refer to Figure 2The signal processing program can be included in the memory 1005; the processor 1001 is configured to invoke the signal processing program stored in the memory 1005, and perform the following operations:
[0070] Obtaining a transient audio signal;
[0071] Performing delay processing on the transient audio signal to obtain a delayed audio signal;
[0072] When the transient value of the delayed audio signal exceeds a preset threshold, performing automatic gain processing on the delayed audio signal to obtain a gain audio signal;
[0073] Performing dynamic range compression on the gain audio signal to obtain a first steady-state signal;
[0074] Playing the first steady-state signal through a sound box.
[0075] Based on the above sound box, the audio signal processing method of the present embodiment will be described in detail in combination with the flowchart shown in Figure 1
[0076] At present, in some small-volume and large-volume sound boxes, in order to achieve large volume, a signal amplification function is generally set, and the power after amplification mostly exceeds the maximum power (Threshold) that the sound box can withstand, such as the rated power of the sound box. Although a dynamic range compression (DRC, commonly used for soft limiting of audio output) is set in these sound boxes to ensure that the power of the output signal is within the range that the sound box can withstand, and in most cases only DRC and power amplifier are set for signal processing, which is equivalent to a power limiter to protect the load from being burned out. When the signal is very small, the DRC will not work, and only when the power of the output signal exceeds the set DRC threshold value, the DRC will work to compress the amplitude of the output signal within a certain range. Because the output audio signal is too large, it will cause peak clipping, thereby causing audio distortion, and it may also cause speaker damage, so DRC is needed to limit the output within a certain range.
[0077] However, in this signal processing process, the DRC has a reaction time (Attack Time) when it works, that is, when the amplified signal reaches the DRC, it cannot be immediately suppressed to the rated power, but needs a certain time to slowly suppress it to the rated power. As shown in Figure 3 The figure shows the relationship between signal gain and time in the prior art, where the horizontal axis represents time (Time), t1 to t2 represents the working time of the DRC, including Attack Time, and the vertical axis represents signal gain (Gain); from Figure 3 It can be seen that the reaction time of the DRC is not short. ForFigure 3 For example, we can obtain the following: Figure 4 The diagram shows a comparison of the input and output signals of a speaker in the prior art. In the diagram, (a) represents the waveform of the input signal and (b) represents the waveform of the output signal. Figure 4 It can be seen that during the reaction time, the output signal gradually weakens to the maximum power (Threshold).
[0078] Regarding the above example, in actual use, the signal output by the DRC during the Attack Time, after passing through the power amplifier, may experience clipping distortion due to power supply voltage limitations or excessive amplification gain set in pursuit of higher volume. This results in a hissing noise when listening to music with a wide dynamic range at high volume, which is particularly noticeable when listening to bass drum sounds or piano music. Figure 5 The schematic diagram shown illustrates the change of the signal from input to output. The input signal is amplified into a larger transient signal, and after DRC (Digital Reduction Control), it becomes a steady-state signal as shown in the diagram. Figure 5 It can be seen that the large signal exhibits clipping. In other words, although existing speakers can reproduce large transient signals with high volume, wide dynamic range, and deep bass, these large transient signals are prone to clipping distortion. While some methods exist to address this distortion, they are not universally applicable. Figure 5 The transient signal in the form of a large signal from the speaker at high volume either cannot be obtained in the same magnitude as the transient signal, or distortion still exists. Therefore, it is necessary to propose an audio signal processing method that preserves the transient large signal.
[0079] In the first embodiment, the method may include the following steps:
[0080] Step S100: Acquire transient audio signal.
[0081] Specifically, the speaker can receive input signals sent by external devices, as well as input signals generated and sent to the speaker by other components in the terminal device. This input signal is a transient audio signal, which can be input via wired or wireless means. For example, external electronic devices such as mobile phones or computers can send audio signals to the speaker on the terminal device via wireless communication or USB connection, and the speaker can then acquire the transient audio signal. Alternatively, the signal processing device in the terminal device can also generate and send audio signals to the speaker, enabling the speaker to acquire transient audio signals.
[0082] Step S200: Delay the transient audio signal to obtain a delayed audio signal.
[0083] Specifically, after the transient audio signal is acquired, the transient audio signal is subjected to delay processing, which can be specifically delay processing through a preset delay parameter, to obtain a delay-processed transient audio signal, i.e., a delay audio signal.
[0084] Delay processing of the transient audio signal facilitates subsequent operations, including transient value judgment, gain processing, and dynamic range compression processing.
[0085] Step S300: When a transient value of the delay audio signal exceeds a preset threshold, the delay audio signal is subjected to automatic gain processing to obtain a gain audio signal.
[0086] Specifically, the transient value refers to a transient amplitude of the delay audio signal. When the audio box detects that the transient value of the delay audio signal exceeds a preset threshold, the delay audio signal is subjected to automatic gain processing (AGC) to obtain a gain-processed transient signal, i.e., a gain audio signal. The preset threshold can be set by the audio box manufacturer according to the hardware structure parameters of the audio box or actual needs when the audio box is manufactured or developed.
[0087] Automatic gain processing can gain the signal amplitude to the maximum output range, so that the subsequent dynamic range compression processing is not clipped, and the output signal after subsequent power amplifier processing can also be prevented from exceeding the maximum range that the audio box can withstand.
[0088] It should be noted that when the delay audio signal is small, automatic gain processing can not be performed, because the final output signal generally does not exceed the maximum range that the audio box can withstand. However, when the delay audio signal is large, e.g., the transient value exceeds the preset threshold, the delay audio signal is subjected to automatic gain processing.
[0089] Step S400: The gain audio signal is subjected to dynamic range compression to obtain a first steady-state signal.
[0090] Specifically, when the gain audio signal is subjected to dynamic range compression (DRC), the working power of the audio box can be referred to for compression of the amplitude of the signal to limit it within a set range. If the signal output to the loudspeaker is too large, it will cause clipping, thereby causing audio distortion and possibly damaging the loudspeaker. Therefore, dynamic range compression is needed to limit the signal output to the loudspeaker within a certain range.
[0091] Step S500: The first steady-state signal is played through the audio box.
[0092] Specifically, the steady-state signal, i.e., a first steady-state signal, obtained after sequentially performing delay processing, automatic gain processing, and dynamic range compression on the input signal can be directly played out through a playback component of the sound box, wherein the playback component can include a power amplifier and a loudspeaker, and finally the sound is played through the loudspeaker.
[0093] In the second implementation, on the basis of the first implementation, step S200 can include:
[0094] Step S210: obtaining a volume adjustment signal generated by a user performing a volume increase operation.
[0095] Step S220: performing delay processing on the transient audio signal according to the volume adjustment signal to obtain a delay audio signal.
[0096] Specifically, while the sound box obtains the transient audio signal, it can also detect an operation performed on the sound box, such as an operation of increasing or decreasing the volume, etc. When the user performs the volume increase operation, the sound box detects the corresponding operation information and generates a volume adjustment signal, i.e., obtains the volume adjustment signal generated by the user performing the volume increase operation. Then, based on the volume adjustment signal, the transient audio signal is processed to obtain the transient audio signal after delay processing, i.e., the delay audio signal.
[0097] The signal processing method of the present embodiment is executed only after the user performs the volume increase operation, i.e., the starting condition of the method includes obtaining the transient audio signal and the volume adjustment signal. This can prevent the waste of system resources and computing power in some low-volume scenarios.
[0098] It should be noted that the generation of the volume adjustment signal can also be detecting the current volume of the sound box. If it is within the set range, a volume adjustment signal is generated accordingly. For example, the maximum volume of the sound box is 100, and the set range is 80-100. Assuming that the user has adjusted the volume last time, it can not be necessary to adjust the volume after starting the sound box this time, and it is not possible to generate a volume adjustment signal according to the user's volume increase operation. At this time, the current volume value can be directly detected. If the real-time volume value is detected to be 90, which is within the set range, a volume adjustment signal can be directly generated, so that the transient audio signal is processed based on the volume adjustment signal.
[0099] In the third implementation, on the basis of the first implementation or the second implementation, step S200 can include:
[0100] Step S230: performing multi-segment frequency division on the transient audio signal to obtain a plurality of segmented audio signals.
[0101] Step S240: for each segmented audio signal, delay processing is performed to obtain a corresponding delayed audio signal.
[0102] Specifically, on the basis of the first implementation, after obtaining the transient audio signal, the transient audio signal can be divided into multiple segments to obtain multiple segmented audio signals, for example, the transient audio signal is divided into high, medium and low three segments, that is, three segmented audio signals are obtained, which are high segment audio signal, medium segment audio signal and low segment audio signal. Then, for each segmented audio signal, subsequent operations are performed in turn, which specifically include delay processing, transient value detection, automatic gain processing and dynamic range compression.
[0103] The signal processing is performed in the frequency division segment, the automatic gain processing can be performed on one or several segmented audio signals, the gain processing process of other segmented audio signals can be omitted, and the speed of the signal processing method is improved; and the output sound of the later processing can be prevented from being large and small.
[0104] It can be understood that, on the basis of the second implementation, after obtaining the transient audio signal and the volume adjustment signal, the transient audio signal can be divided into multiple segments to obtain multiple segmented audio signals.
[0105] Further, after step S300, the method can further include:
[0106] Step A1: for each segmented audio signal, a corresponding gain audio signal is determined;
[0107] Step A2: superimposing the gain audio signals corresponding to all the segmented audio signals to obtain a superimposed audio signal;
[0108] Correspondingly, step S400 can include:
[0109] Step S410: performing dynamic range compression on the superimposed audio signal to obtain the first steady-state signal.
[0110] Specifically, after performing delay processing on each segmented audio signal to obtain a corresponding delayed audio signal, step S300 is executed, that is, for the delayed audio signal, if it is detected that the transient value exceeds the preset threshold, automatic gain processing is performed thereon to obtain a corresponding gain audio signal, that is, the gain audio signal corresponding to the segmented audio signal is determined. In combination with the above example, after the gain audio signals corresponding to the high segment audio signal, the medium segment audio signal and the low segment audio signal are respectively determined, the gain audio signals corresponding to the three segmented audio signals are superimposed to obtain a superimposed audio signal, that is, a superimposed audio signal. Subsequently, step S400 is normally executed, that is, dynamic range compression is performed on the superimposed audio signal to obtain the first steady-state signal.
[0111] The segmented signals are superimposed after delay processing and automatic gain processing in different frequency bands to obtain a superimposed signal, which facilitates more accurate determination of the maximum power when subsequent dynamic range compression is performed, thereby obtaining a more accurate steady-state signal; and can also prevent the bulging problem at the frequency division point.
[0112] In the fourth implementation, on the basis of any one of the first to third implementations, step S300 can include:
[0113] Step S310: determining whether the transient value of the delay audio signal exceeds a preset threshold value;
[0114] Step S320: if the transient value of the delay audio signal exceeds the preset threshold value, performing automatic gain processing on the delay audio signal to obtain a gain audio signal;
[0115] Step S330: if the transient value of the delay audio signal does not exceed the preset threshold value, directly performing dynamic range compression on the delay audio signal to obtain the first steady-state signal.
[0116] Specifically, the transient value of the delay audio signal is compared and detected to determine whether it exceeds a preset threshold value. If yes, the delay audio signal is subjected to automatic gain processing (AGC) to obtain a gain audio signal, and then step S400 is executed, i.e., the gain audio signal is subjected to dynamic range compression to obtain the first steady-state signal. If no, the delay audio signal is not subjected to AGC processing, but directly jumps to step S400, i.e., the delay audio signal obtained after delay processing is directly subjected to dynamic range compression to obtain the first steady-state signal.
[0117] Only the delay audio signal whose transient value exceeds the preset threshold value is subjected to AGC processing, and the delay audio signal whose transient value meets the preset threshold value is not subjected to AGC processing, which can prevent each transient signal from being subjected to the signal processing method of the embodiment, and avoid a complicated overall process.
[0118] Further, in the various embodiments described above, when step S300 performs automatic gain processing, the automatic gain calculation formula involved is:
[0119]
[0120] wherein G represents the automatic gain value; A represents the transient value of the delay audio signal; A ref represents the preset threshold value, which can be set according to actual needs.
[0121] In the fifth implementation, on the basis of any one of the first to fourth implementations, step S500 can include:
[0122] Step S510: performing power amplification on the first steady-state signal to obtain a second steady-state signal.
[0123] Step S520: playing the second steady-state signal through the loudspeaker of the sound box.
[0124] Specifically, before playing, the sound box can perform power amplification on the first steady-state signal obtained after DRC processing to obtain a second steady-state signal, and then play the second steady-state signal through the loudspeaker of the sound box. The function of the power amplifier is to amplify the weak signal and drive the sound box to play. The signal output by the method of the embodiment does not have the problem of transient distortion because there is no clipping, thereby improving the sound quality of the sound box playing, and thus improving the user experience.
[0125] In order to better illustrate the effect of the present application, comparative experiments are carried out by using the method of the prior art and the method of the present application respectively, and the signal schematic diagrams as shown in Figure 6-8 and the signal schematic diagrams as shown in Figure 9-12 are obtained. In the comparative experiment, the prior art sequentially performs DRC processing and power amplification on the signal received by the sound box, and in the embodiment, the sound box sequentially performs delay processing, AGC processing, DRC processing and power amplification on the signal received by the sound box. It is assumed that the signal input to the sound box is a digital signal of-3dBfs, the range is set to-9dBFS in the DRC processing, and the rated power output after power amplification is 8W (assuming that the loudspeaker impedance is 2Ω, the output voltage threshold is 4V, and the corresponding peak value is ).
[0126] Figure 6 is the input signal of the prior art, Figure 7 is the steady-state signal obtained after the prior art performs DRC processing on the input signal of Figure 6 , Figure 8 is the output signal obtained after the prior art performs power amplification on the steady-state signal of Figure 7 . As can be seen from Figure 6-8 , the transient voltage peak of the output signal is , and there is a transient clipping distortion.
[0127] Figure 9 is the transient audio signal obtained in step S100 of the method of the embodiment, Figure 10 is the gain audio signal obtained in step S300 of the method of the embodiment, Figure 11 is the first steady-state signal obtained in step S400 of the method of the embodiment, Figure 12 is the second steady-state signal obtained in step S510 of the method of the embodiment. As can be seen from Figure 9-12It can be seen that the transient voltage peak of the second steady-state signal after the power amplifier is 8V, which meets the setting requirement of the sound box, and no clipping is needed, that is, no clipping distortion occurs when the gain audio signal obtained after the automatic gain processing is-6dBfs, which sufficiently shows the necessity of the automatic gain processing in the embodiment.
[0128] The audio signal processing method provided in the embodiment realizes the purpose of playing after processing the received signal of the sound box, and achieves the effect of avoiding distortion of the transient signal. The method can ensure that the transient signal of the audio is not distorted, and can also ensure that the steady-state signal power output to the loudspeaker of the sound box is within the rated power range that the sound box can withstand.
[0129] Embodiment Two
[0130] Based on the same inventive concept, referring to Figure 13 and Figure 14 , the first embodiment of the audio signal processing system of the present application is proposed, which can be a virtual device or system and applied to the mainboard of the sound box.
[0131] The audio signal processing system provided in the embodiment will be described in detail below with reference to the functional module schematic diagram shown in Figure 13 . The system can include:
[0132] The signal acquisition module 10 is configured to acquire the transient audio signal.
[0133] The delay processing module 20 is configured to perform delay processing on the transient audio signal to obtain a delay audio signal.
[0134] The automatic gain module 30 is configured to perform automatic gain processing on the delay audio signal when the transient value of the delay audio signal exceeds a preset threshold to obtain a gain audio signal.
[0135] The steady-state processing module 40 is configured to perform dynamic range compression on the gain audio signal to obtain a first steady-state signal.
[0136] The audio playing module 50 is configured to play the first steady-state signal through the sound box.
[0137] Further, the delay processing module 20 can include:
[0138] The volume adjusting unit is configured to acquire a volume adjusting signal generated by the user performing a volume increasing operation.
[0139] The first delay unit is used to perform delay processing on the transient audio signal according to the volume adjustment signal to obtain a delayed audio signal.
[0140] Furthermore, the delay processing module 20 may also include:
[0141] The frequency division unit is used to divide the transient audio signal into multiple segments to obtain multiple segmented audio signals.
[0142] The second delay unit is used to perform delay processing on each segment of audio signal to obtain the corresponding delayed audio signal.
[0143] Furthermore, the system may also include:
[0144] The signal superposition unit 33 is used to determine the corresponding gain audio signal for each segmented audio signal, and to superimpose the gain audio signals corresponding to all segmented audio signals to obtain a superimposed audio signal.
[0145] Correspondingly, the steady-state processing module 40 is also used to perform dynamic range compression on the superimposed audio signal to obtain the first steady-state signal.
[0146] Furthermore, the automatic gain module 30 may include:
[0147] The judgment unit 31 is used to determine whether the transient value of the delayed audio signal exceeds a preset threshold.
[0148] The first execution unit is configured to perform automatic gain processing on the delayed audio signal to obtain a gained audio signal if the transient value of the delayed audio signal exceeds a preset threshold.
[0149] The second execution unit is used to directly perform dynamic range compression on the delayed audio signal to obtain the first steady-state signal if the transient value of the delayed audio signal does not exceed a preset threshold.
[0150] Furthermore, in the automatic gain module 30, the automatic gain calculation formula is as follows:
[0151]
[0152] Where G represents the automatic gain value; A represents the transient value of the delayed audio signal; A ref This indicates a preset threshold.
[0153] Furthermore, the audio playback module 50 may include:
[0154] A power amplification unit is used to amplify the power of the first steady-state signal to obtain a second steady-state signal;
[0155] The audio playing unit is configured to play the second steady-state signal through a loudspeaker of the sound box.
[0156] In the embodiment, as shown in the detailed connection diagram, Figure 14 The signal acquisition module 10 can be implemented by a receiver 11, the delay processing module 20 can be implemented by a delay timer 21, the automatic gain module 30 can be implemented by an AGC 32, the steady-state processing module 40 can be implemented by a DRC 41, and the audio playing module 50 can be implemented by a loudspeaker connected to the steady-state processing module 40.
[0157] Further, the volume adjusting unit in the delay processing module 20 can be implemented by a volume adjuster 12, the frequency dividing unit can be implemented by a frequency divider 13, and the first delay unit or the second delay unit can be implemented by the delay timer 21; the judging unit 31 in the automatic gain module 30 is connected to the delay timer 21, the first execution unit calls the AGC 32 and then executes the signal superposition unit 33 for the case that the result of the judging unit 21 is yes, and the second execution unit jumps to execute the signal superposition unit 33 for the case that the result of the judging unit 21 is no; the power amplification unit in the audio playing module 50 can be implemented by a power amplifier 51, and the second steady-state signal is output to the loudspeaker.
[0158] It should be noted that the functions that can be implemented by each module in the audio signal processing system provided in the embodiment and the technical effects achieved thereby can refer to the descriptions of the specific embodiments of the audio signal processing method of the present application, and will not be described herein for the sake of brevity.
[0159] Embodiment Three
[0160] Based on the same inventive concept, with reference to the hardware structure diagram, Figure 2 The embodiment provides a sound box, which can include a processor and a memory. The memory stores a signal processing program, and when the signal processing program is executed by the processor, all or part of the steps of the embodiments of the audio signal processing method are implemented.
[0161] It can be understood that the sound box can further include a communication bus, a user interface and a network interface. The communication bus is used to realize the connection and communication among these components; the user interface is used to connect a client and communicate data with the client, and the user interface can include an output unit such as a display screen and an input unit such as a keyboard; the network interface is used to connect a background server and communicate data with the background server, and the network interface can include an input / output interface, such as a standard wired interface and a wireless interface.
[0162] Memory is used to store various types of data, which may include, for example, instructions for any application or method in the speaker, as well as application-related data. Memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Random Access Memory (RAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. Optionally, memory can also be a processor-independent storage device.
[0163] The processor is used to call the signal processing program stored in the memory and execute the audio signal processing method as described above. The processor may be an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field-programmable gate array (FPGA), a controller, a microcontroller, a microprocessor, or other electronic components, and is used to execute all or part of the steps of the various embodiments of the audio signal processing method described above.
[0164] Those skilled in the art will understand that Figure 2 The hardware structure shown does not constitute a limitation on the speaker of the present invention, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0165] Example 4
[0166] Based on the same inventive concept, the embodiment provides a computer readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read only memory (ROM), a programmable read only memory (PROM), an erasable programmable read only memory (EPROM), an electrically erasable programmable read only memory (EEPROM), a magnetic memory, a magnetic disk, an optical disk, a server, etc., which stores a computer program. The computer program can be executed by one or more processors. When the computer program is executed by the processor, all or part of the steps of the embodiments of the audio signal processing method of the present application can be implemented.
[0167] It should be noted that the above-mentioned embodiment numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments. The above embodiments are only optional embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent flow conversion within the inventive concept of the present application, or direct or indirect application in other related technical fields, is included in the patent protection scope of the present application.
Claims
1. An audio signal processing method, characterized in that, Applied to a speaker, wherein the speaker is installed on a terminal device, the method includes: Acquire transient audio signals; The transient audio signal is delayed to obtain a delayed audio signal; When the transient value of the delayed audio signal exceeds a preset threshold, the delayed audio signal is subjected to automatic gain processing to obtain a gained audio signal. The gain audio signal is subjected to dynamic range compression to obtain a first steady-state signal; The first steady-state signal is played through the speaker; The step of delaying the transient audio signal to obtain a delayed audio signal includes: Acquire the volume adjustment signal generated when the user performs a volume increase operation; Based on the volume adjustment signal, the transient audio signal is delayed to obtain a delayed audio signal; The step of delaying the transient audio signal according to the volume adjustment signal to obtain a delayed audio signal includes: Based on the volume adjustment signal, the transient audio signal is divided into multiple segments to obtain multiple segmented audio signals; For each segment of the audio signal, a delay processing is performed to obtain the corresponding delayed audio signal.
2. The audio signal processing method as described in claim 1, characterized in that, After the step of performing automatic gain processing on the delayed audio signal to obtain a gained audio signal when the transient value of the delayed audio signal exceeds a preset threshold, the method further includes: For each segment of the audio signal, determine the corresponding gain audio signal; The superimposed audio signal is obtained by superimposing the gain audio signals corresponding to all segmented audio signals. The step of dynamically compressing the gain audio signal to obtain a first steady-state signal includes: The superimposed audio signal is subjected to dynamic range compression to obtain the first steady-state signal.
3. The audio signal processing method as described in claim 1, characterized in that, When the transient value of the delayed audio signal exceeds a preset threshold, automatic gain processing is performed on the delayed audio signal to obtain a gained audio signal, including: Determine whether the transient value of the delayed audio signal exceeds a preset threshold; If the transient value of the delayed audio signal exceeds a preset threshold, the delayed audio signal is subjected to automatic gain processing to obtain a gained audio signal. If the transient value of the delayed audio signal does not exceed the preset threshold, the delayed audio signal is directly subjected to dynamic range compression to obtain the first steady-state signal.
4. The audio signal processing method as described in claim 1, characterized in that, In the step of performing automatic gain processing on the delayed audio signal to obtain a gained audio signal when the transient value of the delayed audio signal exceeds a preset threshold, the automatic gain calculation formula involved is as follows: Where G represents the automatic gain value; A represents the transient value of the delayed audio signal; A ref This indicates a preset threshold.
5. The audio signal processing method as described in claim 1, characterized in that, Playing the first steady-state signal through the speaker includes: The first steady-state signal is amplified to obtain the second steady-state signal; The second steady-state signal is played through the speaker of the speaker.
6. An audio signal processing system, characterized in that, Applied to a speaker, the system includes: The signal acquisition module is used to acquire transient audio signals; The delay processing module is used to perform delay processing on the transient audio signal to obtain a delayed audio signal; An automatic gain module is used to perform automatic gain processing on the delayed audio signal to obtain a gained audio signal when the transient value of the delayed audio signal exceeds a preset threshold. The steady-state processing module is used to perform dynamic range compression on the gain audio signal to obtain a first steady-state signal; An audio playback module is used to play the first steady-state signal through the speaker; The delay processing module is also used to acquire the volume adjustment signal generated by the user performing a volume increase operation; and to perform delay processing on the transient audio signal according to the volume adjustment signal to obtain a delayed audio signal. The delay processing module is also used to perform multi-segment frequency division on the transient audio signal according to the volume adjustment signal to obtain multiple segmented audio signals; For each segment of the audio signal, a delay processing is performed to obtain the corresponding delayed audio signal.
7. A speaker, characterized in that, The speaker includes a processor and a memory, the memory storing a signal processing program, which, when executed by the processor, implements the audio signal processing method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by one or more processors, implements the audio signal processing method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Sound effect control method and device, television set and storage medium
CN109151562A
Signal processing method and device and loudspeaker
CN109151667A
Audio signal processing method, related device, loudspeaker device, and storage medium
WO2021138808A1