Audio compression method and apparatus

By adding a spectrum compensation filter before DRC, the audio signal is processed to compensate for the spectrum, which solves the problem of distortion during audio signal compression and achieves higher quality audio playback.

WO2026020511A1PCT designated stage Publication Date: 2026-01-29SHENZHEN GRANDSUN ELECTRONICS CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/109859
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-22
Filing Date
2024-08-05
Publication Date
2026-01-29

AI Technical Summary

Technical Problem

In existing technologies, audio signals are prone to distortion during compression, especially when audio signals of different amplitudes are compressed into the same dynamic range. The amplitude of some frequency bands exceeds the acoustic output threshold or the gain of high-volume frequency bands is excessively reduced, affecting audibility and equipment safety.

Method used

A spectrum compensation filter is added before the dynamic range compressor (DRC) to perform spectrum compensation processing on the audio signal, adjust the amplitude of the distortion frequency band, and then compress the signal by calculating the compression coefficient through the DRC to ensure that the signal is within the acoustic output threshold.

Benefits of technology

It reduces distortion during audio signal playback, improves playback quality, ensures that the gain of high-volume frequency bands is not significantly reduced, and adapts to the compression requirements of audio signals of different amplitudes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024109859_29012026_PF_FP_ABST
    Figure CN2024109859_29012026_PF_FP_ABST
Patent Text Reader

Abstract

The present application is applicable to the technical field of audio processing. Provided are an audio compression method and apparatus. The method comprises: acquiring a first audio signal to be processed; on the basis of a preset target spectrum, using a spectrum compensation filter to perform filtering processing on the first audio signal, so as to obtain a second audio signal, wherein the target spectrum is related to a distortion frequency band of an audio playing device; processing the second audio signal by means of a preset dynamic range compressor (DRC), so as to obtain a compression coefficient; and on the basis of the compression coefficient, outputting a compressed signal. The method can expand the compression range without significantly reducing the gain of high-volume frequency bands, thereby reducing the occurrences of distortion during audio signal playing, and improving playing quality.
Need to check novelty before this filing date? Find Prior Art

Description

Audio compression method and device

[0001] The present application claims priority to the Chinese patent application No. 202410983822.X, filed on July 22, 2024, and entitled "Audio compression method and device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application belongs to the technical field of audio processing, and in particular relates to an audio compression method and device. BACKGROUND

[0003] A dynamic range compressor (DRC) is a core audio processor in an audio playback device (such as a headphone, a sound system, a mobile phone, etc.), which is used to compress the dynamic range (i.e., the logarithm of the ratio of the maximum amplitude to the minimum amplitude of an audio signal) of the audio signal to be played to a specified dynamic range. That is, when the volume (i.e., the loudness) is large, the signal amplitude is attenuated to a threshold value (a compression coefficient set in the DRC), and when the volume is small, the signal amplitude is appropriately boosted to balance the volume of the audio signal. By reducing the dynamic range of the audio signal, the peak value of the audio signal is controlled to not exceed the acoustic output threshold of the audio playback device (i.e., the maximum digital signal output supported by the hardware of the audio playback device in the corresponding frequency band). Thus, the audio signal output by the audio playback device better adapts to the playback environment, improves the audibility, and at the same time avoids excessive and drastic volume differences in the audio signal, protecting the audio playback device from being damaged.

[0004] However, the amplitudes of different audio signals are not the same. When different amplitude audio signals are compressed to the same dynamic range, although the peak value of the audio signal with large amplitude is compressed within the acoustic output threshold, the amplitude of the part of the frequency band still exceeds the acoustic output threshold and cannot be adjusted, resulting in distortion of the part of the frequency band. If the compression range is simply expanded and the amplitude of the audio signal is reduced, the low frequency gain will be reduced at a large volume, which may also cause distortion and affect the audibility. SUMMARY

[0005] The present application provides an audio compression method and device, which can reduce the distortion of the audio signal during playback and improve the playback quality.

[0006] In a first aspect, the present application provides an audio compression method applied to an audio playback device, the method comprising:

[0007] obtaining a first audio signal to be processed;

[0008] Filter the first audio signal based on a preset target spectrum to obtain a second audio signal, the target spectrum being related to a distortion frequency band of the audio playback device;

[0009] Process the second audio signal through a preset dynamic range compressor (DRC) to obtain a compression coefficient;

[0010] Output a compressed signal according to the compression coefficient.

[0011] In a possible implementation, the first audio signal to be processed is obtained by:

[0012] Obtain an original audio signal to be played;

[0013] Input the original audio signal to be played into an audio effect processing module to obtain a third audio signal, the third audio signal being the first audio signal, and the audio effect processing module comprising at least one audio effect processor;

[0014] The output of the compressed signal according to the compression coefficient comprises:

[0015] Compress the third audio signal according to the compression coefficient to output the compressed signal.

[0016] In a possible implementation, the target spectrum and the spectrum compensation filter are obtained in the following manner:

[0017] Turn off the audio compensation filter, and after the audio effect processing module is debugged, detect the distortion frequency band of the audio playback device;

[0018] Determine the target spectrum according to the distortion frequency band;

[0019] Debug the spectrum compensation filter according to the target spectrum.

[0020] In a possible implementation, the target spectrum and the spectrum compensation filter are obtained in the following manner:

[0021] Turn off the audio compensation filter, and after the audio effect processing module is debugged, detect the acoustic output threshold curve of the audio playback device;

[0022] Determine a compression curve based on the difference between the acoustic output threshold curve and the frequency response curve of the audio signal output by the audio effect processing module;

[0023] Determine the target spectrum according to the compression curve;

[0024] Debug the spectrum compensation filter according to the target spectrum.

[0025] In a possible implementation, the first audio signal is an original audio signal to be played, or the first audio signal is an audio signal obtained by attenuating the original audio signal to be played according to a preset threshold.

[0026] In a possible implementation, the outputting of the compressed signal according to the compression coefficient includes:

[0027] compressing the original audio signal to be played according to the compression coefficient, and outputting the compressed signal;

[0028] The target frequency spectrum and the frequency spectrum compensation filter are obtained in the following manner:

[0029] turning off the audio compensation filter, and testing an acoustic output threshold curve of the audio playback device;

[0030] determining a compression curve based on the acoustic output threshold curve and an original audio signal used for debugging;

[0031] determining the target frequency spectrum according to the compression curve;

[0032] debugging the frequency spectrum compensation filter according to the target frequency spectrum.

[0033] In a possible implementation, the outputting of the compressed signal according to the compression coefficient includes:

[0034] inputting the original audio signal to be played into an audio effect processing module to obtain a third audio signal, the audio effect processing module including at least one audio effect processor;

[0035] compressing the third audio signal according to the compression coefficient, and outputting the compressed signal;

[0036] The target frequency spectrum and the frequency spectrum compensation filter are obtained in the following manner:

[0037] turning off the audio compensation filter and the audio effect processing module, and detecting an acoustic output threshold curve of the audio playback device;

[0038] determining a compression curve based on the acoustic output threshold curve and an original audio signal used for debugging;

[0039] determining the target frequency spectrum according to the compression curve;

[0040] debugging the frequency spectrum compensation filter according to the target frequency spectrum.

[0041] In a possible implementation, the determining of the compression curve based on the acoustic output threshold curve and the original audio signal used for debugging includes:

[0042] determine the compression curve based on a difference between the acoustic output threshold curve and a frequency response curve of the original audio signal used for debugging.

[0043] In a possible implementation, the determining of the compression curve based on the acoustic output threshold curve and the original audio signal used for debugging comprises:

[0044] determine the compression curve based on a difference between the acoustic output threshold curve and a frequency response curve of a fourth audio signal, the fourth audio signal being an audio signal obtained by attenuating the original audio signal used for debugging according to the preset threshold.

[0045] In a possible implementation, the sound effect processing module comprises an equalizer.

[0046] In a possible implementation, the debugging manner of the DRC is:

[0047] perform parameter debugging on the audio signal output by the audio compensation filter.

[0048] In a possible implementation, the spectrum compensation filter is an IIR filter or an FIR filter.

[0049] In a second aspect, the present application provides an audio playing device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor implements the method in the first aspect or any possible implementation manner of the first aspect when executing the computer program.

[0050] In a third aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executable on a processor to implement the method in the first aspect or any possible implementation manner of the first aspect.

[0051] In a fourth aspect, the present application provides a computer program product, and the computer program product is executable on a processor to implement the method in the first aspect or any possible implementation manner of the first aspect.

[0052] Compared with the prior art, the embodiments of the present application have the beneficial effects that the present application provides an audio compression method, and a spectrum compensation filter is added before a DRC. That is, the amplitude of an audio signal in a distortion frequency band corresponding region is first filtered, so that the frequency spectrum of the processed signal is a target frequency spectrum. The processed signal is input into the DRC to calculate a compression coefficient, and the compression coefficient is used to compress an audio signal to be output. In this way, the compression range can be expanded without significantly reducing the gain of a large volume frequency band, the distortion during playing can be reduced, and the playing quality can be improved. BRIEF DESCRIPTION OF DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor based on these drawings.

[0054] FIG. 1 is a schematic diagram of a framework of an audio processing system in the related art;

[0055] FIGS. 2 to 5 are schematic diagrams of compression effects of frequency response curves in the related art;

[0056] FIG. 6 is a schematic diagram of a flow of an audio compression method provided by an embodiment of the present application;

[0057] FIG. 7 is a schematic diagram of a framework of an audio processing system provided by an embodiment of the present application;

[0058] FIGS. 8 to 9 are schematic diagrams of compression effects of frequency response curves provided by an embodiment of the present application;

[0059] FIG. 10 is a schematic diagram of a comparison between a frequency response curve and an acoustic output threshold curve provided by an embodiment of the present application;

[0060] FIG. 11 is a schematic diagram of a compression curve provided by an embodiment of the present application;

[0061] FIG. 12 is a schematic diagram of a framework of an audio processing system provided by another embodiment of the present application;

[0062] FIG. 13 is a schematic diagram of a comparison between a frequency response curve and an acoustic output threshold curve provided by another embodiment of the present application;

[0063] FIG. 14 is a schematic diagram of a compression curve provided by another embodiment of the present application;

[0064] FIG. 15 is a schematic diagram of a framework of an audio processing system provided by yet another embodiment of the present application;

[0065] FIG. 16 is a schematic diagram of a structure of an audio compression device provided by an embodiment of the present application;

[0066] FIG. 17 is a schematic diagram of a structure of an audio playback device provided by an embodiment of the present application. Embodiments of the present application

[0067] As described in the background, the audio playing device generally adjusts the dynamic range of the audio signal through the DRC to achieve the loudness adjustment of the audio signal. In the related art, the DRC is generally arranged after the sound effect processor. The sound effect processor is used to adjust the acoustic effect of the audio signal, and different playing effects can be obtained by using different sound effect processors.

[0068] For example, the sound effect processor can include but is not limited to an equalizer, a reverb, a tone controller, a special effect processor, etc. Among them, the equalizer (EQ) is a set of filters in the audio playing device, which is used to adjust the frequency response curve of the original audio signal, so that the audio output by the audio playing device achieves the expected acoustic effect (for example, bass enhancement, treble enhancement, noise reduction, etc.). The reverb is used to make the audio output by the audio playing device have a spatial effect. The tone controller can change the timbre and / or tone of the original audio signal to achieve the function of changing the sound.

[0069] The acoustic structure design of different audio playing devices is different, so the sound effect processor obtained based on the reference standard of the target acoustic effect is also different.

[0070] For example, FIG. 1 is a schematic diagram of a commonly used audio processing system architecture in the prior art. The data obtained by processing the original audio signal through the equalizer (in this application, the audio signal output by the sound effect processor is referred to as the third audio signal) is input into the DRC for processing to obtain a corresponding compression coefficient, and then the third audio signal is compressed through the compression coefficient, and finally the compressed signal obtained by compression is sent to the loudspeaker for playing.

[0071] The DRC includes pre-adjusted compression parameters, for example, including but not limited to threshold, compression ratio, attack time, release time, etc. Based on the compression parameters, the DRC can determine the compression amount corresponding to each frequency band of the third audio signal. For example, when the gain (unit: dBFs) of the third audio signal exceeds the threshold, the DRC starts compression within the attack time, and attenuates the gain of the corresponding frequency band in the third audio signal below the threshold according to the compression ratio, thereby determining the compression amount of the frequency band. Until the gain of the third audio signal is lower than the threshold, the DRC releases the compression within the release time. The compression coefficient at least includes the compression amount corresponding to each frequency band in the third audio signal whose gain exceeds the threshold.

[0072] For example, as shown in FIG. 2, assuming that the threshold value in the DRC is -5 dBFs, the curve a is the frequency response curve of the third audio signal (wherein the abscissa is the frequency and the ordinate is the gain), wherein the gain corresponding to 45 Hz-80 Hz exceeds -5 dBFs, then the gain corresponding to 45 Hz-80 Hz in the third audio signal is compressed based on the compression coefficient output by the DRC, and the frequency response curve of the compression signal 1 obtained after compression is shown by the curve b, and the gain corresponding to 45 Hz-80 Hz in the compression signal 1 is compressed to below -5 dBFs. As shown in FIG. 3, assuming that the dashed line represents the acoustic output threshold curve of the audio playback device, then in an ideal state, the gain of the compression signal 1 obtained after the processing of the equalizer and the DRC in each frequency band should not exceed the acoustic output threshold of the audio playback device.

[0073] However, since the compression parameter of the DRC is a fixed value obtained by debugging, it is difficult to meet the compression effect of a large number of audio signals with different amplitudes. Moreover, since the maximum digital signal allowed to be output by the audio playback device fluctuates in the entire frequency band rather than being a fixed value, that is, the acoustic output threshold often presents a curve with the change of frequency (for example, as shown in the acoustic output threshold curve in FIG. 3), which is different from the threshold value in the DRC. Therefore, after a large-amplitude audio signal is compressed, the gain corresponding to each frequency band may not exceed the threshold value in the DRC, but the gain corresponding to part of the frequency bands still exceeds the acoustic output threshold, resulting in distortion during playback.

[0074] For example, as shown in FIG. 4, compared with the original audio signal of the compression signal 1, a larger-amplitude audio signal is processed by the equalizer and the DRC to obtain a compression signal 2. Although the gain corresponding to the large-volume frequency band (for example, 45 Hz-80 Hz as shown in FIG. 4) of the compression signal 2 is compressed by the DRC to be within the acoustic output threshold, the adjacent frequency bands (for example, 35 Hz and 100 Hz) of the large-volume frequency band are not compressed because they do not exceed the threshold value of the DRC, and thus still exceed the acoustic output threshold of the audio playback device corresponding to the adjacent frequency bands, resulting in distortion of the audio signal output in the adjacent frequency bands.

[0075] In some schemes, in order to compress the gain of all frequency bands of the audio signal to be within the acoustic output threshold, a larger compression range is used. For example, as shown in FIG. 5, the threshold value in the DRC is set to -6 dBFs, and a larger-amplitude audio signal is processed by the equalizer and the DRC to obtain a compression signal 3. As can be seen, compared with the compression signal 2 shown in FIG. 4, the gain of the compression signal 3 in all frequency bands does not exceed the corresponding acoustic output threshold, but the gain of the large-volume frequency band is reduced by a larger amplitude, resulting in insufficient listening and possibly causing distortion in the large-volume frequency band.

[0076] To this end, the application provides an audio compression method, which can expand the compression range without significantly reducing the gain of the large volume frequency band, reduce the distortion during playing, and improve the playing quality.

[0077] Please refer to FIG. 6, which is a flowchart of an audio compression method provided by an embodiment of the application. The audio compression method is applied to an audio playing device, which can be a headset, a sound system, or any electronic device (for example, a mobile phone, a computer, a tablet, a television, etc.) that can play audio or video containing audio. As shown in FIG. 6, the audio compression method provided by the application can include the following steps:

[0078] S601, obtaining a first audio signal to be processed.

[0079] The first audio signal can be a third audio signal output by an audio effect processor, an original audio signal to be played, or a signal obtained by attenuating the original audio signal to be played.

[0080] S602, applying a spectrum compensation filter to the first audio signal based on a preset target spectrum to obtain a second audio signal, the target spectrum being related to a distortion frequency band of the audio playing device.

[0081] The application adds a spectrum compensation filter before the DRC to filter the first audio signal to be input into the DRC for processing, and adjusts the amplitude of the first audio signal corresponding to the distortion frequency band of the audio playing device, so that the spectrum of the second audio signal obtained by the adjustment is the target spectrum.

[0082] The spectrum compensation filter can be any filter that can attenuate the amplitude of a digital signal, for example, an infinite impulse response (IIR) filter or a finite impulse response (FIR) filter.

[0083] The distortion frequency band of the audio playing device refers to the frequency range in which distortion occurs when the audio playing device plays a sweep signal (i.e., a pure tone signal with the largest amplitude) at the maximum volume (i.e., the amplitude is 0 dBFS). The filtering range of the spectrum compensation filter can be the same as or contain the distortion frequency band. The actual compression effect can be adjusted adaptively according to the requirements.

[0084] In the embodiment of the application, the amplitude corresponding to the distortion frequency band in the first audio signal is compressed after the spectrum compensation filter is applied to the first audio signal, that is, compared with the spectrum of the first audio signal, the spectrum of the second audio signal is more flat in the waveform corresponding to the distortion frequency band.

[0085] S603, processing the second audio signal by the preset DRC to obtain a compression coefficient.

[0086] In the embodiments of the present application, since the spectral compensation filter is added before the DRC, the parameters (such as threshold, compression rate, effective time, release time, etc.) in the DRC are debugged according to the audio signal output by the spectral compensation filter. Since the waveform of the audio signal processed by the spectral compensation filter is smoother, the DRC debugged can obtain a larger compression range when calculating the compression coefficient corresponding to the second audio signal.

[0087] S604, obtaining an output compressed signal according to the compression coefficient.

[0088] In the embodiments of the present application, after the audio playing device obtains the compression coefficient corresponding to the second audio signal, the audio playing device can compress the audio signal to be played to obtain a compressed signal. For example, when the audio processing system of the audio playing device is provided with an audio effect processor, the audio playing device can compress the audio signal output by the audio effect processor by using the compression coefficient to obtain a compressed signal. When the audio processing system does not have an audio effect processor, the audio playing device can compress the original audio signal to be played by using the compression coefficient to obtain a compressed signal. The obtained compressed signal will be sent to the loudspeaker of the audio playing device for playing.

[0089] The audio compression method provided in the embodiments of the present application adds a spectral compensation filter before the DRC, first performs spectral compensation on the first audio signal, filters the amplitude of the first audio signal in the corresponding area of the distortion frequency band, inputs the processed signal into the DRC to calculate the compression coefficient, and when the compression coefficient is used to compress the audio signal to be output, the compression range can be expanded without significantly reducing the gain of the large volume frequency band, the distortion during playing can be reduced, and the playing quality can be improved.

[0090] The audio compression method provided in the embodiments of the present application will be exemplarily described in the following specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in some embodiments.

[0091] In addition, the DRC, the audio effect processor, and the filter in the present application are all concepts well known to those skilled in the art, and the parameter debugging method and the signal processing flow are also well known to those skilled in the art. Therefore, the specific debugging process of the DRC, the audio effect processor, and the filter and the signal processing flow are not specifically given in the present application.

[0092] For the audio processing system including the audio effect processor, in one example, the spectral compensation filter can be arranged between the audio effect processor and the DRC, and the first audio signal can be the third audio signal output by the audio effect processor.

[0093] For example, the audio processing system can include an audio effect processing module, a spectrum compensation filter, a DRC and a compression module as shown in FIG. 7. The audio effect processing module includes at least one audio effect processor, such as an equalizer, a reverb, a tone controller, a special effect processor, etc.

[0094] After the original audio signal to be played is input to the audio processing system, it is first processed by the audio effect processing module to obtain a third audio signal. The third audio signal is input to the compression module and the spectrum compensation filter. The spectrum compensation filter performs spectrum compensation on the third audio signal output by the audio effect processing module, adjusts the amplitude of the third audio signal in the corresponding area of the distortion frequency band, and obtains a second audio signal. The second audio signal is input to the DRC, and the compression coefficient corresponding to the second audio signal is calculated according to the parameters obtained by pre-adjustment. The obtained compression coefficient is input to the compression module, and the compression module uses the compression coefficient to compress the third audio signal to be output to obtain a compressed signal, which is sent to the loudspeaker for playing.

[0095] For example, assuming that the distortion frequency band of the audio playback device is 30Hz-100Hz, and the filter range of the spectrum compensation filter is 20Hz-200Hz, as shown in FIG. 8, compared with the frequency response curve of the third audio signal output by the audio effect processor, the frequency response curve of the second audio signal obtained after the spectrum compensation filter performs spectrum compensation on the third audio signal is relatively flat in the waveform corresponding to the distortion frequency band.

[0096] It can be understood that in the embodiments of the present application, the parameters in the DRC are obtained by adjusting the audio signal output by the spectrum compensation filter. Since the audio signal output by the spectrum compensation filter has a waveform corresponding to the distortion frequency band that is flatter than the audio signal output by the audio effect processor, the DRC obtained by adjustment can obtain a larger compression range when calculating the compression coefficient.

[0097] For example, as shown in FIG. 8, the threshold B obtained by adjusting the audio signal output by the audio effect processor is greater than the threshold A obtained by adjusting the audio signal output by the spectrum compensation filter. It can be seen that when the compression coefficient corresponding to the third audio signal is calculated by the threshold B, the compression range is 35Hz to 100Hz. When the compression coefficient corresponding to the second audio signal is calculated by the threshold A, the compression range is 20Hz to 200Hz. That is, due to the change of the spectrum of the audio signal input to the DRC, the compression range of the DRC becomes larger.

[0098] Taking the amplitude corresponding to 100Hz as an example, the amplitude corresponding to 100Hz is attenuated from y1 to y2 after compensation by the spectrum compensation filter. When the third audio signal is input into the DRC to calculate the corresponding compression coefficient, the compression amount gain is 0 because the amplitude corresponding to 100Hz of the third audio signal does not exceed the threshold B. When the compression module compresses the third audio signal by using the compression coefficient, the amplitude corresponding to 100Hz will not be compressed.

[0099] When the second audio signal is input into the DRC to calculate the corresponding compression coefficient, the compression amount gain is y2-A because the amplitude corresponding to 100Hz of the second audio signal exceeds the threshold A. After the compression module compresses the third audio signal by using the compression coefficient, the amplitude corresponding to 100Hz of the compressed signal is:

[0100] y1-gain=y1-(y2-A)

[0101] It can be seen that, due to the expansion of the compression range, the third audio signal obtains more compression amount in the corresponding region of the distortion frequency band, thereby further ensuring that the amplitude of the compressed signal in the distortion frequency band is within the range limited by the acoustic output threshold, and reducing the distortion of the compressed signal when playing.

[0102] As shown in FIG. 9, it is a comparison diagram between the frequency response curves (the curves c1, d1, e1 and f1 shown in (a) of FIG. 9) obtained by using the audio processing system shown in FIG. 1 to compress the original audio signals with different amplitudes to be played, and the frequency response curves (the curves c2, d2, e2 and f2 shown in (b) of FIG. 9) obtained by using the audio processing system provided by the present application to compress the original audio signals with different amplitudes to be played, and the acoustic output threshold curve. It can be seen that the compressed signals obtained by using the audio processing system provided by the present application are all compressed within the acoustic output threshold. And because the spectrum of the second audio signal in the distortion frequency band corresponds to a waveform that is more flat, the compression amount calculated by the DRC changes slightly with the frequency, thereby ensuring that the gain of the large volume frequency band is not significantly reduced, and ensuring the loudness of the large audio frequency band.

[0103] For the audio processing system as shown in FIG. 7, when debugging the spectrum compensation filter, the spectrum compensation filter can be closed first, and the sound effect processing module is debugged. After the sound effect processing module is debugged, the distortion frequency band of the audio playing device is detected, i.e., the frequency range of the sweep signal played at the maximum volume is detected to determine the target spectrum (i.e., the spectrum that can make the output signal in the distortion frequency band not exceed the acoustic output threshold). The initial filtering range of the spectrum compensation filter is set according to the target spectrum. Then, the spectrum compensation filter is started, the original audio signal used for debugging is input into the audio processing system, and the compressed signal output by the audio processing system is detected. According to the detection result, the filtering range of the spectrum compensation filter is adjusted to obtain the final filtering range of the spectrum compensation filter, and the spectrum compensation filter is debugged.

[0104] Alternatively, after the sound effect processing module is debugged, the acoustic output threshold curve of the audio playing device can be detected, and the compression curve can be determined based on the difference between the acoustic output threshold curve and the frequency response curve of the audio signal output by the sound effect processing module. For example, the frequency response curve of the audio signal (indicated as F1 in the figure) output by the sound effect processing module after the original audio signal used for debugging is processed by the modulated sound effect processing module, and the acoustic output threshold curve of the audio playing device can be as shown in FIG. 10. The compression curve as shown in FIG. 11 can be obtained by subtracting the frequency response curve from the acoustic output threshold curve. It can be understood that the compression curve represents the frequency band of the audio signal output by the sound effect processing module that needs to be compressed, i.e., the distortion frequency band of the audio playing device.

[0105] Then, the target spectrum can be set according to the compression curve. The initial filtering range of the spectrum compensation filter is set according to the target spectrum, the filtering range is adjusted by repeatedly testing the compression effect of the compressed signal, the final filtering range of the spectrum compensation filter is determined, and the spectrum compensation filter is debugged.

[0106] In another example, the spectrum compensation filter can also be set independently of the sound effect processor. The first audio signal can be the original audio signal to be played. Alternatively, considering that the maximum amplitude of the audio signal that can be processed by most audio playing devices cannot be greater than 0 dBFS, and the amplitude of some original audio signals in some frequency band range can be greater than 0 dBFS, the first audio signal can also be a signal obtained by attenuating the original audio signal to be played in all frequency bands. In this case, the waveform of the frequency response curve of the first audio signal is the same as the waveform of the frequency response curve of the original audio signal to be played.

[0107] For example, the audio processing system can also include an audio effect processing module, a spectrum compensation filter, an attenuation module, a DRC and a compression module as shown in FIG. 12. After the original audio signal to be played is input into the audio processing system, it is input into the attenuation module and the audio effect processing module respectively. The attenuation module first attenuates the original audio signal to be played according to a preset threshold to obtain a first audio signal. The spectrum compensation filter performs spectrum compensation on the first audio signal, adjusts the amplitude of the first audio signal in the corresponding area of the distortion frequency band to obtain a second audio signal. The second audio signal is input into the DRC, and the compression coefficient corresponding to the second audio signal is calculated according to the parameters obtained in advance. After the original audio signal to be played is processed by the audio effect processing module, a third audio signal is obtained. The obtained compression coefficient and the third audio signal are input into the compression module, and the compression module compresses the third audio signal to be output by using the compression coefficient to obtain a compressed signal, which is sent to a loudspeaker for playing.

[0108] When debugging the spectrum compensation filter, the acoustic output threshold curve of the audio playback device can be detected with the audio compensation filter and the audio effect processing module turned off. The original audio signal used for debugging is input into the audio processing system, and the attenuation module attenuates the original audio signal used for debugging according to a preset threshold to obtain a fourth audio signal. The compression curve is determined based on the difference between the acoustic output threshold curve and the frequency response curve of the fourth audio signal.

[0109] For example, as shown in FIG. 13, the frequency response curve of the fourth audio signal is subtracted from the acoustic output threshold curve of the audio playback device to obtain the compression curve as shown in FIG. 14. It can be understood that the compression curve represents the frequency band in which the original audio signal needs to be compressed, i.e., the distortion frequency band of the audio playback device.

[0110] Alternatively, the frequency response curve of the original audio signal used for debugging in the audio processing system can also be directly obtained, and the compression curve can be determined according to the difference between the acoustic output threshold curve and the frequency response curve of the original audio signal.

[0111] After obtaining the compression curve, the target spectrum can be set according to the compression curve, and the initial filtering range of the spectrum compensation filter can be set according to the target spectrum. The filtering range can be adjusted by repeatedly testing the compression effect of the compressed signal to determine the final filtering range of the spectrum compensation filter, and a debugged spectrum compensation filter is obtained.

[0112] It is worth mentioning that in the audio processing system shown in FIG. 7, the parameters of the spectral compensation filter change based on the change of the parameters in the sound effect processor. In the audio processing system shown in FIG. 12, the sound effect processor and the spectral compensation filter can be debugged separately, and the change of the parameters in the sound effect processor does not affect the spectral compensation filter, avoiding the need to modify the spectral compensation filter synchronously when adjusting the parameters of the sound effect processor.

[0113] In another scenario, no sound effect processor can be set in the audio processing system. The first audio signal can be the original audio signal to be played, or the first audio signal can be a signal obtained by attenuating the original audio signal to be played in all frequency bands.

[0114] As shown in FIG. 15, another audio processing system provided by the present application includes a spectral compensation filter, an attenuation module, a DRC, and a compression module. After the original audio signal to be played is input into the audio processing system, it is input into the attenuation module and the compression module respectively. The attenuation module first attenuates the original audio signal to be played according to a preset threshold to obtain a first audio signal. The spectral compensation filter performs spectral compensation on the first audio signal to obtain a second audio signal. The second audio signal is input into the DRC, and a compression coefficient corresponding to the second audio signal is calculated according to the parameters obtained by pre-debugging. The obtained compression coefficient is input into the compression module, and the compression module compresses the original audio signal to be played to be output by using the compression coefficient to obtain a compressed signal, which is sent to a loudspeaker for playing.

[0115] Correspondingly, when debugging the spectral compensation filter, the acoustic output threshold curve of the audio playback device can be detected with the audio compensation filter turned off. The original audio signal used for debugging is input into the audio processing system, and the attenuation module attenuates the original audio signal used for debugging according to the preset threshold to obtain a fourth audio signal. The compression curve is determined based on the difference between the acoustic output threshold curve and the frequency response curve of the fourth audio signal. Alternatively, the compression curve is directly determined according to the difference between the frequency response curve of the original audio signal in the audio processing system and the acoustic output threshold curve. Then, the target spectrum can be set according to the compression curve, and the initial filtering range of the spectral compensation filter can be set according to the target spectrum. The filtering range is adjusted by repeatedly testing the compression effect of the compressed signal to determine the final filtering range of the spectral compensation filter, and a debugged spectral compensation filter is obtained.

[0116] As can be seen from the above, by adding the spectral compensation filter before the DRC, the compression range can be expanded without significantly reducing the gain of the high-volume frequency band, and the distortion of the compressed signal during playing is reduced.

[0117] Based on the same inventive concept, as an implementation of the method, the embodiment of the application provides an audio compression device, the device embodiment corresponds to the method embodiment, for the convenience of reading, the details of the method embodiment will not be described one by one, but it should be clear that the device in the embodiment can correspondingly implement all the contents in the method embodiment.

[0118] Fig. 16 is a structural schematic diagram of an audio compression device provided by the embodiment of the application, as shown in Fig. 16, the device provided by the embodiment includes:

[0119] An acquisition unit is configured to acquire a first audio signal to be processed;

[0120] A spectrum compensation unit is configured to perform filtering processing on the first audio signal input based on a preset target spectrum to obtain a second audio signal, and the target spectrum is related to a distortion frequency band of the audio playback device;

[0121] A dynamic range compression unit is configured to process the second audio signal to obtain a compression coefficient;

[0122] A compression unit is configured to output a compressed signal according to the compression coefficient.

[0123] Optionally, the acquisition of the first audio signal to be processed includes:

[0124] An original audio signal to be played is acquired;

[0125] The original audio signal to be played is input into an audio effect processing module for processing to obtain a third audio signal, the third audio signal is taken as the first audio signal, and the audio effect processing module includes at least one audio effect processor;

[0126] The output of the compressed signal according to the compression coefficient includes:

[0127] The third audio signal is compressed according to the compression coefficient to output the compressed signal.

[0128] Optionally, the acquisition method of the target spectrum and the spectrum compensation filter includes:

[0129] The audio compensation filter is closed, and after the audio effect processing module is debugged, the distortion frequency band of the audio playback device is detected;

[0130] The target spectrum is determined according to the distortion frequency band;

[0131] The spectrum compensation filter is debugged according to the target spectrum.

[0132] Optionally, the acquisition method of the target spectrum and the spectrum compensation filter includes:

[0133] close the audio compensation filter, and detect the acoustic output threshold curve of the audio playing device after debugging the sound effect processing module;

[0134] determine a compression curve based on the difference between the acoustic output threshold curve and the frequency response curve of the audio signal output by the sound effect processing module;

[0135] determine the target frequency spectrum according to the compression curve;

[0136] obtain the frequency spectrum compensation filter according to the target frequency spectrum.

[0137] Optionally, the first audio signal is an original audio signal to be played, or the first audio signal is an audio signal obtained by attenuating the original audio signal to be played according to a preset threshold.

[0138] Optionally, the outputting of the compressed signal according to the compression coefficient includes:

[0139] compressing the original audio signal to be played according to the compression coefficient, and outputting the compressed signal;

[0140] the target frequency spectrum and the frequency spectrum compensation filter are obtained in the following manner:

[0141] close the audio compensation filter, and test the acoustic output threshold curve of the audio playing device;

[0142] determine a compression curve based on the acoustic output threshold curve and the original audio signal used for debugging;

[0143] determine the target frequency spectrum according to the compression curve;

[0144] obtain the frequency spectrum compensation filter according to the target frequency spectrum.

[0145] Optionally, the outputting of the compressed signal according to the compression coefficient includes:

[0146] input the original audio signal to be played into a sound effect processing module to obtain a third audio signal, the sound effect processing module including at least one sound effect processor;

[0147] compress the third audio signal according to the compression coefficient, and output the compressed signal;

[0148] the target frequency spectrum and the frequency spectrum compensation filter are obtained in the following manner:

[0149] close the audio compensation filter and the sound effect processing module, and detect the acoustic output threshold curve of the audio playing device;

[0150] determining a compression curve based on the acoustic output threshold curve and the original audio signal used for the tuning;

[0151] determining the target spectrum according to the compression curve;

[0152] tuning the spectral compensation filter according to the target spectrum.

[0153] Optionally, the determining of the compression curve based on the acoustic output threshold curve and the original audio signal used for the tuning comprises:

[0154] determining the compression curve based on a difference between the acoustic output threshold curve and a frequency response curve of the original audio signal used for the tuning.

[0155] Optionally, the determining of the compression curve based on the acoustic output threshold curve and the original audio signal used for the tuning comprises:

[0156] determining the compression curve based on a difference between the acoustic output threshold curve and a frequency response curve of a fourth audio signal, the fourth audio signal being an audio signal obtained by attenuating the original audio signal used for the tuning according to the preset threshold.

[0157] Optionally, the sound effect processing module comprises an equalizer.

[0158] Optionally, the tuning manner of the dynamic range compression unit is:

[0159] performing parameter tuning according to the audio signal output by the audio compensation filter unit.

[0160] Optionally, the spectral compensation filter unit is an IIR filter or an FIR filter.

[0161] The audio compression device provided by the embodiment can execute the method embodiment described above, and has similar implementation principles and technical effects, which will not be described herein again.

[0162] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is exemplified, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to complete all or part of the above described functions. Each functional unit or module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, 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. In addition, the specific names of each functional unit or module are only for convenient distinction, and do not limit the protection scope of the present application. The specific working process of the unit or module in the system can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0163] Based on the same inventive concept, the embodiments of the present application also provide an audio playback device. Fig. 17 is a structural schematic diagram of an audio playback device provided by the embodiments of the present application. As shown in Fig. 17, the audio playback device provided by the embodiments of the present application comprises a memory 210 and a processor 220. The memory 210 is configured to store a computer program. The processor 220 is configured to execute the method provided in the above method embodiments when the computer program is invoked.

[0164] The audio playback device provided by the embodiments of the present application can execute the above method embodiments, and the implementation principles and technical effects are similar, which will not be repeated here.

[0165] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the method provided in the above method embodiments.

[0166] The embodiments of the present application also provide a computer program product. When the computer program product runs on an audio playback device, the audio playback device executes the method provided in the above method embodiments.

[0167] In the embodiments described above, all or part of the processes can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the processes can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes described in the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transmitted by the computer readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, hard disk or magnetic tape), optical media (such as DVD), or semiconductor media (such as solid state disk (SSD)), etc.

[0168] Those of ordinary skill in the art can understand that all or part of the processes in the above-described embodiments can be implemented by a computer program instructing relevant hardware, which can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-described embodiments.

[0169] In the above-described embodiments, the description of each embodiment focuses on different aspects. The parts not described in detail or recorded in a certain embodiment can be referred to the relevant description of other embodiments.

[0170] In the embodiments provided in the present application, it should be understood that the disclosed devices / apparatuses and methods can be implemented by other means. For example, the device / apparatus embodiments described above are only schematic, and 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 omitted or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed elements can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0171] It should be understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0172] In the description of the application, unless otherwise specified, " / " means that the objects before and after are in a "or" relationship, for example, A / B can mean A or B; "and / or" in this application is only a description of the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, A and / or B, which can mean: A exists alone, A and B exist together, B exists alone, and A, B can be singular or plural.

[0173] And, in the description of the application, unless otherwise specified, "multiple" means two or more than two. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple.

[0174] As used in the specification and the appended claims, the term "if" can be interpreted as meaning "when" or "once" or "in response to a determination" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if [a described condition or event] is detected" can be interpreted as meaning "once it is determined" or "in response to the determination" or "once [a described condition or event] is detected" or "in response to detecting [a described condition or event]" depending on the context.

[0175] In addition, in the description of the specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0176] In the description of the application, the reference "one embodiment" or "some embodiments" and the like means that the specific features, structures or characteristics described in connection with the embodiment are included in one or more embodiments of the application. Therefore, the statements "in one embodiment", "in some embodiments", "in other some embodiments", "in other some embodiments" and the like appearing in different places in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized.

[0177] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. An audio compression method applied to an audio playing device, characterized in that, The method comprises: acquiring a first audio signal to be processed; applying a spectrum compensation filter based on a preset target spectrum to the first audio signal to obtain a second audio signal, the target spectrum being related to a distortion frequency band of the audio playback device; processing the second audio signal through a preset dynamic range compressor (DRC) to obtain a compression coefficient; outputting a compressed signal according to the compression coefficient.

2. The method of claim 1, wherein, The acquiring of the first audio signal to be processed comprises: acquiring an original audio signal to be played; inputting the original audio signal to be played into an audio effect processing module to obtain a third audio signal, the third audio signal being used as the first audio signal, the audio effect processing module comprising at least one audio effect processor; The outputting of the compressed signal according to the compression coefficient comprises: compressing the third audio signal according to the compression coefficient to output the compressed signal.

3. The method of claim 2, wherein, The acquisition of the target spectrum and the spectrum compensation filter comprises: turning off the audio compensation filter, detecting the distortion frequency band of the audio playback device after the audio effect processing module is debugged; determining the target spectrum according to the distortion frequency band; debugging the spectrum compensation filter according to the target spectrum.

4. The method of claim 2, wherein, The acquisition of the target spectrum and the spectrum compensation filter comprises: turning off the audio compensation filter, detecting the acoustic output threshold curve of the audio playback device after the audio effect processing module is debugged; determining a compression curve based on the difference between the acoustic output threshold curve and the frequency response curve of the audio signal output by the audio effect processing module; determining the target spectrum according to the compression curve; debugging the spectrum compensation filter according to the target spectrum.

5. The method of claim 1, wherein, The first audio signal is the original audio signal to be played, or the first audio signal is an audio signal obtained by attenuating the original audio signal to be played according to a preset threshold.

6. The method of claim 5, wherein, The outputting of the compressed signal according to the compression coefficient comprises: compressing the original audio signal to be played according to the compression coefficient to output the compressed signal; The acquisition of the target spectrum and the spectrum compensation filter comprises: turning off the audio compensation filter, testing the acoustic output threshold curve of the audio playback device; determining a compression curve based on the acoustic output threshold curve and the original audio signal used for debugging; determining the target spectrum according to the compression curve; debugging the spectrum compensation filter according to the target spectrum.

7. The method of claim 5, wherein, The outputting of the compressed signal according to the compression coefficient comprises: inputting the original audio signal to be played into an audio effect processing module to obtain a third audio signal, the audio effect processing module comprising at least one audio effect processor; compressing the third audio signal according to the compression coefficient to output the compressed signal; The acquisition of the target spectrum and the spectrum compensation filter comprises: turning off the audio compensation filter and the audio effect processing module, detecting the acoustic output threshold curve of the audio playback device; determining a compression curve based on the acoustic output threshold curve and the original audio signal used for debugging; determining the target spectrum according to the compression curve; debugging the spectrum compensation filter according to the target spectrum.

8. The method according to claim 6 or 7, characterized in that, determining a compression curve based on the acoustic output threshold curve and an original audio signal used for debugging, including: determining the compression curve based on a difference between the acoustic output threshold curve and a frequency response curve of the original audio signal used for debugging.

9. The method according to claim 6 or 7, characterized in that, determining a compression curve based on the acoustic output threshold curve and an original audio signal used for debugging, including: determining the compression curve based on a difference between the acoustic output threshold curve and a frequency response curve of a fourth audio signal, the fourth audio signal being an audio signal obtained by attenuating the original audio signal used for debugging according to the preset threshold.

10. The method of any one of claims 2-4, 7, wherein, The sound effect processing module includes an equalizer.

11. The method according to any one of claims 1 to 7, characterized in that, The debugging mode of the DRC is: performing parameter debugging according to an audio signal output by the audio compensation filter.

12. The method according to any one of claims 1 to 7, characterized in that, The spectrum compensation filter is an infinite impulse response (IIR) filter or a finite impulse response (FIR) filter.

13. An audio playback device, comprising: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 12 when executing the computer program.

14. A computer-readable storage medium, the computer-readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to implement the method of any one of claims 1 to 12.

15. A computer program product, characterised in that, The computer program product includes a computer program, which is executed by the processor to implement the method of any one of claims 1 to 12.

Citation Information

Patent Citations

  • Method for processing signal and system for processing audio signal

    CN101800051A

  • A digital compressor for compressing an audio signal

    CN105612692A

  • Audio signal enhancement method and device, storage medium and processor

    CN111970628A

  • Personalized loudness compensation method and device, computer equipment and storage medium

    CN116778949A

  • Device and Method for Tuning a Frequency-Dependent Attenuation Stage

    US20170061982A1