Adaptive speech filter for attenuation of ambient noise
According to a preferred aspect of the instant invention, there is provided a system and method that allows the user to attenuate ambient noise in speech recordings in the audio part of a video recording. The user does not need to define particular sections or samples or individual parameters. The system is automatically analyzing the input signal and in a plurality of individual steps detects the ambient noise, determines an adaptive filter, implements the filter and therewith attenuates the ambient noise accordingly.
1. A method of enhancing a speech signal in the presence of noise, comprising:
performing, by computer processing hardware, operations of:
a. reading an audio signal containing said speech signal therein;
b. transforming said audio signal to the frequency domain, thereby forming a transformed audio signal;
c. determining via a recursive spectral analysis a plurality of spectral components in the frequency domain that have a most energy;
d. identifying at least one null point in the time domain associated with each of said plurality of spectral components;
e. determining a gradient of each of said null points;
f. determining a variance of each of said determined gradients;
g. analyzing the variance of each of said determined gradients to assign each of said determined gradients to a category, wherein said gradient with a high variance is classified as noise, wherein said gradient with a middle variance is classified as part of a tonal part of said speech signal, and wherein said gradient with a low variance is classified as a tonal component not a part of said speech signal;
h. determining whether the plurality spectral components with the most energy belong to a harmonic series, wherein frequencies of the plurality spectral components with the most energy are a multiple of a base frequency;
i. calculating a transfer function using said analysis of each variance and said determination of belonging to harmonic series of said plurality of spectral components with the most energy;
j. applying said transfer function to said transformed audio signal, thereby forming a filtered audio signal;
k. inverse transforming said filtered audio signal, thereby forming an enhanced speech signal.