Audio signal processing method, device, equipment and storage medium

By performing segmented processing and nonlinear gain adjustment of audio signals, the timeliness and distortion problems of audio signal amplitude adjustment in the prior art are solved, and the transmission effect and user experience of audio signals are improved.

CN113113042BActive Publication Date: 2025-08-29GUANGZHOU HUIRUI SITONG INFORMATION SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110383925.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-09
Publication Date
2025-08-29
Estimated Expiration
2041-04-09

AI Technical Summary

Technical Problem

In the prior art, when adjusting the amplitude of audio signals in the environment of walkie-talkies, there is a problem of poor aging and easy to cause signal distortion. Especially when adjusting the signal energy by comparing the signal, peak cutting is required after the signal with a larger amplitude exceeds the threshold.

Method used

The audio signal is segmented into multiple stages, and the amplitude adjustment of the signal is performed for each stage. The signal amplitude is controlled by preset thresholds to avoid overall gain adjustment. Segmentation processing and nonlinear gain adjustment are adopted to ensure that the signal does not exceed the upper limit of the transmission channel.

Benefits of technology

It realizes that while ensuring timeliness, avoids signal distortion, improves the audio effect and user experience of the audio signal, and ensures that the signal amplitude is transmitted within a reasonable range.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113113042B_ABST
    Figure CN113113042B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of signal processing, and in particular to an audio signal processing method, apparatus, device and storage medium. The method includes: obtaining an audio signal to be processed; segmenting the audio signal to obtain at least two stage audio signals; and processing each stage audio signal as follows: when the maximum amplitude value of the stage audio signal is less than a first preset amplitude threshold, amplifying the amplitude of the stage audio signal so that the amplified maximum amplitude value is greater than or equal to the first preset amplitude threshold, and less than or equal to the transmission amplitude upper limit value of the transmission channel of the audio signal; when the maximum amplitude value of the stage audio signal is greater than a second preset amplitude threshold, adjusting the amplitude of the stage audio signal so that the adjusted maximum amplitude value is less than or equal to the transmission amplitude upper limit value of the transmission channel of the audio signal. The present disclosure is used to solve the problem that the existing technology for adjusting the amplitude of the audio signal cannot avoid audio signal distortion while ensuring timeliness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of signal processing, and in particular to an audio signal processing method, apparatus, device, and storage medium. Background Art

[0002] In areas of use such as walkie-talkies, when transmitting audio signals, it is necessary to adjust the amplitude of the audio signals to achieve an ideal state for facilitating subsequent processing or use of the audio signals. For example, the adjusted audio signals are more conducive to modulation of the audio signals.

[0003] In the prior art, there are two common methods for adjusting the amplitude of audio signals. One is to adjust the signal through a negative feedback loop, which can stably adjust the audio signal's amplitude. The other is to adjust the signal by comparing signal energy. The energy of the audio signal represents the overall amplitude of the audio signal. After comparing the audio signal energy with a preset energy threshold, the gain multiplier is calculated based on the comparison result, and the audio signal's amplitude is then adjusted based on this gain multiplier. Summary of the Invention

[0004] Currently, signal adjustment through negative feedback is relatively stable, but the signal adjustment process is time-consuming, making it particularly unsuitable for time-sensitive environments such as walkie-talkies. This results in poor audio signal amplitude adjustment. While signal energy comparison ensures timeliness, its gain multiplier directly affects the overall amplitude of the audio signal. When the amplitude of the same audio signal fluctuates significantly, the maximum amplitude of the larger signal component, after multiplying by the gain multiplier, will exceed the preset signal amplitude threshold. The portion of the signal exceeding the threshold is clipped, causing distortion and reducing the quality of the audio signal. This also results in poor audio signal amplitude adjustment.

[0005] The present disclosure provides an audio signal processing method, apparatus, device and storage medium to solve the problem in the prior art that the amplitude adjustment of audio signals cannot ensure timeliness while avoiding audio signal distortion.

[0006] In a first aspect, an embodiment of the present disclosure provides an audio signal processing method, comprising: obtaining an audio signal to be processed; segmenting the audio signal to obtain at least two stage audio signals; and performing the following processing on each stage audio signal: when the maximum amplitude value of the stage audio signal is less than a first preset amplitude threshold, amplifying the amplitude of the stage audio signal so that the amplified maximum amplitude value is greater than or equal to the first preset amplitude threshold and less than or equal to the transmission amplitude upper limit value of the transmission channel of the audio signal; when the maximum amplitude value of the stage audio signal is greater than a second preset amplitude threshold, adjusting the amplitude of the stage audio signal so that the adjusted maximum amplitude value is less than or equal to the transmission amplitude upper limit value of the transmission channel of the audio signal; wherein, the first preset amplitude threshold is less than the second preset amplitude threshold.

[0007] Optionally, when the maximum amplitude value of the stage audio signal is less than a first preset amplitude threshold, amplifying the amplitude of the stage audio signal includes: when the maximum amplitude value of the stage audio signal is less than the first preset amplitude threshold, using the ratio of the first preset amplitude threshold to the maximum amplitude value as a first amplitude gain value; and amplifying the amplitude of the stage audio signal by the first amplitude gain value.

[0008] Optionally, when the maximum amplitude value of the stage audio signal is greater than a second preset amplitude threshold, adjusting the amplitude of the stage audio signal includes: when the maximum amplitude value of the stage audio signal is greater than the second preset amplitude threshold, using the ratio of the transmission amplitude upper limit value to the maximum amplitude value as a second amplitude gain value; and adjusting the amplitude of the stage audio signal according to the second amplitude gain value.

[0009] Optionally, when the maximum amplitude value of the stage audio signal is greater than a second preset amplitude threshold, after adjusting the amplitude of the stage audio signal so that the adjusted maximum amplitude value is less than or equal to the transmission amplitude upper limit of the transmission channel of the audio signal, the method further includes: obtaining boundary sampling points of two adjacent stage audio signals; obtaining N consecutive sampling points including the boundary sampling points from the two adjacent stage audio information, where N is an integer greater than 1, and the N consecutive sampling points include at least two sampling points belonging to different stage audio information; and interpolating the audio signals corresponding to the N consecutive sampling points.

[0010] Optionally, obtaining the audio signal to be processed includes: receiving a signal to be analyzed; obtaining a first signal energy value of the signal to be analyzed within a preset audio frequency band, and obtaining a second signal energy value of the signal to be analyzed within a preset noise frequency band; when a ratio of the first signal energy value to the second signal energy value is greater than a preset energy threshold, treating the signal of the signal to be analyzed within the preset audio signal frequency band as the audio signal to be processed.

[0011] Optionally, segmenting the audio signal to obtain at least two stage audio signals includes: grouping continuous sampling points contained in the audio signal according to a preset number of sampling points to obtain at least two grouping results, wherein one grouping result includes at least two continuous sampling points; and taking the audio signal corresponding to each grouping result as a stage audio signal, wherein the number of sampling points included in the stage audio signal is equal to or less than the preset number of sampling points.

[0012] Optionally, the method further includes: when the maximum amplitude value is greater than the first preset amplitude threshold and the maximum amplitude value is less than a third preset amplitude threshold, amplifying the amplitude of the stage audio signal according to the ratio of the amplitude value of each sampling point in the stage audio signal to the third preset amplitude threshold, wherein the third preset amplitude threshold is greater than the first preset amplitude threshold and less than the second preset amplitude threshold; when the maximum amplitude value is less than the second preset amplitude threshold and the maximum amplitude value is greater than a fourth preset amplitude threshold, reducing the amplitude of the stage audio signal according to the ratio of the amplitude value of each sampling point in the stage audio signal to the fourth preset amplitude threshold, wherein the fourth preset amplitude threshold is less than the second preset amplitude threshold and greater than the third preset amplitude threshold.

[0013] In a second aspect, an embodiment of the present disclosure provides an audio signal processing device, comprising: an acquisition unit for acquiring an audio signal to be processed; a segmentation unit for segmenting the audio signal to obtain at least two stage audio signals; and a processing unit for performing the following processing on each stage audio signal: when the maximum amplitude value of the stage audio signal is less than a first preset amplitude threshold, amplifying the amplitude of the stage audio signal so that the amplified maximum amplitude value is greater than or equal to the first preset amplitude threshold and less than or equal to the transmission amplitude upper limit value of the transmission channel of the audio signal; when the maximum amplitude value of the stage audio signal is greater than a second preset amplitude threshold, adjusting the amplitude of the stage audio signal so that the adjusted maximum amplitude value is less than or equal to the transmission amplitude upper limit value of the transmission channel of the audio signal; wherein, the first preset amplitude threshold is less than the second preset amplitude threshold.

[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor, a memory, and a communication bus, wherein the processor and the memory communicate with each other via the communication bus; the memory is used to store computer programs; and the processor is used to execute the programs stored in the memory to implement the audio signal processing method described in the first aspect.

[0015] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the audio signal processing method described in the first aspect.

[0016] The above technical solution provided by the embodiment of the present disclosure has the following advantages over the prior art: the method provided by the embodiment of the present disclosure segments the audio signal to be processed to obtain at least two stage audio signals, and processes each stage audio signal separately. When the maximum amplitude value of the stage audio signal is less than the first preset amplitude threshold, the amplitude of the stage audio signal is amplified so that the amplified maximum amplitude value is greater than or equal to the first preset amplitude threshold, and less than or equal to the transmission amplitude upper limit value of the transmission channel of the audio signal; when the maximum amplitude value of the stage audio signal is greater than the second preset amplitude threshold, the amplitude of the stage audio signal is adjusted so that the adjusted maximum amplitude value is less than or equal to the transmission amplitude upper limit value of the transmission channel of the audio signal; wherein the first preset amplitude threshold is less than the second preset amplitude threshold.

[0017] Compared to existing technologies, this method adjusts the overall amplitude of the audio signal at each stage based on the relationship between the maximum amplitude value of the audio signal at that stage and a first preset amplitude threshold or a second preset amplitude threshold. If the maximum amplitude value of the audio signal at a stage is small, the amplitude of the audio signal at that stage is amplified; if the maximum amplitude value of the audio signal at a stage is large, the amplitude of the audio signal at that stage is reduced, while ensuring that the maximum amplitude value of the audio signal at each stage does not exceed the transmission amplitude upper limit of the transmission channel.

[0018] The amplitude of the stage audio signal is directly adjusted without using a negative feedback loop, which can ensure the timeliness of the audio signal processing process. At the same time, the amplitude of the audio signal is adjusted separately in segments, rather than amplifying or reducing the amplitude of the audio signal as a whole based on the same gain multiple, to avoid the situation where when a small-amplitude signal is amplified, a large-amplitude signal is also amplified, and then the peak is clipped to cause signal distortion. What is compared with the first preset amplitude threshold or the second preset amplitude threshold is the maximum amplitude value of the stage audio signal. The amplitude of the signal itself is adjusted based on the comparison result between the amplitude value and the amplitude threshold, rather than adjusting the amplitude through energy comparison. This has a better effect on the amplitude adjustment of the audio signal, improves the audio effect presented by the audio signal, and further enhances the user's audio experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0021] Figure 1 A schematic diagram of the steps for implementing the audio signal processing method provided in an embodiment of the present disclosure;

[0022] Figure 2 A schematic diagram of the process steps for obtaining an audio signal to be processed provided in an embodiment of the present disclosure;

[0023] Figure 3 A schematic diagram of the process steps for segmenting an audio signal provided in an embodiment of the present disclosure;

[0024] Figure 4 A schematic diagram of the smoothing process steps provided in an embodiment of the present disclosure;

[0025] Figure 5 Schematic diagram of the structure connection of the audio signal processing device provided in the embodiment of the present disclosure Figure 1 ;

[0026] Figure 6 Schematic diagram of the structure connection of the audio signal processing device provided in the embodiment of the present disclosure Figure 2 ;

[0027] Figure 7 A schematic diagram of the structural connection of an electronic device provided in an embodiment of the present disclosure;

[0028] Figure 8 A schematic diagram of the structure connection of a walkie-talkie provided in an embodiment of the present disclosure Figure 1 ;

[0029] Figure 9 A schematic diagram of the structure connection of a walkie-talkie provided in an embodiment of the present disclosure Figure 2 ;

[0030] Figure 10 A schematic diagram of the structure connection of a walkie-talkie provided in an embodiment of the present disclosure Figure 3 ; DETAILED DESCRIPTION

[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0032] The audio processing method provided in the embodiments of the present disclosure is implemented in a device that processes audio signals. The device can be a dedicated device for audio processing, such as a walkie-talkie, or it can be an intelligent device with integrated audio processing functions, such as a smart phone. The scope of protection of the present disclosure is not limited to the specific type of device that implements the method.

[0033] In one embodiment, if Figure 1 As shown, the implementation process of the audio signal processing method mainly includes the following steps:

[0034] Step 101: Acquire an audio signal to be processed.

[0035] In this embodiment, the audio signal to be processed is a signal that can actually produce an audio effect, rather than a noise signal or other signal that has no practical significance for producing an audio effect. For example, when using a walkie-talkie, the voice signal transmitted by the walkie-talkie is required to be the audio signal to be processed, etc.

[0036] In one embodiment, when a device receives a signal to be analyzed, it receives both the audio signal to be processed and the noise signal generated by the environment. The noise signal generated by the environment is always present, while the audio signal to be processed is only generated when needed. Therefore, it is necessary to determine whether the received signal to be analyzed contains the audio signal to be processed. The audio signal to be processed is located within a specific frequency band, while the noise signal exists across the entire frequency band. Based on the frequency band, it is possible to determine whether the received signal to be analyzed contains the required audio signal and then obtain the audio signal to be processed.

[0037] like Figure 2 As shown, the process of obtaining the audio signal to be processed includes the following steps:

[0038] Step 201: Receive a signal to be analyzed.

[0039] The signal to be analyzed is a signal received by a device. The signal to be analyzed may contain only a noise signal, or may contain both an audio signal and a noise signal that need to be processed.

[0040] Step 202: Acquire a first signal energy value of the signal to be analyzed within a preset audio frequency band, and acquire a second signal energy value of the signal to be analyzed within a preset noise frequency band.

[0041] A preset audio frequency band and a preset noise frequency band can be determined based on the frequency band of the audio signal to be processed and the sampling rate of the audio signal. The signal energy within the preset audio frequency band is calculated to obtain a first signal energy value; the signal energy within the preset noise frequency band is calculated to obtain a second signal energy value.

[0042] For example, the frequency band of speech signals that humans can perceive is 300Hz to 3000Hz, and when the sampling rate of the speech signal is 8kHz, the preset audio frequency band is set to 300Hz to 3000Hz, and the preset noise frequency band is set to 3000Hz to 4000Hz. The first filter and the second filter are used to separate the same signal in different frequency bands. When the signal to be analyzed passes through the two filters in parallel, the first filter separates the signal to be analyzed that is located between 300Hz and 3000Hz, and the second filter separates the signal to be analyzed that is located between 300Hz and 4000Hz. The energy of the 300Hz to 3000Hz frequency band is calculated as the first signal energy value, and the energy of the 3000Hz to 4000Hz frequency band is calculated as the second signal energy value.

[0043] Step 203 : When the ratio of the first signal energy value to the second signal energy value is greater than a preset energy threshold, the signal to be analyzed within the preset audio signal frequency band is used as the audio signal to be processed.

[0044] The preset energy threshold may be a value set according to actual conditions and needs, or a value obtained through experiments or empirical calculations. The scope of protection of the present disclosure is not limited to the setting method of the preset energy threshold.

[0045] After obtaining the ratio of the first signal energy value to the second signal energy value, it can be directly compared with the preset energy threshold, or it can be processed according to a preset rule and then compared with the preset energy threshold. For example, the ratio of the first signal energy value to the second signal energy value can be processed using the following preset formula:

[0046] Processing result = 10 × log10 (first signal energy value / second signal energy value);

[0047] The processing result of processing the first signal energy value and the second signal energy value according to the above formula is compared with the preset energy threshold. If the processing result is not greater than the preset energy threshold, the required audio signal is not included in the signal to be analyzed, and subsequent signal processing is no longer performed; if the processing result is greater than the preset energy threshold, the required audio signal is included in the signal to be analyzed, and the signal of the signal to be analyzed within the preset audio signal frequency band is used as the audio signal to be processed.

[0048] In one embodiment, when generating an audio signal to be processed, a sub-audio signal is added to the audio signal. This sub-audio signal is a sinusoidal signal with a frequency less than 300 Hz, and the specific frequency is set by the upper control layer. Upon receiving the audio signal, the sub-audio signal is separated and compared with a pre-stored set component corresponding to the sub-audio signal. If the comparison result is consistent, the signal is determined to be the audio signal to be processed.

[0049] In one embodiment, the audio signal to be processed needs to be transmitted from a transmitting intercom to a receiving intercom, and this method is implemented on the transmitting intercom. In this case, the audio signal to be processed needs to be pre-conditioned based on the characteristics of the intercom's transmission channel and transmission requirements. This pre-conditioning process includes pre-emphasis, interpolation upsampling, and anti-image filtering.

[0050] Pre-emphasis refers to amplifying the high-frequency components of the signal to compensate for the high-frequency attenuation caused by the channel. Pre-emphasis is implemented using a filter whose transfer function is:

[0051] y(n)=x(n)-0.92x(n-1), n=0,1,2,…,N-1;

[0052] Among them, y(n) represents the filter output, x(n) represents the filter input, N is the frame length, and n represents each frame.

[0053] Interpolation upsampling refers to interpolating the signal after upsampling to increase the signal sampling rate. Specifically, (upsampling factor - 1) sampling points are inserted between two sampling points.

[0054] Image filtering is the process of removing image interference, which is harmonic interference of the main frequency. This is achieved by using a low-pass filter as an anti-image filter.

[0055] In this embodiment, through the pre-adjustment process, the audio signal to be processed is pre-emphasized, interpolated up-sampling and anti-image filtering are performed, so that the signal characteristics of the audio signal are more obvious, which facilitates the subsequent processing of the signal and improves the final audio presentation effect of the audio signal.

[0056] Step 102: Segment the audio signal to obtain audio signals of at least two stages.

[0057] Segmenting an audio signal means dividing a long audio signal into two or more shorter audio signals for processing. The amplitude fluctuation of the segmented audio signal is smaller than that of the entire audio signal, which is more conducive to amplitude adjustment.

[0058] In one embodiment, if Figure 3As shown, the audio signal is segmented to obtain at least two stages of audio signals. The specific process includes the following steps:

[0059] Step 301: grouping continuous sampling points included in the audio signal according to a preset number of sampling points to obtain at least two grouping results, wherein one grouping result includes at least two continuous sampling points;

[0060] In step 302 , the audio signal corresponding to each grouping result is respectively regarded as a phase audio signal, wherein the number of sampling points included in the phase audio signal is equal to or less than a preset number of sampling points.

[0061] Specifically, for example, if the preset number of sampling points is set to 160, if the audio signal contains 1910 sampling points, the 1st to 160th sampling points are considered as the first group, the 161st to 320th sampling points are considered as the second group, and so on, the audio signal is divided into 12 groups. The 12th group contains the 1761st to 1910th sampling points, for a total of 150 sampling points.

[0062] In this embodiment, the number of preset sampling points can be set according to actual conditions and needs. The number of preset sampling points can be a value obtained through experiments or a value set based on experience. The scope of protection of this disclosure is not limited to the specific value of the number of preset sampling points.

[0063] Step 103: Process the audio signal of each stage as follows:

[0064] When the maximum amplitude value of the stage audio signal is less than the first preset amplitude threshold, amplify the amplitude of the stage audio signal so that the maximum amplitude value after amplification is greater than or equal to the first preset amplitude threshold and less than or equal to the transmission amplitude upper limit of the transmission channel of the audio signal;

[0065] When the maximum amplitude value of the stage audio signal is greater than the second preset amplitude threshold, the amplitude of the stage audio signal is adjusted so that the adjusted maximum amplitude value is less than or equal to the transmission amplitude upper limit value of the transmission channel of the audio signal; wherein the first preset amplitude threshold is less than the second preset amplitude threshold.

[0066] In this embodiment, the second preset amplitude threshold is less than or equal to an upper limit of the transmission amplitude of the transmission channel of the audio signal.

[0067] The maximum amplitude value of the audio signal in the stage is compared with the first preset amplitude threshold and the second preset amplitude threshold respectively to determine whether the amplitude of the audio signal needs to be adjusted and how to adjust it.

[0068] When the maximum amplitude value of the stage audio signal is less than the first preset amplitude threshold, that is, the maximum amplitude value of the stage audio signal is small, which means that the overall amplitude of the audio signal at this stage is relatively small, then the amplitude of the audio signal at this stage is amplified. When the maximum amplitude value of the stage audio signal is greater than the second preset amplitude threshold, that is, the maximum amplitude value of the stage audio signal is large, which means that the overall amplitude of the audio signal at this stage is relatively large, and may exceed the transmission amplitude upper limit of the audio signal transmission channel, then the audio signal at this stage is adjusted to limit the amplitude within the transmission amplitude upper limit to avoid peak clipping. When the maximum amplitude value of the stage audio signal is greater than the first preset amplitude threshold and less than the second preset amplitude threshold, it means that the overall amplitude of the audio signal at this stage is relatively appropriate, and no amplitude adjustment is performed.

[0069] In this embodiment, when the maximum amplitude value of the stage audio signal is less than the first preset amplitude threshold, the maximum amplitude value of the stage audio signal can be adjusted to the first preset amplitude threshold, or to any amplitude value between the first preset amplitude threshold and the second preset amplitude threshold. Similarly, when the maximum amplitude value of the stage audio signal is greater than the second preset amplitude threshold, the maximum amplitude value of the stage audio signal can be adjusted to the second preset amplitude threshold, or to the transmission amplitude upper limit, or to any amplitude value between the first preset amplitude threshold and the second preset amplitude threshold.

[0070] In this embodiment, the first preset amplitude threshold and the second preset amplitude threshold can be set according to actual conditions and needs, or can be calculated according to preset rules. For example, the first preset amplitude threshold can be obtained by the following formula:

[0071] The first preset amplitude threshold = 0.1 × the upper limit of the transmission amplitude;

[0072] The second preset amplitude threshold can be obtained by the following formula:

[0073] The second preset amplitude threshold=0.9×the upper limit of the transmission amplitude.

[0074] In one embodiment, when the maximum amplitude value of the stage audio signal is less than a first preset amplitude threshold, the amplitude of the stage audio signal is amplified. The specific implementation process is as follows: when the maximum amplitude value of the stage audio signal is less than the first preset amplitude threshold, the ratio of the first preset amplitude threshold to the maximum amplitude value is used as the first amplitude gain value; and the amplitude of the stage audio signal is amplified by the first amplitude gain value.

[0075] In this embodiment, when the maximum amplitude value of the audio signal in a stage is less than the first preset amplitude threshold, the maximum amplitude value of the audio signal in that stage may be amplified to the first preset amplitude threshold to achieve adjustment of the audio signal in the stage with a smaller amplitude.

[0076] In one embodiment, when the maximum amplitude value of the stage audio signal is greater than the second preset amplitude threshold, the amplitude of the stage audio signal is adjusted. The specific implementation process is as follows: when the maximum amplitude value of the stage audio signal is greater than the second preset amplitude threshold, the ratio of the transmission amplitude upper limit value to the maximum amplitude value is used as the second amplitude gain value; the amplitude of the stage audio signal is adjusted according to the second amplitude gain value.

[0077] In this embodiment, when the maximum amplitude value of the audio signal in a stage is greater than the second preset amplitude threshold, the maximum amplitude value of the audio signal in that stage can be adjusted to the upper limit of the transmission amplitude, thereby achieving adjustment of the audio signal in the stage with a larger amplitude.

[0078] In one embodiment, when the maximum amplitude value of a stage audio signal is greater than a second preset amplitude threshold, the amplitude of the stage audio signal is adjusted so that the adjusted maximum amplitude value is less than or equal to the upper limit of the transmission amplitude of the audio signal transmission channel. If the adjustment methods of two adjacent stage audio signals are different, the amplitude difference at the boundary of the two stage audio signals may be large, resulting in discontinuity of the audio signal and intermittent sound. Therefore, it is necessary to smooth the boundary. Figure 4 The specific processing process is as follows:

[0079] Step 401: obtaining boundary sampling points of audio signals in two adjacent phases;

[0080] Step 402: Obtain N consecutive sampling points including a boundary sampling point from audio information of two adjacent stages, where N is an integer greater than 1, and the N consecutive sampling points include at least two sampling points belonging to audio information of different stages;

[0081] Step 403: interpolate the audio signals corresponding to N consecutive sampling points.

[0082] In this embodiment, the value of N can be set according to actual conditions and needs, and can be set to a fixed value; it can also be set according to the amplitude gain values ​​of the audio signals in two adjacent stages according to preset rules. The greater the difference between the two amplitude gain values, the larger the value of N. When the difference between the two amplitude gain values ​​is less than the preset difference threshold, smoothing processing may not be performed.

[0083] In a specific embodiment, the number of sampling points in both audio signals is 160, N is a fixed value of 40, and the amplitude gain values ​​of the audio signals in the two stages are G1 and G2, respectively. Interpolation is performed on the 20 sampling points in the audio signal in the first stage that include boundary sampling points, and the 20 sampling points in the audio signal in the second stage that include boundary sampling points. The calculation formula for the interpolation unit is as follows:

[0084] Interpolation unit = (G1-G2) / 40.

[0085] In one embodiment, in the above embodiment, the amplitude gain values ​​for adjusting the amplitude of the stage audio signal are all fixed values, that is, linear adjustment is achieved. In addition, more amplitude thresholds can be set, and nonlinear adjustment can be performed under different amplitude thresholds. The specific adjustment process is as follows:

[0086] When the maximum amplitude value is greater than the first preset amplitude threshold and the maximum amplitude value is less than the third preset amplitude threshold, amplifying the amplitude of the stage audio signal according to the ratio of the amplitude value of each sampling point in the stage audio signal to the third preset amplitude threshold, wherein the third preset amplitude threshold is greater than the first preset amplitude threshold and less than the second preset amplitude threshold;

[0087] When the maximum amplitude value is less than the second preset amplitude threshold and the maximum amplitude value is greater than the fourth preset amplitude threshold, the amplitude of the stage audio signal is reduced according to the ratio of the amplitude value of each sampling point in the stage audio signal to the fourth preset amplitude threshold, wherein the fourth preset amplitude threshold is less than the second preset amplitude threshold and greater than the third preset amplitude threshold.

[0088] In this embodiment, the third preset amplitude threshold and the fourth preset amplitude threshold can be set according to actual conditions and needs, or can be calculated according to preset rules. For example, the third preset amplitude threshold can be obtained by the following formula:

[0089] The third preset amplitude threshold = 0.15 × the upper limit of the transmission amplitude;

[0090] The fourth preset amplitude threshold can be obtained by the following formula:

[0091] The fourth preset amplitude threshold=0.85×the upper limit of the transmission amplitude.

[0092] In a specific embodiment, the amplitude of the stage audio signal is amplified according to the ratio of the amplitude value of each sampling point in the stage audio signal to the third preset amplitude threshold. Specifically, when adjusting the stage audio signal, the amplitude gain value obtained by the following formula can be used for adjustment:

[0093] Amplitude gain value=log2(x+1), where x represents the ratio of the third preset amplitude threshold to the amplitude value of the x-th sampling point.

[0094] Similarly, the amplitude of the stage audio signal is amplified according to the ratio of the amplitude value of each sampling point in the stage audio signal to the fourth preset amplitude threshold. Specifically, when adjusting the stage audio signal, the amplitude gain value obtained by the following formula can be used for adjustment:

[0095] Amplitude gain value=log2(y+1), where y represents the ratio of the fourth preset amplitude threshold to the amplitude value of the y-th sampling point.

[0096] In this embodiment, nonlinear gain can be understood as a speed bump: the gain is flattened, but the signal still experiences gain. When the signal is farther from the set amplitude, linear gain allows for faster amplification. When the signal is closer to the set amplitude, nonlinear gain allows for slower amplification. This process improves processing speed. Nonlinear gain, also amplified through a gain function, offers processing speed advantages over negative feedback loop adjustment methods. It also reduces gain differences within each segment, reducing the number of interpolations required for smoothing and further preventing audio signal distortion.

[0097] The audio signal processing method provided by the present disclosure segments the audio signal to be processed to obtain at least two stages of audio signals, and processes each stage of the audio signal separately. When the maximum amplitude value of the stage audio signal is less than a first preset amplitude threshold, the amplitude of the stage audio signal is amplified so that the amplified maximum amplitude value is greater than or equal to the first preset amplitude threshold and less than or equal to the transmission amplitude upper limit of the audio signal transmission channel; when the maximum amplitude value of the stage audio signal is greater than a second preset amplitude threshold, the amplitude of the stage audio signal is adjusted so that the adjusted maximum amplitude value is less than or equal to the transmission amplitude upper limit of the audio signal transmission channel; wherein the first preset amplitude threshold is less than the second preset amplitude threshold.

[0098] Compared to existing technologies, this method adjusts the overall amplitude of the audio signal at each stage based on the relationship between the maximum amplitude value of the audio signal at that stage and a first preset amplitude threshold or a second preset amplitude threshold. If the maximum amplitude value of the audio signal at a stage is small, the amplitude of the audio signal at that stage is amplified; if the maximum amplitude value of the audio signal at a stage is large, the amplitude of the audio signal at that stage is reduced, while ensuring that the maximum amplitude value of the audio signal at each stage does not exceed the transmission amplitude upper limit of the transmission channel.

[0099] The amplitude of the stage audio signal is directly adjusted without using a negative feedback loop, which can ensure the timeliness of the audio signal processing process. At the same time, the amplitude of the audio signal is adjusted separately in segments, rather than amplifying or reducing the amplitude of the audio signal as a whole based on the same gain multiple, to avoid the situation where when a small-amplitude signal is amplified, a large-amplitude signal is also amplified, and then the peak is clipped to cause signal distortion. What is compared with the first preset amplitude threshold or the second preset amplitude threshold is the maximum amplitude value of the stage audio signal. The amplitude of the signal itself is adjusted based on the comparison result between the amplitude value and the amplitude threshold, rather than adjusting the amplitude through energy comparison. This has a better effect on the amplitude adjustment of the audio signal, improves the audio effect presented by the audio signal, and further enhances the user's audio experience.

[0100] Through the pre-adjustment process, the audio signal to be processed is pre-emphasized, interpolated up-sampled, and anti-image filtered, making the signal characteristics of the audio signal more obvious, facilitating subsequent signal processing, and improving the final audio presentation effect of the audio signal.

[0101] Smoothing the audio signals of two adjacent stages can avoid a large amplitude difference at the boundary of the two stages, which would cause discontinuity of the audio signal and intermittent sound, thereby improving the audio presentation effect of the audio signal.

[0102] The nonlinear gain is amplified through the gain function, which still has the advantage of processing speed compared to the negative feedback loop adjustment method. At the same time, it reduces the gain difference of each segment, reduces the number of interpolations that need to be smoothed, and further prevents distortion of the audio signal.

[0103] Based on the same concept, an audio signal processing device is provided in the embodiment of the present disclosure. The specific implementation of the device can be found in the description of the method embodiment part, and the repeated parts will not be repeated. Figure 5 As shown, the device mainly includes:

[0104] An acquisition unit 501 is configured to acquire an audio signal to be processed;

[0105] A segmentation unit 502 is configured to segment the audio signal to obtain audio signals of at least two stages;

[0106] The processing unit 503 is configured to perform the following processing on each stage audio signal: when the maximum amplitude value of the stage audio signal is less than a first preset amplitude threshold, amplify the amplitude of the stage audio signal so that the amplified maximum amplitude value is greater than or equal to the first preset amplitude threshold and less than or equal to the transmission amplitude upper limit of the audio signal transmission channel; when the maximum amplitude value of the stage audio signal is greater than a second preset amplitude threshold, adjust the amplitude of the stage audio signal so that the adjusted maximum amplitude value is less than or equal to the transmission amplitude upper limit of the audio signal transmission channel; wherein the first preset amplitude threshold is less than the second preset amplitude threshold.

[0107] In one embodiment, the processing unit 503 is specifically configured to, when the maximum amplitude value of the stage audio signal is less than the first preset amplitude threshold, use the ratio of the first preset amplitude threshold to the maximum amplitude value as the first amplitude gain value; and amplify the amplitude of the stage audio signal by the first amplitude gain value.

[0108] In one embodiment, the processing unit 503 is specifically configured to use the ratio of the transmission amplitude upper limit value to the maximum amplitude value as the second amplitude gain value when the maximum amplitude value of the stage audio signal is greater than the second preset amplitude threshold; and adjust the amplitude of the stage audio signal according to the second amplitude gain value.

[0109] In one embodiment, if Figure 6 As shown, the audio signal processing apparatus further includes an interpolation unit 504 .

[0110] The interpolation unit 504 is configured to, when the maximum amplitude value of the audio signal in a stage is greater than a second preset amplitude threshold, adjust the amplitude of the audio signal in that stage so that the adjusted maximum amplitude value is less than or equal to the upper limit of the transmission amplitude of the audio signal transmission channel, and then obtain boundary sampling points of the audio signals in two adjacent stages; obtain N consecutive sampling points, including the boundary sampling points, from the audio information of the two adjacent stages, where N is an integer greater than 1, and the N consecutive sampling points include at least two sampling points belonging to audio information in different stages; and interpolate the audio signals corresponding to the N consecutive sampling points.

[0111] In one embodiment, the acquisition unit 501 is specifically used to receive a signal to be analyzed; obtain a first signal energy value of the signal to be analyzed within a preset audio frequency band, and obtain a second signal energy value of the signal to be analyzed within a preset noise frequency band; when the ratio of the first signal energy value to the second signal energy value is greater than a preset energy threshold, the signal to be analyzed within the preset audio signal frequency band is used as the audio signal to be processed.

[0112] In one embodiment, the segmentation unit 502 is specifically configured to group the continuous sampling points contained in the audio signal according to a preset number of sampling points to obtain at least two grouping results, wherein one grouping result includes at least two continuous sampling points; and the audio signal corresponding to each grouping result is respectively used as a stage audio signal, wherein the number of sampling points included in the stage audio signal is equal to or less than the preset number of sampling points.

[0113] In one embodiment, the processing unit 503 is further configured to, when the maximum amplitude value is greater than a first preset amplitude threshold and the maximum amplitude value is less than a third preset amplitude threshold, amplify the amplitude of the stage audio signal according to a ratio of the amplitude value of each sampling point in the stage audio signal to the third preset amplitude threshold, wherein the third preset amplitude threshold is greater than the first preset amplitude threshold and less than the second preset amplitude threshold; and when the maximum amplitude value is less than the second preset amplitude threshold and the maximum amplitude value is greater than a fourth preset amplitude threshold, reduce the amplitude of the stage audio signal according to a ratio of the amplitude value of each sampling point in the stage audio signal to the fourth preset amplitude threshold, wherein the fourth preset amplitude threshold is less than the second preset amplitude threshold and greater than the third preset amplitude threshold.

[0114] Based on the same concept, an electronic device is also provided in the embodiment of the present disclosure, such as Figure 7 As shown, the electronic device mainly includes: a processor 701, a memory 702 and a communication bus 703, wherein the processor 701 and the memory 702 communicate with each other via the communication bus 703. The memory 702 stores a program that can be executed by the processor 701, and the processor 701 executes the program stored in the memory 702 to implement the following steps: obtaining an audio signal to be processed; segmenting the audio signal to obtain at least two stage audio signals; and performing the following processing on each stage audio signal: when the maximum amplitude value of the stage audio signal is less than a first preset amplitude threshold, amplifying the amplitude of the stage audio signal so that the amplified maximum amplitude value is greater than or equal to the first preset amplitude threshold and less than or equal to the transmission amplitude upper limit of the audio signal transmission channel; when the maximum amplitude value of the stage audio signal is greater than a second preset amplitude threshold, adjusting the amplitude of the stage audio signal so that the adjusted maximum amplitude value is less than or equal to the transmission amplitude upper limit of the audio signal transmission channel; wherein the first preset amplitude threshold is less than the second preset amplitude threshold.

[0115] The communication bus 703 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 703 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0116] The memory 702 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor 701.

[0117] The above-mentioned processor 701 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc., and can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0118] The electronic device may be the intercom mentioned in the present disclosure, or other devices capable of implementing the audio signal processing method, such as a smartphone, a tablet computer, etc. The scope of protection of this application is not limited to the specific type of electronic device.

[0119] Based on the same concept, an intercom is provided in the embodiment of the present disclosure. The specific implementation of the intercom can refer to the description of the method embodiment part, and the repeated parts will not be repeated. Figure 8 As shown, the intercom includes a signal processing module 801 and a signal transmission module 802;

[0120] The signal processing module 801 is configured to obtain an audio signal to be processed; segment the audio signal to obtain at least two stages of audio signals; and perform the following processing on each stage of the audio signal: when the maximum amplitude value of the stage audio signal is less than a first preset amplitude threshold, amplify the amplitude of the stage audio signal so that the amplified maximum amplitude value is greater than or equal to the first preset amplitude threshold and less than or equal to the transmission amplitude upper limit of the audio signal transmission channel; when the maximum amplitude value of the stage audio signal is greater than a second preset amplitude threshold, adjust the amplitude of the stage audio signal so that the adjusted maximum amplitude value is less than or equal to the transmission amplitude upper limit of the audio signal transmission channel; wherein the first preset amplitude threshold is less than the second preset amplitude threshold;

[0121] The signal processing module 801 is further configured to transmit the audio signal processed at each stage to the signal transmission module 802;

[0122] The signal transmission module 802 is used to transmit the audio signal processed at each stage to other devices through a transmission channel.

[0123] In one embodiment, the signal processing module 801 is specifically configured to, when the maximum amplitude value of the stage audio signal is less than a first preset amplitude threshold, use the ratio of the first preset amplitude threshold to the maximum amplitude value as a first amplitude gain value; and amplify the amplitude of the stage audio signal by using the first amplitude gain value.

[0124] In one embodiment, the signal processing module 801 is specifically configured to use the ratio of the transmission amplitude upper limit value to the maximum amplitude value as the second amplitude gain value when the maximum amplitude value of the stage audio signal is greater than the second preset amplitude threshold; and adjust the amplitude of the stage audio signal according to the second amplitude gain value.

[0125] In one embodiment, Figure 9 As shown, the intercom further includes a signal interpolation module 803;

[0126] The signal interpolation module 803 is configured to obtain the audio signal after processing the audio signal of each stage transmitted by the signal processing module 801, and then obtain the boundary sampling points of the audio signals of two adjacent stages; obtain N consecutive sampling points including the boundary sampling points from the audio information of the two adjacent stages, where N is an integer greater than 1, and the N consecutive sampling points include at least two sampling points belonging to the audio information of different stages; and interpolate the audio signals corresponding to the N consecutive sampling points.

[0127] In one embodiment, if Figure 10 As shown, the intercom further includes a signal receiving module 804 and a signal detecting module 805;

[0128] The signal receiving module 804 is used to receive the signal to be analyzed and transmit it to the signal detection module 805;

[0129] The signal detection module 805 is used to obtain a first signal energy value of the signal to be analyzed within a preset audio frequency band, and obtain a second signal energy value of the signal to be analyzed within a preset noise frequency band; when the ratio of the first signal energy value to the second signal energy value is greater than a preset energy threshold, the information of the signal to be analyzed within the preset audio signal frequency band is used as the audio signal to be processed, and the audio signal to be processed is transmitted to the signal processing module 801.

[0130] In one embodiment, the signal processing module 801 is specifically used to group the continuous sampling points contained in the audio signal according to a preset number of sampling points to obtain at least two grouping results, wherein one grouping result includes at least two continuous sampling points; and the audio signal corresponding to each grouping result is respectively used as a stage audio signal, wherein the number of sampling points included in the stage audio signal is equal to or less than the preset number of sampling points.

[0131] In one embodiment, the signal processing module 801 is further configured to, when the maximum amplitude value is greater than a first preset amplitude threshold and the maximum amplitude value is less than a third preset amplitude threshold, amplify the amplitude of the stage audio signal according to the ratio of the amplitude value of each sampling point in the stage audio signal to the third preset amplitude threshold, wherein the third preset amplitude threshold is greater than the first preset amplitude threshold and less than the second preset amplitude threshold; and when the maximum amplitude value is less than the second preset amplitude threshold and the maximum amplitude value is greater than a fourth preset amplitude threshold, reduce the amplitude of the stage audio signal according to the ratio of the amplitude value of each sampling point in the stage audio signal to the fourth preset amplitude threshold, wherein the fourth preset amplitude threshold is less than the second preset amplitude threshold and greater than the third preset amplitude threshold.

[0132] In another embodiment of the present disclosure, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is run on a computer, the computer executes the audio signal processing method described in the above embodiment.

[0133] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented using software, all or part of the embodiments 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, the process or function according to the embodiment of the present disclosure is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions are transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, microwave, etc.) method. 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 or data center that includes one or more available media integrated therein. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape, etc.), an optical medium (e.g., a DVD) or a semiconductor medium (e.g., a solid-state hard disk), etc.

[0134] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device that includes the element.

[0135] The foregoing is merely a detailed description of the present invention, intended to enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein, but is to be construed in the widest manner consistent with the principles and novel features claimed herein.

Claims

1. A method for processing an audio signal, characterized in that: include: Obtain the audio signal to be processed; Segmenting the pre-adjusted audio signal to obtain at least two stages of audio signals; The audio signal of each stage is processed as follows: When the maximum amplitude value of the audio signal in the stage is less than a first preset amplitude threshold, amplifying the entire amplitude of the audio signal in the stage so that the maximum amplitude value after amplification is greater than or equal to the first preset amplitude threshold and less than or equal to the transmission amplitude upper limit of the transmission channel of the audio signal; When the maximum amplitude value of the audio signal in the stage is greater than a second preset amplitude threshold, adjusting the overall amplitude of the audio signal in the stage so that the adjusted maximum amplitude value is less than or equal to the transmission amplitude upper limit of the transmission channel of the audio signal; When the maximum amplitude value is greater than the first preset amplitude threshold and the maximum amplitude value is less than a third preset amplitude threshold, a first gain value is calculated based on a ratio of the third preset amplitude threshold to the amplitude value of each sampling point in the stage audio signal to amplify the amplitude of the stage audio signal; wherein the first gain value is calculated according to the following formula: ; in, is the ratio of the third preset amplitude threshold to the amplitude value of each sampling point in the stage audio signal; When the maximum amplitude value is less than the second preset amplitude threshold and the maximum amplitude value is greater than the fourth preset amplitude threshold, a second gain value is calculated based on a ratio of the fourth preset amplitude threshold to the amplitude value of each sampling point in the stage audio signal to reduce the amplitude of the stage audio signal; wherein the second gain value is calculated according to the following formula: ; in, is the ratio of the fourth preset amplitude threshold to the amplitude value of each sampling point in the audio signal of the stage; Wherein, the first preset amplitude threshold is smaller than the second preset amplitude threshold, the third preset amplitude threshold is larger than the first preset amplitude threshold and smaller than the second preset amplitude threshold; the fourth preset amplitude threshold is smaller than the second preset amplitude threshold and larger than the third preset amplitude threshold; The audio signal is smoothed according to the difference in amplitude gain values ​​of the audio signals in adjacent stages and a preset difference threshold.

2. The audio signal processing method according to claim 1, wherein: When the maximum amplitude value of the audio signal in the stage is less than a first preset amplitude threshold, amplifying the amplitude of the audio signal in the stage includes: When the maximum amplitude value of the audio signal in the stage is less than the first preset amplitude threshold, a ratio of the first preset amplitude threshold to the maximum amplitude value is used as a first amplitude gain value; The amplitude of the stage audio signal is amplified by the first amplitude gain value.

3. The audio signal processing method according to claim 1, wherein: When the maximum amplitude value of the audio signal in the stage is greater than a second preset amplitude threshold, adjusting the amplitude of the audio signal in the stage includes: When the maximum amplitude value of the audio signal in the stage is greater than a second preset amplitude threshold, the ratio of the transmission amplitude upper limit value to the maximum amplitude value is used as a second amplitude gain value; The amplitude of the stage audio signal is adjusted according to the second amplitude gain value.

4. The audio signal processing method according to claim 1, wherein: After adjusting the amplitude of the audio signal at the stage so that the adjusted maximum amplitude value is less than or equal to the upper limit of the transmission amplitude of the transmission channel of the audio signal when the maximum amplitude value of the audio signal at the stage is greater than the second preset amplitude threshold, the method further includes: Obtaining boundary sampling points of the audio signals of two adjacent stages; From the two adjacent stage audio signals, obtain the boundary sampling points Continuous sampling points, is an integer greater than 1, The continuous sampling points include at least two sampling points belonging to the audio signal at different stages; Regarding the The audio signals corresponding to the consecutive sampling points are interpolated.

5. The audio signal processing method according to claim 1, wherein: The obtaining of the audio signal to be processed includes: receiving a signal to be analyzed; Acquiring a first signal energy value of the signal to be analyzed within a preset audio frequency band, and acquiring a second signal energy value of the signal to be analyzed within a preset noise frequency band; When the ratio of the first signal energy value to the second signal energy value is greater than a preset energy threshold, the signal to be analyzed within a preset audio signal frequency band is used as the audio signal to be processed.

6. The audio signal processing method according to claim 1, wherein: The pre-adjusted audio signal is segmented to obtain at least two stages of audio signals, including: Grouping the continuous sampling points included in the audio signal according to a preset number of sampling points to obtain at least two grouping results, wherein one of the grouping results includes at least two continuous sampling points; The audio signal corresponding to each of the grouping results is respectively used as a stage audio signal, wherein the number of sampling points included in the stage audio signal is equal to or less than the preset number of sampling points.

7. An audio signal processing device, characterized in that: include: An acquisition unit, configured to acquire an audio signal to be processed; A segmentation unit, configured to segment the pre-adjusted audio signal to obtain audio signals of at least two stages; a processing unit, configured to process the audio signal of each stage as follows: when the maximum amplitude value of the audio signal of the stage is less than a first preset amplitude threshold, amplify the overall amplitude of the audio signal of the stage so that the maximum amplitude value after amplification is greater than or equal to the first preset amplitude threshold and less than or equal to the transmission amplitude upper limit of the transmission channel of the audio signal; When the maximum amplitude value of the stage audio signal is greater than the second preset amplitude threshold, the overall amplitude of the stage audio signal is adjusted so that the adjusted maximum amplitude value is less than or equal to the transmission amplitude upper limit of the transmission channel of the audio signal; when the maximum amplitude value is greater than the first preset amplitude threshold and the maximum amplitude value is less than the third preset amplitude threshold, a first gain value is calculated based on the ratio of the third preset amplitude threshold to the amplitude value of each sampling point in the stage audio signal to amplify the amplitude of the stage audio signal; wherein the first gain value is calculated according to the following formula: ; in, is the ratio of the third preset amplitude threshold to the amplitude value of each sampling point in the stage audio signal; When the maximum amplitude value is less than the second preset amplitude threshold and the maximum amplitude value is greater than the fourth preset amplitude threshold, a second gain value is calculated based on a ratio of the fourth preset amplitude threshold to the amplitude value of each sampling point in the stage audio signal to reduce the amplitude of the stage audio signal; wherein the second gain value is calculated according to the following formula: ; in, is the ratio of the fourth preset amplitude threshold to the amplitude value of each sampling point in the audio signal of the stage; Wherein, the first preset amplitude threshold is smaller than the second preset amplitude threshold, the third preset amplitude threshold is larger than the first preset amplitude threshold and smaller than the second preset amplitude threshold; the fourth preset amplitude threshold is smaller than the second preset amplitude threshold and larger than the third preset amplitude threshold; The audio signal is smoothed according to the difference in amplitude gain values ​​of the audio signals in adjacent stages and a preset difference threshold.

8. An electronic device, characterized in that: include: A processor, a memory, and a communication bus, wherein the processor and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is configured to execute the program stored in the memory to implement the audio signal processing method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the audio signal processing method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Voice signal processing method, voice signal processing device and voice signal processing mobile terminal

    CN105225674A