CN117475976A - Audio processing method, device, electronic equipment and storage medium - Google Patents

Audio processing method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117475976A
CN117475976A CN202210863785.XA CN202210863785A CN117475976A CN 117475976 A CN117475976 A CN 117475976A CN 202210863785 A CN202210863785 A CN 202210863785A CN 117475976 A CN117475976 A CN 117475976A
Authority
CN
China
Prior art keywords
sub
howling
signal
band
audio
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210863785.XA
Other languages
Chinese (zh)
Inventor
练添富
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210863785.XA priority Critical patent/CN117475976A/en
Publication of CN117475976A publication Critical patent/CN117475976A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • G10K11/178Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • G10K11/178Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
    • G10K11/1781Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase characterised by the analysis of input or output signals, e.g. frequency range, modes, transfer functions
    • G10K11/17813Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase characterised by the analysis of input or output signals, e.g. frequency range, modes, transfer functions characterised by the analysis of the acoustic paths, e.g. estimating, calibrating or testing of transfer functions or cross-terms
    • G10K11/17819Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase characterised by the analysis of input or output signals, e.g. frequency range, modes, transfer functions characterised by the analysis of the acoustic paths, e.g. estimating, calibrating or testing of transfer functions or cross-terms between the output signals and the reference signals, e.g. to prevent howling

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The application discloses an audio processing method, an audio processing device, electronic equipment and a storage medium, wherein the audio processing method comprises the following steps: detecting a sub-band signal with howling in the audio signal acquired by the audio acquisition module as a first sub-band signal; based on the howling parameters of the first sub-band signals, carrying out howling suppression processing on the first sub-band signals to obtain second sub-band signals, wherein the howling parameters are used for representing the howling degree of the first sub-band signals; and mixing the second sub-band signal with other sub-band signals except the first sub-band signal in the audio signal to obtain a target audio signal. The method can improve the howling inhibition effect.

Description

Audio processing method, device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of electronic devices, and in particular, to an audio processing method, an apparatus, an electronic device, and a storage medium.
Background
With the progress of the technological level and the living standard, electronic devices (such as headphones, smartphones, tablet computers, etc.) with audio playing function are increasingly used in daily life, especially for listening to music, broadcasting, etc. by using the electronic devices, so that the listening effect of the electronic devices is very important for users. However, in some cases, a howling phenomenon may occur during the use of the electronic device, where the occurrence of howling may affect the user experience, and may easily cause damage to the speaker and the microphone, increase power consumption, and may even cause burning of the circuit.
Disclosure of Invention
The application provides an audio processing method, an audio processing device, electronic equipment and a storage medium, which can improve the howling suppression effect.
In a first aspect, an embodiment of the present application provides an audio processing method, which is applied to an electronic device, where the electronic device includes an audio acquisition module, and the method includes: detecting a sub-band signal with howling in the audio signal acquired by the audio acquisition module as a first sub-band signal; based on the howling parameters of the first sub-band signals, carrying out howling suppression processing on the first sub-band signals to obtain second sub-band signals, wherein the howling parameters are used for representing the howling degree of the first sub-band signals; and mixing the second sub-band signal with other sub-band signals except the first sub-band signal in the audio signal to obtain a target audio signal.
In a second aspect, an embodiment of the present application provides an audio processing apparatus, which is applied to an electronic device, where the electronic device includes an audio acquisition module, and the apparatus includes: the device comprises a howling detection module, a howling suppression module and an audio synthesis module, wherein the howling detection module is used for detecting a sub-band signal with howling in an audio signal acquired by the audio acquisition module to serve as a first sub-band signal; the howling suppression module is configured to perform howling suppression processing on the first subband signal based on a howling parameter of the first subband signal to obtain a second subband signal, where the howling parameter is used to characterize a howling degree of the first subband signal; the audio synthesis module is used for mixing the second sub-band signal with other sub-band signals except the first sub-band signal in the audio signal to obtain a target audio signal.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the audio processing method provided in the first aspect above.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored therein program code that is callable by a processor to perform the audio processing method provided in the first aspect described above.
According to the scheme, through detecting the sub-band signals with howling in the audio signals collected by the audio collection module, the sub-band signals are used as first sub-band signals, howling suppression processing is conducted on the first sub-band signals based on the howling parameters of the first sub-band signals, second sub-band signals are obtained, the howling parameters are used for representing the howling degree of the first sub-band signals, and the second sub-band signals are mixed with other sub-band signals except the first sub-band signals in the audio signals, so that target audio signals for output are obtained. Therefore, the adaptive howling suppression of the sub-band signals based on the howling degree of the sub-band signals with the howling can be realized, the accuracy of the howling suppression is improved, and the howling suppression effect of the electronic equipment is further improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a schematic diagram of an audio system provided in an embodiment of the present application.
Fig. 2 shows an application scenario schematic diagram provided in an embodiment of the present application.
Fig. 3 shows a flow chart of an audio processing method according to an embodiment of the present application.
Fig. 4 shows a flow chart of an audio processing method according to another embodiment of the present application.
Fig. 5 shows a schematic diagram of frequency shift processing in the audio processing method according to the embodiment of the present application.
Fig. 6 shows a schematic diagram of an effect of the frequency shift processing provided in the embodiment of the present application.
Fig. 7 shows another effect schematic of the frequency shift processing provided in the embodiment of the present application.
Fig. 8 shows a schematic diagram of an all-pass filter according to an embodiment of the present application.
Fig. 9 shows another schematic diagram of an all-pass filter provided in an embodiment of the present application.
Fig. 10 shows a schematic diagram of an amplitude-frequency response of an all-pass filter provided in an embodiment of the present application.
Fig. 11 shows a schematic diagram of a phase-frequency response of an all-pass filter provided in an embodiment of the present application.
Fig. 12 shows a flow chart of an audio processing method according to a further embodiment of the present application.
Fig. 13 shows a flow chart of an audio processing method according to a further embodiment of the present application.
Fig. 14 shows a block diagram of an audio processing device according to an embodiment of the present application.
Fig. 15 is a block diagram of an electronic device for performing an audio processing method according to an embodiment of the present application.
Fig. 16 is a storage unit for storing or carrying program codes for implementing the audio processing method according to the embodiment of the present application.
Detailed Description
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application.
In the audio playing system, because the microphone and the loudspeaker are in the same environment and are closely spaced, the sound picked up by the microphone is played by the loudspeaker after being amplified by the power amplifier, and the sound is picked up by the microphone again and is played by the loudspeaker after being amplified by the power amplifier again, so that positive feedback is formed to cause the phenomenon of sound howling, and the sound played by the loudspeaker is sharp and sound which is harsher, the effect of pickup and playing is seriously affected, and sometimes even the power amplifier and the loudspeaker are possibly burnt, especially when the distance between the microphone and the loudspeaker is relatively short, the effect is particularly obvious.
Illustratively, in the audio system shown in fig. 1, the microphone is in the same environment as the loudspeaker, x (n) is the pickup signal of the microphone, y (n) is the play signal of the loudspeaker, F (w) is the signal transfer function from loudspeaker to microphone, i.e. the feedback system, G (w) is the sound system transfer function, and k is the sound system gain. The sound system forms a closed loop system, the closed loop transfer function of which is:
according to the nyquist system stability principle, the amplitude and phase of the open loop gain meet the following conditions,
|G(w)F(w)|≥1;
angle G (w) F (w) =2npi, n is an integer
The system is not stable and the system is not stable,
in recent years, electronic products are more and more, and electronic devices with audio playing function are more and more widely used. In some situations, the electronic device may play the sound collected by the microphone, so that a howling phenomenon may also occur. For example, for headphones, some headphones have a pass-through mode, when a user turns on the pass-through mode of the headphones, the headphone microphone collects ambient sounds outside the headphones, and processes the collected ambient sounds, so that the ambient sounds heard by the user when wearing the headphones are very close to the ambient sounds heard when not wearing the headphones; in addition, if the earphone is touched by a user during the open-and-close mode, the structure of the earphone cavity is changed, which results in a change of the acoustic transmission path, thereby causing a harsh whistling sound.
In the related art, the howling suppression process mainly includes: frequency shift, adaptive notch algorithm, and adaptive feedback suppression algorithm. In the frequency shift mode, the output signal with the frequency changed by the full-band modulation mode enters the system again and cannot be overlapped with the original signal frequency, so that the aim of suppressing howling is fulfilled, but if the howling frequency points are more, the howling suppression effect of the frequency shift mode is not ideal.
The self-adaptive notch algorithm is used for detecting and reducing the gain at the howling frequency point and destroying the gain condition generated by the howling, namely, the notch processing is carried out on the more obvious howling frequency point in the signal, so that the purpose of suppressing the howling is achieved. However, the adaptive notch algorithm needs to accurately detect the howling frequency point, and needs to perform fast fourier transform (fast Fourier transform, FFT) spectrum analysis processing on the signals collected by the microphone to obtain acoustic characteristics to judge the howling frequency point, so that the notch frequency point cannot be well eliminated due to low FFT resolution and misjudgment.
Adaptive feedback suppression algorithm the feedback signal acquired by the microphone is filtered from the microphone signal by using adaptive algorithms such as least mean square algorithm (Least mean square, LMS), normalized least mean square algorithm (Normalized Least mean square, NLMS) and the like. The adaptive feedback suppression algorithm has high computational power requirement and is suitable for a digital signal processor with high processing capacity.
In order to solve the above problems, the inventor proposes an audio processing method, an apparatus, an electronic device, and a storage medium provided by the embodiments of the present application, and performs adaptive howling suppression on a subband signal based on a howling degree of the subband signal with howling, thereby improving accuracy of howling suppression, and further improving a howling suppression effect of the electronic device. The specific audio processing method is described in detail in the following embodiments.
The following describes a scenario related to an embodiment of the present application.
As shown in fig. 2, the electronic device includes a processor 110, a memory 120, an audio acquisition module 130, an op-amp 140, and a speaker 150. The processor 110 may amplify the audio data to be played by the op-amp 140 and then play the audio data by the speaker 150. The audio collection module 130 may be a microphone, and when the speaker 150 plays the audio signal collected by the audio collection module 130, the processor 150 may perform howling detection on the collected audio signal, and perform adaptive howling suppression on the subband signal according to the howling degree of the subband signal with howling, thereby improving accuracy of howling suppression and further improving howling suppression effect of the electronic device.
The following describes the audio processing method provided in the embodiment of the present application in detail with reference to the accompanying drawings.
Referring to fig. 3, fig. 3 is a flow chart illustrating an audio processing method according to an embodiment of the present application. In a specific embodiment, the audio processing method is applied to an audio processing apparatus 400 as shown in fig. 14 and an electronic device 100 (fig. 15) configured with the audio processing apparatus 400. The following details about the flow shown in fig. 3, the audio processing method may specifically include the following steps:
step S110: detecting a howling sub-band signal in the audio signal acquired by the audio acquisition module as a first sub-band signal.
Wherein the audio signal is a frequency, amplitude varying information carrier of sound waves with speech, music, sound effects, etc. In this embodiment of the present application, in a scenario where an electronic device is playing sound collected by an audio collection module, howling detection may be performed on an audio signal collected by the audio collection module, so as to detect a subband signal with howling, and use the subband signal as a first subband signal, where the howling detection is used to detect whether the audio signal includes a signal with howling.
In some embodiments, after the audio signal acquired by the audio acquisition module is acquired, the audio signal may be transformed from a time domain to a frequency domain, and the signal transformed to the frequency domain may be divided into a plurality of sub-band signals, so as to obtain a plurality of sub-band signals; then, it is detected whether howling exists in each of the plurality of subband signals. The frequency domain transformation refers to transforming an audio signal from a time domain to a frequency domain, the time domain refers to describing the relationship between the audio signal and time, and the time domain waveform of the audio signal can express the change of the audio signal along with the time; the frequency domain is a coordinate system used in describing the frequency-wise characteristics of the signal, meaning that the audio signal varies with frequency, and the frequency domain map shows the amount of signal in each given frequency band over a range of frequencies, which may also include information of the phase shift of each sinusoid in order to be able to recombine the frequency components to recover the original time signal.
In one possible implementation, the electronic device may detect whether howling is present in the subband signal based on the power of the subband signal. For example, the electronic device may detect whether a sub-band signal is howled by one or more of Peak-to-Threshold Power Raio (PTPR), peak-to-Average Power Raio (PAPR), peak-to-Neighboring Power Raio (PNPR), peak-to-harmonic power ratio (Peak-to-Harmonics Power Raio, PHPR).
In some embodiments, after the audio signal collected by the audio collection module is obtained, the collected signal may be converted into a digital signal, for example, by an Analog-to-Digital Converter (ADC), the digital signal is input to an amplifier, an amplified audio signal is obtained, and then howling detection is performed on the audio signal as above. Because the audio signal is amplified, the user can conveniently listen to the audio signal and simultaneously conveniently detect and inhibit the howling in the process of subsequent howling detection, howling inhibition and audio playing.
In some embodiments, noise filtering may also be performed on the audio signal before howling detection is performed on the audio signal, considering that noise may be included in the audio signal collected by the audio collection module. The filtering parameters of the noise filtering may be fixed values, or may be set in a targeted manner according to a frequency band corresponding to common noise in the sound collected by the audio collection module of the electronic device, and specific filtering parameters may not be limited.
Step S120: and carrying out howling suppression processing on the first sub-band signal based on the howling parameters of the first sub-band signal to obtain a second sub-band signal, wherein the howling parameters are used for representing the howling degree of the first sub-band signal.
After detecting the above first sub-band signals (i.e., the sub-band signals with howling) in the audio signals collected by the audio collection module, the electronic device may perform howling suppression processing on the first sub-band signals. In this embodiment of the present application, the electronic device may separate the first subband signal from the audio signal through the band pass filter, and then perform howling suppression processing on the first subband signal, where when howling suppression processing is performed on the first subband signal, the first subband signal may be suppressed in a targeted manner according to the howling parameter of the first subband signal, and the processed signal is used as the second subband signal. The howling parameter is used to represent the howling degree of the first subband signal, and the howling parameter may be power, energy, etc. of the first subband signal, which is not limited herein; the degree of suppression of the howling suppression processing performed on the first subband signal may be positively correlated with the degree of howling, whereby adaptive howling suppression may be achieved, and not only loss of sound quality may be avoided. In addition, when the howling suppression is realized by frequency shift and phase shift under the condition that the howling degree is relatively low, the suppression degree of the howling suppression processing is also low, so that the frequency shift amount and the phase shift amount are relatively small, and the howling sub-bands are overlapped after frequency shift or the howling formation of other frequency bands can be reduced.
In some embodiments, the howling suppression processing is performed on the first subband signal, which may be frequency shifting, or the like, on the first subband signal to suppress howling. Wherein, frequency shift refers to changing the frequency of the first sub-band signal, for example, increasing or decreasing the frequency of the first sub-band signal, and the output signal with the changed frequency reenters the system and cannot be overlapped with the original signal frequency, thereby suppressing howling; the phase shift and the frequency shift are the same, and the phase of the first sub-band signal is changed so that the first sub-band signal is not overlapped with the original signal, thereby suppressing howling. Wherein the frequency shift or the amount of change in the phase shift may be positively correlated with the howling parameter. Of course, the specific howling suppression method is not limited, and for example, the howling suppression method may be performed by a notch method, in which the gain of the first subband signal is reduced during the notch method, the gain condition for howling is destroyed, thereby achieving the purpose of howling suppression, and the degree of reduction in the gain may be positively correlated with the degree of howling.
Step S130: and mixing the second sub-band signal with other sub-band signals except the first sub-band signal in the audio signal to obtain a target audio signal.
In this embodiment of the present application, the electronic device performs howling suppression processing on the first subband signal with howling, and after obtaining the second subband signal, may mix the first subband signal with other subband signals in the audio signal, so as to obtain the target audio signal. The other subband signals are subband signals without howling, and the second subband signal is mixed with the other subband signals, so that an audio signal after howling suppression processing is performed on the audio signal acquired by the audio acquisition module can be obtained. The target audio signal, namely the audio signal used for being output by the electronic equipment, is the audio signal obtained by carrying out howling suppression processing on the audio signal acquired by the audio acquisition module, so that the generation of howling can be avoided during playing.
According to the audio processing method, through detecting the sub-band signals with howling in the audio signals collected by the audio collection module and carrying out howling suppression processing only on the sub-band signals with howling, the tone quality damage of non-howling sub-bands can be reduced, the hearing is ensured, and damage to components of electronic equipment is prevented; in addition, because the howling degree of the sub-band signals with howling is based on the self-adaptive howling suppression of the sub-band signals, the accuracy of the howling suppression is improved, the loss of sound quality is avoided, and the howling suppression effect is improved.
Referring to fig. 4, fig. 4 is a flow chart illustrating an audio processing method according to another embodiment of the present application. The audio processing method is applied to the electronic device, and will be described in detail with respect to the flowchart shown in fig. 4, where the audio processing method specifically includes the following steps:
step S210: detecting a howling sub-band signal in the audio signal acquired by the audio acquisition module as a first sub-band signal.
In the embodiment of the present application, step S210 may refer to the content of other embodiments, which is not described herein.
Step S220: and determining a howling suppression parameter based on the howling parameter of the first sub-band signal, wherein the howling parameter is used for representing the howling degree of the first sub-band signal, and the parameter value of the howling suppression parameter is positively correlated with the parameter value of the howling parameter.
In this embodiment of the present application, after detecting the above first subband signal (i.e., the subband signal having howling) in the audio signal collected by the audio collection module, when the electronic device performs the howling suppression processing on the first subband signal, the howling suppression parameter may be determined based on the howling parameter of the first subband signal, and the parameter value of the howling suppression parameter and the parameter value of the howling parameter are positively correlated, that is, the greater the parameter value of the howling parameter, the greater the parameter value of the howling suppression parameter, and otherwise the smaller the parameter value of the howling parameter, the smaller the parameter value of the howling suppression parameter. The howling suppression parameter is determined by a howling suppression process, for example, if the howling suppression process is performed by a frequency shift method, the howling suppression parameter is a frequency offset, that is, a frequency shift amount (a change amount of frequency), and if the howling suppression process is performed by a phase shift method, the howling suppression parameter is a phase offset, that is, a phase shift amount (a change amount of phase), and if the howling suppression process is performed by a notch process, the howling suppression parameter is a decrease amount of gain.
In some embodiments, the electronic device may obtain the howling parameter of the first subband signal before performing the howling suppression process on the first subband signal based on the howling parameter of the first subband signal. The howling parameter may include power of the first subband signal, a detected value of an envelope detected signal corresponding to the first subband signal, energy, and the like, and specifically the howling parameter may not be limited.
In one possible embodiment, the howling parameter may comprise the power of the first sub-band signal. The electronic equipment can acquire a power spectrum corresponding to the first sub-band signal; and acquiring the power of the first sub-band signal based on the power spectrum as a howling parameter of the first sub-band signal. The power of the first sub-band signal can be determined by acquiring a power spectrum of the first sub-band signal according to the change condition of the signal power along with the frequency, that is, the distribution condition of the signal power in the frequency domain. The power of the signal having howling can reflect the degree of howling, and the greater the power, the greater the degree of howling, and conversely, the smaller the power, the lesser the degree of howling.
In another possible embodiment, the howling parameter may include a detected value of an envelope detected signal corresponding to the first subband signal. The electronic equipment can acquire an envelope detection signal corresponding to the first sub-band signal; and obtaining the detection value of the envelope detection signal as the howling parameter of the first sub-band signal. The electronic device may perform envelope detection on the first subband signal to obtain an envelope detection signal, and further determine the detection value according to the envelope detection signal. The detection value of the envelope detection signal can reflect the howling degree, and the greater the detection value is, the greater the howling degree is, whereas the smaller the detection value is, the smaller the howling degree is.
In some embodiments, a mapping relationship between the howling suppression parameter and the howling parameter may be pre-stored in the electronic device, and in the mapping relationship, a parameter value of the howling suppression parameter and a parameter value of the howling parameter are positively correlated. After the electronic device obtains the howling parameters of the first subband signal, when determining the howling suppression parameters, the electronic device may determine, according to the mapping relationship, the howling suppression parameters corresponding to the howling parameters of the first subband signal.
Step S230: and carrying out howling suppression processing on the first sub-band signal based on the howling suppression parameter to obtain a second sub-band signal.
In this embodiment of the present application, after the electronic device determines the howling suppression parameter, the howling suppression processing may be performed on the first subband signal based on the determined howling suppression parameter, and a signal obtained after the howling suppression processing may be used as the second subband signal.
In some embodiments, the howling suppression parameter may include a frequency offset. The electronic device may perform frequency shift processing on the first subband signal based on the frequency offset to obtain a second subband signal. If the frequency offset is positive, the frequency of the first sub-band signal can be increased according to the frequency offset; when the frequency offset is negative, the frequency of the first subband signal may be reduced according to the frequency offset.
In one possible implementation, a frequency shifter may be provided in the electronic device, and the frequency offset of the frequency shifter may be adjusted. Based on this, the electronic device may adjust the frequency offset of the frequency shifter according to the howling suppression parameter determined above, and then input the first subband signal to the frequency shifter, thereby obtaining a frequency-shifted signal, and use the frequency-shifted signal as the second subband signal.
In another possible implementation manner, the electronic device may perform frequency shift processing on the first subband signal through the first preset filter based on the frequency offset to obtain the second subband signal. Wherein the first predetermined filter may be a hilbert transform filter (Hilbert Transform Filter).
Optionally, the electronic device may acquire a target sine signal and a target cosine signal based on the frequency offset; filtering the first sub-band signal based on the Hilbert transform filter to obtain a first intermediate signal; obtaining the product of the target sinusoidal signal and the first intermediate signal to obtain a second intermediate signal; obtaining the product of the target cosine signal and the first sub-band signal to obtain a third intermediate signal; and adding the second intermediate signal and the third intermediate signal to obtain a second sub-band signal.
In this embodiment, the frequency offset Δf may be expressed as:Δf=sin(2*π*f/fs)*f max wherein f is the frequency of the oscillator, fs is the resonant frequency of the oscillator, the oscillator is used for generating the target sine signal and the target cosine signal, f max Is the maximum value of the frequency offset. f may be less than 10 hertz (Hz).
The electronics can determine the angular frequency ω0 of the desired sine signal and cosine signal based on the frequency offset Δf, where ω0=2×pi×Δf/fs. Based on this, the oscillator can be controlled to generate a target sine signal-sin (ω0n), and a target cosine signal cos (ω0n), based on ω0, and frequency shift is achieved with-sin (ω0n) and cos (ω0n). Alternatively, the oscillator may be a digital oscillator to generate different sine and cosine signals as required.
Referring to fig. 5, the electronic device obtains a first intermediate signal conv (x (n), h (n)) by inputting a time domain signal x (n) of the first subband signal to the hilbert transform filter, wherein conv represents convolution or filtering processing, and then multiplies the first intermediate signal conv (x (n), h (n)) by a target sinusoidal signal sin (ω0n) to obtain a second intermediate signal y 1 =conv (x (n), h (n)) (-sin (w 0 n)); in addition, the time domain signal x (n) of the first sub-band signal is multiplied by the target cosine signal to obtain a third intermediate signal y 2 =x (n) ×cos (w 0 n); then the second intermediate signal and the third intermediate signal are added to obtain a second subband signal y (n) =y 1 (n)+y 2 (n). Therefore, the frequency shift processing of the frequency shift amount delta f can be realized on the first sub-band signal, when the frequency shift amount delta f is dynamically changed along with the howling parameters of the first sub-band signal, the frequency shift amount can be dynamically adjusted, the effect of self-adaptive frequency shift processing is achieved, and further, the frequency shift amount is relatively smaller under the condition that the parameter values of the howling parameters are relatively lower, so that the howling sub-bands are overlapped after frequency shift or the howling formation of other frequency bands is stimulated can be reduced. Exemplary, as shown in FIG. 6, FIG. 6 shows a time domain effect graph of shifting a 600Hz sine wave by 10Hz in the above manner, as shown in FIG. 7, FIG. 7 shows a frequency domain effect graph of shifting a 600Hz sine wave by 10Hz in the above manner, when the frequency offset Δf is at a low frequencyWhen the upper and lower frequency shift intervals are changed, the generation of howling can be effectively inhibited.
In some embodiments, the howling suppression parameter may include a phase offset. The electronic device may perform phase shift processing on the first subband signal based on the phase offset amount, and use a signal obtained by the phase shift processing as the second subband signal. The phase offset is positive, and the phase of the first sub-band signal can be advanced according to the phase offset; when the phase shift amount is negative, the phase of the first subband signal may be shifted backward by the phase shift amount.
In one possible implementation, a phase shifter may be provided in the electronic device, the phase shift amount of which may be adjusted. Based on this, the electronic device may adjust the phase offset of the phase shifter according to the howling suppression parameter determined above, and then input the first subband signal to the phase shifter, thereby obtaining a phase-shifted signal, and use it as the second subband signal.
In another possible implementation manner, the electronic device may perform phase shifting processing on the first subband signal through a second preset filter based on the phase offset to obtain a second subband signal. The second preset filter may be an all-pass filter, which does not have a so-called filtering function, and is used for realizing functions of phase correction, delay equalization, and the like by changing the phase of the input signal.
Optionally, the transfer function of the all-pass filter is as follows:
where z represents the z-domain, g represents the gain, and d represents the delay.
As shown in fig. 8, fig. 8 shows a schematic structure of an all-pass filter, based on which, based on the all-pass filter, the delay d is adaptively adjusted to a filter with a constant amplitude-frequency response and a dynamically changed phase, so as to realize the phase corresponding to the phase offset And (5) adjusting. As shown in fig. 9, the all-pass filter shown in fig. 8 is adjusted, and the oscillator inputs the delay signal d to z of the all-pass filter -d In order to dynamically adjust the phase, where d=sin (2×pi×f/fs×n) ×m+q, f is the frequency of the oscillator, fs is the resonant frequency of the oscillator, f is typically less than 10hz, M is the maximum modulation delay sample value, and Q is the fixed delay sample value. Alternatively, the oscillator may be a sine wave oscillator, a triangular wave oscillator, or the like, and is not limited herein. Illustratively, as shown in fig. 10, fig. 10 shows an amplitude-frequency response diagram of the above all-pass filter, and as shown in fig. 11, fig. 11 shows a phase-frequency response diagram of the above all-pass filter, it can be seen that the phase shift process corresponding to the above phase shift amount can be implemented by the all-pass filter.
Therefore, the frequency shift processing of the phase shift amount can be realized, when the phase shift amount is dynamically changed along with the howling parameters of the first sub-band signal, the phase shift amount can be dynamically adjusted, the effect of self-adaptive phase shift processing is achieved, and further, the phase shift amount is relatively smaller under the condition that the parameter value of the howling parameters is relatively lower, so that the howling sub-bands are overlapped or the howling formation of other frequency bands is stimulated after the frequency shift is reduced.
In still other embodiments, the howling suppression parameter may include a gain reduction amount. The electronic device may reduce the gain of the first subband signal by the corresponding gain based on the gain reduction amount, thereby performing howling suppression processing on the first subband signal in a manner of implementing notch processing.
Step S240: and mixing the second sub-band signal with other sub-band signals except the first sub-band signal in the audio signal to obtain a target audio signal.
In the embodiment of the present application, step S240 may refer to the content of other embodiments, which is not described herein.
It should be noted that, in the foregoing embodiments, different embodiments may be combined, and in one possible embodiment, the howling suppression parameter may include a frequency offset and a phase offset, and the electronic device may adaptively shift the frequency of the first subband signal according to the determined frequency offset, and then adaptively shift the phase of the first subband signal according to the phase offset, so as to obtain the second subband signal; and then mixing the second sub-band signal with other sub-band signals to obtain a target audio signal, converting the target audio signal into an analog signal through a digital-to-analog converter (DAC) after the target audio signal passes through a sound system gain K, amplifying the analog signal through an Amplifier (AMP), outputting the amplified analog signal to a loudspeaker, and playing the amplified analog signal through the loudspeaker. Optionally, the electronic device may decompose the howling suppression process into two parts according to the howling parameter of the first subband signal, where one part is implemented by frequency shifting and the other part is implemented by phase shifting, so that the frequency offset and the phase offset may be determined respectively, where the frequency offset may be smaller than an offset required for howling suppression by frequency shifting alone, and the phase offset may be smaller than an offset required for howling suppression by phase shifting alone, so that the formation of howling in other frequency bands may be further reduced by overlapping or exciting after frequency shifting the howling subbands. In this embodiment, the phase shift processing may be performed on the first subband signal and then the frequency shift processing may be performed, and the order of the two may not be limited.
According to the audio processing method provided by the embodiment of the application, the frequency offset or the phase offset is determined according to the detected howling parameters of the sub-band signals with howling, and then the frequency shift processing or the phase shift processing is carried out according to the determined parameters, so that the frequency offset or the phase offset is smaller, the howling sub-bands can be reduced to overlap or excite the howling formation of other frequency bands after the frequency shift, and the howling suppression effect is improved.
Referring to fig. 12, fig. 12 is a flow chart illustrating an audio processing method according to another embodiment of the present application. The audio processing method is applied to the electronic device, and will be described in detail with respect to the flowchart shown in fig. 12, where the audio processing method specifically includes the following steps:
step S310: and carrying out preset processing on the audio signals acquired by the audio acquisition module to obtain a plurality of sub-band signals of each frame of audio signals in the multi-frame audio signals.
In the embodiment of the application, when the audio signal collected by the audio collection module is subjected to howling detection, the audio signal can be subjected to preset processing, so that a plurality of sub-band signals of each frame of audio signal in the multi-frame audio signal are obtained. Wherein the preset processing comprises analog-to-digital conversion, downsampling, framing, and performing N-point (sampling point) Fast Fourier Transform (FFT) after windowing, thereby obtaining a plurality of sub-band signals X (omega) i ,m),X(ω i M) represents an ith subband ω of an mth frame signal at a certain time i
It will be appreciated that the audio signal may be framed and windowed in order to better satisfy the periodicity requirements of the fourier transform process for the time domain signal, reducing signal omission. The windowed window function may be a rectangular window, a gaussian window, a Kaiser window, or the like, and the specific function form may not be limited.
Step S320: and determining a sub-band signal in which howling exists in the multi-frame audio signal as a first sub-band signal based on the power of each sub-band signal.
In the embodiment of the present application, after each sub-band signal in each frame of audio signal is obtained, a sub-band signal in which howling exists in each frame of audio signal may be determined for each frame of audio signal based on the power of each sub-band signal in each frame of audio signal, and used as the first sub-band signal.
In some embodiments, the electronic device may determine candidate subband signals in the multi-frame audio signal that satisfy a first preset condition based on the power of each subband signal; and determining a candidate sub-band signal meeting a second preset condition in the candidate sub-band signals as a first sub-band signal based on the audio signals of adjacent frames of the frame where the candidate sub-band signal is located.
In one possible embodiment, the first preset condition may be a condition that the preliminary candidate is that howling exists. The first preset condition may be a condition constituted by one or more of a peak threshold power ratio, a peak-to-average power ratio, and a peak adjacent power ratio.
Alternatively, the first preset condition may be a condition satisfied by the peak threshold power ratio, setting the sub-band ω i The power threshold is P 0 The peak threshold power ratio is calculated as:
if the peak threshold power ratio PTPR is greater than the first threshold, it is determined that a first preset condition is met. Wherein the first threshold may be 0.
Optionally, the first preset condition may be a condition satisfied by a peak-to-average power ratio, and the average power of the full band is set to be P m (t) the peak-to-average power ratio is calculated as:
and if the peak-to-average power ratio (PAPR) is greater than the second threshold, determining that the first preset condition is met. Wherein the second threshold may be 0.
Optionally, the first preset condition may be a condition that the peak adjacent power ratio meets, and the calculation formula of the peak adjacent power ratio is that:
and if the peak neighbor power ratio PNPR is larger than a third threshold value, determining that the first preset condition is met. Wherein the third threshold may be 0.
In one possible embodiment, candidate subband signals ω are screened out i Thereafter, the candidate subband signal ω is counted i If the characteristic that the adjacent k frame signals of the frame have power increment exists, the sub-band signals can be determined to have howlingCalled the first sub-band signal.
In another possible implementation manner, after determining the candidate subband signal, it may also be determined whether the same candidate subband signal exists in the adjacent frame of the frame where the candidate subband signal exists, if the same candidate subband signal exists, it indicates that the subband signal is used as the candidate howling subband signal in the continuous multi-frame audio signal, so that it may be determined that howling exists in the subband signal.
Through the method, after the candidate sub-band signals are determined, howling detection is performed through the second preset condition, so that the sub-band signals with howling can be accurately detected, and meaningless detection decisions are reduced.
Step S330: and carrying out howling suppression processing on the first sub-band signal based on the howling parameters of the first sub-band signal to obtain a second sub-band signal, wherein the howling parameters are used for representing the howling degree of the first sub-band signal.
Step S340: and mixing the second sub-band signal with other sub-band signals except the first sub-band signal in the audio signal to obtain a target audio signal.
In the embodiment of the present application, step S330 and step S340 may refer to the content of other embodiments, which are not described herein.
According to the audio processing method, due to the fact that the howling degree of the sub-band signals with howling is based, the self-adaptive howling suppression is carried out on the sub-band signals, accuracy of howling suppression is improved, loss of tone quality is avoided, and howling suppression effect is improved; in addition, when howling detection is performed, candidate is performed on the sub-band signals suspected to be howled based on the power of the sub-band signals, then howling detection is performed through a preset condition, so that the sub-band signals with howling can be accurately detected, and meaningless judgment in the howling detection process is reduced.
Referring to fig. 13, fig. 13 is a schematic flow chart of an audio processing method according to still another embodiment of the present application. The audio processing method is applied to the electronic device, in this embodiment, the electronic device is an earphone, and the following details will be described with respect to the flowchart shown in fig. 13, and the audio processing method specifically may include the following steps:
Step S410: detecting a howling sub-band signal in the audio signal acquired by the audio acquisition module as a first sub-band signal.
In this embodiment, step S410 may refer to the content of the foregoing embodiment, which is not described herein.
Step S420: and if the earphone is in a worn state, carrying out howling suppression processing on the first sub-band signal based on the howling parameters of the first sub-band signal to obtain a second sub-band signal.
In the embodiment of the application, the earphone can also detect the use state of the earphone, wherein the use state comprises a worn state or an unworn state. The worn state refers to a state in which the user wears the earphone on the user's ear; the unworn state refers to a state in which the user does not wear the earphone on the user's ear. Optionally, if the earphone is in-ear, in a state that the earphone is worn, an earplug of the earphone is inserted into the ear canal, and audio played by a speaker of the earphone is transmitted into the ear canal of the user through an audio output channel wrapped by the earplug.
In some embodiments, the housing of the earphone may be provided with a wear detection module, where the wear detection module is disposed on a designated surface of the housing of the earphone, where the designated surface is a surface of the earphone head that contacts the concha cavity of the human ear when the earphone is worn. Optionally, a black round hole is formed in the designated surface, a wearing detection module is assembled in the round hole, the wearing detection module can be a light sensor and comprises a light emitting unit and a light sensing unit, the light emitting unit can be an LED lamp, the LED lamp emits infrared light, the infrared light passes through a prism sheet on the round hole and irradiates outside the earphone, if an opaque object is blocked in front, most of the light can be reflected back, and the light sensing unit judges whether an object is blocked according to the intensity of the reflected light to infer whether the wearing state is achieved. Similarly, the second earphone may also be provided with a wearing detector, and determine whether the earphone is in a wearing state based on the wearing detector. Of course, the specific type of the wearing detector is not limited, and the wearing detector may be a touch sensor, a pressure sensor, or the like.
In this embodiment, a state threshold corresponding to the wearing detection module may be preset, and based on a detection value detected by the wearing detection module, the state threshold may be compared, and whether the earphone is in a wearing state may be determined according to a comparison result. For example, when the wearing detection module is a light sensor, the state threshold is a set light intensity threshold, and if the light intensity detected by the light sensor is lower than the set light intensity threshold, the earphone is determined to be in a wearing state; and if the light intensity detected by the light sensor is greater than or equal to the set light intensity threshold value, determining that the earphone is in an unworn state.
In this embodiment of the present application, after the first subband signal is detected, if the earphone is in a wearing state, it indicates that the user can hear the audio signal played by the earphone, and at this time, howling suppression can be performed on the audio signal collected by the audio collection module to avoid affecting the user experience, so that howling suppression processing can be performed on the first subband signal based on the howling parameter of the first subband signal, and a second subband signal is obtained.
Step S430: if the earphone is in an unworn state and the parameter value of the howling parameter is larger than a preset threshold value, based on the howling parameter of the first sub-band signal, howling suppression processing is performed on the first sub-band signal to obtain a second sub-band signal.
In this embodiment of the present application, after the first subband signal is detected, if the earphone is in a state of not being worn, it indicates that the user cannot hear the audio signal played by the earphone, and at this time, there may not be a need to suppress howling of the audio signal collected by the audio collection module. In this case, considering that the howling may damage the earphone, a parameter value of a howling parameter of the first subband signal may be obtained, and the parameter value is compared with a preset threshold, and if the parameter value is greater than the preset threshold, it indicates that the howling degree of the first subband signal may damage the earphone, so that the howling suppression processing may be performed on the first subband signal based on the howling parameter of the first subband signal, to obtain the second subband signal; if the parameter value is smaller than or equal to the preset threshold value, the howling degree of the first sub-band signal does not damage the earphone, and the current user does not hear the audio signal played by the earphone, so that the user experience is not affected, in this case, the howling suppression processing of the first sub-band signal is not required, and at this time, the audio signal collected by the audio collection module can be directly output as the target audio signal.
Step S440: and mixing the second sub-band signal with other sub-band signals except the first sub-band signal in the audio signal to obtain a target audio signal.
In the embodiment of the present application, step S440 may refer to the content of the foregoing embodiment, which is not described herein.
According to the audio processing method, due to the fact that the howling degree of the sub-band signals with howling is based, the self-adaptive howling suppression is carried out on the sub-band signals, accuracy of howling suppression is improved, loss of tone quality is avoided, and howling suppression effect is improved; in addition, when the earphone is in a worn state, howling suppression processing is performed on the sub-band signal with howling, and when the earphone is in an unworn state and the parameter value of the howling parameter of the sub-band signal is greater than a preset threshold value, the howling suppression processing is performed on the first sub-band signal, so that the power consumption of the earphone is reduced.
Referring to fig. 14, a block diagram of an audio processing apparatus 400 according to an embodiment of the present application is shown. The audio processing apparatus 400 is applied to the above electronic device, and the electronic device includes an audio acquisition module. The audio processing apparatus 400 includes: howling detection module 410, howling suppression module 420, and audio synthesis module 430. The howling detection module 410 is configured to detect a subband signal with howling in the audio signal collected by the audio collection module, as a first subband signal; the howling suppression module 420 is configured to perform howling suppression processing on the first subband signal based on a howling parameter of the first subband signal, to obtain a second subband signal, where the howling parameter is used to characterize a howling degree of the first subband signal; the audio synthesis module 430 is configured to mix the second subband signal with other subband signals in the audio signal except the first subband signal to obtain a target audio signal.
In some embodiments, howling suppression module 420 may be specifically configured to: determining a howling suppression parameter based on a howling parameter of the first subband signal, the parameter value of the howling suppression parameter being positively correlated with the parameter value of the howling parameter; and carrying out howling suppression processing on the first sub-band signal based on the howling suppression parameter to obtain a second sub-band signal.
In one possible implementation, the howling suppression parameter comprises a frequency offset. Based on the howling suppression parameter, howling suppression module 420 performs howling suppression processing on the first subband signal to obtain a second subband signal, which may include: and performing frequency shift processing on the first sub-band signal based on the frequency offset to obtain a second sub-band signal.
Alternatively, howling suppression module 420 may be specifically configured to: and performing frequency shift processing on the first sub-band signal through a first preset filter based on the frequency offset to obtain a second sub-band signal.
In another possible embodiment, the howling suppression parameter includes a phase offset. Howling suppression module 420 may be specifically configured to: and carrying out phase shifting processing on the first sub-band signal based on the phase offset to obtain a second sub-band signal.
Alternatively, howling suppression module 420 may be specifically configured to: and performing phase shifting processing on the first sub-band signal through a second preset filter based on the phase offset to obtain a second sub-band signal.
In some embodiments, the audio processing apparatus 400 may further include a power spectrum acquisition module and a first parameter acquisition module. The power spectrum acquisition module is used for acquiring a power spectrum corresponding to the first sub-band signal before the howling suppression processing is carried out on the first sub-band signal based on the howling parameter of the first sub-band signal to obtain a second sub-band signal; the first parameter obtaining module is configured to obtain, based on the power spectrum, power of the first subband signal as a howling parameter of the first subband signal.
In some embodiments, the audio processing apparatus 400 may further include a detection acquisition module and a second parameter acquisition module. The detection acquisition module is used for acquiring an envelope detection signal corresponding to the first sub-band signal before the howling suppression processing is carried out on the first sub-band signal based on the howling parameter of the first sub-band signal to obtain a second sub-band signal; the second parameter obtaining module is configured to obtain a detection value of the envelope detection signal as a howling parameter of the first subband signal.
In some embodiments, the howling detection module 410 may be specifically configured to: performing preset processing on the audio signals acquired by the audio acquisition module to obtain a plurality of sub-band signals of each frame of audio signals in the multi-frame audio signals; and determining a sub-band signal in which howling exists in the multi-frame audio signal as a first sub-band signal based on the power of each sub-band signal.
In one possible implementation, howling detection module 410 may be further specifically configured to: determining candidate subband signals meeting a first preset condition in the multi-frame audio signal based on the power of each subband signal; and determining a candidate sub-band signal meeting a second preset condition in the candidate sub-band signals as a first sub-band signal based on the audio signals of adjacent frames of the frame where the candidate sub-band signal is located.
In some embodiments, where the electronic device is a headset, howling suppression module 420 may be specifically configured to: and if the earphone is in a worn state, carrying out howling suppression processing on the first sub-band signal based on the howling parameters of the first sub-band signal to obtain a second sub-band signal.
In one possible implementation, howling suppression module 420 may also be configured to: if the earphone is in an unworn state and the parameter value of the howling parameter is larger than a preset threshold value, based on the howling parameter of the first sub-band signal, howling suppression processing is performed on the first sub-band signal to obtain a second sub-band signal.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus and modules described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
In several embodiments provided herein, the coupling of the modules to each other may be electrical, mechanical, or other.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
In summary, according to the scheme provided by the application, through detecting the sub-band signal with howling in the audio signal collected by the audio collection module, the howling suppression processing is performed on the first sub-band signal based on the howling parameter of the first sub-band signal to obtain the second sub-band signal, the howling parameter is used for representing the howling degree of the first sub-band signal, and the second sub-band signal is mixed with other sub-band signals except the first sub-band signal in the audio signal to obtain the target audio signal for output. Therefore, the adaptive howling suppression of the sub-band signals based on the howling degree of the sub-band signals with the howling can be realized, the accuracy of the howling suppression is improved, and the howling suppression effect of the electronic equipment is further improved.
Referring to fig. 15, a block diagram of an electronic device according to an embodiment of the present application is shown. The electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by the one or more processors 110, the one or more applications configured to perform the method as described in the foregoing method embodiments.
Processor 110 may include one or more processing cores. The processor 110 utilizes various interfaces and lines to connect various portions of the overall electronic device 100, perform various functions of the electronic device 100, and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and invoking data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 110 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for being responsible for rendering and drawing of display content; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 110 and may be implemented solely by a single communication chip.
The Memory 120 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Memory 120 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described below, etc. The storage data area may also store data created by the electronic device 100 in use (e.g., phonebook, audiovisual data, chat log data), and the like.
Referring to fig. 16, a block diagram of a computer readable storage medium according to an embodiment of the present application is shown. The computer readable medium 800 has stored therein program code which can be invoked by a processor to perform the methods described in the method embodiments described above.
The computer readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 comprises a non-volatile computer readable medium (non-transitory computer-readable storage medium). The computer readable storage medium 800 has storage space for program code 810 that performs any of the method steps described above. The program code can be read from or written to one or more computer program products. Program code 810 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, one of ordinary skill in the art will appreciate that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not drive the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (15)

1. An audio processing method, applied to an electronic device, the electronic device including an audio acquisition module, the method comprising:
detecting a sub-band signal with howling in the audio signal acquired by the audio acquisition module as a first sub-band signal;
based on the howling parameters of the first sub-band signals, carrying out howling suppression processing on the first sub-band signals to obtain second sub-band signals, wherein the howling parameters are used for representing the howling degree of the first sub-band signals;
and mixing the second sub-band signal with other sub-band signals except the first sub-band signal in the audio signal to obtain a target audio signal.
2. The method according to claim 1, wherein the howling suppression processing is performed on the first subband signal based on the howling parameter of the first subband signal to obtain a second subband signal, including:
determining a howling suppression parameter based on a howling parameter of the first subband signal, the parameter value of the howling suppression parameter being positively correlated with the parameter value of the howling parameter;
and carrying out howling suppression processing on the first sub-band signal based on the howling suppression parameter to obtain a second sub-band signal.
3. The method according to claim 2, wherein the howling suppression parameter includes a frequency offset, and wherein the howling suppression processing is performed on the first subband signal based on the howling suppression parameter to obtain a second subband signal, including:
and performing frequency shift processing on the first sub-band signal based on the frequency offset to obtain a second sub-band signal.
4. A method according to claim 3, wherein said frequency shifting the first subband signal based on the frequency offset to obtain a second subband signal comprises:
And performing frequency shift processing on the first sub-band signal through a first preset filter based on the frequency offset to obtain a second sub-band signal.
5. The method according to claim 2, wherein the howling suppression parameter includes a phase offset, and wherein the howling suppression processing is performed on the first subband signal based on the howling suppression parameter to obtain a second subband signal, including:
and carrying out phase shifting processing on the first sub-band signal based on the phase offset to obtain a second sub-band signal.
6. The method of claim 5, wherein the phase shifting the first subband signal based on the phase offset to obtain a second subband signal comprises:
and performing phase shifting processing on the first sub-band signal through a second preset filter based on the phase offset to obtain a second sub-band signal.
7. The method according to claim 1, wherein before said howling suppression processing is performed on said first subband signal based on a howling parameter of said first subband signal, said method further comprises:
Acquiring a power spectrum corresponding to the first sub-band signal;
and acquiring the power of the first sub-band signal based on the power spectrum as a howling parameter of the first sub-band signal.
8. The method according to claim 1, wherein before said howling suppression processing is performed on said first subband signal based on a howling parameter of said first subband signal, said method further comprises:
acquiring an envelope detection signal corresponding to the first sub-band signal;
and obtaining the detection value of the envelope detection signal as the howling parameter of the first sub-band signal.
9. The method according to any one of claims 1-8, wherein detecting a howling subband signal in the audio signal collected by the audio collection module as the first subband signal comprises:
performing preset processing on the audio signals acquired by the audio acquisition module to obtain a plurality of sub-band signals of each frame of audio signals in the multi-frame audio signals;
and determining a sub-band signal in which howling exists in the multi-frame audio signal as a first sub-band signal based on the power of each sub-band signal.
10. The method of claim 9, wherein the determining, based on the power of each sub-band signal, a sub-band signal in which howling is present in the multi-frame audio signal as a first sub-band signal, comprises:
determining candidate subband signals meeting a first preset condition in the multi-frame audio signal based on the power of each subband signal;
and determining a candidate sub-band signal meeting a second preset condition in the candidate sub-band signals as a first sub-band signal based on the audio signals of adjacent frames of the frame where the candidate sub-band signal is located.
11. The method according to any one of claims 1-8, wherein the electronic device is an earphone, and the howling suppression processing is performed on the first subband signal based on the howling parameter of the first subband signal, to obtain a second subband signal, including:
and if the earphone is in a worn state, carrying out howling suppression processing on the first sub-band signal based on the howling parameters of the first sub-band signal to obtain a second sub-band signal.
12. The method according to claim 11, wherein the howling suppression processing is performed on the first subband signal based on the howling parameter of the first subband signal, to obtain a second subband signal, further comprising:
If the earphone is in an unworn state and the parameter value of the howling parameter is larger than a preset threshold value, based on the howling parameter of the first sub-band signal, howling suppression processing is performed on the first sub-band signal to obtain a second sub-band signal.
13. An audio processing apparatus for application to an electronic device, the electronic device including an audio acquisition module, the apparatus comprising: a howling detection module, a howling suppression module and an audio synthesis module, wherein,
the howling detection module is used for detecting a sub-band signal with howling in the audio signal acquired by the audio acquisition module, and the sub-band signal is used as a first sub-band signal;
the howling suppression module is configured to perform howling suppression processing on the first subband signal based on a howling parameter of the first subband signal to obtain a second subband signal, where the howling parameter is used to characterize a howling degree of the first subband signal;
the audio synthesis module is used for mixing the second sub-band signal with other sub-band signals except the first sub-band signal in the audio signal to obtain a target audio signal.
14. An electronic device, comprising:
one or more processors;
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-12.
15. A computer readable storage medium having stored therein program code which is callable by a processor to perform the method according to any one of claims 1-12.
CN202210863785.XA 2022-07-20 2022-07-20 Audio processing method, device, electronic equipment and storage medium Pending CN117475976A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210863785.XA CN117475976A (en) 2022-07-20 2022-07-20 Audio processing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210863785.XA CN117475976A (en) 2022-07-20 2022-07-20 Audio processing method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117475976A true CN117475976A (en) 2024-01-30

Family

ID=89633509

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210863785.XA Pending CN117475976A (en) 2022-07-20 2022-07-20 Audio processing method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117475976A (en)

Similar Documents

Publication Publication Date Title
CN110291581B (en) Headset off-ear detection
US11451898B2 (en) Headset on ear state detection
US8972251B2 (en) Generating a masking signal on an electronic device
JP6215488B2 (en) Active noise reduction earphone, noise reduction control method and system applied to the earphone
JP6436934B2 (en) Frequency band compression using dynamic threshold
EP3635714B1 (en) Spectral optimization of audio masking waveforms
JP5644359B2 (en) Audio processing device
US8428274B2 (en) Apparatus and method for detecting acoustic feedback
CN109640223B (en) Howling suppression method and device, sound and sound amplification system
US9325285B2 (en) Method of reducing un-correlated noise in an audio processing device
US20140341386A1 (en) Noise reduction
US8116490B2 (en) Method for operation of a hearing device system and hearing device system
US10616676B2 (en) Dynamically adjustable sidetone generation
JP5903921B2 (en) Noise reduction device, voice input device, wireless communication device, noise reduction method, and noise reduction program
US20140064529A1 (en) Apparatus and method of shielding external noise for use in hearing aid device
CN117475976A (en) Audio processing method, device, electronic equipment and storage medium
CN113031904B (en) Control method and electronic equipment
US11694708B2 (en) Audio device and method of audio processing with improved talker discrimination
US20230396939A1 (en) Method of suppressing undesired noise in a hearing aid
US11330376B1 (en) Hearing device with multiple delay paths
JP2010041280A (en) Signal processing apparatus
JP2011040831A (en) Headphone and method for canceling digital noise
CN114866899A (en) Earphone noise reduction method, earphone device and computer readable storage medium
CN118072709A (en) Howling suppression for Active Noise Cancellation (ANC) systems and methods
CN115202605A (en) Audio processing method and device, terminal equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination