CN111147983A - Loudspeaker control method and device and readable storage medium - Google Patents

Loudspeaker control method and device and readable storage medium Download PDF

Info

Publication number
CN111147983A
CN111147983A CN201811312174.6A CN201811312174A CN111147983A CN 111147983 A CN111147983 A CN 111147983A CN 201811312174 A CN201811312174 A CN 201811312174A CN 111147983 A CN111147983 A CN 111147983A
Authority
CN
China
Prior art keywords
noise
gain
signal
det
audio signal
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
CN201811312174.6A
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.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai Co 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 Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN201811312174.6A priority Critical patent/CN111147983A/en
Publication of CN111147983A publication Critical patent/CN111147983A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • H04R3/04Circuits for transducers, loudspeakers or microphones for correcting frequency response
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2430/00Signal processing covered by H04R, not provided for in its groups

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Soundproofing, Sound Blocking, And Sound Damping (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

A speaker control method and device and a readable storage medium are provided, wherein the speaker control method comprises the following steps: acquiring an audio signal; detecting a noise signal in the audio signal, and calculating a noise gain corresponding to the noise signal; processing the audio signal according to the noise gain; and outputting the processed audio signal to a loudspeaker. By adopting the scheme, the experience of the loudspeaker playback system can be improved.

Description

Loudspeaker control method and device and readable storage medium
Technical Field
The invention belongs to the technical field of loudspeakers, and particularly relates to a loudspeaker control method and device and a readable storage medium.
Background
At present, because smart machine is pursuit frivolousization more and more, the inner space who reserves for the speaker is limited, and for the playback capability of make full use of speaker, more and more smart machine adopts intelligent speaker control system, to speaker output effective control, improves output sound pressure level under the circumstances of guaranteeing speaker safety.
However, the smart speaker system generally increases the gain of the output signal, and obtains a larger output volume while amplifying the background noise portion of the audio signal, which brings a bad experience to the user.
In the prior art, a speaker control system usually detects noise by using a threshold method, and determines a signal with energy lower than a threshold as a noise signal to suppress gain of the noise signal. However, the threshold method is not ideal for determining the accuracy of the audio signal with low signal-to-noise ratio, and cannot distinguish the audio signal with low signal-to-noise ratio from the audio signal with high signal-to-noise ratio.
Disclosure of Invention
The embodiment of the invention solves the problem of improving the experience of a loudspeaker playback system.
In order to solve the above technical problem, an embodiment of the present invention provides a speaker control method, where the speaker control method includes: acquiring an audio signal; detecting a noise signal in the audio signal, and calculating a noise gain corresponding to the noise signal; processing the audio signal according to the noise gain; and outputting the processed audio signal to a loudspeaker.
Optionally, after calculating the noise gain corresponding to the noise signal, the method further includes: and smoothing the noise gain.
Optionally, the calculating a noise gain corresponding to the noise signal includes: performing noise estimation on the audio signal; calculating a signal-to-noise ratio in the audio signal; and obtaining the noise gain according to the noise estimation and the signal-to-noise ratio.
Optionally, the obtaining the noise gain according to the noise estimation and the signal-to-noise ratio includes: when the signal-to-noise ratio is larger than a first preset threshold value, calculating the noise gain according to an initial noise gain constant and a first smoothing coefficient; when the signal-to-noise ratio is smaller than a first preset threshold and larger than a second preset threshold, calculating the noise gain according to an initial noise gain constant, a first noise gain constant and a second smoothing coefficient; and when the signal-to-noise ratio is smaller than a second preset threshold value, calculating the noise gain according to an initial noise gain constant, a second noise gain constant and a third smoothing coefficient, wherein the first noise gain constant is larger than the second noise gain constant.
Optionally, the calculating the noise gain includes: the noise gain is calculated using the following equation: gnoise_det(m)=a0*1+(1-a0)*gnoise_det(m-1); wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(1)=1,gnoise_det(m-1) noise gain of a frame preceding the mth frame, a0Is the first smoothing coefficient, 0 < a0<1。
Optionally, the calculating the noise gain includes: the noise gain is calculated using the following equation: gnoise_det(m)=a1*gnoise_det1+(1-a1)*gnoise_det(m-1); wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(1)=1,gnoise_det(m-1) noise gain of a frame previous to the mth frame, gnoise_det1Is the first noise gain constant, 0 < gnoise_det1<1,a1Is the second smoothing coefficient, 0 < a1<1。
Optionally, the calculating the noise gain includes: the noise gain is calculated using the following equation: gnoise_det(m)=a2*gnoise_det2+(1-a2)*gnoise_det(m-1); wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(m-1) noise gain of a frame previous to the mth frame, gnoise_det2Is the second noise gain constant, a2Is the third smoothing coefficient, 0 < a2<1。
Optionally, the processing the audio signal according to the noise gain includes: determining a corresponding noise control mode according to the noise signal; and processing the audio signal according to the noise control mode and the noise gain.
Optionally, the processing the audio signal according to the noise gain includes: and preprocessing the audio signal, and then processing the preprocessed audio signal.
Optionally, the calculating a noise gain corresponding to the noise signal includes: according to the preprocessing of the audio signal, obtaining a signal gain corresponding to the audio signal; taking the noise gain corresponding to the calculated noise signal as a first noise gain; and multiplying the signal gain and the first noise gain to obtain the noise gain.
Optionally, the pretreatment comprises at least one of the following treatments: signal amplitude control, loudspeaker diaphragm displacement control and temperature control.
Optionally, the processing the audio signal according to the noise gain includes: and performing gain control on at least one frequency band of the audio signal according to the noise gain.
Optionally, the processing the audio signal according to the noise gain includes: and carrying out filtering processing on the audio signal.
Optionally, the outputting the processed audio signal to a speaker includes: converting the processed audio signal into an analog signal; performing power amplification on the analog signal; and outputting the analog signal after power amplification to a loudspeaker.
In order to solve the above technical problem, an embodiment of the present invention further discloses a speaker control device, where the speaker control device includes: an acquisition unit configured to acquire an audio signal; the detection unit is used for detecting a noise signal in the audio signal and calculating a noise gain corresponding to the noise signal; a processing unit for processing the audio signal according to the noise gain; and the output unit is used for outputting the processed audio signal to a loudspeaker.
Optionally, the detection unit is further configured to: and smoothing the noise gain.
Optionally, the detection unit is configured to perform noise estimation on the audio signal; calculating a signal-to-noise ratio in the audio signal; and obtaining the noise gain according to the noise estimation and the signal-to-noise ratio.
Optionally, the detection unit is configured to: when the signal-to-noise ratio is larger than a first preset threshold value, calculating the noise gain according to an initial noise gain constant and a first smoothing coefficient; when the signal-to-noise ratio is smaller than a first preset threshold and larger than a second preset threshold, calculating the noise gain according to an initial noise gain constant, a first noise gain constant and a second smoothing coefficient; and when the signal-to-noise ratio is smaller than a second preset threshold value, calculating the noise gain according to an initial noise gain constant, a second noise gain constant and a third smoothing coefficient, wherein the first noise gain constant is larger than the second noise gain constant.
Optionally, the detecting unit is configured to calculate the noise gain, and calculate the noise gain by using the following formula: gnoise_det(m)=a0*1+(1-a0)*gnoise_det(m-1); wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(1)=1,gnoise_det(m-1) noise gain of a frame preceding the mth frame, a0Is the first smoothing coefficient, 0 < a0<1。
OptionalThe detection unit is configured to calculate the noise gain, and calculate the noise gain by using the following formula: gnoise_det(m)=a1*gnoise_det1+(1-a1)*gnoise_det(m-1); wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(1)=1,gnoise_det(m-1) noise gain of a frame previous to the mth frame, gnoise_det1Is the first noise gain constant, 0 < gnoise_det1<1,a1Is the second smoothing coefficient, 0 < a1<1。
Optionally, the detecting unit is configured to calculate the noise gain, and calculate the noise gain by using the following formula: gnoise_det(m)=a2*gnoise_det2+(1-a2)*gnoise_det(m-1); wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(m-1) noise gain of a frame previous to the mth frame, gnoise_det2Is the second noise gain constant, a2Is the third smoothing coefficient, 0 < a2<1。
Optionally, the processing unit is configured to determine a corresponding noise control mode according to the noise signal; and processing the audio signal according to the noise control mode and the noise gain.
Optionally, the processing unit is configured to pre-process the audio signal, and then process the pre-processed audio signal.
Optionally, the detecting unit is configured to obtain a signal gain corresponding to the audio signal according to the preprocessing of the audio signal; taking the noise gain corresponding to the calculated noise signal as a first noise gain; and multiplying the signal gain and the first noise gain to obtain the noise gain.
Optionally, the pretreatment comprises at least one of the following treatments: signal amplitude control, loudspeaker diaphragm displacement control and temperature control.
Optionally, the processing unit is configured to: and performing gain control on at least one frequency band of the audio signal according to the noise gain.
Optionally, the processing unit is configured to: and carrying out filtering processing on the audio signal.
Optionally, the output unit is configured to: converting the processed audio signal into an analog signal; performing power amplification on the analog signal; and outputting the analog signal after power amplification to a loudspeaker.
The embodiment of the invention also discloses a readable storage medium, wherein computer instructions are stored on the readable storage medium, and when the computer instructions are operated, the computer instructions execute the steps of any one of the loudspeaker control methods.
The embodiment of the present invention further provides a speaker control apparatus, which includes a memory and a processor, where the memory stores computer instructions executable on the processor, and the processor executes any of the steps of the speaker control method when executing the computer instructions.
Compared with the prior art, the technical scheme of the embodiment of the invention has the following beneficial effects:
calculating a noise gain corresponding to a noise signal by detecting the noise signal in the audio signal; the audio signal is processed according to the noise gain, noise detection and noise gain processing are added on the basis of the existing loudspeaker control method, the output gain is controlled in a self-adaptive mode by detecting the intensity of noise in the input audio signal, the output sound pressure level is improved, meanwhile, the output of the noise signal is controlled, and therefore the experience of a loudspeaker playback system is improved.
Drawings
Fig. 1 is a flowchart of a speaker control method according to an embodiment of the present invention;
FIG. 2 is a diagram of an effect of a speaker control method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a speaker control apparatus according to an embodiment of the present invention.
Detailed Description
In the prior art, a speaker control system usually detects noise by using a threshold method, and determines a signal with energy lower than a threshold as a noise signal to suppress a gain of the noise signal. However, the threshold method is not ideal for determining the accuracy of the audio signal with low signal-to-noise ratio, and cannot distinguish the audio signal with low signal-to-noise ratio from the audio signal with high signal-to-noise ratio.
In the embodiment of the invention, the noise gain corresponding to the noise signal is calculated by detecting the noise signal in the audio signal; the audio signal is processed according to the noise gain, noise detection and noise gain processing are added on the basis of the existing loudspeaker control method, the output gain is controlled in a self-adaptive mode by detecting the intensity of noise in the input audio signal, the output sound pressure level is improved, meanwhile, the output of the noise signal is controlled, and therefore the experience of a loudspeaker playback system is improved.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
The embodiment of the invention is provided, and is explained in detail by the specific steps in the following with reference to fig. 1.
Step S101, an audio signal is acquired.
In a specific implementation, the audio signal may be acquired first. Since noise is generally mixed in the audio signal, step S102 may be performed after the audio signal is acquired.
Step S102, detecting a noise signal in the audio signal, and calculating a noise gain corresponding to the noise signal.
In a specific implementation, it may be detected whether a noise signal is present in the audio signal. When the noise signal is detected from the audio signal, a noise gain corresponding to the noise signal may be calculated to perform noise gain processing on the audio signal.
In a specific implementation, after the noise gain corresponding to the noise signal is calculated, the noise gain may be smoothed to avoid abrupt change of the noise gain and influence on auditory perception.
In a specific implementation, the calculating a noise gain corresponding to the noise signal may include: firstly, carrying out noise estimation on the audio signal; then calculating the signal-to-noise ratio in the audio signal; and finally, obtaining the noise gain according to the noise estimation and the signal-to-noise ratio.
In the embodiment of the present invention, an algorithm based on voice activity detection is adopted to perform noise estimation on the audio signal, but in the noise estimation process, other methods may also be adopted to perform noise estimation, and different users may adopt methods such as a minimum tracking noise estimation algorithm, a time recursive average noise estimation algorithm, and the like according to different requirements of the users themselves, which is not described herein again.
In a specific implementation, the noise gain may be obtained according to the noise estimation and the signal-to-noise ratio, and when the signal-to-noise ratio is greater than a first preset threshold, it indicates that the signal-to-noise ratio is high, and noise control is not required for an audio signal, so that the noise gain is calculated according to an initial noise gain constant and a first smoothing coefficient, and the noise gain may be calculated by using the following formula (1):
gnoise_det(m)=a0*1+(1-a0)*gnoise_det(m-1); (1)
wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(1)=1,gnoise_det(m-1) noise gain of a frame preceding the mth frame, a0Is the first smoothing coefficient, 0 < a0Is less than 1. The noise gain is smoothed through the smoothing coefficient, and the noise gain of the current frame and the noise gain of the previous frame are smoothed, so that sudden change of the noise gain is avoided, and auditory perception is prevented from being influenced.
In a specific implementation, the noise gain may be obtained according to the noise estimation and the signal-to-noise ratio, and when the signal-to-noise ratio is smaller than a first preset threshold and larger than a second preset threshold, it indicates that the noise is high, but there is also a non-noise audio, and it is necessary to perform partial noise control on the audio signal, so that the noise gain is calculated according to an initial noise gain constant, a first noise gain constant, and a second smoothing coefficient; calculating the noise gain using the following equation (2):
gnoise_det(m)=a1*gnoise_det1+(1-a1)*gnoise_det(m-1); (2)
wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(1)=1,gnoise_det(m-1) noise gain of a frame previous to the mth frame, gnoise_det1Is the first noise gain constant, 0 < gnoise_det1<1,a1Is the second smoothing coefficient, 0 < a1Is less than 1. The noise gain constant is used for carrying out partial noise control on the noise in the audio signal, the smoothing coefficient is used for smoothing the noise gain, and the smoothing processing is carried out on the noise gain of the current frame and the noise gain of the previous frame, so that the influence of the noise is effectively controlled, and the influence of sudden change of the noise gain on auditory perception is avoided.
In a specific implementation, the noise gain may be obtained according to the noise estimation and the signal-to-noise ratio, and when the signal-to-noise ratio is smaller than a second preset threshold, it indicates that the audio signal is determined as a noise signal, and the gain of the noise signal needs to be controlled, so that the noise gain is calculated according to an initial noise gain constant, a second noise gain constant, and a third smoothing coefficient, where the first noise gain constant is greater than the second noise gain constant. The noise gain is calculated using the following equation (3):
gnoise_det(m)=a2*gnoise_det2+(1-a2)*gnoise_det(m-1); (3)
wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(m-1) noise enhancement of a frame preceding the mth frameYi, gnoise_det2Is the second noise gain constant, a2Is the third smoothing coefficient, 0 < a2Is less than 1. The noise gain constant is used for carrying out partial noise control on the noise in the audio signal, the smoothing coefficient is used for smoothing the noise gain, and the smoothing processing is carried out on the noise gain of the current frame and the noise gain of the previous frame, so that the influence of the noise is effectively controlled, and the influence of sudden change of the noise gain on auditory perception is avoided.
And step S103, processing the audio signal according to the noise gain.
In a specific implementation, according to the strength of the noise determined in step S102, a corresponding noise gain and a noise control mode are determined, and then the audio signal is processed according to the noise control mode and the noise gain.
In a specific implementation, a noise-free control mode, a partial noise control mode, and a noise control mode are obtained according to the determination of the signal-to-noise ratio and the noise estimation in step S102.
When the loudspeaker control system judges that the current loudspeaker control mode is the noise-free control mode, the audio signal is amplified according to the current noise gain and the noise control mode, the size of the original signal is improved, and the user experience of the loudspeaker playback system is improved.
When the loudspeaker control system judges that the current loudspeaker control mode is the partial noise control mode, the audio signal is amplified according to the current noise gain and the noise control mode, the size of the original signal is improved, the influence of noise is inhibited, and the user experience of the loudspeaker playback system is improved.
When the loudspeaker control system judges that the current mode is the noise control mode, the audio signal is amplified according to the current noise gain and the noise control mode, the size of the original signal is improved, meanwhile, the output sound pressure level is improved, meanwhile, the noise can be effectively controlled, and the experience of the loudspeaker playback system is improved.
In a specific implementation, the gain control may be performed on at least one frequency band of the audio signal according to the noise gain. It can be understood that different users can select different ranges of noise control according to different requirements, and the present invention is not described herein.
In a specific implementation, the audio signal may be filtered to further reduce noise, which improves the experience of the speaker playback system.
In a specific implementation, the audio signal may be preprocessed, and then the preprocessed audio signal may be processed. The pre-treatment may include at least one of: signal amplitude control, loudspeaker diaphragm displacement control and temperature control. It can be understood that different users can select one or more audio signal processing methods according to different requirements, that is, as long as the effect of improving the output effect of the audio signal is achieved, the processing method is not limited, and the details of the present invention are not described herein.
In a specific implementation, a signal gain corresponding to the audio signal may be obtained according to the preprocessing of the audio signal; then taking the noise gain corresponding to the calculated noise signal as a first noise gain; and finally, multiplying the first noise gain and the signal gain to obtain the noise gain.
In the embodiment of the present invention, after the first noise gain corresponding to the noise signal is calculated, the signal gain may be obtained through a process of preprocessing the audio signal. And the loudspeaker control system multiplies the first noise gain and the signal gain, the product is used as noise gain of noise control, and the audio signal is processed according to the noise gain. It can be understood that, according to different requirements, different users may not select to preprocess the audio signal, or obtain no signal gain during the preprocessing, and directly use the first noise gain corresponding to the noise signal as the noise gain to process the audio signal, which is not described herein again.
And step S104, outputting the processed audio signal to a loudspeaker.
In a specific implementation, the processed audio signal may be converted to an analog signal; then, amplifying the power of the analog signal; and finally, outputting the analog signal after power amplification to a loudspeaker.
In the embodiment of the invention, the noise gain corresponding to the noise signal is calculated by detecting the noise signal in the audio signal; the audio signal is processed according to the noise gain, noise detection and noise gain processing are added on the basis of the existing loudspeaker control method, the output gain is controlled in a self-adaptive mode by detecting the intensity of noise in the input audio signal, the output sound pressure level is improved, meanwhile, the output of the noise signal is controlled, and therefore the experience of a loudspeaker playback system is improved.
Referring to fig. 2, a diagram of an implementation effect of the speaker control method according to the embodiment of the present invention is shown, and fig. 2 lists a spectrogram of an original audio, a spectrogram of an unprocessed noisy audio, and a spectrogram of a noisy audio adopting the speaker control method provided by the present disclosure.
It can be seen that when the spectrogram of the unprocessed noisy audio shows that the audio signal is amplified, the noise is also amplified at the same time, thus leading to poor hearing perception after the loudspeaker system replays; the spectrogram of the noisy audio frequency of the loudspeaker control method provided by the scheme represents that the loudspeaker control system gives consideration to the control of noise when amplifying the audio signal.
Therefore, compared with the existing loudspeaker control method, the loudspeaker control method provided by the scheme adds noise detection and noise gain processing, the output gain is adaptively controlled by detecting the intensity of noise in the input audio signal, the output sound pressure level is improved, and the noise signal output is controlled, so that the experience of a loudspeaker playback system is improved.
Referring to fig. 3, an embodiment of the present invention further provides a speaker control apparatus 30, including: an acquisition unit 301, a detection unit 302, a processing unit 303, and an output unit 304;
the acquiring unit 301 is configured to acquire an audio signal;
the detecting unit 302 is configured to detect a noise signal in the audio signal, and calculate a noise gain corresponding to the noise signal;
the processing unit 303 is configured to process the audio signal according to the noise gain;
the output unit 304 is configured to output the processed audio signal to a speaker.
In a specific implementation, the detecting unit 302 may be further configured to: and smoothing the noise gain.
In a specific implementation, the detection unit 302 may be configured to perform noise estimation on the audio signal; calculating a signal-to-noise ratio in the audio signal; and obtaining the noise gain according to the noise estimation and the signal-to-noise ratio.
In a specific implementation, the detection unit 302 may be configured to: when the signal-to-noise ratio is larger than a first preset threshold value, calculating the noise gain according to an initial noise gain constant and a first smoothing coefficient; when the signal-to-noise ratio is smaller than a first preset threshold and larger than a second preset threshold, calculating the noise gain according to an initial noise gain constant, a first noise gain constant and a second smoothing coefficient; and when the signal-to-noise ratio is smaller than a second preset threshold value, calculating the noise gain according to an initial noise gain constant, a second noise gain constant and a third smoothing coefficient, wherein the first noise gain constant is larger than the second noise gain constant.
In a specific implementation, the detecting unit 302 may be configured to calculate the noise gain, and calculate the noise gain by using the following formula: gnoise_det(m)=a0*1+(1-a0)*gnoise_det(m-1); wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(1)=1,gnoise_det(m-1) noise gain of a frame preceding the mth frame, a0Is the first smoothing coefficient, 0 < a0<1。
In a specific implementation, the detecting unit 302 may be configured to calculate the noise gain, and calculate the noise gain by using the following formula: gnoise_det(m)=a1*gnoise_det1+(1-a1)*gnoise_det(m-1); wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(1)=1,gnoise_det(m-1) noise gain of a frame previous to the mth frame, gnoise_det1Is the first noise gain constant, 0 < gnoise_det1<1,a1Is the second smoothing coefficient, 0 < a1<1。
In a specific implementation, the detecting unit 302 may be configured to calculate the noise gain, and calculate the noise gain by using the following formula: gnoise_det(m)=a2*gnoise_det2+(1-a2)*gnoise_det(m-1); wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(m-1) noise gain of a frame previous to the mth frame, gnoise_det2Is the second noise gain constant, a2Is the third smoothing coefficient, 0 < a2<1。
In a specific implementation, the processing unit 303 may be configured to determine a corresponding noise control mode according to the noise signal; and processing the audio signal according to the noise control mode and the noise gain.
In a specific implementation, the processing unit 303 may be configured to pre-process the audio signal, and then process the pre-processed audio signal.
In a specific implementation, the detecting unit 302 may be configured to obtain a signal gain corresponding to the audio signal according to the preprocessing of the audio signal; then taking the noise gain corresponding to the calculated noise signal as a first noise gain; and finally, multiplying the first noise gain and the signal gain to obtain the noise gain.
In particular implementations, the pre-treatment may include at least one of: signal amplitude control, loudspeaker diaphragm displacement control and temperature control.
In a specific implementation, the processing unit 303 may be configured to: and performing gain control on at least one frequency band of the audio signal according to the noise gain.
In a specific implementation, the processing unit 303 may be configured to: and carrying out filtering processing on the audio signal.
In a specific implementation, the output unit 304 may be configured to: converting the processed audio signal into an analog signal; then, amplifying the power of the analog signal; and finally, outputting the analog signal after power amplification to a loudspeaker.
The embodiment of the present invention further provides a readable storage medium, where the computer readable storage medium is a non-volatile storage medium or a non-transitory storage medium, and has stored thereon computer instructions, where the computer instructions, when executed, perform the steps of the speaker control method according to any one of the foregoing embodiments of the present invention.
The embodiment of the present invention further provides a speaker control apparatus, which includes a memory and a processor, where the memory stores computer instructions executable on the processor, and when the processor executes the computer instructions, the steps of the speaker control method provided in any one of the above embodiments of the present invention are executed.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in any computer readable storage medium, and the storage medium may include: ROM, RAM, magnetic or optical disks, and the like.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (30)

1. A speaker control method, comprising:
acquiring an audio signal;
detecting a noise signal in the audio signal, and calculating a noise gain corresponding to the noise signal;
processing the audio signal according to the noise gain;
and outputting the processed audio signal to a loudspeaker.
2. The method of claim 1, wherein after calculating the noise gain corresponding to the noise signal, further comprising:
and smoothing the noise gain.
3. The method of claim 1, wherein the calculating the noise gain corresponding to the noise signal comprises:
performing noise estimation on the audio signal;
calculating a signal-to-noise ratio in the audio signal;
and obtaining the noise gain according to the noise estimation and the signal-to-noise ratio.
4. The method of claim 3, wherein said deriving the noise gain based on the noise estimate and the signal-to-noise ratio comprises:
when the signal-to-noise ratio is larger than a first preset threshold value, calculating the noise gain according to an initial noise gain constant and a first smoothing coefficient;
when the signal-to-noise ratio is smaller than a first preset threshold and larger than a second preset threshold, calculating the noise gain according to an initial noise gain constant, a first noise gain constant and a second smoothing coefficient;
and when the signal-to-noise ratio is smaller than a second preset threshold value, calculating the noise gain according to an initial noise gain constant, a second noise gain constant and a third smoothing coefficient, wherein the first noise gain constant is larger than the second noise gain constant.
5. The speaker control method of claim 4, wherein said calculating the noise gain comprises: the noise gain is calculated using the following equation:
gnoise_det(m)=a0*1+(1-a0)*gnoise_det(m-1);
wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(1)=1,gnoise_det(m-1) noise gain of a frame preceding the mth frame, a0Is the first smoothing coefficient, 0 < a0<1。
6. The speaker control method of claim 4, wherein said calculating the noise gain comprises: the noise gain is calculated using the following equation:
gnoise_det(m)=a1*gnoise_det1+(1-a1)*gnoise_det(m-1);
wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(1)=1,gnoise_det(m-1) noise gain of a frame previous to the mth frame, gnoise_det1Is the first noise gain constant, 0 < gnoise_det1<1,a1Is the second smoothing coefficient, 0 < a1<1。
7. The speaker control method of claim 4, wherein said calculating the noise gain comprises: the noise gain is calculated using the following equation:
gnoise_det(m)=a2*gnoise_det2+(1-a2)*gnoise_det(m-1);
wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(m-1) noise gain of a frame previous to the mth frame, gnoise_det2Is a stand forThe second noise gain constant, a2Is the third smoothing coefficient, 0 < a2<1。
8. The speaker control method as claimed in claim 1, wherein said processing the audio signal according to the noise gain comprises:
determining a corresponding noise control mode according to the noise signal;
and processing the audio signal according to the noise control mode and the noise gain.
9. The speaker control method as claimed in claim 1, wherein said processing the audio signal according to the noise gain comprises:
and preprocessing the audio signal, and then processing the preprocessed audio signal.
10. The method of claim 9, wherein the calculating the noise gain corresponding to the noise signal comprises:
according to the preprocessing of the audio signal, obtaining a signal gain corresponding to the audio signal;
taking the noise gain corresponding to the calculated noise signal as a first noise gain; and multiplying the signal gain and the first noise gain to obtain the noise gain.
11. The speaker control method according to claim 9, wherein the preprocessing includes at least one of: signal amplitude control, loudspeaker diaphragm displacement control and temperature control.
12. The speaker control method as claimed in claim 1, wherein said processing the audio signal according to the noise gain comprises:
and performing gain control on at least one frequency band of the audio signal according to the noise gain.
13. The speaker control method as claimed in claim 1, wherein said processing the audio signal according to the noise gain comprises: and carrying out filtering processing on the audio signal.
14. The speaker control method as claimed in claim 1, wherein said outputting the processed audio signal to a speaker comprises:
converting the processed audio signal into an analog signal;
performing power amplification on the analog signal;
and outputting the analog signal after power amplification to a loudspeaker.
15. A speaker control apparatus, comprising:
an acquisition unit configured to acquire an audio signal;
the detection unit is used for detecting a noise signal in the audio signal and calculating a noise gain corresponding to the noise signal;
a processing unit for processing the audio signal according to the noise gain;
and the output unit is used for outputting the processed audio signal to a loudspeaker.
16. The speaker control apparatus as claimed in claim 15, wherein the detection unit is further configured to: and smoothing the noise gain.
17. The speaker control apparatus according to claim 15, wherein the detection unit is configured to perform noise estimation on the audio signal; calculating a signal-to-noise ratio in the audio signal; and obtaining the noise gain according to the noise estimation and the signal-to-noise ratio.
18. The speaker control apparatus as claimed in claim 17, wherein the detection unit is configured to: when the signal-to-noise ratio is larger than a first preset threshold value, calculating the noise gain according to an initial noise gain constant and a first smoothing coefficient; when the signal-to-noise ratio is smaller than a first preset threshold and larger than a second preset threshold, calculating the noise gain according to an initial noise gain constant, a first noise gain constant and a second smoothing coefficient; and when the signal-to-noise ratio is smaller than a second preset threshold value, calculating the noise gain according to an initial noise gain constant, a second noise gain constant and a third smoothing coefficient, wherein the first noise gain constant is larger than the second noise gain constant.
19. The speaker control apparatus as claimed in claim 18, wherein the detecting unit is configured to calculate the noise gain, and the noise gain is calculated by using the following equation:
gnoise_det(m)=a0*1+(1-a0)*gnoise_det(m-1);
wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(1)=1,gnoise_det(m-1) noise gain of a frame preceding the mth frame, a0Is the first smoothing coefficient, 0 < a0<1。
20. The speaker control apparatus as claimed in claim 18, wherein the detecting unit is configured to calculate the noise gain, and the noise gain is calculated by using the following equation:
gnoise_det(m)=a1*gnoise_det1+(1-a1)*gnoise_det(m-1);
wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(1)=1,gnoise_det(m-1) noise gain of a frame previous to the mth frame, gnoise_det1Is the first noiseGain constant, 0 < gnoise_det1<1,a1Is the second smoothing coefficient, 0 < a1<1。
21. The speaker control apparatus as claimed in claim 18, wherein the detecting unit is configured to calculate the noise gain, and the noise gain is calculated by using the following equation:
gnoise_det(m)=a2*gnoise_det2+(1-a2)*gnoise_det(m-1);
wherein, gnoise_det(m) is the noise gain of the mth frame, m is greater than or equal to 2, gnoise_det(1) Is the initial noise gain constant, gnoise_det(m-1) noise gain of a frame previous to the mth frame, gnoise_det2Is the second noise gain constant, a2Is the third smoothing coefficient, 0 < a2<1。
22. The speaker control apparatus of claim 15, wherein the processing unit is configured to determine a corresponding noise control mode based on the noise signal; and processing the audio signal according to the noise control mode and the noise gain.
23. The speaker control apparatus as claimed in claim 15, wherein the processing unit is configured to pre-process the audio signal and then process the pre-processed audio signal.
24. The speaker control apparatus as claimed in claim 23, wherein the detecting unit is configured to obtain a signal gain corresponding to the audio signal according to the pre-processing of the audio signal; taking the noise gain corresponding to the calculated noise signal as a first noise gain; and multiplying the signal gain and the first noise gain to obtain the noise gain.
25. The speaker control apparatus of claim 23, wherein the pre-processing comprises at least one of: signal amplitude control, loudspeaker diaphragm displacement control and temperature control.
26. The speaker control apparatus of claim 15, wherein the processing unit is to: and performing gain control on at least one frequency band of the audio signal according to the noise gain.
27. The speaker control apparatus of claim 15, wherein the processing unit is to: and carrying out filtering processing on the audio signal.
28. The speaker control apparatus of claim 15, wherein the output unit is configured to: converting the processed audio signal into an analog signal; performing power amplification on the analog signal; and outputting the analog signal after power amplification to a loudspeaker.
29. A readable storage medium, which is a non-volatile storage medium or a non-transitory storage medium, having stored thereon computer instructions, wherein the computer instructions, when executed, perform the steps of the speaker control method according to any one of claims 1 to 14.
30. A speaker control apparatus comprising a memory and a processor, the memory having stored thereon computer instructions executable on the processor, wherein the processor, when executing the computer instructions, performs the steps of the speaker control method of any one of claims 1 to 14.
CN201811312174.6A 2018-11-06 2018-11-06 Loudspeaker control method and device and readable storage medium Pending CN111147983A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811312174.6A CN111147983A (en) 2018-11-06 2018-11-06 Loudspeaker control method and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811312174.6A CN111147983A (en) 2018-11-06 2018-11-06 Loudspeaker control method and device and readable storage medium

Publications (1)

Publication Number Publication Date
CN111147983A true CN111147983A (en) 2020-05-12

Family

ID=70516474

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811312174.6A Pending CN111147983A (en) 2018-11-06 2018-11-06 Loudspeaker control method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN111147983A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1296258A (en) * 1999-11-10 2001-05-23 三菱电机株式会社 Noise canceller
CN1312938A (en) * 1997-09-02 2001-09-12 夸尔柯姆股份有限公司 System and method for reducing noise
CN1419794A (en) * 2000-01-28 2003-05-21 艾利森电话股份有限公司 System and method for dual microphone signal noise reduction using spectral subtraction
CN1520069A (en) * 1998-06-22 2004-08-11 Dspc�������޹�˾ Noise suppressor
CN1664610A (en) * 2004-03-02 2005-09-07 微软公司 System and method for beamforming using a microphone array
CN1728237A (en) * 2004-07-27 2006-02-01 三星电子株式会社 Eliminate the apparatus and method of noise from recording unit
CN101080766A (en) * 2004-11-03 2007-11-28 声学技术公司 Noise reduction and comfort noise gain control using BARK band WEINER filter and linear attenuation
US20100166198A1 (en) * 2008-12-30 2010-07-01 Gn Resound A/S Hearing Instrument with Improved Initialisation of Parameters of Digital Feedback Suppression Circuitry
CN101987023A (en) * 2009-07-31 2011-03-23 深圳迈瑞生物医疗电子股份有限公司 Gain compensation and image optimization method and device for ultrasonic imaging and system
CN104936091A (en) * 2015-05-14 2015-09-23 科大讯飞股份有限公司 Intelligent interaction method and system based on circle microphone array
CN105721656A (en) * 2016-03-17 2016-06-29 北京小米移动软件有限公司 Background noise generation method and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1312938A (en) * 1997-09-02 2001-09-12 夸尔柯姆股份有限公司 System and method for reducing noise
CN1520069A (en) * 1998-06-22 2004-08-11 Dspc�������޹�˾ Noise suppressor
CN1296258A (en) * 1999-11-10 2001-05-23 三菱电机株式会社 Noise canceller
CN1419794A (en) * 2000-01-28 2003-05-21 艾利森电话股份有限公司 System and method for dual microphone signal noise reduction using spectral subtraction
CN1664610A (en) * 2004-03-02 2005-09-07 微软公司 System and method for beamforming using a microphone array
CN1728237A (en) * 2004-07-27 2006-02-01 三星电子株式会社 Eliminate the apparatus and method of noise from recording unit
CN101080766A (en) * 2004-11-03 2007-11-28 声学技术公司 Noise reduction and comfort noise gain control using BARK band WEINER filter and linear attenuation
US20100166198A1 (en) * 2008-12-30 2010-07-01 Gn Resound A/S Hearing Instrument with Improved Initialisation of Parameters of Digital Feedback Suppression Circuitry
CN101987023A (en) * 2009-07-31 2011-03-23 深圳迈瑞生物医疗电子股份有限公司 Gain compensation and image optimization method and device for ultrasonic imaging and system
CN104936091A (en) * 2015-05-14 2015-09-23 科大讯飞股份有限公司 Intelligent interaction method and system based on circle microphone array
CN105721656A (en) * 2016-03-17 2016-06-29 北京小米移动软件有限公司 Background noise generation method and device

Similar Documents

Publication Publication Date Title
US10650796B2 (en) Single-channel, binaural and multi-channel dereverberation
US9171552B1 (en) Multiple range dynamic level control
CN109767783B (en) Voice enhancement method, device, equipment and storage medium
US11064296B2 (en) Voice denoising method and apparatus, server and storage medium
JP6328627B2 (en) Loudness control by noise detection and low loudness detection
US10553236B1 (en) Multichannel noise cancellation using frequency domain spectrum masking
JP5678445B2 (en) Audio processing apparatus, audio processing method and program
CN111800725B (en) Howling detection method and device, storage medium and computer equipment
US11664040B2 (en) Apparatus and method for reducing noise in an audio signal
JP2014122939A (en) Voice processing device and method, and program
CN111383647B (en) Voice signal processing method and device and readable storage medium
CN104867497A (en) Voice noise-reducing method
CN106782586B (en) Audio signal processing method and device
CN103813251A (en) Hearing-aid denoising device and method allowable for adjusting denoising degree
CN103824563A (en) Hearing aid denoising device and method based on module multiplexing
CN108053834B (en) Audio data processing method, device, terminal and system
KR20170065488A (en) Method and apparatus for processing audio signal including noise
US9159336B1 (en) Cross-domain filtering for audio noise reduction
CN111147983A (en) Loudspeaker control method and device and readable storage medium
CN117995215B (en) Voice signal processing method and device, computer equipment and storage medium
US10600432B1 (en) Methods for voice enhancement
CN104703108A (en) Wide-dynamic compression algorithm of digital hearing aid under noise condition
US9779762B2 (en) Object sound period detection apparatus, noise estimating apparatus and SNR estimation apparatus
CN113409812B (en) Processing method and device of voice noise reduction training data and training method
JP5056654B2 (en) Noise suppression device and noise suppression method

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200512