A multi-channel digital audio signal processing method, device and medium
By digitizing the audio signals output by the audio source device and noise suppression, combined with the optimization of environmental noise and the adjustment of output intensity, the problem of difficulty in dynamic optimization of audio signals in the prior art is solved, and efficient optimization and quantitative evaluation of audio signals are achieved.
Patent Information
- Application Number
- CN202510299759.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-03-14
AI Technical Summary
The prior art is difficult to dynamically optimize the audio signals output by audio source devices based on environmental noise, and the lack of quantization standards makes it difficult to quantify and evaluate the optimization results.
By obtaining the audio signal output by the audio source device, converting it into a digital audio signal, and noise suppression and standardization are performed. Then, secondary optimization is performed based on environmental noise, the noise source direction is obtained, and the output intensity of the audio signal is adjusted according to the noise source direction.
It realizes dynamic optimization of audio signals based on environmental noise, improves the quality of audio signals, and evaluates the effectiveness of optimization results through quantitative standards.
Smart Images

Figure CN119811352B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of audio signal processing, and specifically relates to a multi-channel digital audio signal processing method, device, and medium. Background Art
[0002] A multi-channel digital audio signal refers to a data stream containing multiple independent audio channels, and each channel can transmit one or more audio signals. These channels can represent sound information from different audio sources, such as the left and right channels in stereo audio, or more complex systems such as 5.1 or 7.1 channel surround sound systems, where each channel transmits an independent audio signal. After these signals are converted into digital format, they are synchronously processed and transmitted in a processor to provide a richer and more spatially immersive auditory experience.
[0003] In the prior art, traditional noise suppression usually only focuses on removing background noise, lacks suppression of environmental noise, and cannot dynamically optimize the audio signals output by the audio source device according to environmental noise. At the same time, the existing optimization of audio signals lacks a quantization standard, resulting in the optimization results being difficult to quantitatively evaluate;
[0004] Therefore, the present invention proposes a multi-channel digital audio signal processing method, device, and medium. Summary of the Invention
[0005] The purpose of the present invention is to propose a multi-channel digital audio signal processing method, device, and medium to solve the problems raised in the above background art.
[0006] The technical problem to be solved by the present invention is:
[0007] How to dynamically optimize the audio signals output by the audio source device according to environmental noise and quantify the optimization results.
[0008] To achieve the above purpose, the present invention adopts the following technical solutions:
[0009] A multi-channel digital audio signal processing method is as follows:
[0010] Step S1, obtain the audio signals output by the audio source device and convert the audio signals into digital audio signals;
[0011] Step S2, perform noise suppression on the digital audio signals and standardize the digital audio signals after noise suppression;
[0012] Step S3, obtain the environmental noise of the environment where the audio source device is located and perform secondary optimization on the digital audio signals based on the environmental noise;
[0013] Step S4, obtain the direction of the noise source based on the ambient noise, and adjust the output intensity of the audio signal based on the direction of the noise source;
[0014] Step S5, convert the optimized digital audio signal into an audio signal and output it through the audio source device.
[0015] Furthermore, the said Step S1 includes the following sub-steps:
[0016] Step S11, set the sampling rate corresponding to the audio signal of the audio source device to 40 kHz,
[0017] Step S12, obtain the audio signal output by the audio source device, detect the audio signal, detect the type of the audio signal corresponding to the audio signal, and set the corresponding quantization bit depth based on the type of the audio signal;
[0018] Among them, the types of audio signals include microphone audio signals, musical instrument audio signals, background sound effect audio signals, etc.;
[0019] Step S13, after quantizing the audio signal output by the audio source device to obtain the digital value corresponding to the audio signal, then encode the digital value of the audio signal to obtain the binary number corresponding to the digital value of the audio signal, and integrate the binary numbers to obtain the digital audio signal corresponding to the audio signal.
[0020] Furthermore, when the audio signal type is a microphone audio signal and a musical instrument audio signal, set the quantization bit depth of the microphone audio signal and the musical instrument audio signal to 24-bit quantization;
[0021] When the audio signal type is a background sound effect audio signal, set the quantization bit depth of the background sound effect audio signal to 16-bit quantization.
[0022] Furthermore, the said Step S2 includes the following sub-steps:
[0023] Step S21, perform noise suppression on the digital audio signal;
[0024] Obtain the amplitude value x(i) of any digital audio signal in the digital audio signal, where i is the sampling number when sampling the digital audio signal, i = 1, 2, ……, n, and n is a positive integer. At the same time, obtain the weighting factor w(i); among them, the weighting factor w(i) changes dynamically according to the value of the amplitude value x(i) of the digital audio signal;
[0025] Step S22, calculate the output value of the digital audio signal through the formula y(i) = x(i) × w(i);
[0026] Step S23, standardize the digital audio signal, specifically:
[0027] Traverse the output value y(i) of the digital audio signal to obtain the maximum output value max|y(i)| in the output values of the digital audio signal. At the same time, obtain the target amplitude z after the digital audio signal is normalized, and calculate the output value BZH(i) of the digital audio signal after normalization through the formula. The specific formula is as follows:
[0028] BZH(i) = {y(i) / [max|y(i)|]} × z; where the target amplitude is the maximum amplitude that the digital audio signal can reach after normalization, and the value range of the target amplitude is [-1, 1];
[0029] Step S24, convert the normalized digital audio signal into an audio signal, and calculate the first signal-to-noise ratio of the audio signal;
[0030] If the first signal-to-noise ratio of the audio signal is greater than the first signal-to-noise ratio threshold, it is determined that the normalization of the audio signal is qualified, and proceed to the next step;
[0031] If the first signal-to-noise ratio of the audio signal is less than or equal to the first signal-to-noise ratio threshold, it is determined that the normalization of the audio signal is unqualified, and repeat the noise suppression and normalization steps.
[0032] Further, the step S3 includes the following sub-steps:
[0033] Step S31, place a microphone in the environment where the audio source device is located, construct a microphone array by the microphone, collect the noise in the environment where the audio source device is located through the microphone, and analyze the noise to obtain the environmental noise;
[0034] If the audio source device is outputting sound while the microphone array is collecting noise, remove the output sound of the audio source device in the noise through echo cancellation technology to obtain the environmental noise;
[0035] Step S32, calculate the initial signal-to-noise ratio corresponding to the audio signal output by the audio source device, and use the initial signal-to-noise ratio as the second signal-to-noise ratio threshold of the audio signal;
[0036] Among them, the initial signal-to-noise ratio corresponding to the audio signal output by the audio source device is the common signal-to-noise ratio of the environmental noise and the audio signal output by the audio source device.
[0037] Further, the step S3 also includes the following sub-steps:
[0038] Step S33, analyze the environmental noise in the environment where the audio source device is located, and analyze to obtain the environmental noise type;
[0039] Convert the environmental noise into a frequency-domain signal through fast Fourier transform;
[0040] When the frequency of the frequency-domain signal belongs to the first frequency interval, it is determined that the environmental noise type is high-frequency noise;
[0041] When the frequency of the frequency-domain signal belongs to the second frequency interval, it is determined that the environmental noise type is low-frequency noise;
[0042] Among them, the endpoint value of the first frequency interval is greater than the endpoint value of the second frequency interval, and the endpoint value of the second frequency interval is greater than zero;
[0043] Step S34, convert the standardized audio signal into a digital audio signal again. When the environmental noise type is high-frequency noise, suppress the high-frequency signal band in the standardized digital audio signal;
[0044] When the environmental noise type is low-frequency noise, suppress the low-frequency signal band in the standardized digital audio signal;
[0045] Step S35, convert the frequency-suppressed digital audio signal back into an audio signal, and calculate the second signal-to-noise ratio corresponding to the frequency-suppressed audio signal;
[0046] If the second signal-to-noise ratio is greater than the second signal-to-noise ratio threshold, it is determined that the audio signal suppresses environmental noise, and enter the next step;
[0047] If the second signal-to-noise ratio is greater than the second signal-to-noise ratio threshold, it is determined that the audio signal does not suppress environmental noise, and repeat the above optimization steps until the audio signal suppresses environmental noise.
[0048] Further, the step S4 includes the following sub-steps:
[0049] Step S41, number the microphones in the microphone array, match the environmental noise collected by all the microphones in the microphone array with the microphone numbers, and perform signal weighting on the environmental noise corresponding to the microphones according to the positions and directions of the microphones in the microphone array;
[0050] Step S42, locate the direction of the noise source of the environmental noise through the time delay difference of the environmental noise received by all the microphones in the microphone array;
[0051] Step S43, obtain the noise intensity ZSQj of the environmental noise at any time node, where j is the time node number, j = 1, 2,..., m, and m is a positive integer. Traverse the noise intensity to obtain the maximum noise intensity ZSQo.
[0052] Further, the step S4 also includes the following sub-steps:
[0053] Step S44: Re-convert the frequency-suppressed audio signal into a digital audio signal, obtain the original output intensity ZYS of the left channel and the original output intensity YYS of the right channel in the digital audio signal of the audio source device, and calculate the first left-channel increased intensity ZYZj that needs to be increased in the left channel and the first right-channel increased intensity ZYYj that needs to be increased in the right channel of the audio source device respectively through the following formulas:
[0054] ZYZj = k × (ZSQj / ZSQo) × (ZYS - b), ZYYj = k × (ZSQj / ZSQo) × (YYS - b), where k is an adjustment coefficient with a fixed value, and b is a constant used to control the minimum output intensity of the left and right channels;
[0055] Step S45: Obtain the angle c between the noise source direction and the target listener, and calculate the left-channel output intensity ZSCj and the right-channel output intensity YSCj respectively through the following formulas:
[0056] ZSCj = ZYS + {ZYZj × [1 + cos(JD)]}, ZSCj = YYS + {ZYYj × [1 + cos(JD)]};
[0057] Step S46: Convert the digital audio signal into an audio signal, and calculate the third signal-to-noise ratio corresponding to the audio signal with the adjusted output intensity;
[0058] If the third signal-to-noise ratio is greater than the third signal-to-noise ratio threshold, it is determined that the environmental noise is suppressed by adjusting the output intensity, and proceed to the next step;
[0059] If the third signal-to-noise ratio is less than or equal to the third signal-to-noise ratio threshold, it is determined that the environmental noise is not suppressed by adjusting the output intensity, and repeat the above adjustment steps until the environmental noise is suppressed by adjusting the output intensity;
[0060] Among them, the first signal-to-noise ratio threshold is less than the second signal-to-noise ratio threshold, and the second signal-to-noise ratio threshold is less than the third signal-to-noise ratio threshold.
[0061] In a second aspect, an electronic device, the electronic device includes:
[0062] A memory storing a computer program;
[0063] A processor communicatively connected to the memory, and when the computer program is executed by the processor, a multi-channel digital audio signal processing method is implemented.
[0064] In a third aspect, a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, a multi-channel digital audio signal processing method is implemented.
[0065] In summary, due to the adoption of the above technical solutions, the beneficial effects of the present invention are as follows:
[0066] The present invention first obtains the audio signal output by the audio source device, then converts the audio signal into a digital audio signal, and at the same time suppresses the noise of the digital audio signal, normalizes the digital audio signal after noise suppression, further obtains the ambient noise of the environment where the audio source device is located, performs secondary optimization on the digital audio signal based on the ambient noise, finally obtains the direction of the noise source based on the ambient noise, adjusts the output intensity of the audio signal based on the direction of the noise source, converts the optimized digital audio signal into an audio signal, and outputs it through the audio source device. The present invention dynamically optimizes the audio signal output by the audio source device according to the ambient noise and quantifies the optimization result. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] For the convenience of those skilled in the art to understand, the present invention will be further described below with reference to the accompanying drawings.
[0068] Figure 1 is the overall system block diagram of the present invention;
[0069] Figure 2 is an example diagram of the environment where the audio source device of the present invention is located;
[0070] Figure 3 is an example diagram of the output intensity of the left and right channels of the audio source device before adjustment of the present invention;
[0071] Figure 4 is an example diagram of the output intensity of the left and right channels of the audio source device after adjustment of the present invention;
[0072] Figure 5 is the structural schematic diagram of the electronic device of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0073] The technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0074] Embodiment 1: Please refer to Figures 1-4 As shown, the technical solution provided by the present invention is: a multi-channel digital audio signal processing method, which is used for: when there is noise in the environment where the audio source device is located, optimizing the audio signal of the audio source device to reduce the interference of the noise to the target listener. The method is as follows:
[0075] Step S1, obtain the audio signal output by the audio source device and convert the audio signal into a digital audio signal;
[0076] Among them, the audio source device is specifically an audio player, synthesizer, digital audio workstation, etc., which can connect 24 audio sources and output sound through 24 output channels;
[0077] It should be specifically noted that the audio signal is the sound data in the form of an electrical signal directly emitted by the audio source device, which is an analog signal, such as the analog voltage signal output through the audio interface;
[0078] In this embodiment, the step S1 includes the following sub-steps:
[0079] Step S11, set the sampling rate corresponding to the audio signal of the audio source device to 40 kHz;
[0080] It should be specifically noted that in this embodiment, the frequency response of the digital audio signal finally output by the audio source device is between 20 Hz - 20 kHz ± 0.5 dB. According to the Nyquist theorem, the sampling rate of the audio signal is 40 Hz;
[0081] Step S12, obtain the audio signal output by the audio source device, detect the audio signal, detect the audio signal type corresponding to the audio signal, and set the corresponding quantization bit depth based on the audio signal type;
[0082] It should be specifically noted that identifying the corresponding audio signal type through the audio signal is a prior art. The audio signal type of the audio signal can be judged through the spectral characteristics, dynamic range, and time domain characteristics of the audio signal;
[0083] Among them, the audio signal types include microphone audio signals, musical instrument audio signals, background sound effect audio signals, etc.;
[0084] Specifically, when the audio signal type is a microphone audio signal or a musical instrument audio signal, set the quantization bit depth of the microphone audio signal and the musical instrument audio signal to 24-bit quantization;
[0085] When the audio signal type is a background sound effect audio signal, set the quantization bit depth of the background sound effect audio signal to 16-bit quantization;
[0086] Step S13, quantize the audio signal output by the audio source device to obtain the digital value corresponding to the audio signal, then encode the digital value of the audio signal to obtain the binary number corresponding to the digital value of the audio signal, and integrate the binary numbers to obtain the digital audio signal corresponding to the audio signal.
[0087] Step S2, perform noise suppression on the digital audio signal, and standardize the digital audio signal after noise suppression;
[0088] In this embodiment, step S2 includes the following sub-steps:
[0089] Step S21, perform noise suppression on the digital audio signal;
[0090] Further, obtain the amplitude value x(i) of any digital audio signal in the digital audio signal, where i is the sampling number when sampling the digital audio signal, i = 1, 2, ……, n, n is a positive integer, and at the same time obtain the weighting factor w(i);
[0091] Among them, the weighting factor w(i) changes dynamically according to the value of the amplitude value x(i) of the digital audio signal;
[0092] Step S22, calculate the output value of the digital audio signal through the formula y(i) = x(i) × w(i);
[0093] Step S23, standardize the digital audio signal, specifically:
[0094] Traverse the output value y(i) of the digital audio signal to obtain the maximum output value max|y(i)| in the output value of the digital audio signal, and at the same time obtain the target amplitude z after standardizing the digital audio signal, and calculate the output value BZH(i) of the standardized digital audio signal through the formula. The specific formula is as follows:
[0095] BZH(i) = {y(i) / [max|y(i)|]} × z;
[0096] Among them, the target amplitude is the maximum amplitude that the digital audio signal can reach after standardization, and the value range of the target amplitude is [-1, 1];
[0097] Step S24, convert the standardized digital audio signal into an audio signal, and calculate the first signal-to-noise ratio of the audio signal;
[0098] If the first signal-to-noise ratio of the audio signal is greater than the first signal-to-noise ratio threshold, it is determined that the standardization of the audio signal is qualified, and proceed to the next step;
[0099] If the first signal-to-noise ratio of the audio signal is less than or equal to the first signal-to-noise ratio threshold, it is determined that the standardization of the audio signal is unqualified, and repeat the noise suppression and standardization steps.
[0100] Step S3, obtain the ambient noise of the environment where the audio source device is located, and perform secondary optimization on the digital audio signal based on the ambient noise;
[0101] In this embodiment, step S3 includes the following sub-steps:
[0102] Step S31: Place a microphone in the environment where the audio source device is located, construct a microphone array with the microphone, collect the noise in the environment where the audio source device is located through the microphone, and analyze the noise to obtain the environmental noise;
[0103] Specifically, if the audio source device is outputting sound while the microphone array is collecting noise, the output sound of the audio source device in the noise is removed through echo cancellation technology to obtain the environmental noise;
[0104] It should be specifically noted that echo cancellation technology is an existing technology. Echo cancellation will compare the output sound of the audio source device with the noise received by the microphone array, use the calculated output sound of the audio source device as the echo, and record the noise after removing the echo as the environmental noise;
[0105] Step S32: Calculate the initial signal-to-noise ratio corresponding to the audio signal output by the audio source device, and use the initial signal-to-noise ratio as the second signal-to-noise ratio threshold for the audio signal;
[0106] Among them, the initial signal-to-noise ratio corresponding to the audio signal output by the audio source device is the common signal-to-noise ratio of the environmental noise and the audio signal output by the audio source device;
[0107] It should be specifically noted that the signal-to-noise ratio can be calculated through a spectrum analysis tool;
[0108] Step S33: Analyze the environmental noise in the environment where the audio source device is located to obtain the environmental noise type;
[0109] Specifically, the environmental noise is converted into a frequency-domain signal through fast Fourier transform;
[0110] When the frequency of the frequency-domain signal belongs to the first frequency interval, it is determined that the environmental noise type is high-frequency noise;
[0111] When the frequency of the frequency-domain signal belongs to the second frequency interval, it is determined that the environmental noise type is low-frequency noise;
[0112] Among them, the endpoint value of the first frequency interval is greater than the endpoint value of the second frequency interval, and the endpoint value of the second frequency interval is greater than zero;
[0113] It should be specifically noted that the frequency-domain signal is used to display the amplitude size of the audio signal at different frequencies and show the energy distribution of the audio signal at each frequency;
[0114] Step S34: Convert the standardized audio signal into a digital audio signal again. When the environmental noise type is high-frequency noise, suppress the high-audio signal frequency band in the standardized digital audio signal;
[0115] When the environmental noise type is low-frequency noise, frequency suppression is performed on the low-frequency signal band in the normalized digital audio signal;
[0116] Step S35, convert the frequency-suppressed digital audio signal back into an audio signal, and calculate the second signal-to-noise ratio corresponding to the frequency-suppressed audio signal;
[0117] If the second signal-to-noise ratio is greater than the second signal-to-noise ratio threshold, it is determined that the environmental noise has been suppressed from the audio signal, and proceed to the next step;
[0118] If the second signal-to-noise ratio is greater than the second signal-to-noise ratio threshold, it is determined that the environmental noise has not been suppressed from the audio signal, and repeat the above optimization steps until the environmental noise is suppressed from the audio signal.
[0119] Step S4, as Figures 2-4 shown, obtain the noise source direction based on the environmental noise, and adjust the output intensity of the audio signal based on the noise source direction;
[0120] In this embodiment, the step S4 includes the following sub-steps:
[0121] Step S41, number the microphones in the microphone array, match the environmental noise collected by all the microphones in the microphone array with the microphone numbers according to the microphone numbers, and perform signal weighting on the environmental noise corresponding to the microphones according to the positions and directions of the microphones in the microphone array;
[0122] Among them, performing signal weighting on the environmental noise corresponding to the microphones is used to enhance the signal in the noise direction and weaken the signal in the non-noise direction at the same time;
[0123] Step S42, locate the noise source direction of the environmental noise through the time delay difference of the duration of the environmental noise received by all the microphones in the microphone array;
[0124] Exemplarily, in Figure 2 , A, B, C, D, E, and F are microphones placed in the room, which are constructed into a microphone array. When there is environmental noise emitted from the due east direction, microphones A and B receive the environmental noise simultaneously, microphones C and D receive the environmental noise next, and microphones E and F receive the environmental noise last. Calculate the time delay difference of the duration of the environmental noise received by each microphone, and obtain the noise source direction of the environmental noise through the time delay difference;
[0125] Step S43, obtain the noise intensity ZSQj of the environmental noise at any time node, where j is the number of the time node, j = 1, 2,..., m, and m is a positive integer. Traverse the noise intensity, and the maximum noise intensity ZSQo is obtained through the traversal;
[0126] Step S44: Re-convert the frequency-suppressed audio signal into a digital audio signal, obtain the original output intensity ZYS of the left channel and the original output intensity YYS of the right channel in the digital audio signal of the audio source device, and calculate the first left-channel increase intensity ZYZj that needs to be increased in the left channel and the first right-channel increase intensity ZYYj that needs to be increased in the right channel of the audio source device through the following formulas:
[0127] ZYZj = k × (ZSQj / ZSQo) × (ZYS - b);
[0128] ZYYj = k × (ZSQj / ZSQo) × (YYS - b); where k is an adjustment coefficient with a fixed value, and b is a constant used to control the minimum output intensity of the left and right channels;
[0129] It should be specifically noted that in this embodiment, the output of the audio source device consists of a left channel and a right channel, and the output intensity of the left channel and the right channel can be freely adjusted;
[0130] Step S45: Obtain the angle c between the noise source direction and the target listener, and calculate the left-channel output intensity ZSCj and the right-channel output intensity YSCj through the following formulas:
[0131] ZSCj = ZYS + {ZYZj × [1 + cos(JD)]};
[0132] ZSCj = YYS + {ZYYj × [1 + cos(JD)]};
[0133] Step S46: Convert the digital audio signal into an audio signal, and calculate the third signal-to-noise ratio corresponding to the audio signal with the adjusted output intensity;
[0134] If the third signal-to-noise ratio is greater than the third signal-to-noise ratio threshold, it is determined that the output intensity is adjusted to suppress environmental noise, and proceed to the next step;
[0135] If the third signal-to-noise ratio is less than or equal to the third signal-to-noise ratio threshold, it is determined that the adjustment of the output intensity does not suppress environmental noise, and repeat the above adjustment steps until the adjustment of the output intensity suppresses environmental noise;
[0136] Among them, the first signal-to-noise ratio threshold is less than the second signal-to-noise ratio threshold, and the second signal-to-noise ratio threshold is less than the third signal-to-noise ratio threshold.
[0137] Step S5: Convert the optimized digital audio signal into an audio signal and output it through the audio source device.
[0138] In this application, if there are corresponding calculation formulas, the above calculation formulas are all dimensionless and take their numerical values for calculation. Coefficients such as weight coefficients and proportionality coefficients in the formulas are set to obtain a result value by quantifying each parameter. Regarding the magnitudes of the weight coefficients and proportionality coefficients, as long as the proportional relationship between the parameters and the result value is not affected, it is fine.
[0139] Embodiment 2: Figure 5 Illustrates a schematic structural diagram of an electronic device, as Figure 5 shown. The electronic device may include: a processor, a communications interface, a memory, and a communication bus. Among them, the processor, the communications interface, and the memory complete communication with each other through the communication bus. The processor can call the logical instructions in the memory to execute a multi-channel digital audio signal processing method, which includes: obtaining an audio signal output by an audio source device and converting the audio signal into a digital audio signal; performing noise suppression on the digital audio signal and normalizing the digital audio signal after noise suppression; obtaining the ambient noise of the environment where the audio source device is located and performing secondary optimization on the digital audio signal based on the ambient noise; obtaining the direction of the noise source based on the ambient noise and adjusting the output intensity of the audio signal based on the direction of the noise source; converting the optimized digital audio signal into an audio signal and outputting it through the audio source device.
[0140] In addition, when the logical instructions in the above-mentioned memory are implemented in the form of software functional units and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.
[0141] On the other hand, the present application also provides a computer program product. The computer program product includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a multi-channel digital audio signal processing method provided by each of the above methods. The method includes: obtaining an audio signal output by an audio source device, and converting the audio signal into a digital audio signal; performing noise suppression on the digital audio signal, and normalizing the digital audio signal after noise suppression; obtaining environmental noise of the environment to which the audio source device belongs, and performing secondary optimization on the digital audio signal based on the environmental noise; obtaining the direction of a noise source according to the environmental noise, and adjusting the output intensity of the audio signal based on the direction of the noise source; converting the optimized digital audio signal into an audio signal, and outputting the audio signal through the audio source device.
[0142] In another aspect, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is configured to execute a multi-channel digital audio signal processing method provided by each of the above. The method includes: obtaining an audio signal output by an audio source device, and converting the audio signal into a digital audio signal; performing noise suppression on the digital audio signal, and normalizing the digital audio signal after noise suppression; obtaining environmental noise of the environment to which the audio source device belongs, and performing secondary optimization on the digital audio signal based on the environmental noise; obtaining the direction of a noise source according to the environmental noise, and adjusting the output intensity of the audio signal based on the direction of the noise source; converting the optimized digital audio signal into an audio signal, and outputting the audio signal through the audio source device.
[0143] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative efforts.
[0144] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, also by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0145] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than limiting them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A multi-channel digital audio signal processing method, characterized in that: Here’s how: Step S1, obtaining an audio signal output by an audio source device, and converting the audio signal into a digital audio signal; Step S2, performing noise suppression on the digital audio signal, and standardizing the digital audio signal after noise suppression; Step S3, obtaining the environmental noise of the environment to which the audio source device belongs, and performing secondary optimization on the digital audio signal based on the environmental noise; Step S4, obtaining the direction of the noise source according to the ambient noise, and adjusting the output intensity of the audio signal based on the direction of the noise source; The step S4 includes the following sub-steps: Step S41, numbering the microphones in the microphone array, matching the environmental noise collected by all microphones in the microphone array with the microphone numbers according to the microphone numbers, and performing signal weighting on the environmental noise corresponding to the microphones according to the positions and directions of the microphones in the microphone array; Step S42, locating the direction of the noise source of the ambient noise by using the time delay difference of all microphones in the microphone array receiving the ambient noise; Step S43, obtaining the noise intensity ZSQj of the ambient noise at any time node, where j is the number of the time node, j=1, 2, ..., m, and m is a positive integer, traversing the noise intensity to obtain the maximum noise intensity ZSQo; Step S44, reconvert the frequency suppressed audio signal into a digital audio signal, obtain the original output intensity ZYS of the left channel and the original output intensity YYS of the right channel in the digital audio signal of the audio source device, and calculate the first left channel increase intensity ZYZj and the first right channel increase intensity ZYYj required to be increased for the left channel and the right channel of the audio source device respectively by formulas, and the specific formulas are as follows: ZYZj=k×(ZSQj / ZSQo)×(ZYS-b), ZYYj=k×(ZSQj / ZSQo)×(YYS-b), where k is a fixed value adjustment coefficient and b is a constant used to control the minimum output intensity of the left and right channels; Step S45, obtaining the angle c between the noise source direction and the target listener, and calculating the left channel output intensity ZSCj and the right channel output intensity YSCj by formulas, the specific formulas are as follows: ZSCj=ZYS+{ZYZj×[1+cos(JD)]}, YSCj=YYS+{ZYYj×[1+cos(JD)]}; Step S46, converting the digital audio signal into an audio signal, and calculating a third signal-to-noise ratio corresponding to the audio signal after the output intensity is adjusted; If the third signal-to-noise ratio is greater than the third signal-to-noise ratio threshold, it is determined that the output intensity is adjusted to suppress the environmental noise, and the next step is entered; If the third signal-to-noise ratio is less than or equal to the third signal-to-noise ratio threshold, it is determined that the adjusted output intensity does not suppress the ambient noise, and the above adjustment steps are repeated until the adjusted output intensity suppresses the ambient noise; The first signal-to-noise ratio threshold is smaller than the second signal-to-noise ratio threshold, and the second signal-to-noise ratio threshold is smaller than the third signal-to-noise ratio threshold; Step S5, converting the optimized digital audio signal into an audio signal, and outputting it through an audio source device.
2. A multi-channel digital audio signal processing method according to claim 1, characterized in that: The step S1 includes the following sub-steps: Step S11, setting the sampling rate corresponding to the audio signal of the audio source device to 40kHz, Step S12, acquiring an audio signal output by an audio source device, detecting the audio signal, detecting and obtaining an audio signal type corresponding to the audio signal, and setting a corresponding quantization bit depth based on the audio signal type; The audio signal types include microphone audio signals, instrument audio signals and background sound effect audio signals; Step S13, quantizing the audio signal output by the audio source device to obtain a digital value corresponding to the audio signal, then encoding the digital value of the audio signal to obtain a binary number corresponding to the digital value of the audio signal, and integrating the binary numbers to obtain a digital audio signal corresponding to the audio signal.
3. A multi-channel digital audio signal processing method according to claim 2, characterized in that: When the audio signal type is a microphone audio signal or a musical instrument audio signal, the quantization bit depth of the microphone audio signal and the musical instrument audio signal is set to 24-bit quantization; When the audio signal type is a background sound effect audio signal, the quantization bit depth of the background sound effect audio signal is set to 16-bit quantization.
4. A multi-channel digital audio signal processing method according to claim 1, characterized in that: The step S2 includes the following sub-steps: Step S21, performing noise suppression on the digital audio signal; Obtaining the amplitude value x(i) of any digital audio signal in the digital audio signal, where i is the sampling number when the digital audio signal is sampled, i=1, 2, ..., n, and n is a positive integer, and obtaining the weighting factor w(i) at the same time; wherein the weighting factor w(i) changes dynamically according to the value of the amplitude value x(i) of the digital audio signal; Step S22, calculating the output value of the digital audio signal by the formula y(i)=x(i)×w(i); Step S23, standardizing the digital audio signal, specifically: Traverse the output value y(i) of the digital audio signal to obtain the maximum output value max|y(i)| in the output value of the digital audio signal, and at the same time obtain the target amplitude z of the digital audio signal after standardization, and calculate the output value BZH(i) of the standardized digital audio signal through the formula. The specific formula is as follows: BZH(i)={y(i) / [max|y(i)|]}×z; where the target amplitude is the maximum amplitude that can be achieved after the digital audio signal is standardized, and the value range of the target amplitude is [-1, 1]; Step S24, converting the standardized digital audio signal into an audio signal, and calculating a first signal-to-noise ratio of the audio signal; If the first signal-to-noise ratio of the audio signal is greater than the first signal-to-noise ratio threshold, it is determined that the audio signal is qualified for standardization, and the next step is entered; If the first signal-to-noise ratio of the audio signal is less than or equal to the first signal-to-noise ratio threshold, it is determined that the standardization of the audio signal is unqualified, and the noise suppression and standardization steps are repeated.
5. A multi-channel digital audio signal processing method according to claim 1, characterized in that: The step S3 includes the following sub-steps: Step S31, placing a microphone in the environment to which the audio source device belongs, constructing a microphone array by using the microphone, collecting noise in the environment to which the audio source device belongs through the microphone, and analyzing the noise to obtain environmental noise; If the microphone array is collecting noise while the audio source device is outputting sound, the output sound of the audio source device is removed from the noise by using echo cancellation technology to obtain the ambient noise; Step S32, calculating an initial signal-to-noise ratio corresponding to the audio signal output by the audio source device, and using the initial signal-to-noise ratio as a second signal-to-noise ratio threshold of the audio signal; The initial signal-to-noise ratio corresponding to the audio signal output by the audio source device is a common signal-to-noise ratio of the ambient noise and the audio signal output by the audio source device.
6. A multi-channel digital audio signal processing method according to claim 5, characterized in that: The step S3 also includes the following sub-steps: Step S33, analyzing the environmental noise of the environment to which the audio source device belongs, and obtaining the type of environmental noise by analysis; The environmental noise is converted into a frequency domain signal by fast Fourier transform; When the frequency of the frequency domain signal belongs to the first frequency interval, determining that the type of environmental noise is high frequency noise; When the frequency of the frequency domain signal belongs to the second frequency interval, determining that the type of the environmental noise is low-frequency noise; The endpoint value of the first frequency interval is greater than the endpoint value of the second frequency interval, and the endpoint value of the second frequency interval is greater than zero; Step S34, converting the standardized audio signal into a digital audio signal again, and when the environmental noise type is high-frequency noise, suppressing the frequency of the high audio signal band in the standardized digital audio signal; When the environmental noise type is low-frequency noise, the frequency band of the low-frequency audio signal in the standardized digital audio signal is suppressed; Step S35, reconverting the frequency-suppressed digital audio signal into an audio signal, and calculating a second signal-to-noise ratio corresponding to the frequency-suppressed audio signal; If the second signal-to-noise ratio is greater than the second signal-to-noise ratio threshold, it is determined that the audio signal suppresses the ambient noise, and the process proceeds to the next step; If the second signal-to-noise ratio is greater than the second signal-to-noise ratio threshold, it is determined that the audio signal does not suppress the ambient noise, and the above optimization steps are repeated until the audio signal suppresses the ambient noise.
7. An electronic device, characterized in that: The electronic device comprises: A memory storing a computer program; A processor is communicatively connected to the memory, and when the computer program is executed by the processor, the method described in any one of claims 1 to 6 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Hearing enhancement method and system based on intelligent wearable equipment and wearable equipment
CN111464905A
Automatic music score correction method based on big data
CN113903318A
Voice noise reduction method and device and storage medium
CN114333885A
Long-distance ad hoc network full duplex voice communication system for fire fighting
CN119296559A