Disclosure of Invention
The application aims to provide an audio processing method, an audio processing device, a computer readable storage medium and electronic equipment, which can effectively reduce the influence of environmental noise and improve the voice quality of voice of a conversation counterpart answered by a headset user.
In order to achieve the purpose of the application, the application provides the following technical scheme:
in the first aspect, a high-frequency signal and a medium-low frequency signal are obtained by frequency division of a target audio signal obtained in real time;
obtaining a target reference signal based on a current environmental noise signal transmitted by a feedforward microphone acquired in real time;
acquiring a real-time control signal based on the target reference signal acquired in real time and a feedforward control filter coefficient of the feedforward microphone acquired in real time;
and the high-frequency signal and the real-time control signal are fused to form a first target audio signal and output to the air conduction sounding device so as to play corresponding first target audio, the middle-low frequency signal at the same time is output to the bone conduction sounding device so as to play corresponding second target audio, and the first target audio and the second target audio are synchronously played.
In a preferred embodiment, the obtaining the target reference signal based on the current environmental noise signal transmitted by the feedforward microphone acquired in real time includes:
acquiring an initial reference signal transmitted by a feedforward microphone in real time;
performing band-pass filtering processing on the initial reference signal to obtain a preprocessed reference signal;
and carrying out reduction treatment on the preprocessed reference signal to obtain a target reference signal.
In a preferred embodiment, the reducing the reference signal after the preprocessing to obtain the target reference signal includes:
the target reference signal is obtained based on a pre-processed reference signal and a pre-calibrated output-reference transfer path coefficient.
In a preferred embodiment, the method further comprises updating the feedforward control filter coefficients in real time, including:
judging whether an environmental noise mutation exists in real time, and determining a target mutation suppression coefficient at the current moment according to a preset corresponding relation between a judging result and the mutation suppression coefficient;
updating the output-error transfer path coefficient of the feedback microphone in real time;
obtaining a target feedback signal based on a current environmental noise signal transmitted by a feedback microphone obtained in real time;
the feedforward control filter coefficient at the current time is obtained based on the output-error transfer path coefficient at the current time, the target abrupt change suppression coefficient, and the target feedback signal.
In a preferred embodiment, the obtaining the target feedback signal based on the current environmental noise signal transmitted by the feedback microphone acquired in real time includes:
acquiring an initial feedback signal transmitted by a feedback microphone in real time;
performing band-pass filtering processing on the initial feedback signal to obtain a preprocessed feedback signal;
and carrying out reduction processing on the preprocessed feedback signal to obtain a target feedback signal.
In a preferred embodiment, the updating the output-error transfer path coefficient of the feedback microphone in real time includes:
obtaining a pre-calibrated initial output-error transfer path coefficient;
and carrying out real-time compensation updating on the initial output-error transfer path coefficient to obtain the output-error transfer path coefficient.
In a second aspect, there is provided an audio processing apparatus, the apparatus comprising:
the first acquisition module is used for obtaining a high-frequency signal and a medium-low frequency signal by frequency division of a target audio signal acquired in real time;
the second acquisition module is used for acquiring a target reference signal based on the current environmental noise signal transmitted by the feedforward microphone acquired in real time;
and the processing module is used for fusing the high-frequency signal with the real-time control signal and outputting the high-frequency signal to the air conduction sounding device so as to play and form a first target audio, and outputting the medium-low frequency signal at the same time to the bone conduction sounding device so as to play and form a second target audio.
In a preferred embodiment, the second acquisition module includes:
the first acquisition unit is used for acquiring an initial reference signal transmitted by the feedforward microphone in real time;
the second acquisition unit is used for carrying out band-pass filtering processing on the initial reference signal to obtain a preprocessed reference signal;
and the reduction unit is used for carrying out reduction processing on the preprocessed reference signal to obtain a target reference signal.
In a third aspect, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by one or more processors, implements the steps of the audio processing method according to any of the first aspects.
In a fourth aspect, an electronic device is provided, comprising:
the audio receiving device is in communication connection with a target communication terminal to receive the target audio signal sent by the target communication terminal in real time;
a feedforward microphone for picking up a current ambient noise signal;
one or more processors coupled to the audio acquisition device, the feedforward microphone, respectively, to perform operations according to any of the first aspects; and
the gas conduction sounding device is connected with the one or more processors to receive the first target audio signal and play corresponding first target audio;
and the bone conduction sounding device is connected with the one or more processors to receive the second target audio signal and play corresponding second target audio.
Compared with the prior art, the application has the following beneficial effects:
the application provides an audio processing method, an audio processing device, a computer readable storage medium and electronic equipment, wherein the method comprises the steps of dividing a target audio signal acquired in real time to obtain a high-frequency signal and a medium-low frequency signal; obtaining a target reference signal based on a current environmental noise signal transmitted by a feedforward microphone acquired in real time; acquiring a real-time control signal based on a real-time acquired target reference signal and a real-time acquired feedforward control filter coefficient of a feedforward microphone; the method comprises the steps of fusing a high-frequency signal and a real-time control signal to form a first target audio signal, outputting the first target audio signal to an air conduction sounding device so as to play corresponding first target audio, outputting a simultaneously-timed medium-low frequency signal to a bone conduction sounding device so as to play corresponding second target audio, and synchronously playing the first target audio and the second target audio; according to the audio processing method provided by the application, the environment noise is counteracted by synchronously playing the reverse sound signal of the environment noise through the air conduction sounding device arranged on the bone conduction earphone, so that the influence of the environment noise on the user when receiving the earphone audio is avoided, the interference of the external environment noise can be eliminated for the user even in a noisy environment, a better audio receiving experience is provided, and the quality of the user communication or music experience is improved; and the high-frequency part in the target audio signal is output by using the gas conduction sounding device in a frequency division mode, so that the defect that the bone conduction earphone experiences poor high-frequency part of the audio can be effectively overcome, and the use experience of the bone conduction earphone is improved;
the method further comprises the steps of updating the feedforward control filter coefficient in real time, including judging whether the environmental noise mutation exists in real time, and determining a target mutation suppression coefficient at the current moment according to the corresponding relation between a preset judging result and the mutation suppression coefficient; updating the output-error transfer path coefficient of the feedback microphone in real time; obtaining a target feedback signal based on a current environmental noise signal transmitted by a feedback microphone obtained in real time; obtaining a feedforward control filter coefficient at the current moment based on the error transfer path coefficient at the current moment, the mutation suppression coefficient and a target feedback signal; the adaptive updating based on the feedforward control filter can effectively avoid abnormal sounds such as howling and the like caused by sudden changes of the real-time control signal due to sudden changes of the environmental noise, thereby further improving the use experience of the bone conduction earphone.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the description of the present application, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
Aiming at the current situation that when the current earphone, particularly the bone conduction earphone, is in use, a user is susceptible to environmental noise when receiving an audio signal, the embodiment provides an audio processing method, an audio processing device, a computer readable storage medium and electronic equipment, and can effectively improve the use experience when the user uses the earphone, particularly the bone conduction earphone.
Audio processing methods, apparatuses, computer-readable storage media, and electronic devices are described in further detail below in connection with specific embodiments.
Examples
As shown in fig. 1 and 4, the present embodiment provides an audio processing method, which is suitable for a bone conduction earphone, and is used for suppressing the influence of environmental noise on the bone conduction earphone when a user listens to audio to perform real-time active noise reduction, so that a quiet earphone use environment can be provided for the bone conduction earphone even in a noisy environment.
As shown in fig. 2 and 3, the earphone in the present embodiment includes a controller, a microphone, an air conduction sounding device (speaker) 1, a bone conduction sounding device (motor vibrator), a feedforward microphone 3, a feedback microphone 2, and the like, wherein the controller is configured to perform the audio processing method, the feedforward microphone 3 and the feedback microphone 2 are both configured to pick up environmental noise of the earphone, and the air conduction sounding device is configured to output a first target audio corresponding to a first target audio signal output by the controller. Preferably, the processor is integrated in the bluetooth controller of the bone conduction headset or algorithmically processed in a separate MCU/DSP. Preferably, the air conduction sounding device is arranged at the main control hardware, preferably near or towards the ear, the feedback microphone 2 is arranged at the near ear end of the bone conduction earphone closest to the human ear, and the feedforward microphone 3 is arranged at the position of the bone conduction vibrator far from the loudspeaker. Of course, the setting manner is not limited to this, and all setting manners capable of realizing the audio processing method in the present embodiment are within the scope of the present embodiment.
Specifically, the audio processing method includes:
s1, dividing frequency of a target audio signal acquired in real time to obtain a high-frequency signalMedium and low frequency signals.
Specifically, the target audio signal is divided by band-pass filtering to obtain a high-frequency signal and a medium-low frequency signal respectively. In this embodiment, the frequency of the high-frequency signal is greater than 1000Hz, and the frequency of the medium-low frequency signal is less than 1000 Hz.
S2, obtaining a target reference signal x (n) based on the current environmental noise signal transmitted by the feedforward microphone obtained in real time.
Specifically, step S2 includes:
s21, acquiring an initial reference signal transmitted by the feedforward microphone in real time.
S22, carrying out band-pass filtering processing on the initial reference signal to obtain a preprocessed reference signal.
Specifically, the initial reference signal is preprocessed according to the frequency band range of the active noise reduction control to obtain a preprocessed reference signal, and the preprocessing method is implemented by adopting band-pass filtering to perform filtering processing according to the frequency band range of the active noise reduction control.
S23, carrying out reduction processing on the preprocessed reference signal to obtain a target reference signal x (n).
Since the output audio corresponding to the control signal output by the gas conduction sounding device and the output audio corresponding to the high-frequency part of the target audio may have a certain influence on the initial reference signal acquired by the feedforward microphone, the initial reference signal needs to be subjected to reduction processing to obtain an actual target reference signal.
Before step S23, the method further includes step S0a of pre-calibrating the output-reference transmission path coefficient of the feedforward microphone to obtain a calibrated output-reference transmission path coefficient. The step S0a specifically comprises the following steps: the test loudspeaker emits a white noise signal a (n), the feedforward microphone picks up the white noise signal and converts the white noise signal into an audio electric signal (reference signal x0 (n)), the reference signal x0 (n) and the white noise signal are calculated according to a least mean square algorithm (LMS) to obtain a calibrated output-reference transmission path coefficient Pn, and n represents the current n moment.
Similarly, the method further comprises the step of S0b, emitting a white noise signal a (n) by the test loudspeaker, picking up the white noise signal by the feedback microphone, converting the white noise signal into an audio electric signal (error signal e0 (n)), calculating a calibrated output-feedback transfer path coefficient Sn according to a least mean square algorithm (LMS) by the error signal e0 (n) and the white noise signal, wherein n represents the current n time.
It should be noted that, the calibration output-reference transmission path coefficient Pn and the calibration output-feedback transmission path coefficient Sn are actual physical parameters of the bone conduction earphone, and only one calibration is needed after the bone conduction earphone leaves the factory.
The step S23 specifically includes: and obtaining a target reference signal based on the preprocessed reference signal and a calibrated output-reference transmission path coefficient calibrated in advance. Specifically, the target reference signal is obtained by calculation of the following formula (1)x(n):
(1)
Where n represents the current nth time, i represents the sequence number, and M represents the filter order.
S3, acquiring a real-time control signal based on the real-time acquired target reference signal and the feedforward control filter coefficient of the feedforward microphone acquired in real time.
Before step S3, the method further includes Sa, updating feedforward control filter coefficients in real time, including:
sa1, real-time update based on the calibration output-error transfer path coefficient of the feedback microphone obtained in advance to obtain the real-time output-error transfer path coefficient。
Specifically, step Sa1 includes:
sa1-1, obtaining a calibration output-error transfer path coefficient, see step S0b;
sa1-2, and error transmission path coefficient for calibration outputPerforming real-time compensation update to obtain real-time output-error transfer path coefficient。
Specifically, the real-time output-error transfer path coefficient is obtained by calculation using the following formula (2):
(2)
M denotes the filter order, n denotes the current n time instant, i denotes the sequence number,Sni(n)representation ofnTime, the firstiCalibration output of sequence number-error transfer path coefficient.
Sa2, obtaining a target feedback signal based on the current environmental noise signal transmitted by the feedback microphone obtained in real time. Specifically, step Sa1 includes:
sa2-1, acquiring an initial feedback signal transmitted by a feedback microphone in real time;
sa2-2, performing band-pass filtering processing on the initial feedback signal to obtain a preprocessed feedback signal;
sa2-3 for feedback signal after pretreatmentPerforming reduction treatment to obtain target feedback signal->。
Because the output audio corresponding to the control signal output by the gas conduction sounding device and the output audio corresponding to the high-frequency part of the target audio may have a certain influence on the initial feedback signal collected by the feedback microphone, the initial feedback signal needs to be restored to obtain the actual target feedback signal。
Specifically, the target feedback signal e (n) is obtained by calculation using the following formula (3):
(3)
wherein M represents the filter order, n represents the current n time, i represents the sequence number,representation ofnTime, the firstiCalibration output of sequence number-error transfer path coefficient.
And Sa3, judging whether the environmental noise mutation exists or not in real time based on the target feedback signal, and determining a target mutation suppression coefficient at the current moment according to the corresponding relation between a preset judging result and the mutation suppression coefficient.
In one embodiment, it is determined whether the target feedback signal belongs to a preset feedback signal threshold. If not, judging the mutation of the environmental noise. If yes, judging that the environmental noise has no mutation.
In another embodiment, it is determined whether the target feedback signal power belongs to a preset feedback signal power threshold, and if not, it is determined that the environmental noise is abrupt. If yes, judging that the environmental noise has no mutation.
When it is judged that the environmental noise has no mutation, the mutation suppression coefficient p3 value is set to 0. When the environmental noise is judged to be suddenly changed: the value of the abrupt change suppression coefficient p3 is updated to be non-zero, so that the updated quantity part of the feedforward control filter coefficient is attenuated rapidly, and the feedforward control filter coefficient is stopped from updating.
Sa4, obtaining the feedforward control filter coefficient at the current moment based on the real-time output-error transfer path coefficient at the current moment, the target abrupt change suppression coefficient and the target feedback signal.
Specifically, the feedforward control filter coefficients are calculated using the following equations (4) (5):
(4)
(5)
wherein,,representing step size->Representing an anti-divergence small value, +.>Representing normalized coefficient,/->Represents mutation suppression coefficient, N1 represents error buffer order,>indicating the degree of adaptation of the feedforward control filter at the present time (which can be used to update the coefficients of the feedforward control filter to achieve adaptive feedforward control),>representing the feedforward control filter coefficients at the current time.
Therefore, when the feedforward control filter coefficient is updated, an abnormal sound suppression module is added on the basis of the fxlms algorithm, and abnormal sound generation caused by abrupt change of the output of the control signal due to abrupt change of environmental noise can be effectively avoided.
S4, fusing the high-frequency signal and the real-time control signal to form a first target audio signal, outputting the first target audio signal to the air conduction sounding device so as to play the corresponding first target audio, outputting the simultaneously-timed medium-low frequency signal to the bone conduction sounding device so as to play the corresponding second target audio, and synchronously playing the first target audio and the second target audio.
In summary, the present embodiment provides an audio processing method, which counteracts environmental noise by means of synchronous playing of an environmental noise reverse sound signal by an air conduction sounding device set by a bone conduction earphone, so as to avoid influence of the environmental noise on the user when receiving the earphone audio, and even in a noisy environment, the method can eliminate interference of external environmental noise for the user, provide a better audio receiving experience, and improve quality of user communication or music experience; and the high-frequency part in the target audio signal is output by using the gas conduction sounding device in a frequency division mode, so that the defect that the bone conduction earphone experiences poor high-frequency part of the audio can be effectively overcome, and the use experience of the bone conduction earphone is improved;
and the adaptive updating based on the feedforward control filter can effectively avoid abnormal sounds such as howling and the like caused by abrupt change of the real-time control signal due to abrupt change of the environmental noise, thereby further improving the use experience of the bone conduction earphone.
Corresponding to the above-mentioned audio processing method, the present embodiment further provides an audio processing apparatus corresponding to the method, and the method is implemented by each functional module. The audio processing apparatus includes:
the first acquisition module is used for obtaining a high-frequency signal and a medium-low frequency signal by frequency division of a target audio signal acquired in real time;
the second acquisition module is used for acquiring a target reference signal based on the current environmental noise signal transmitted by the feedforward microphone acquired in real time;
the processing module is used for fusing the high-frequency signal and the real-time control signal and outputting the fused high-frequency signal and the real-time control signal to the air conduction sounding device so as to play and form a first target audio, and outputting the medium-low frequency signal at the same time to the bone conduction sounding device so as to play and form a second target audio;
and the updating module is used for updating the feedforward control filter coefficient in real time.
The second obtaining module includes:
the first acquisition unit is used for acquiring an initial reference signal transmitted by the feedforward microphone in real time;
the second acquisition unit is used for carrying out band-pass filtering processing on the initial reference signal to obtain a preprocessed reference signal;
and the reduction unit is used for carrying out reduction processing on the preprocessed reference signal to obtain a target reference signal.
The second obtaining unit is specifically configured to obtain the target reference signal based on the preprocessed reference signal and a calibrated output-reference transmission path coefficient calibrated in advance.
The update module includes:
the first updating unit is used for carrying out real-time updating based on the calibration output-error transfer path coefficient of the feedback microphone obtained in advance to obtain a real-time output-error transfer path coefficient;
a third acquisition unit for acquiring a target feedback signal based on the current environmental noise signal transmitted by the feedback microphone acquired in real time;
the first processing unit is used for judging whether the environmental noise mutation exists or not in real time based on the target feedback signal, and determining a target mutation suppression coefficient at the current moment according to the corresponding relation between a preset judging result and the mutation suppression coefficient;
and the second processing unit is used for obtaining the feedforward control filter coefficient at the current moment based on the real-time output-error transfer path coefficient at the current moment, the target mutation suppression coefficient and the target feedback signal.
The first updating unit is specifically configured to:
obtaining a calibration output-error transfer path coefficient of the feedback microphone;
and carrying out real-time compensation and update on the calibrated output-error transfer path coefficient to obtain the real-time output-error transfer path coefficient.
The third obtaining unit is specifically configured to:
acquiring an initial feedback signal transmitted by a feedback microphone in real time;
performing band-pass filtering processing on the initial feedback signal to obtain a preprocessed feedback signal;
and carrying out reduction processing on the preprocessed feedback signal to obtain a target feedback signal.
It should be noted that: in the audio processing device provided in the above embodiment, when performing audio processing service, only the division of the above functional modules is used for illustration, in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the system is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the embodiments of the audio processing apparatus and the audio processing method provided in the foregoing embodiments belong to the same concept, that is, the apparatus is based on the method, and the specific implementation process of the apparatus is detailed in the method embodiment, which is not described herein again.
And as shown in fig. 5, this embodiment also provides a computer readable storage medium, on which a computer program is stored, where the computer program when executed by a processor implements the steps of the audio processing method provided in this embodiment, so that environmental noise of a user can be effectively counteracted, and the influence of the environmental noise on the user receiving the earphone audio signal is avoided.
In particular, any combination of one or more computer readable media may be employed. The computer readable storage medium may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
Further, the present embodiment also provides an electronic device, preferably a bone conduction headset, including:
the audio receiving device is in communication connection with a target communication terminal to receive the target audio signal sent by the target communication terminal in real time;
a feedforward microphone for picking up a current ambient noise signal;
one or more processors, respectively connected to the audio acquisition device and the feedforward microphone, for performing operations according to any one of the foregoing audio reception methods; and
the gas conduction sounding device is connected with the one or more processors to receive the first target audio signal and play corresponding first target audio;
and the bone conduction sounding device is connected with the one or more processors to receive the second target audio signal and play corresponding second target audio.
All the above optional technical solutions can be combined to form an optional embodiment of the present application, and any multiple embodiments can be combined, so as to obtain the requirements of coping with different application scenarios, which are all within the protection scope of the present application, and are not described in detail herein.
It should be noted that the above-mentioned embodiments are only preferred embodiments of the present application, and are not intended to limit the present application, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present application should be included in the protection scope of the present application.