Voice gain control method and device, terminal and storage medium
By performing Fourier transform and signal-to-noise ratio calculation on real-time speech signals, the frequency gain coefficient is determined for enhancement processing, which solves the problem of noise interference in real-time voice interaction scenarios and achieves better speech gain control and response speed.
Patent Information
- Application Number
- CN202311622161.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-29
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2043-11-29
AI Technical Summary
Existing technologies have poor voice gain control performance in real-time voice interaction scenarios, especially in noisy environments where the response speed is slow and the effect is poor.
By performing a Fourier transform on the original speech signal of the current frame, the signal-to-noise ratio and amplitude value of each frequency point in the spectrum are calculated, the gain coefficient of the corresponding frequency point is determined, and enhancement processing is performed based on these coefficients to obtain the target speech signal.
Framing the speech signal in the frequency domain reduces noise interference, improves speech gain control and response speed, and enhances speech quality.
Smart Images

Figure CN117912462B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of signal processing technology, and in particular to a voice gain control method, device, terminal, and storage medium. Background Technology
[0002] In real-time voice interaction scenarios, voice quality can be affected by noise in the surrounding environment. To improve voice quality, several common methods in existing technologies include the following.
[0003] The first type is the DAGC (Delayed Automatic Gain Control) algorithm, which determines the gain by measuring the amplitude of the input signal. It typically begins by performing root mean square (RMS) or peak detection on the input signal and then adjusts the gain based on the detected amplitude. This method is simple and intuitive, but it can be affected when dealing with nonlinear signals or in the presence of noise.
[0004] The second type is the DAGC algorithm based on signal statistical properties. This method uses the statistical properties of the signal (such as mean, variance, etc.) to adjust the gain. For example, if the mean of the input signal is too low, the gain can be increased to enhance the signal strength. This method has certain advantages in handling nonlinear and noise problems because it considers the overall characteristics of the signal, not just a single instantaneous value. However, this method requires a certain amount of time to accumulate statistical data, so its response speed may be slower.
[0005] It is evident that existing speech processing methods have poor gain control performance in real-time speech interaction scenarios. Summary of the Invention
[0006] This invention provides a voice gain control method, device, terminal, and storage medium to solve the problem of poor voice gain control in real-time voice interaction scenarios in the prior art.
[0007] In a first aspect, embodiments of the present invention provide a voice gain control method, comprising:
[0008] Perform a Fourier transform on the original speech signal of the current frame to obtain the spectrum of the original speech signal of the current frame, and determine the amplitude value of each frequency point in the spectrum;
[0009] Calculate the signal-to-noise ratio at each frequency point in the spectrum;
[0010] Determine the gain coefficient for each frequency point based on the signal-to-noise ratio and amplitude value at each frequency point;
[0011] The amplitude value of the corresponding frequency point is enhanced based on the gain coefficient of each frequency point to obtain the target speech signal.
[0012] Secondly, embodiments of the present invention provide a voice gain control device, comprising:
[0013] The spectrum acquisition module is used to perform Fourier transform on the original speech signal of the current frame to obtain the spectrum of the original speech signal of the current frame, and to determine the amplitude value of each frequency point in the spectrum.
[0014] The signal-to-noise ratio (SNR) calculation module is used to calculate the SNR at each frequency point in the spectrum.
[0015] The gain coefficient determination module is used to determine the gain coefficient of the corresponding frequency point based on the signal-to-noise ratio and amplitude value of each frequency point;
[0016] The speech enhancement module is used to enhance the amplitude value of the corresponding frequency point based on the gain coefficient of each frequency point to obtain the target speech signal.
[0017] Thirdly, embodiments of the present invention provide a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method as described in any possible implementation of the first aspect above.
[0018] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method as described in any possible implementation of the first aspect above.
[0019] This invention provides a voice gain control method, apparatus, terminal, and storage medium. The method first performs a Fourier transform on the original voice signal of the current frame to obtain its spectrum and determines the amplitude value of each frequency point in the spectrum. Then, it calculates the signal-to-noise ratio (SNR) of each frequency point. Based on the SNR and amplitude value of each frequency point, it determines the gain coefficient for that frequency point. Finally, it enhances the amplitude value of the corresponding frequency point based on the gain coefficients to obtain the target voice signal. This method can perform frame-by-frame processing on real-time voice signals acquired in real-time voice interaction scenarios and determine appropriate gain values for the amplitude values of different frequency points of the original voice signal in the current frame in the frequency domain based on their SNR and amplitude values. This reduces noise interference during gain control, improving not only the voice gain control effect but also the response speed. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart illustrating the implementation of the speech gain control method provided in this embodiment of the invention.
[0022] Figure 2 This is a schematic diagram of the voice gain control device provided in an embodiment of the present invention;
[0023] Figure 3 This is a schematic diagram of the terminal provided in an embodiment of the present invention. Detailed Implementation
[0024] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.
[0025] To make the objectives, technical solutions, and advantages of the present invention clearer, specific embodiments will be described below in conjunction with the accompanying drawings.
[0026] See Figure 1 The document illustrates a flowchart of the speech gain control method provided in an embodiment of the present invention, which is described in detail below:
[0027] S101: Perform a Fourier transform on the original speech signal of the current frame to obtain the spectrum of the original speech signal of the current frame, and determine the amplitude value of each frequency point in the spectrum.
[0028] Specifically, in real-time voice interaction scenarios, after the audio acquisition device acquires the raw voice signal, it stores the raw voice signal in the audio library. The terminal's audio acquisition thread obtains the raw voice signal stored in the audio library and stores the obtained raw voice signal in the cache so that the terminal can extract the raw voice signal in the cache for subsequent voice gain control.
[0029] The above method can collect audio data from the audio library in real time, and can also collect historical audio data stored in the audio library, thus adapting to both real-time voice interaction scenarios and non-real-time interaction scenarios.
[0030] The terminal's audio acquisition thread retrieves the raw speech signal frame by frame from the buffer, then performs a Fourier transform on the current frame's raw speech signal to obtain its spectrum. The horizontal axis of the spectrum represents frequency, and the vertical axis represents the amplitude of the speech at different frequency points. Therefore, after obtaining the spectrum of the current frame's raw speech signal, the amplitude values at different frequency points can be determined. There can be one or more audio acquisition threads.
[0031] In one possible implementation, prior to S101, the method provided in this embodiment further includes:
[0032] A window function is used to extract the current frame's original audio signal from the buffered original audio signal, wherein the step size of the window function is smaller than the window length of the window function.
[0033] In this embodiment, the terminal's data processing thread reads the raw audio signal from the cache using a window function to prevent data leakage. The window function can be a Hamming window, Hanning window, etc.
[0034] Specifically, the terminal uses a window function to window the original speech signal, extracting the current frame of the original speech signal from the buffer. The window function's movement step size is smaller than its window step size, meaning there is overlap between consecutive frames of the original speech signal. This is to further improve the speech processing performance.
[0035] Preferably, the step size of the window function is set to half the window step size of the window function.
[0036] For example, the data processing thread reads 256 new data points each time, concatenates them with the last 256 data points read from the previous frame to obtain 512 data points, and then performs windowing processing to obtain the original audio signal of the current frame.
[0037] After obtaining the original speech signal of the current frame, a Fast Fourier Transform is performed on the original speech signal of the current frame to obtain its spectrum. Then, gain processing is performed on the original speech signal of the current frame in the frequency domain.
[0038] S102: Calculate the signal-to-noise ratio at each frequency point in the spectrum.
[0039] In one possible implementation, the specific implementation process of S102 includes:
[0040] S201: Perform noise estimation on the spectrum to obtain the noise estimation value corresponding to each frequency point.
[0041] In one possible implementation, the specific implementation process of S201 includes:
[0042] The noise is estimated based on the IMCRA (Improved Minima Controlled Recursive Averaging) algorithm to obtain the noise estimate value corresponding to each frequency point.
[0043] Specifically, when estimating noise in the spectrum, MCRA (Minima Controlled Recursive Averaging) or neural network algorithms can also be used.
[0044] S202: Calculate the speech gain corresponding to each frequency point based on the noise estimate value corresponding to each frequency point, and use the speech gain corresponding to each frequency point to filter the spectrum to obtain a clean speech signal in the frequency domain.
[0045] In one possible implementation, the specific implementation process of S202 includes:
[0046] Based on the OMLSA (Optimally-modified log-spectral amplitude) algorithm, the speech gain corresponding to each frequency point is derived by combining the noise estimate value corresponding to each frequency point.
[0047] S203: Subtract the pure speech signal from the spectrum to obtain the noise signal.
[0048] Specifically, the amplitude value of the corresponding frequency point in the clean speech signal is subtracted from the amplitude value of each frequency point in the spectrum to obtain the noise signal.
[0049] S204: Calculate the signal-to-noise ratio at each frequency point based on the energy spectrum of the clean speech signal and the energy spectrum of the noise signal.
[0050] Specifically, the signal-to-noise ratio (SNR) at a given frequency is obtained by dividing the energy value of the clean speech signal at that frequency by the energy value of the noise signal.
[0051] S103: Determine the gain coefficient for each frequency point based on the signal-to-noise ratio and amplitude value.
[0052] In one possible implementation, the specific implementation process of S103 includes:
[0053] Based on the signal-to-noise ratio (SNR) of each frequency point, a first gain coefficient for the corresponding frequency point is determined, wherein the SNR is positively correlated with the first gain coefficient.
[0054] The second gain coefficient for each frequency point is determined based on the amplitude value of each frequency point, and the amplitude value is negatively correlated with the second gain coefficient.
[0055] Multiply the first gain coefficient and the second gain coefficient at the same frequency point to obtain the gain coefficient at that frequency point.
[0056] Specifically, the signal-to-noise ratio (SNR) has an exponential relationship with the first gain coefficient, while the amplitude value has an inverse relationship with the second gain coefficient.
[0057] Specifically, the implementation process of S103 may also include:
[0058] Find the gain coefficient corresponding to the amplitude value and signal-to-noise ratio for each frequency point from the preset gain table. The preset gain table includes the amplitude value, signal-to-noise ratio, gain coefficient, and the correspondence between the three.
[0059] S104: Amplify the amplitude value of the corresponding frequency point based on the gain coefficient of each frequency point to obtain the target speech signal.
[0060] In one possible implementation, the specific implementation process of S104 includes:
[0061] The first speech signal is obtained by multiplying the gain coefficient of each frequency point by the amplitude value of the corresponding frequency point;
[0062] The first speech signal is subjected to inverse Fourier transform to obtain the target speech signal.
[0063] Specifically, this embodiment comprehensively considers amplitude and signal-to-noise ratio to adaptively enhance the speech signal. It can use a larger gain value to enhance the speech at frequency points with small amplitude and high signal-to-noise ratio, and use a smaller gain value to enhance the speech at frequency points with large amplitude and low signal-to-noise ratio. This can solve the problem of noise interference during real-time voice interaction, and has low computational cost and wide applicability.
[0064] In one possible implementation, after obtaining the target speech signal, the method provided in this embodiment further includes:
[0065] The target speech signal of the current frame is superimposed with the final speech signal of the previous frame using the overlap addition method to obtain the final speech signal of the current frame.
[0066] Specifically, this embodiment uses an overlap-addition method to add the overlapping part of the target speech signal in the current frame to the final speech signal in the previous frame, which can improve the signal quality of the final speech signal in the current frame. Furthermore, the latter half of the final speech signal in the current frame can be superimposed with the target speech signal in the next frame to improve the speech quality. By repeating this process, the speech enhancement effect of the entire segment can be better improved, thereby enhancing the overall quality of the speech signal.
[0067] As can be seen from the above embodiments, this embodiment performs frequency-band gain processing on the original speech signal of the current frame in the frequency domain. Compared with the traditional method of using a single gain value across the entire frequency band in the time domain, this avoids the problem of amplifying noise while simultaneously enhancing speech in scenarios where both high-frequency and low-frequency noise are significant. This embodiment uses a lower gain value for frequency bands with low signal-to-noise ratios (SNR) in the high-frequency or low-frequency range, and a higher gain value for the mid-frequency range with high SNR. This not only enhances the speech signal but also avoids interference caused by increased noise, while ensuring speech processing response speed and improving speech quality.
[0068] Secondly, this embodiment combines the noise reduction algorithms IMCRA and OMLSA to better estimate the noise signal and the clean speech signal, thereby improving the accuracy of the signal-to-noise ratio calculation and further improving the speech signal.
[0069] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0070] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.
[0071] Figure 2 A schematic diagram of the voice gain control device provided in an embodiment of the present invention is shown. For ease of explanation, only the parts related to the embodiment of the present invention are shown, and are described in detail below:
[0072] like Figure 2 As shown, the voice gain control device 100 includes:
[0073] The spectrum acquisition module 110 is used to perform Fourier transform on the original speech signal of the current frame to obtain the spectrum of the original speech signal of the current frame, and to determine the amplitude value of each frequency point in the spectrum.
[0074] The signal-to-noise ratio calculation module 120 is used to calculate the signal-to-noise ratio at each frequency point in the spectrum;
[0075] The gain coefficient determination module 130 is used to determine the gain coefficient of the corresponding frequency point based on the signal-to-noise ratio and amplitude value of each frequency point;
[0076] The speech enhancement module 140 is used to enhance the amplitude value of the corresponding frequency point based on the gain coefficient of each frequency point to obtain the target speech signal.
[0077] In one possible implementation, the gain coefficient determination module 130 includes:
[0078] Based on the signal-to-noise ratio (SNR) of each frequency point, a first gain coefficient for the corresponding frequency point is determined, wherein the SNR is positively correlated with the first gain coefficient.
[0079] The second gain coefficient for each frequency point is determined based on the amplitude value of each frequency point, and the amplitude value is negatively correlated with the second gain coefficient.
[0080] Multiply the first gain coefficient and the second gain coefficient at the same frequency point to obtain the gain coefficient at that frequency point.
[0081] In one possible implementation, the signal-to-noise ratio calculation module 120 includes:
[0082] A noise estimation unit is used to perform noise estimation on the spectrum to obtain noise estimation values corresponding to each frequency point;
[0083] The clean speech signal extraction unit is used to calculate the speech gain corresponding to each frequency point based on the noise estimation value corresponding to each frequency point, and to filter the spectrum using the speech gain corresponding to each frequency point to obtain a clean speech signal in the frequency domain.
[0084] A noise signal extraction unit is used to subtract the clean speech signal from the spectrum to obtain a noise signal;
[0085] The signal-to-noise ratio (SNR) calculation unit is used to calculate the SNR at each frequency point based on the energy spectrum of the clean speech signal and the energy spectrum of the noise signal.
[0086] In one possible implementation, the noise signal extraction unit includes:
[0087] The noise is estimated based on the IMCRA algorithm to obtain the noise estimate value corresponding to each frequency point.
[0088] In one possible implementation, the clean speech signal extraction unit includes:
[0089] Based on the OMLSA algorithm, the speech gain corresponding to each frequency point is derived by combining the noise estimation value corresponding to each frequency point.
[0090] In one possible implementation, the voice enhancement module 140 includes:
[0091] The first speech signal is obtained by multiplying the gain coefficient of each frequency point by the amplitude value of the corresponding frequency point;
[0092] The first speech signal is subjected to inverse Fourier transform to obtain the target speech signal.
[0093] In one possible implementation, the voice gain control device 100 further includes:
[0094] The signal acquisition module is used to extract the current frame of original speech signal from the buffered original speech signal using a window function, wherein the moving step size of the window function is smaller than the window length of the window function;
[0095] The voice gain control device 100 also includes:
[0096] The signal overlay module is used to overlay the target speech signal of the current frame with the final speech signal of the previous frame using an overlay addition method to obtain the final speech signal of the current frame.
[0097] Figure 3 This is a schematic diagram of a terminal provided in an embodiment of the present invention. Figure 3 As shown, the terminal 3 in this embodiment includes a processor 30 and a memory 31. The memory 31 stores a computer program 32, and the processor 30 calls and runs the computer program 32 stored in the memory 31 to execute the steps described in the various speech gain control method embodiments above, for example... Figure 1 The steps S101 to S104 are shown. Alternatively, the processor 30 is used to call and run the computer program 32 stored in the memory 31 to implement the functions of each module / unit in the above-described device embodiments, for example... Figure 2 The functions of modules 110 to 140 are shown.
[0098] For example, the computer program 32 can be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 30 to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 32 in the terminal 3. For example, the computer program 32 can be divided into... Figure 2 Modules 110 to 140 are shown.
[0099] The terminal 3 can be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal 3 may include, but is not limited to, a processor 30 and a memory 31. Those skilled in the art will understand that... Figure 3 This is merely an example of terminal 3 and does not constitute a limitation on terminal 3. It may include more or fewer components than shown, or combine certain components, or different components. For example, the terminal may also include input / output devices, network access devices, buses, etc.
[0100] The processor 30 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0101] The memory 31 can be an internal storage unit of the terminal 3, such as a hard disk or memory of the terminal 3. The memory 31 can also be an external storage device of the terminal 3, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the terminal 3. Furthermore, the memory 31 can include both internal storage units and external storage devices of the terminal 3. The memory 31 is used to store the computer program and other programs and data required by the terminal. The memory 31 can also be used to temporarily store data that has been output or will be output.
[0102] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0103] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0104] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0105] In the embodiments provided by this invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0106] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0107] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0108] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various voice gain control method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0109] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions 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 invention, and should all be included within the protection scope of the present invention.
Claims
1. A voice gain control method, characterized in that, include: Perform a Fourier transform on the original speech signal of the current frame to obtain the spectrum of the original speech signal of the current frame, and determine the amplitude value of each frequency point in the spectrum; Calculate the signal-to-noise ratio at each frequency point in the spectrum; Determine the gain coefficient for each frequency point based on the signal-to-noise ratio and amplitude value at each frequency point; The amplitude value of the corresponding frequency point is enhanced based on the gain coefficient of each frequency point to obtain the target speech signal; The step of determining the gain coefficient for each frequency point based on the signal-to-noise ratio and amplitude value includes: Based on the signal-to-noise ratio (SNR) of each frequency point, a first gain coefficient for the corresponding frequency point is determined, wherein the SNR is positively correlated with the first gain coefficient. The second gain coefficient for each frequency point is determined based on the amplitude value of each frequency point, and the amplitude value is negatively correlated with the second gain coefficient. Multiply the first gain coefficient and the second gain coefficient at the same frequency point to obtain the gain coefficient at that frequency point; The calculation of the signal-to-noise ratio at each frequency point in the spectrum includes: Noise estimation is performed on the spectrum to obtain noise estimates for each frequency point; The speech gain corresponding to each frequency point is calculated based on the noise estimate value corresponding to each frequency point, and the spectrum is filtered using the speech gain corresponding to each frequency point to obtain a clean speech signal in the frequency domain. Subtracting the pure speech signal from the spectrum yields the noise signal; The signal-to-noise ratio (SNR) at each frequency point is calculated based on the energy spectrum of the pure speech signal and the energy spectrum of the noise signal.
2. The speech gain control method according to claim 1, characterized in that, The step of performing noise estimation on the spectrum to obtain noise estimation values corresponding to each frequency point includes: The noise is estimated based on the IMCRA algorithm to obtain the noise estimate value corresponding to each frequency point.
3. The speech gain control method according to claim 1, characterized in that, The step of calculating the speech gain corresponding to each frequency point based on the noise estimate value corresponding to each frequency point includes: Based on the OMLSA algorithm, the speech gain corresponding to each frequency point is derived by combining the noise estimation value corresponding to each frequency point.
4. The speech gain control method according to claim 1, characterized in that, The enhancement of the amplitude value of the corresponding frequency point based on the gain coefficient of each frequency point to obtain the target speech signal includes: The first speech signal is obtained by multiplying the gain coefficient of each frequency point by the amplitude value of the corresponding frequency point; The first speech signal is subjected to inverse Fourier transform to obtain the target speech signal.
5. The speech gain control method according to claim 4, characterized in that, Before performing a Fourier transform on the original speech signal of the current frame, the method further includes: A window function is used to extract the current frame's original audio signal from the buffered original audio signal, wherein the moving step size of the window function is smaller than the window length of the window function; After obtaining the target speech signal, the method further includes: The target speech signal of the current frame is superimposed with the final speech signal of the previous frame using the overlap addition method to obtain the final speech signal of the current frame.
6. A voice gain control device, characterized in that, include: The spectrum acquisition module is used to perform Fourier transform on the original speech signal of the current frame to obtain the spectrum of the original speech signal of the current frame, and to determine the amplitude value of each frequency point in the spectrum. The signal-to-noise ratio (SNR) calculation module is used to calculate the SNR at each frequency point in the spectrum. The gain coefficient determination module is used to determine the gain coefficient of the corresponding frequency point based on the signal-to-noise ratio and amplitude value of each frequency point; The speech enhancement module is used to enhance the amplitude value of the corresponding frequency point based on the gain coefficient of each frequency point to obtain the target speech signal; The gain coefficient determination module includes: Based on the signal-to-noise ratio (SNR) of each frequency point, a first gain coefficient for the corresponding frequency point is determined, wherein the SNR is positively correlated with the first gain coefficient. The second gain coefficient for each frequency point is determined based on the amplitude value of each frequency point, and the amplitude value is negatively correlated with the second gain coefficient. Multiply the first gain coefficient and the second gain coefficient at the same frequency point to obtain the gain coefficient at that frequency point; The signal-to-noise ratio calculation module includes: A noise estimation unit is used to perform noise estimation on the spectrum to obtain noise estimation values corresponding to each frequency point; The clean speech signal extraction unit is used to calculate the speech gain corresponding to each frequency point based on the noise estimation value corresponding to each frequency point, and to filter the spectrum using the speech gain corresponding to each frequency point to obtain a clean speech signal in the frequency domain. A noise signal extraction unit is used to subtract the clean speech signal from the spectrum to obtain a noise signal; The signal-to-noise ratio (SNR) calculation unit is used to calculate the SNR at each frequency point based on the energy spectrum of the clean speech signal and the energy spectrum of the noise signal.
7. A terminal, characterized in that, It includes a processor and a memory, the memory being used to store computer programs, and the processor being used to call and run the computer programs stored in the memory to perform the voice gain control method as described in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the speech gain control method as described in any one of claims 1 to 5 above.
Citation Information
Patent Citations
Single-channel voice enhancement method and device, storage medium and terminal
CN111554315A
Voice enhancement method and system, electronic equipment and storage medium
CN112151053A