Audio signal processing method, device, terminal and storage medium

文档序号:1114586 发布日期:2020-09-29 浏览:28次 中文

阅读说明:本技术 音频信号处理方法、装置、终端及存储介质 (Audio signal processing method, device, terminal and storage medium ) 是由 陈岩 于 2019-03-18 设计创作,主要内容包括:本申请实施例公开了一种音频信号处理方法、装置、终端及存储介质,属于语音处理技术领域。该方法包括获取音频信号,对所述音频信号进行预处理得到和所述音频信号对应的频域下的帧信号;计算所述帧信号的频谱平滑度;确定所述频谱平滑度是否满足预设条件,如果是,则对所述帧信号进行增益处理。本申请实施例中,通过得到频域下的帧信号并进行频谱平滑度计算,对满足预设条件的帧信号进行增益处理,提高了语音处理的精确性和处理效率。(The embodiment of the application discloses an audio signal processing method, an audio signal processing device, a terminal and a storage medium, and belongs to the technical field of voice processing. The method comprises the steps of obtaining an audio signal, preprocessing the audio signal to obtain a frame signal in a frequency domain corresponding to the audio signal; calculating a spectral smoothness of the frame signal; and determining whether the frequency spectrum smoothness meets a preset condition, and if so, performing gain processing on the frame signal. In the embodiment of the application, the frame signals meeting the preset condition are subjected to gain processing by obtaining the frame signals in the frequency domain and performing spectrum smoothness calculation, so that the accuracy and the processing efficiency of voice processing are improved.)

1. An audio signal processing method, comprising:

acquiring an audio signal, and preprocessing the audio signal to obtain a frame signal in a frequency domain corresponding to the audio signal;

calculating a spectral smoothness of the frame signal;

and determining whether the frequency spectrum smoothness meets a preset condition, and if so, performing gain processing on the frame signal.

2. The method of claim 1, wherein preprocessing the audio signal to obtain a frame signal in a frequency domain corresponding to the audio signal comprises:

and performing framing processing on the audio signal, performing windowing processing on a processing result, and performing Fourier transform to obtain a frame signal in a frequency domain corresponding to the audio signal.

3. The method of claim 2, wherein the framing the audio signal, and performing a windowing process on the processing result and then performing a fourier transform on the processing result to obtain a frame signal in a frequency domain corresponding to the audio signal comprises:

performing framing processing on the audio signal x (n) to obtain a signal xm(N), where N is 0,1,2,3.. N-1, m represents the number of frames as the mth frame, and N is the length of each frame;

according to the formula

Figure FDA0001998441160000011

Figure FDA0001998441160000012

for the signal

Figure FDA0001998441160000013

4. The method of claim 3, wherein said calculating the spectral smoothness of the frame signal comprises:

dividing the frame signal X (m, k) into l frequency bandsSignal Xb(m, k), where b is the b-th frequency band, b is 0,1,2,3sL, the number of frequency points contained in each frequency band w is N/l, wherein fsIs the sampling rate;

according to the formula

Figure FDA0001998441160000014

5. The method according to any of claims 1-4, wherein said determining whether said spectral smoothness meets a preset condition comprises:

and determining whether the frequency spectrum smoothness is larger than a preset howling threshold value theta.

6. The method according to any of claims 1-4, wherein the gain processing the frame signal comprises:

according to the formulaPerforming gain processing on the frame signal, wherein g is a gain coefficient and the value range of g is 0 to 0.5, xmAnd (n) is a frame signal in a frequency domain corresponding to the audio signal.

7. The method of any of claim 6, wherein prior to performing gain processing on the frame signal, further comprising:

determining a playing scene corresponding to the audio signal, and determining a gain coefficient value according to the playing scene;

after performing gain processing on the frame signal, the method further includes:

and inputting the audio signal after the gain processing to an audio player for playing.

8. Audio signal processing apparatus, characterized by comprising:

the signal preprocessing module is used for acquiring an audio signal, and preprocessing the audio signal to obtain a frame signal in a frequency domain corresponding to the audio signal;

a smoothness calculation module for calculating spectral smoothness of the frame signal;

and the gain processing module is used for determining whether the frequency spectrum smoothness meets a preset condition, and if so, performing gain processing on the frame signal.

9. A terminal, comprising: processor, memory and computer program stored on the memory and executable on the processor, characterized in that the processor implements the audio signal processing method according to any of claims 1 to 7 when executing the computer program.

10. A storage medium containing terminal-executable instructions, which when executed by a terminal processor, are for performing the audio signal processing method of any one of claims 1-7.

Technical Field

The present disclosure relates to voice processing technologies, and in particular, to an audio signal processing method, an audio signal processing apparatus, a terminal, and a storage medium.

Background

With the development of terminal device hardware and audio processing technology, the terminal device can play audio signals, wherein the audio signals are carriers of frequency and amplitude variation information of sound waves.

In the existing audio signal processing algorithm, for example, a mode of processing an audio signal by introducing a momentum factor on the basis of an LMS (Least Mean Square) algorithm is adopted, and the algorithm has low precision, high complexity and large computation amount.

Disclosure of Invention

The embodiment of the application provides an audio signal processing method, an audio signal processing device, a terminal and a storage medium, and can solve the problems of low audio signal processing precision, high complexity and large computation amount in the related art. The technical scheme is as follows:

in a first aspect, an embodiment of the present application provides an audio signal processing method, including:

acquiring an audio signal, and preprocessing the audio signal to obtain a frame signal in a frequency domain corresponding to the audio signal;

calculating a spectral smoothness of the frame signal;

and determining whether the frequency spectrum smoothness meets a preset condition, and if so, performing gain processing on the frame signal.

In a second aspect, an embodiment of the present application further provides an audio signal processing apparatus, including:

the signal preprocessing module is used for acquiring an audio signal, and preprocessing the audio signal to obtain a frame signal in a frequency domain corresponding to the audio signal;

a smoothness calculation module for calculating spectral smoothness of the frame signal;

and the gain processing module is used for determining whether the frequency spectrum smoothness meets a preset condition, and if so, performing gain processing on the frame signal.

In a third aspect, an embodiment of the present application further provides a terminal, including: a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor implements the audio signal processing method according to embodiments of the present application.

In a fourth aspect, the present application further provides a storage medium containing terminal-executable instructions, which are used to execute the audio signal processing method according to the present application when executed by a terminal processor.

In the scheme provided by the embodiment of the application, by acquiring the audio signal, preprocessing the audio signal to obtain the frame signal in the frequency domain corresponding to the audio signal, calculating the spectral smoothness of the frame signal, determining whether the spectral smoothness meets the preset condition, and if so, performing gain processing on the frame signal, thereby improving the accuracy and the processing efficiency of voice processing.

Drawings

Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:

FIG. 1 is a flow chart of an audio signal processing method provided by an exemplary embodiment of the present application;

FIG. 2 is a flow chart of an audio signal processing method provided by another exemplary embodiment of the present application;

FIG. 3 is a flow chart of an audio signal processing method provided by another exemplary embodiment of the present application;

fig. 4 is a block diagram of an audio signal processing apparatus according to an exemplary embodiment of the present application;

fig. 5 is a block diagram of a terminal according to an exemplary embodiment of the present application.

Detailed Description

The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are for purposes of illustration and not limitation. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.

For example, the audio signal processing method according to the embodiment of the present application may be applied to a terminal, where the terminal includes a processor and a memory. The terminal may include a server, a television, a set-top box, smart glasses, a smart watch, a digital camera, an MP4 player terminal, an MP5 player terminal, a learning machine, a point-to-read machine, an electronic dictionary, a vehicle-mounted terminal, a Virtual Reality (VR) player terminal, an Augmented Reality (AR) player terminal, a mobile phone, a tablet computer, a laptop computer, a desktop computer, an all-in-one computer, or the like.

Referring to fig. 1, fig. 1 shows a flowchart of an audio signal processing method provided by an exemplary embodiment of the present application, the method including:

step S101, obtaining an audio signal, and preprocessing the audio signal to obtain a frame signal in a frequency domain corresponding to the audio signal.

The audio signal is a carrier of frequency and amplitude variation information of the sound wave, the transmission of audio data can be carried out through the audio signal, and the audio signal can be collected by an audio signal collecting device (such as a microphone). In the embodiment of the present application, the audio signal may be a voice uttered by a user, which may be collected by a signal collecting device integrated with the terminal, and the collected audio signal is an analog signal.

When the terminal collects the audio signal, for example, the mobile phone receives the voice of the user in the hands-free state, when the echo cancellation processing is not good, or when two mobile phones are close to each other, the sound with the same frequency is continuously superposed, and the sound (namely, howling) with harsh ears is generated at the other end of the mobile phone call. For another example, when a user makes a multi-user voice call through the voice chat software, a howling phenomenon may occur when the echo cancellation technique fails to process the voice call.

The traditional howling suppression algorithm utilizes a Least Mean Square (LMS) algorithm to construct a wave trap to detect and eliminate howling, but the algorithm has large calculation amount and certain delay, and cannot achieve good effect in a low-delay and complex call scene.

In the embodiment of the present application, an audio signal collected by a microphone is obtained, and the audio signal is preprocessed to obtain a frame signal of the audio signal in a frequency domain. Where the original audio signal is a time domain signal, the time domain is used to describe the waveform of the signal over time, and the frequency domain is used to describe the characteristics of the signal in terms of frequency. For example, the preprocessing method for obtaining the frame signal in the frequency domain corresponding to the audio signal includes performing framing and windowing on the audio signal, and performing fourier transform on a processing result to obtain the frame signal in the frequency domain corresponding to the audio signal in the time domain.

And step S102, calculating the spectral smoothness of the frame signal.

In the embodiment of the application, after frame signals in a frequency domain corresponding to an audio signal are obtained, spectrum smoothness of each frame signal is calculated, where the spectrum smoothness is used to represent a smooth condition of the frame signal, and refers to a relative change of power in the frequency domain, the lower the value of the spectrum smoothness (approaching 0), the lower the possibility of generating a howling is, the larger the value of the spectrum smoothness (approaching 1), the higher the possibility of the frame signal being a howling signal is, and when it is determined that the frame signal is a howling signal (i.e., a howling phenomenon is generated), howling suppression processing needs to be performed to avoid the generation of the howling phenomenon.

In an embodiment of the present application, after obtaining a frame signal X (m, k) in a frequency domain corresponding to an audio signal, the frame signal X (m, k) is divided into signals X of l frequency bandsb(m, k) where b is the b-th band, b is 0,1,2,3uIs the upper frequency point of the frequency band, blFor the lower frequency of this band, an exemplary assumption is made that there are 25 frequency points per band, buIs the 1 st frequency point of the frequency band, blIs the 25 th frequency point of the frequency band, wherein the width of each frequency band is fsL, the number of frequency points contained in each frequency band w is N/l, wherein fsFor the sampling rate, N is the length of each frame, k represents a frequency point, and k is 0,1,2,3.. N-1; the calculation formula for calculating the spectral smoothness γ (m, b) of the frame signal is as follows:

Figure BDA0001998441170000041

step S103, determining whether the frequency spectrum smoothness meets a preset condition, and if so, performing gain processing on the frame signal.

In the embodiment of the present application, a howling threshold θ may be set, and when the value of the spectral smoothness is greater than the howling threshold θ, it may be determined that the spectral smoothness satisfies a preset condition, and then the gain processing is performed on the frame signal. For example, the howling threshold may be in a range of 0.1 to 0.3, and may be specifically set to 0.15.

In the embodiment of the application, after frame signals in a frequency domain corresponding to an audio signal are obtained, spectral smoothness is calculated for each frame signal according to the formula in S102, if a condition is met, the frame signal is directly subjected to gain processing without being restored to a time domain signal and then the time domain signal is processed, meanwhile, a gain processing process is set independently for each frame, the processing accuracy is high, whether gain processing is required or not is determined by comparing the spectral smoothness calculation formula with a subsequent and howling threshold, and the algorithm complexity is remarkably reduced compared with the prior art.

In this embodiment of the present application, performing gain processing on the frame signal includes: according to the formula xm g(n)=gxm(n) performing gain processing on the frame signal, wherein g is a gain coefficient and the value range of g comprises 0 to 0.5, and xmAnd (n) is a frame signal in a frequency domain corresponding to the audio signal.

In the embodiment of the application, an audio signal collected by a microphone is obtained, the audio signal is preprocessed through a howling detection module to obtain a frame signal in a frequency domain corresponding to the audio signal, the frequency spectrum smoothness of each frame in the frame signal is calculated to detect whether the howling phenomenon exists in the frame, if the howling is detected, the frame signal is sent to a howling suppression module, namely the frame signal is subjected to gain processing to obtain a signal subjected to howling suppression, then the signal is sent to a CPU to be subjected to conventional audio signal processing, and finally the processed audio signal is played through a loudspeaker. If the howling phenomenon is not detected, the gain processing is not performed or the gain value is set to 1.

Therefore, by acquiring the audio signal, preprocessing the audio signal to obtain a frame signal in a frequency domain corresponding to the audio signal, calculating the spectral smoothness of the frame signal, determining whether the spectral smoothness meets a preset condition, and if so, performing gain processing on the frame signal, wherein the algorithm complexity is low, and the processing precision and the processing efficiency are both significantly improved by directly processing the frame signal in the frequency domain.

Referring to fig. 2, fig. 2 is a flowchart of an audio signal processing method according to another exemplary embodiment of the present application, which further defines the original step S101, specifically as follows:

step S201, obtaining an audio signal, performing framing processing on the audio signal, performing windowing processing on a processing result, and performing Fourier transform to obtain a frame signal in a frequency domain corresponding to the audio signal.

The audio signal of the user voice is unstable macroscopically and stable microscopically, and has short-time stationarity (the audio signal of the user voice can be considered to be approximately unchanged within 10ms-30 ms), and the fourier transform requires that the input time domain signal is a stable signal, so in the embodiment of the application, the obtained audio signal is firstly subjected to framing processing, in the embodiment of the application, when the framing processing is performed, a mode of continuous interception without mutual overlapping is not adopted, but a mode of certain overlapping is adopted for framing, such as 50% overlapping, wherein the length N of each frame of the framing is an integer, and the framing processing is performed in a mode of taking N to 512.

In the embodiment of the present application, the audio signal x (n) is subjected to framing processing to obtain the signal xm(N), where N is 0,1,2,3.. N-1, m represents the number of frames as the mth frame, and N is the length of each frame. After the framing processing, in order to make the global situation more continuous, avoid the gibbs effect, and make the original voice signal without periodicity present the partial characteristics of the periodic function, windowing processing is performed, for example, a rectangular window, a triangular window, a Hanning window, a Hamming window, a Blackman window, etc. may be adopted

Figure BDA0001998441170000051

For xm(n) performing a windowing process, wherein,

for the signalPerforming Fourier transform, namely: x (m, k) ═ FFT [ X [ ]m(n)]And obtaining a frame signal X (m, k) in a frequency domain, wherein k represents a frequency point, and k is 0,1,2,3.

Step S202, calculating the frequency spectrum smoothness of the frame signal.

In the embodiment of the present application, the frame signal X (m, k) obtained in S201 is divided into signals of l frequency bandsXb(m, k), where b is the b-th frequency band, b is 0,1,2,3sL, the number of frequency points contained in each frequency band w is N/l, wherein fsIs the sampling rate;

according to the formula

Figure BDA0001998441170000061

Calculating the signal XbSpectral smoothness of (m, k) γ (m, b), wherein buIs a frequency point on the frequency band, blWhich is the frequency point under the frequency band.

Step S203, determining whether the frequency spectrum smoothness meets a preset condition, and if so, performing gain processing on the frame signal.

In the embodiment of the present application, the determination condition may be according to the following formula:

wherein, G is 1, which means that howling is not detected, and G is 0, which means that howling is detected, wherein the specific determination condition is that the frequency spectrum smoothness γ (m, b) is greater than the howling threshold θ.

In the embodiment of the application, the formula is shown

Figure BDA0001998441170000063

Performing gain processing on the frame signal, wherein g is a gain coefficient and the value range of g is 0 to 0.5, xmAnd (n) is a frame signal in a frequency domain corresponding to the audio signal.

Therefore, the squeal signal in the audio signal is reasonably and efficiently detected and gain processed, the generation of the squeal phenomenon is effectively avoided, and the communication and playing quality of the audio signal is improved.

Referring to fig. 3, fig. 3 is a flowchart of an audio signal processing method according to another exemplary embodiment of the present application, and step S103 is further defined, which is specifically referred to as follows:

step S301, obtaining an audio signal, performing framing processing on the audio signal, performing windowing processing on a processing result, and performing Fourier transform to obtain a frame signal in a frequency domain corresponding to the audio signal.

Step S302, calculating the frequency spectrum smoothness of the frame signal.

Step S303, determining whether the frequency spectrum smoothness meets a preset condition, if so, determining a playing scene corresponding to the audio signal, and determining a gain factor value according to the playing scene.

In the embodiment of the present application, different audio signal playing scenes correspond to different gain coefficient values, which are exemplarily shown in the following table:

scene Gain value
Game voice 0.2
Telephone conversation 0.1

In the process of processing the audio signal, the playing scene of the audio signal can be judged according to a main program in which the terminal is running, if xx game voice software is run, the current scene is determined to be a game voice scene, and a corresponding gain value (such as 0.2) can be obtained by correspondingly looking up a table.

Step S304, performing gain processing on the frame signal, and inputting the audio signal after the gain processing to an audio player for playing.

Therefore, the howling signal in the audio signal is reasonably and efficiently detected and gain processed, different gain values are selected according to different scenes in the processing process, so that the processing result is more consistent with the current application scene, for example, in the embodiment of the application, the howling is reduced to the maximum degree by setting a lower gain value for the telephone call, and the gain value can be slightly improved in the game voice scene to ensure the authenticity of voice data.

The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.

Fig. 4 is a block diagram of an audio signal processing apparatus according to an exemplary embodiment of the present application. The audio signal processing means may be implemented as all or a part of the terminal by software, hardware or a combination of both. The device includes:

the signal preprocessing module 101 is configured to acquire an audio signal, and preprocess the audio signal to obtain a frame signal in a frequency domain corresponding to the audio signal.

In the embodiment of the present application, an audio signal collected by a microphone is obtained, and the audio signal is preprocessed to obtain a frame signal of the audio signal in a frequency domain. Where the original audio signal is a time domain signal, the time domain is used to describe the waveform of the signal over time, and the frequency domain is used to describe the characteristics of the signal in terms of frequency. For example, the preprocessing method for obtaining the frame signal in the frequency domain corresponding to the audio signal includes performing framing and windowing on the audio signal, and performing fourier transform on a processing result to obtain the frame signal in the frequency domain corresponding to the audio signal in the time domain.

The audio signal of the user voice is unstable macroscopically and stable microscopically, and has short-time stationarity (the audio signal of the user voice can be considered to be approximately unchanged within 10ms-30 ms), and the fourier transform requires that the input time domain signal is a stable signal, so in the embodiment of the application, the obtained audio signal is firstly subjected to framing processing, in the embodiment of the application, when the framing processing is performed, a mode of continuous interception without mutual overlapping is not adopted, but a mode of certain overlapping is adopted for framing, such as 50% overlapping, wherein the length N of each frame of the framing is an integer, and the framing processing is performed in a mode of taking N to 512.

In the embodiment of the present application, the audio signal x (n) is subjected to framing processing to obtain the signal xm(N), where N is 0,1,2,3.. N-1, m represents the number of frames as the mth frame, and N is the length of each frame. After the framing processing, in order to make the global situation more continuous, avoid the gibbs effect, and make the original voice signal without periodicity present the partial characteristics of the periodic function, windowing processing is performed, for example, a rectangular window, a triangular window, a Hanning window, a Hamming window, a Blackman window, etc. may be adoptedFor xm(n) performing a windowing process, wherein,

Figure BDA0001998441170000082

for the signalPerforming Fourier transform, namely: x (m, k) ═ FFT [ X [ ]m(n)]And obtaining a frame signal X (m, k) in a frequency domain, wherein k represents a frequency point, and k is 0,1,2,3.

A smoothness calculation module 102, configured to calculate a spectral smoothness of the frame signal.

In the embodiment of the application, after frame signals in a frequency domain corresponding to an audio signal are obtained, spectrum smoothness of each frame signal is calculated, where the spectrum smoothness is used to represent a smooth condition of the frame signal, and refers to a relative change of power in the frequency domain, the lower the value of the spectrum smoothness (approaching 0), the lower the possibility of generating a howling is, the larger the value of the spectrum smoothness (approaching 1), the higher the possibility of the frame signal being a howling signal is, and when it is determined that the frame signal is a howling signal (i.e., a howling phenomenon is generated), howling suppression processing needs to be performed to avoid the generation of the howling phenomenon.

In an embodiment of the present application, after obtaining a frame signal X (m, k) in a frequency domain corresponding to an audio signal, the frame signal X (m, k) is divided into signals X of l frequency bandsb(m, k) in whichb is the b-th frequency band, b 0,1,2,3uIs the upper frequency point of the frequency band, blFor the lower frequency of this band, an exemplary assumption is made that there are 25 frequency points per band, buIs the 1 st frequency point of the frequency band, blIs the 25 th frequency point of the frequency band, wherein the width of each frequency band is fsL, the number of frequency points contained in each frequency band w is N/l, wherein fsFor the sampling rate, N is the length of each frame, k represents a frequency point, and k is 0,1,2,3.. N-1; the calculation formula for calculating the spectral smoothness γ (m, b) of the frame signal is as follows:

and the gain processing module 103 is configured to determine whether the spectral smoothness meets a preset condition, and if so, perform gain processing on the frame signal.

In the embodiment of the present application, a howling threshold θ may be set, and when the value of the spectral smoothness is greater than the howling threshold θ, it may be determined that the spectral smoothness satisfies a preset condition, and then the gain processing is performed on the frame signal. For example, the howling threshold may be in a range of 0.1 to 0.3, and may be specifically set to 0.15.

In the embodiment of the application, after frame signals in a frequency domain corresponding to an audio signal are obtained, the frequency spectrum smoothness is calculated for each frame signal according to the formula, if the conditions are met, the frame signals are directly subjected to gain processing without being restored to time domain signals and then processed, meanwhile, the gain processing process is set independently for each frame, the processing accuracy is high, whether the gain processing is required or not is judged by comparing the frequency spectrum smoothness calculation formula with a subsequent and howling threshold value, and the algorithm complexity is obviously reduced compared with the prior art.

In this embodiment of the present application, performing gain processing on the frame signal includes: according to the formula

Figure BDA0001998441170000091

Performing gain processing on the frame signal, wherein g is a gain coefficient, and a value range packetIncluding 0 to 0.5, xmAnd (n) is a frame signal in a frequency domain corresponding to the audio signal.

In the embodiment of the application, an audio signal collected by a microphone is obtained, the audio signal is preprocessed through a howling detection module to obtain a frame signal in a frequency domain corresponding to the audio signal, the frequency spectrum smoothness of each frame in the frame signal is calculated to detect whether the howling phenomenon exists in the frame, if the howling is detected, the frame signal is sent to a howling suppression module, namely the frame signal is subjected to gain processing to obtain a signal subjected to howling suppression, then the signal is sent to a CPU to be subjected to conventional audio signal processing, and finally the processed audio signal is played through a loudspeaker. If the howling phenomenon is not detected, the gain processing is not performed or the gain value is set to 1.

Therefore, by acquiring the audio signal, preprocessing the audio signal to obtain a frame signal in a frequency domain corresponding to the audio signal, calculating the spectral smoothness of the frame signal, determining whether the spectral smoothness meets a preset condition, and if so, performing gain processing on the frame signal, wherein the algorithm complexity is low, and the processing precision and the processing efficiency are both significantly improved by directly processing the frame signal in the frequency domain.

In a possible embodiment, the signal preprocessing module 101 is specifically configured to:

and performing framing processing on the audio signal, performing windowing processing on a processing result, and performing Fourier transform to obtain a frame signal in a frequency domain corresponding to the audio signal.

In a possible embodiment, the signal preprocessing module 101 is specifically configured to:

performing framing processing on the audio signal x (n) to obtain a signal xm(N), where N is 0,1,2,3.. N-1, m represents the number of frames as the mth frame, and N is the length of each frame;

according to the formulaFor xm(n) performing a windowing process, wherein,

for the signalAnd performing Fourier transform to obtain a frame signal X (m, k) in a frequency domain, wherein k represents a frequency point, and k is 0,1,2,3.

In a possible embodiment, the smoothness calculation module 102 is specifically configured to:

dividing the frame signal X (m, k) into signals X of l frequency bandsb(m, k), where b is the b-th frequency band, b is 0,1,2,3sL, the number of frequency points contained in each frequency band w is N/l, wherein fsIs the sampling rate;

according to the formula

Figure BDA0001998441170000102

Calculating the signal XbSpectral smoothness of (m, k) γ (m, b), wherein buIs a frequency point on the frequency band, blWhich is the frequency point under the frequency band.

In a possible embodiment, the gain processing module 103 is specifically configured to:

and determining whether the frequency spectrum smoothness is larger than a preset howling threshold value theta.

In a possible embodiment, the gain processing module 103 is specifically configured to:

according to the formula

Figure BDA0001998441170000103

Performing gain processing on the frame signal, wherein g is a gain coefficient and the value range of g is 0 to 0.5, xmAnd (n) is a frame signal in a frequency domain corresponding to the audio signal.

In one possible embodiment, the gain processing module 103 is further configured to:

determining a playing scene corresponding to the audio signal, and determining a gain coefficient value according to the playing scene;

and the playing module 104 is configured to input the audio signal after the gain processing to the audio player for playing after the gain processing is performed on the frame signal.

Referring to fig. 5, fig. 5 is a block diagram of a terminal according to an exemplary embodiment of the present application. The terminal comprises a processor 201 and a memory 202.

The processor 201 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP. The processor 201 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.

The memory 202 is connected to the processor 201 through a bus or other means, and at least one instruction, at least one program, a code set, or a set of instructions is stored in the memory 202, and is loaded and executed by the processor 201 to implement the audio signal processing method according to the above embodiments. The memory 202 includes a volatile memory (english: volatile memory) and a non-volatile memory (english: non-volatile memory). The volatile memory may be a random-access memory (RAM), such as a static random-access memory (SRAM) or a dynamic random-access memory (DRAM). The non-volatile memory may be a read-only memory (ROM), such as a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM). The non-volatile memory may also be a flash memory, a magnetic memory, such as a magnetic tape, a floppy disk, or a hard disk. The non-volatile memory may also be an optical disc.

The embodiment of the present application further provides a storage medium containing terminal executable instructions, where the storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the audio signal processing method according to the above embodiments.

The present application further provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the audio signal processing method according to the above embodiments.

Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.

The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于变分自编码器的声码器实现方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!