Tuning method, device, equipment and medium
By acquiring the DRC processing results and performing peak suppression parameter settings based on the speaker power parameters, the maximum value of the audio signal time-domain waveform is compressed, solving the problem of distortion in speaker tuning and achieving efficient and high-quality audio signal output.
Patent Information
- Application Number
- CN202410497246.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2025-10-24
AI Technical Summary
Existing technologies are prone to distortion during speaker tuning and have low tuning efficiency, failing to effectively guarantee high-quality audio signals output by the speakers.
By acquiring the processing results of the Dynamic Range Control (DRC) and determining the peak suppression parameters based on the speaker's power parameters, when the conditions for distortion are determined, the maximum value of the audio signal's time-domain waveform is compressed according to preset rules and output to the speaker for playback.
It effectively avoids sound distortion while ensuring that the speaker outputs high-quality audio signals, improving tuning efficiency and reducing manpower, material resources, and time costs.
Smart Images

Figure CN120835246A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of audio technology, in particular to a tuning method and device, equipment and medium. BACKGROUND
[0002] In the process of tuning a sound box, the problem of breaking sound often occurs. The existing technology solves this problem by using dynamic range control (DRC) technology.
[0003] The principle of DRC technology is to change the volume and loudness of a signal by compressing and expanding the dynamic range of the signal. By limiting high and low sounds and compressing the output range of high and low sounds, the loudness of the entire signal can be controlled, so it is often used to increase the difference of audio signals and improve the output effect of audio signals. The DRC technology mainly involves the following parameters:
[0004] The compression threshold T is used to determine when the peak value of the time-domain waveform signal of the input audio signal meets the condition that the audio signal needs to be compressed, that is, when the peak value of the time-domain waveform signal of the audio signal reaches or exceeds the threshold T, the DRC compression function will start;
[0005] The start time A refers to the time from when the peak value of the time-domain waveform signal of the audio signal exceeds the threshold T to when the DRC compression starts. The shorter the start time A, the faster the DRC module responds to changes in the signal. Conversely, the longer the start time A, the longer the response delay of the DRC module to changes in the signal. SUMMARY
[0006] The embodiments of the present application provide a tuning method, device, equipment and medium to avoid breaking sound while ensuring that the loudspeaker outputs high-quality audio signals with higher efficiency and better effect.
[0007] The tuning method provided by the embodiments of the present application comprises:
[0008] Obtaining the current DRC processing result obtained by performing dynamic range control (DRC) on the audio signal;
[0009] When it is determined that the preset breaking sound occurrence condition is met based on the current DRC processing result and a peak suppression parameter set in advance based on the power parameter of the loudspeaker, performing compression processing on the maximum value of the time-domain waveform of the audio signal according to a preset rule for the current DRC processing result;
[0010] Outputting the audio signal after the compression processing to the loudspeaker for playing.
[0011] By the method provided by the above embodiments of the present application, when the current DRC processing result obtained by performing dynamic range control (DRC) on an audio signal is acquired, and when it is determined that a preset clip condition is met based on the current DRC processing result and a peak suppression parameter set in advance based on a power parameter of a loudspeaker, compression processing of suppressing a maximum value of a time-domain waveform of the audio signal is performed on the current DRC processing result according to a preset rule, and the audio signal after the compression processing is output to the loudspeaker for playing, so that the clip phenomenon can be avoided while ensuring that the loudspeaker outputs an audio signal with high sound quality, and the efficiency is higher and the effect is better, the whole process does not need manual intervention, more convenient audio signal processing is achieved, and the costs of manpower, material resources, time, etc. are greatly saved.
[0012] In some embodiments, the power parameter of the loudspeaker includes one or a combination of the following parameters:
[0013] a nominal power of the loudspeaker;
[0014] a peak power of the loudspeaker.
[0015] In some embodiments, the peak suppression parameter includes one or a combination of the following parameters:
[0016] a steady-state threshold Ts: when the power of a test signal input to the loudspeaker reaches the nominal power of the loudspeaker, the amplitude value of the test signal is the steady-state threshold Ts;
[0017] a peak threshold Tp: when the power of a test signal input to the loudspeaker reaches the peak power of the loudspeaker, the amplitude value of the test signal is the peak threshold Tp;
[0018] a convergence time maximum value Np: the maximum value of the time required for the amplitude value of a test signal input to the loudspeaker to converge from the peak threshold Tp to the steady-state threshold Ts;
[0019] a compression threshold range Ta of the DRC;
[0020] a start time range Aa of the DRC.
[0021] In some embodiments, the clip condition includes one or a combination of the following conditions:
[0022] the peak value of the time-domain waveform of the audio signal in the current DRC processing result exceeds the peak threshold Tp;
[0023] the time for the amplitude value of the audio signal in the current DRC processing result to converge to the steady-state threshold Ts exceeds the convergence time maximum value Np.
[0024] In some embodiments, the compression processing of the maximum value of the time-domain waveform of the audio signal according to the preset rule based on the current DRC processing result comprises:
[0025] The peak value of the time-domain waveform of the audio signal in the current DRC processing result is reduced by a preset gain coefficient, and the reduced peak value is less than or equal to the peak threshold Tp.
[0026] In some embodiments, the method further comprises:
[0027] monitoring whether there is a risk of breaking the sound, and if so, adjusting the compression threshold T of the DRC and / or reducing the attack time A of the DRC; otherwise, keeping or restoring the compression threshold T of the DRC and / or the attack time A of the DRC to the preset initial value;
[0028] wherein the adjusted compression threshold T of the DRC and the preset initial value of the compression threshold T of the DRC both belong to the compression threshold range Ta of the DRC, and the adjusted attack time A of the DRC and the preset initial value of the attack time A of the DRC both belong to the attack time range Aa of the DRC.
[0029] The embodiment of the present application provides a tuning device, comprising:
[0030] The first unit is configured to obtain a current DRC processing result obtained by performing dynamic range control (DRC) on an audio signal;
[0031] The second unit is configured to, when it is determined that a preset breaking sound occurrence condition is met based on the current DRC processing result and a peak suppression parameter set in advance based on a power parameter of a loudspeaker, perform compression processing of a maximum value of a time-domain waveform of the audio signal according to a preset rule based on the current DRC processing result;
[0032] The third unit is configured to output the audio signal after the compression processing to the loudspeaker for playing.
[0033] The embodiment of the present application provides another tuning device, comprising:
[0034] The DRC module is configured to obtain an input audio signal, and perform dynamic range control (DRC) on the audio signal to obtain a current DRC processing result;
[0035] A peak suppression module is configured to, when it is determined that a preset clip condition is met based on the current DRC processing result and a peak suppression parameter set in advance based on a power parameter of the loudspeaker, suppress a time-domain waveform maximum value of an audio signal according to a preset rule; and output the audio signal after the compression processing to the loudspeaker.
[0036] Another embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory is configured to store program instructions, and the processor is configured to invoke the program instructions stored in the memory to execute any of the above methods.
[0037] Another embodiment of the present application provides a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions are configured to make the computer execute any of the above methods. BRIEF DESCRIPTION OF DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment 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 effort.
[0039] Figure 1 A schematic diagram of the overall process of a tuning method provided by an embodiment of the present application;
[0040] Figure 2 A schematic diagram of the specific process of a tuning method provided by an embodiment of the present application;
[0041] Figure 3 A schematic diagram of the structure of a tuning device provided by an embodiment of the present application;
[0042] Figure 4 A schematic diagram of the structure of another tuning device provided by an embodiment of the present application;
[0043] Figure 5 A schematic diagram of the structure of a third tuning device provided by an embodiment of the present application;
[0044] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0045] With reference to the drawings, the technical solutions in the embodiments of the present application will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0046] The embodiments of the present application provide a tuning method and device, equipment and medium, to avoid the occurrence of the phenomenon of breaking sound while ensuring that the loudspeaker outputs high-quality audio signals, and the efficiency is higher and the effect is better.
[0047] Among them, the method and the device, equipment, medium are based on the same application idea, because the principles of the method and the device, equipment, medium to solve the problem are similar, therefore, the implementation of the device, equipment, medium and the method can be mutually referred to, and the repeated places will not be described again.
[0048] The terms "first", "second", and the like (if any) in the specification and claims of the embodiments of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0049] The following examples and embodiments will only be understood as illustrative examples. Although the present specification may refer to "a", "one", or "some" example or embodiment at several places, this does not mean that each such reference is related to the same example or embodiment, nor does it mean that the feature is only applicable to a single example or embodiment. Individual features of different embodiments can also be combined to provide other embodiments. In addition, the terms "include" and "contain" should be understood as not limiting the described embodiments to only those features mentioned; such examples and embodiments can also include features, structures, units, modules, etc. that are not specifically mentioned.
[0050] The various embodiments of the present application will be described in detail below with reference to the accompanying drawings of the specification. It should be noted that the order of presentation of the embodiments of the present application only represents the order of the embodiments, and does not represent the advantages and disadvantages of the technical solutions provided by the embodiments.
[0051] First, some terms involved in the embodiments of the present application are explained as follows:
[0052] Rated Power of a loudspeaker: refers to the maximum input power that a loudspeaker can safely withstand under normal operating conditions.
[0053] Continuous Power of a loudspeaker: refers to the power level that a loudspeaker can withstand for a long time, usually lower than the rated power of the loudspeaker. Continuous power is an important parameter considered in designing loudspeakers to ensure that the loudspeaker does not overheat during normal use.
[0054] Peak Power of a loudspeaker: refers to the maximum power that a loudspeaker can withstand for a short time, usually used to handle sudden high-power signals. Peak power is much higher than continuous power, but long-term use of peak power may cause damage to the loudspeaker.
[0055] Steady-state threshold Ts: when the power of the audio signal input to the loudspeaker (which can be a preset test signal) reaches the rated power of the loudspeaker, the amplitude value of the audio signal is the steady-state threshold Ts.
[0056] Peak threshold Tp: when the power of the audio signal input to the loudspeaker (which can be a preset test signal) reaches the peak power of the loudspeaker, the amplitude value of the audio signal is the peak threshold Tp.
[0057] Maximum convergence time Np: the maximum value of the time required for the amplitude value of the audio signal input to the loudspeaker (which can be a preset test signal) to converge from the peak threshold Tp to the steady-state threshold Ts.
[0058] In the embodiments of the present application, the corresponding DRC compression threshold T can be configured according to the rated power of the target loudspeaker, so as to avoid the amplitude value of the audio signal output to the loudspeaker exceeding the steady-state threshold Ts; then, the start time A and the release time of the DRC are adjusted, so as to adjust the actual listening experience of the audio signal output by the loudspeaker. In the case of optimal listening experience, if the breaking sound still occurs, the start time A of the DRC can be further reduced, so that the compression processing of the audio signal is faster and shorter. Of course, in order to further improve the listening experience, such as to avoid the occurrence of large and small sounds or poor bass effect, etc., the start time and release time of the DRC and other parameters can also be fine-tuned, so as to obtain the best DRC processing result.
[0059] Embodiment one:
[0060] Referring to Figure 1 , the tuning method provided by the embodiments of the present application comprises:
[0061] S101, acquire a current DRC processing result obtained by performing dynamic range control (DRC) on an audio signal;
[0062] S102, when it is determined that a preset howling occurrence condition is met based on the current DRC processing result and a peak suppression parameter set in advance based on a power parameter of a loudspeaker, perform compression processing of suppressing a maximum value of a time-domain waveform of the audio signal according to a preset rule on the current DRC processing result;
[0063] S103, output the audio signal after the compression processing to the loudspeaker for playing.
[0064] In some embodiments, the power parameter of the loudspeaker includes one or a combination of the following parameters:
[0065] a nominal power of the loudspeaker;
[0066] a peak power of the loudspeaker.
[0067] Of course, in addition to these parameters, the power parameter of the loudspeaker can also include other parameters, such as a continuous power threshold, etc.
[0068] In some embodiments, the peak suppression parameter includes one or a combination of the following parameters:
[0069] a steady-state threshold Ts: when the power of a test signal input to the loudspeaker reaches the nominal power of the loudspeaker, the amplitude value of the test signal is the steady-state threshold Ts;
[0070] a peak threshold Tp: when the power of a test signal input to the loudspeaker reaches the peak power of the loudspeaker, the amplitude value of the test signal is the peak threshold Tp;
[0071] a maximum convergence time Np: the maximum time required for the amplitude value of a test signal input to the loudspeaker to converge from the peak threshold Tp to the steady-state threshold Ts;
[0072] a compression threshold range Ta of the DRC;
[0073] a start-up time range Aa of the DRC.
[0074] Among them, the steady-state threshold Ts, the peak threshold Tp, and the maximum convergence time Np are all preset parameters for efficiently avoiding howling; of course, in addition to these parameters, other parameters that can avoid howling can also be set according to actual needs, and the embodiments of the present application are not limited.
[0075] The compression threshold range Ta of the DRC and the starting time range Aa of the DRC are both preset DRC parameter ranges for ensuring that the loudspeaker outputs audio signals with high sound quality.
[0076] Therefore, through the setting of the above parameters, the loudspeaker can output audio signals with high sound quality while avoiding the occurrence of the howling phenomenon, and the efficiency is higher and the effect is better.
[0077] The determination process of the peak suppression parameter is, for example:
[0078] First, a preset audio signal (referred to as a test signal) for testing, such as a 100Hz single-frequency signal, is input to the to-be-adjusted loudspeaker, and the amplitude value of the test signal is gradually increased so that the power gradually reaches the nominal power of the loudspeaker in the to-be-adjusted loudspeaker. The amplitude value of the test signal at this time is taken as the steady-state threshold Ts (i.e., the amplitude value of the test signal corresponding to the nominal power of the loudspeaker). Further, the amplitude value of the test signal is continuously increased so that the power gradually reaches the peak power of the loudspeaker in the to-be-adjusted loudspeaker. The amplitude value of the test signal at this time is taken as the peak threshold Tp (i.e., the amplitude value of the test signal corresponding to the peak power value of the loudspeaker).
[0079] Second, a single-frequency signal with a peak value of Tp and an amplitude value converging to Ts within N ms is made, where N is, for example, 1-500. The single-frequency signal is input to the to-be-adjusted loudspeaker, and the maximum value Np of the time required for the to-be-adjusted loudspeaker to converge the amplitude value of the input audio signal from Tp to Ts (i.e., the maximum convergence time Np) is determined through the single-frequency signal.
[0080] In the process of determining the maximum convergence time Np, the convergence time parameter N corresponding to the single-frequency signal is sequentially increased from small to large, and the howling condition of the to-be-adjusted loudspeaker is tested. For example, starting from N=1 and increasing by 1 each time, the howling condition of the loudspeaker of the to-be-adjusted loudspeaker is tested each time the single-frequency signal is input to the to-be-adjusted loudspeaker, to determine whether the howling phenomenon exists, or whether the distortion condition of the to-be-adjusted loudspeaker is out of standard, etc. Through multiple tests, the critical value Np of the time required for the input single-frequency signal of the to-be-adjusted loudspeaker to converge from Tp to Ts can be obtained, that is, if the time required for the amplitude value of the input single-frequency signal of the to-be-adjusted loudspeaker to converge from Tp to Ts is N<=Np, the loudspeaker of the to-be-adjusted loudspeaker will not have the howling phenomenon, otherwise, if the time required for the amplitude value of the input single-frequency signal of the to-be-adjusted loudspeaker to converge from Tp to Ts is N>Np, the loudspeaker of the to-be-adjusted loudspeaker will have the howling phenomenon.
[0081] In actual application, the peak power of the loudspeaker may not be an accurate value, which does not conform to the actual situation, so the peak threshold Tp may need to be adjusted up or down. Therefore, in some embodiments, the method further comprises:
[0082] updating the peak threshold value Tp. Specifically, for example:
[0083] If the nominal peak power value of the loudspeaker is lower than the actual situation, that is, the Tp amplitude audio signal is input into the loudspeaker, but the howling condition does not occur all the time, it is necessary to increase the Tp value, for example, gradually increase Tp by 1db as the adjustment step, until the howling condition occurs, and obtain the updated Tp value;
[0084] Conversely, if the nominal peak power value of the loudspeaker is higher than the actual situation, that is, the Tp amplitude audio signal is input into the loudspeaker, and the amplitude of the audio signal converges to Ts in a short time (for example, 1ms), the howling condition still occurs, then it is necessary to decrease the Tp value, for example, gradually decrease Tp by 1db as the adjustment step, until the Tp amplitude audio signal is input into the loudspeaker, and the amplitude of the audio signal converges to Ts in Nms, without the howling condition, where the above N takes a value of 30, for example.
[0085] Regarding the determination of the compression threshold value range Ta of the DRC and the start time range Aa of the DRC:
[0086] For example, according to the tuning requirements, the DRC tuning can be used to determine the DRC parameter range that is best for listening experience without considering howling, that is, the DRC parameter range for ensuring that the loudspeaker outputs high-quality audio signals, including the compression threshold value range Ta of the DRC and the start time range Aa of the DRC, where the compression threshold value range Ta of the DRC is, for example, -15db to -10db; the start time range Aa of the DRC is, for example, 10ms to 30ms, etc.
[0087] In some embodiments, the howling condition includes one or a combination of the following conditions:
[0088] The peak value of the time-domain waveform of the audio signal in the current DRC processing result exceeds the peak threshold value Tp;
[0089] The time for the amplitude value of the audio signal in the current DRC processing result to converge to the steady-state threshold value Ts exceeds the maximum convergence time Np.
[0090] In some embodiments, the compression processing of the maximum value of the time-domain waveform of the audio signal according to the preset rule for the current DRC processing result includes:
[0091] The peak value of the time-domain waveform of the audio signal in the current DRC processing result is reduced by a preset gain coefficient, and the reduced peak value is less than or equal to the peak threshold value Tp. Thus, the howling phenomenon is avoided.
[0092] For example, in the current DRC processing result, assuming that the peak value of the time-domain waveform of the audio signal is Xp, Xp can be multiplied by a preset gain coefficient g (for example, a value less than 1 and greater than 0) so that the peak value of the time-domain waveform of the adjusted audio signal does not exceed Tp, that is, g*Xp<=Tp. Moreover, the time for the amplitude value of the adjusted audio signal to converge to Ts is also less than Np, so that the adjusted result will not cause the breaking of the sound.
[0093] wherein g is a preset target gain value, which can be a preset fixed value or a gain value obtained by real-time calculation and update.
[0094] Therefore, in some embodiments, in order to transition naturally and avoid the occurrence of large and small sounds and the like, a time-based smoothing coefficient at can be calculated in real time, and the smoothing coefficient at is used to smooth the preset gain value g, that is, the value of g is updated in real time according to the actual situation. For example, the following formula is used for smoothing:
[0095] Gn=at*Go+(1-at)*g;
[0096] wherein Gn is the smoothed gain result, Go represents a historical value (i.e., the smoothing result of the last time), and the initial value thereof can be set to 1, for example, g represents the above-mentioned preset target gain value, which is a desired gain, and the value thereof can be set in advance according to actual needs.
[0097] In some embodiments, regarding the calculation of the time-based smoothing coefficient at, for example:
[0098] The start time of the DRC is obtained, denoted as atk, and the sampling rate of the current input audio signal is obtained, denoted as fs;
[0099] The smoothing coefficient at is calculated according to the following formula:
[0100] at=exp(-1*fs / atk).
[0101] In some embodiments, the method further comprises:
[0102] monitoring whether there is a risk of breaking the sound, and if so, adjusting the compression threshold T of the DRC and / or the start time A of the DRC to be smaller, so that the processing result of the DRC is more reasonable, and the sound quality of the output audio signal is higher; otherwise, the compression threshold T of the DRC and / or the start time A of the DRC are kept or restored to the preset initial value;
[0103] The adjusted compression threshold T of the DRC and the preset initial value of the compression threshold T of the DRC both belong to the compression threshold range Ta of the DRC. The adjusted start time A of the DRC and the preset initial value of the start time A of the DRC both belong to the start time range Aa of the DRC. Thus, while avoiding breaking, the loudspeaker can output high-quality audio signals.
[0104] The judgment condition for monitoring whether there is a risk of breaking can use the breaking occurrence condition described above, which will not be repeated. Of course, other judgment conditions can be set according to actual needs, and the embodiments of the application are not limited.
[0105] In the embodiments of the application, by monitoring whether there is a risk of breaking in real time, the breaking phenomenon that will occur can be predicted in advance, and the breaking phenomenon can be avoided by adjusting the DRC parameter value in advance. At the same time, since the adjusted DRC parameter value is still within the preset DRC parameter range that can guarantee high-quality output, the loudspeaker can output high-quality audio signals while avoiding the breaking phenomenon.
[0106] For example, the adjustment method of the compression threshold T is as follows:
[0107] The compression threshold T is adjusted by a preset parameter value less than 1 and greater than 0. Assuming that the gain coefficient g < 1.0, the compression threshold T can be adjusted to T = T * (1 - (1 - g) * a), where a is also a number less than 1, for example, it can be 0.5, and of course it can also be other values, as long as the adjusted compression threshold T belongs to the preset DRC compression threshold range Ta. Since the updated compression threshold T value is smaller, the value of the peak value Xp of the time domain waveform of the audio signal in the subsequent DRC processing result can be expected to be smaller, which is less likely to break, and further avoids the secondary processing of peak suppression, and guarantees the high-quality output of the audio signal. Conversely, if no breaking risk is detected or the breaking risk is removed, if the compression threshold T has been adjusted before, the compression threshold T can be restored to the initial value, and if the current compression threshold T is the initial value, the initial value remains unchanged.
[0108] Similarly, the adjustment method of the start time A is as follows:
[0109] Suppose the time for the amplitude value of the current audio signal to converge to Ts is Xn, then in the case that Xn exceeds Np, the starting time A=A*(Np / Xn) can be updated, and of course the updated starting time A belongs to the preset starting time range Aa. Conversely, if no risk of breaking the sound is detected, or the risk of breaking the sound is removed, then if the starting time A has been adjusted before, the starting time A can be restored to the initial value, and if the current starting time A is the initial value, the initial value is kept unchanged.
[0110] Embodiment two:
[0111] Referring to Figure 2 The embodiment of the present application provides a specific processing method of an audio signal, which comprises:
[0112] S201, determining the peak power bearing capacity.
[0113] For example, step S201 comprises determining the parameters {Ts, Tp, Np}.
[0114] S202, DRC tuning.
[0115] For example, step S202 comprises determining the parameters {Ta, Aa}.
[0116] S203, obtaining the input audio signal and performing DRC processing through the preset DRC module to obtain the current DRC processing result.
[0117] S204, judging whether the preset breaking sound occurrence condition is met based on the current DRC processing result and the peak suppression parameter set in advance based on the power parameter of the loudspeaker; if yes, executing step S205; otherwise, executing step S203, i.e. continuously obtaining the input audio signal and performing DRC processing through the preset DRC module to obtain the latest DRC processing result, and continuously executing the subsequent step of judging whether the preset breaking sound occurrence condition is met, and so on.
[0118] In step S204, {Ts, Tp, Np} obtained in step S201 and {Ta, Aa} obtained in step S202 are taken as input parameters (i.e., reference data of the peak suppression module) of the preset peak suppression module, and the peak suppression module detects whether the current DRC processing result will cause clipping based on the parameters and the current DRC processing result output by the DRC module, and performs corresponding processing. For example, if the peak value of the time-domain waveform of the audio signal in the current DRC processing result exceeds Tp, and / or the time for the amplitude value of the audio signal to converge to Ts exceeds Np, it is determined that clipping will occur, and it is determined that further compression is needed, i.e., step S205 is performed to avoid clipping; otherwise, if clipping will not occur, the current DRC processing result does not need to be processed.
[0119] S205, performing compression processing of the maximum value of the time-domain waveform of the audio signal according to a preset rule for the current DRC processing result;
[0120] Step S205, for example, specifically includes:
[0121] obtaining the starting time of the current DRC and the sampling rate of the current input audio signal;
[0122] calculating a smoothing coefficient based on the starting time of the current DRC and the sampling rate of the current input audio signal;
[0123] performing smoothing processing on the preset gain coefficient using the smoothing coefficient to obtain a gain coefficient after smoothing processing;
[0124] adjusting the peak value of the time-domain waveform of the audio signal in the current DRC processing result using the gain coefficient after smoothing processing.
[0125] S206, monitoring whether there is a risk of clipping, if yes, performing step S207; otherwise, performing step S208;
[0126] S207, adjusting the DRC parameter;
[0127] Step S207, for example, includes lowering the compression threshold T of the DRC, and / or reducing the starting time A of the DRC;
[0128] S208, keeping or restoring the DRC parameter to an initial value;
[0129] Step S208, for example, includes keeping or restoring the compression threshold T of the DRC to a preset initial value, and / or keeping or restoring the starting time A of the DRC to a preset initial value.
[0130] In summary, the tuning method provided by the embodiments of the present application can effectively enhance the effect of DRC processing by taking the preset actual test data as a reference, dynamically detecting, tracking and adjusting the DRC processing result and DRC parameters, etc., avoid breaking the sound, while retaining the original best sound quality effect, and the whole process is more convenient to perform, adjustable and controllable, greatly improving the tuning efficiency.
[0131] The device or apparatus provided by the embodiments of the present application will be described below, and the explanation or illustration of the same or corresponding technical features described in the above method will not be repeated hereinafter.
[0132] Embodiment three:
[0133] Referring to Figure 3 The tuning apparatus provided by the embodiments of the present application may, for example, be any apparatus having the function of suppressing the peak value of the time-domain waveform of the audio signal as described in the embodiments of the present application, and the apparatus comprises:
[0134] The first unit 301 is configured to obtain a current DRC processing result obtained by performing dynamic range control (DRC) on the audio signal;
[0135] The second unit 302 is configured to, when it is determined that a preset breaking sound occurrence condition is met based on the current DRC processing result and a peak suppression parameter set in advance based on the power parameter of the loudspeaker, perform compression processing of suppressing the maximum value of the time-domain waveform of the audio signal according to a preset rule on the current DRC processing result;
[0136] The third unit 303 is configured to output the audio signal after the compression processing to the loudspeaker for playing.
[0137] In some embodiments, the power parameter of the loudspeaker includes one or a combination of the following parameters:
[0138] The nominal power of the loudspeaker;
[0139] The peak power of the loudspeaker.
[0140] In some embodiments, the peak suppression parameter includes one or a combination of the following parameters:
[0141] The steady-state threshold Ts: when the power of the test signal input to the loudspeaker reaches the nominal power of the loudspeaker, the amplitude value of the test signal is the steady-state threshold Ts;
[0142] The peak threshold Tp: when the power of the test signal input to the loudspeaker reaches the peak power of the loudspeaker, the amplitude value of the test signal is the peak threshold Tp;
[0143] a maximum value of convergence time Np: input the amplitude value of the test signal of the loudspeaker, the maximum value of the time required for convergence from the peak threshold value Tp to the steady state threshold value Ts;
[0144] a compression threshold value range Ta of the DRC;
[0145] an attack time range Aa of the DRC.
[0146] In some embodiments, the break-up occurrence condition comprises one or a combination of the following conditions:
[0147] the peak value of the time domain waveform of the audio signal in the current DRC processing result exceeds the peak threshold value Tp;
[0148] the time for the amplitude value of the audio signal in the current DRC processing result to converge to the steady state threshold value Ts exceeds the maximum value of convergence time Np.
[0149] In some embodiments, the compression processing of the maximum value of the time domain waveform of the audio signal according to the preset rule for the current DRC processing result comprises:
[0150] the peak value of the time domain waveform of the audio signal in the current DRC processing result is reduced by a preset gain coefficient, and the reduced peak value is less than or equal to the peak threshold value Tp.
[0151] In some embodiments, the second unit 302 is further configured to:
[0152] monitor whether there is a break-up risk, and if so, lower the compression threshold value T of the DRC and / or reduce the attack time A of the DRC; otherwise, keep or restore the compression threshold value T of the DRC and / or the attack time A of the DRC to a preset initial value;
[0153] wherein the adjusted compression threshold value T of the DRC, the preset initial value of the compression threshold value T of the DRC, both belong to the compression threshold value range Ta of the DRC; the adjusted attack time A of the DRC, the preset initial value of the attack time A of the DRC, both belong to the attack time range Aa of the DRC.
[0154] It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division. In actual implementation, there can be another division manner. In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present alone, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0155] The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part of the prior art that contributes to the technical solutions or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in various embodiments of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0156] Embodiment four:
[0157] Referring to Figure 4 The tuning device (or also referred to as a system) provided by the embodiments of the present application can be any device having the function of suppressing the peak value of the time-domain waveform of the audio signal described in the embodiments of the present application. The device includes:
[0158] The DRC module 401 is configured to obtain an input audio signal and perform dynamic range control (DRC) on the audio signal to obtain a current DRC processing result.
[0159] The peak suppression module 402 is configured to, when it is determined that a preset breaking condition is met based on the current DRC processing result and a peak suppression parameter set in advance based on the power parameter of the loudspeaker, perform compression processing on the maximum value of the time-domain waveform of the audio signal according to a preset rule for the current DRC processing result; and output the audio signal after the compression processing to the loudspeaker.
[0160] In some embodiments, the power parameter of the loudspeaker includes one or a combination of the following parameters:
[0161] The nominal power of the loudspeaker;
[0162] The peak power of the loudspeaker.
[0163] In some embodiments, the peak suppression parameter includes one or a combination of the following parameters:
[0164] The steady-state threshold Ts: when the power of a test signal input to the loudspeaker reaches the nominal power of the loudspeaker, the amplitude value of the test signal is the steady-state threshold Ts;
[0165] a peak threshold Tp, the amplitude value of the test signal reaching the peak threshold Tp when the power of the test signal input to the loudspeaker reaches the peak power of the loudspeaker;
[0166] a maximum convergence time Np, the maximum time required for the amplitude value of the test signal input to the loudspeaker to converge from the peak threshold Tp to the steady-state threshold Ts;
[0167] a compression threshold range Ta of the DRC;
[0168] an attack time range Aa of the DRC.
[0169] In some embodiments, the howling occurrence condition comprises one or a combination of the following conditions:
[0170] the peak of the time-domain waveform of the audio signal in the current DRC processing result exceeds the peak threshold Tp;
[0171] the time for the amplitude value of the audio signal in the current DRC processing result to converge to the steady-state threshold Ts exceeds the maximum convergence time Np.
[0172] In some embodiments, the compression processing of the maximum value of the time-domain waveform of the audio signal according to the preset rule for the current DRC processing result comprises:
[0173] the peak of the time-domain waveform of the audio signal in the current DRC processing result is reduced by a preset gain coefficient, and the reduced peak is less than or equal to the peak threshold Tp.
[0174] In some embodiments, the peak suppression module 402 is further configured to:
[0175] monitor whether there is a howling risk, and if so, lower the compression threshold T of the DRC and / or reduce the attack time A of the DRC; otherwise, keep or restore the compression threshold T of the DRC and / or the attack time A of the DRC to a preset initial value;
[0176] wherein the adjusted compression threshold T of the DRC and the preset initial value of the compression threshold T of the DRC both belong to the compression threshold range Ta of the DRC, and the adjusted attack time A of the DRC and the preset initial value of the attack time A of the DRC both belong to the attack time range Aa of the DRC.
[0177] It can be seen that in this embodiment, the peak suppression module can avoid distortion by suppressing the maximum value of the time domain waveform of the audio signal, while ensuring high-quality output of the audio signal. Specifically, the peak power tolerance of the speaker to be adjusted can be obtained through testing, including the above-mentioned steady-state threshold Ts, peak threshold Tp, maximum convergence time Np, DRC compression threshold range Ta, DRC start-up time range Aa, etc. These peak power tolerance data are used as reference data for the peak suppression module, so that the peak suppression module can make further adjustments to the results output by the DRC module, thereby avoiding the occurrence of distortion and, at the same time, ensuring that the speaker outputs high-quality audio signals. Furthermore, the DRC parameters can be adjusted dynamically to make the DRC effect better and more in line with the changes in the actual audio signal.
[0178] In some embodiments, as Figure 5 As shown, the device further includes one or a combination of the following devices:
[0179] Audio signal input module 501 , audio signal analysis module 502 , parameter setting module 503 (used to preset and adjust the above-mentioned various thresholds, preset values and other parameters), and speaker 504 .
[0180] Embodiment 5:
[0181] An electronic device provided in an embodiment of the present application may be, for example, any electronic device that needs to process and output an audio signal, such as a speaker, a sound box device, a computer, a television, etc. Figure 6 , the electronic device includes, for example:
[0182] The processor 600 is configured to read the program in the memory 620 and execute the following process:
[0183] Obtain the current DRC processing result obtained by performing dynamic range control (DRC) on the audio signal;
[0184] When it is determined based on the current DRC processing result and the peak suppression parameter pre-set based on the power parameter of the speaker that a preset distortion condition is met, compression processing is performed on the current DRC processing result to suppress the maximum value of the time domain waveform of the audio signal according to a preset rule;
[0185] The compressed audio signal is output to the speaker for playback.
[0186] In some embodiments, the power parameter of the speaker includes one or a combination of the following parameters:
[0187] the nominal power of the loudspeaker;
[0188] The peak power of the speaker.
[0189] In some embodiments, the peak suppression parameter comprises one or a combination of the following parameters:
[0190] a steady state threshold Ts, which is a value of the amplitude of the test signal when the power of the test signal input to the loudspeaker reaches a nominal power of the loudspeaker;
[0191] a peak threshold Tp, which is a value of the amplitude of the test signal when the power of the test signal input to the loudspeaker reaches a peak power of the loudspeaker;
[0192] a convergence time maximum Np, which is a maximum value of the time required for the amplitude of the test signal input to the loudspeaker to converge from the peak threshold Tp to the steady state threshold Ts;
[0193] a compression threshold range Ta of the DRC;
[0194] a start time range Aa of the DRC.
[0195] In some embodiments, the clipping risk condition comprises one or a combination of the following conditions:
[0196] a peak of the time domain waveform of the audio signal in the current DRC processing result exceeds the peak threshold Tp;
[0197] a time for the amplitude of the audio signal in the current DRC processing result to converge to the steady state threshold Ts exceeds the convergence time maximum Np.
[0198] In some embodiments, the suppression of the maximum value of the time domain waveform of the audio signal according to the preset rule for the current DRC processing result comprises:
[0199] reducing the peak of the time domain waveform of the audio signal in the current DRC processing result by a preset gain coefficient, and the reduced peak is less than or equal to the peak threshold Tp.
[0200] In some embodiments, the processor 600 is further configured to read the program in the memory 620 and perform the following processes:
[0201] monitoring whether there is a clipping risk, and if so, reducing the compression threshold T of the DRC and / or reducing the start time A of the DRC, otherwise, keeping or restoring the compression threshold T of the DRC and / or the start time A of the DRC to a preset initial value;
[0202] The adjusted compression threshold T of the DRC, the preset initial value of the compression threshold T of the DRC, the adjusted start time A of the DRC, and the preset initial value of the start time A of the DRC all belong to the compression threshold range Ta of the DRC and the start time range Aa of the DRC.
[0203] The transceiver 610 is configured to receive and send data under the control of the processor 600.
[0204] In the formula, the bus architecture can include any number of interconnected buses and bridges, and various circuit links of the processor 600 represented by one or more processors and the memory 620 represented by the memory are linked together. The bus architecture can also link various other circuits such as peripheral devices, voltage stabilizers, and power management circuits, which are well known in the art, and thus, further description thereof will not be given herein. The bus interface provides an interface. The transceiver 610 can be a plurality of elements, i.e., including a transmitter and a receiver, and provides a unit for communicating with various other devices on a transmission medium, including a wireless channel, a wired channel, an optical cable, and the like. The user interface 630 can also be an interface capable of connecting to the required device, including but not limited to a keypad, a display, a speaker, a microphone, a joystick, and the like. Figure 6
[0205] The processor 600 is responsible for managing the bus architecture and general processing, and the memory 620 can store data used by the processor 600 when performing operations.
[0206] In some embodiments, the processor 600 can be a CPU (Central Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a CPLD (Complex Programmable Logic Device), and the processor can also adopt a multi-core architecture.
[0207] The processor is used to execute any of the methods provided by the embodiments of the application according to the executable instructions obtained by calling the computer program stored in the memory. The processor and the memory can also be physically arranged separately.
[0208] It should be noted that the above-mentioned device provided by the embodiments of the application can realize all the method steps realized by the above-mentioned method embodiments, and can achieve the same technical effects, and thus, the same parts and beneficial effects of the method embodiments will not be described in detail herein.
[0209] Any of the devices or apparatuses provided by the embodiments of the present application can be a desktop computer, a portable computer, a smart phone, a tablet computer, a personal digital assistant (PDA), and the like. The devices or apparatuses can include a center processing unit (CPU), a memory, an input / output device, and the like. The input device can include a keyboard, a mouse, a touch screen, and the like. The output device can include a display device, such as a liquid crystal display (LCD), a cathode ray tube (CRT), and the like.
[0210] The memory can include a read-only memory (ROM) and a random access memory (RAM), and provide the processor with program instructions and data stored in the memory. In the embodiments of the present application, the memory can be used to store the programs of any of the methods provided by the embodiments of the present application.
[0211] The processor calls the program instructions stored in the memory, and the processor is configured to perform any of the methods provided by the embodiments of the present application according to the obtained program instructions.
[0212] The embodiments of the present application also provide a computer program product or a computer program, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to make the computer device perform any of the methods in the above embodiments. The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium may, for example, be but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0213] The embodiments of the present application provide a computer readable storage medium for storing computer program instructions for the apparatus provided by the above embodiments of the present application, which includes programs for executing any of the methods provided by the above embodiments of the present application. The computer readable storage medium can be a non-transitory computer readable medium.
[0214] The computer-readable storage medium can be any available media or data storage device that can be accessed by a computer, including but not limited to magnetic storage (e.g. floppy disks, hard disks, tape, MO, etc.), optical storage (e.g. CD, DVD, BD, HVD, etc.), and semiconductor memory (e.g. ROM, EPROM, EEPROM, NAND FLASH, SSD, etc.), etc.
[0215] It should be understood that:
[0216] The access technology via which entities in the communication network transfer traffic to and from each other can be any suitable current or future technology, such as WLAN (Wireless Local Access Network), WiMAX (Worldwide Interoperability for Microwave Access), LTE, LTE-A, 5G, Bluetooth, infrared, etc. can be used; in addition, embodiments can also apply wired technologies, for example, IP-based access technologies, such as wired networks or fixed lines.
[0217] Embodiments suitable to be implemented as software code or part thereof and run using a processor or processing functionality are independent of the software code and can be specified using any known or future developed programming language, such as a high-level programming language, such as objective-C, C, C++, C#, Java, Python, Javascript, other scripting languages, etc., or a low-level programming language, such as a machine language or an assembler.
[0218] The implementation of embodiments is independent of hardware and can be implemented using any known or future developed hardware technology or any mixture thereof, such as microprocessors or CPUs (Central Processing Units), MOS (Metal Oxide Semiconductor), CMOS (Complementary MOS), BiMOS (Bipolar MOS), BiCMOS (Bipolar CMOS), ECL (Emitter Coupled Logic), and / or TTL (Transistor-Transistor Logic).
[0219] Embodiments can be implemented as separate devices, apparatuses, units, components or functions, or in a distributed manner, for example, one or more processors or processing functionality can be used or shared in processing, or one or more processing segments or processing portions can be used and shared in processing, wherein one physical processor or more than one physical processor can be used to implement one or more processing portions dedicated to a specific processing as described.
[0220] The apparatuses can be implemented by semiconductor chips, chip sets, or (hardware) modules including such chips or chip sets.
[0221] The embodiments can also be implemented as any combination of hardware and software, such as ASIC (Application Specific IC (Integrated Circuit)) components, FPGA (Field-Programmable Gate Array) or CPLD (Complex Programmable Logic Device) components or DSP (Digital Signal Processor) components.
[0222] The embodiments can also be implemented as a computer program product including a computer readable program code embodied in a computer available medium, the computer readable program code adapted to carry out processes as described in the embodiments, wherein the computer available medium can be a non-transitory medium.
[0223] Those skilled in the art will appreciate that embodiments of the present application can be supplied as a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer available storage medium (including, but not limited to, disk storage and optical storage) having computer usable program code embodied in the medium.
[0224] The present application is described with reference to the flowchart illustrations and / or block diagrams of the methods, apparatus (systems) and computer program products according to embodiments of the present application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, an embedded processor or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 means for carrying out each of the one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks.
[0225] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions means which implement the function specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 means for carrying out each of the one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks.
[0226] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks.Figure 1 the steps of the functions specified in the one or more blocks.
[0227] It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application cover the modifications and variations of this application provided they come within the scope of the appended claims and their equivalents.
Claims
1. A tuning method characterized by, The method comprises: obtaining a current DRC processing result obtained by performing dynamic range control (DRC) on an audio signal; when it is determined that a preset clipping condition is met based on the current DRC processing result and a peak suppression parameter set in advance based on a power parameter of a loudspeaker, performing compression processing on a time-domain waveform maximum value of the audio signal according to a preset rule for the current DRC processing result; outputting the audio signal after the compression processing to the loudspeaker for playing.
2. The method of claim 1, wherein, The power parameter of the loudspeaker comprises one or a combination of the following parameters: a nominal power of the loudspeaker; a peak power of the loudspeaker.
3. The method of claim 1, wherein, The peak suppression parameter comprises one or a combination of the following parameters: a steady-state threshold Ts, when a power of a test signal input to the loudspeaker reaches the nominal power of the loudspeaker, an amplitude value of the test signal is the steady-state threshold Ts; a peak threshold Tp, when a power of a test signal input to the loudspeaker reaches the peak power of the loudspeaker, an amplitude value of the test signal is the peak threshold Tp; a maximum convergence time Np, a maximum time required for an amplitude value of a test signal input to the loudspeaker to converge from the peak threshold Tp to the steady-state threshold Ts; a compression threshold range Ta of the DRC; a start-up time range Aa of the DRC.
4. The method of claim 3, wherein, The clipping condition comprises one or a combination of the following conditions: a peak value of a time-domain waveform of the audio signal in the current DRC processing result exceeds the peak threshold Tp; a time for an amplitude value of the audio signal in the current DRC processing result to converge to the steady-state threshold Ts exceeds the maximum convergence time Np.
5. The method of claim 3, wherein, The compression processing on the time-domain waveform maximum value of the audio signal according to the preset rule for the current DRC processing result comprises: using a preset gain coefficient to reduce the peak value of the time-domain waveform of the audio signal in the current DRC processing result, and the reduced peak value is less than or equal to the peak threshold Tp.
6. The method of claim 3, wherein, The method further comprises: monitoring whether there is a risk of clipping, and if so, reducing the compression threshold T of the DRC and / or reducing the start-up time A of the DRC; otherwise, keeping or restoring the compression threshold T of the DRC and / or the start-up time A of the DRC to a preset initial value; wherein the adjusted compression threshold T of the DRC, the preset initial value of the compression threshold T of the DRC, the adjusted start-up time A of the DRC, and the preset initial value of the start-up time A of the DRC all belong to the compression threshold range Ta of the DRC and the start-up time range Aa of the DRC, respectively.
7. A tuning device, characterized by The device comprises: a first unit configured to obtain a current DRC processing result obtained by performing dynamic range control (DRC) on an audio signal; The second unit is configured to, when it is determined that the preset howling occurrence condition is met based on the current DRC processing result and a peak suppression parameter set in advance based on a power parameter of the loudspeaker, perform compression processing on a time-domain waveform maximum value of the audio signal according to a preset rule for the current DRC processing result. The third unit is configured to output the audio signal after the compression processing to the loudspeaker for playing.
8. A tuning device, characterized by The device comprises: The DRC module is configured to obtain an input audio signal and perform dynamic range control (DRC) on the audio signal to obtain a current DRC processing result. The peak suppression module is configured to, when it is determined that the preset howling occurrence condition is met based on the current DRC processing result and a peak suppression parameter set in advance based on a power parameter of the loudspeaker, perform compression processing on a time-domain waveform maximum value of the audio signal according to a preset rule for the current DRC processing result, and output the audio signal after the compression processing to the loudspeaker.
9. An electronic device, comprising: The device comprises: The memory is configured to store program instructions. The processor is configured to invoke the program instructions stored in the memory to perform the method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions for causing the computer to perform the method according to any one of claims 1 to 6.