US RE43191 E1 Abstract An acoustic noise suppression filter including attenuation filtering with a noise-free estimate based on a codebook of line spectral frequencies.
Claims(11) 1. A method of filtering a stream of sampled acoustic signals, comprising the steps of:
(a) partitioning athe stream of sampled acoustic signals into a sequence of frames;
(b) Fourier transforming said flamesthe frames using processing circuitry to yield a sequence of transformed frames;
(c) applying a generalized Wiener filter to saidthe transformed frames to yield a sequence of filtered transformed frames, wherein saidthe filter uses power spectrum estimates from LSFsline spectral frequencies (LSFs) defined as weighted sums of LSFs of a codebook of LSFs with the weights determined by the LSFs of saidthe transformed frames; and
(d) inverse Fourier transforming said sequence of filtered transformed frames to yield a sequence of filtered frames.
2. The method of
(a) repeating the step (c) of
3. The method of
(a) saidthe step (c) of
4. A method of noise suppression filtering for a sequence of frames of noisy speech, comprising:
filtering a frame of noisy speech that includes the sub-steps of:
estimating a noise power spectrum, P
_{NOISE}(ω), of the frame of noisy speech, wherein the variable ω is the discrete frequency;computing a noisy speech power spectrum for the frame of noisy speech using processing circuitry;
smoothing noisy speech power spectrum with respect to the variable ω to yield a smoothed noisy speech power spectrum, P
_{SMOOTHEDNOISYSPEECH}(ω), for the frame of noisy speech;defining a noise-suppression filter using the noisy speech power spectrum, and the smoothed noisy speech power spectrum;
filtering the frame of noisy speech with the noise suppression filter; and
repeating the step of filtering for each frame of noisy speech for a plurality of frames of noisy speech. 5. The method of claim 4, wherein the sub-step of smoothing is a convolution with respect to the variable ω of the noisy speech power spectrum and a window function, W(ω).
6. The method of claim 4, wherein the noise suppression filter includes the term:
wherein c is a positive constant.
7. The method of claim 6, wherein c is equal to 1.
8. The method of claim 6, wherein c is equal to 4.
9. The method of claim 4, wherein the noise suppression filter includes the term:
wherein c and M are a positive constant.
10. The method of claim 4, wherein the sub-step of estimating further comprises the sub-steps of:
equating the noise power spectrum of the frame to a product of a first constant and a noise power spectrum estimate of a prior frame when the smoothed noisy speech power spectrum of the frame is less than the product of the noise power spectrum estimate of the prior frame and the first constant; equating the noise power spectrum of the frame to the smoothed noisy speech power spectrum of the frame when the smoothed noisy speech power spectrum of the frame is greater than or equal to the product of the noise power spectrum estimate of the prior frame and the first constant and when the smoothed noisy speech power spectrum of the frame is less than or equal to the product of the noise power spectrum estimate of the prior frame and a second constant, wherein the first and second constants are positive, and wherein the product of the first and second constants is less than one; and equating the noise power spectrum of the frame to the product of the noise power spectrum estimate of the prior frame and the second constant, when the smoothed noisy speech power spectrum of the frame is greater than the product of the noise power spectrum estimate of the prior frame and the second constant. 11. The method of claim 10, wherein the first constant is 0.978 and the second constant is 1.006.
Description Cofiled patent applications with Ser. Nos. 08/424,928, 08/425,125, 08/426,746, and 08/426,427 are copending and disclose related subject matter. These applications all have a common assignee. The invention relates to electronic devices, and, more particularly, to speech analysis and synthesis devices and systems. Human speech consists of a stream of acoustic signals with frequencies ranging up to roughly 20 KHz; but the band of 100 Hz to 5 KHz contains the bulk of the acoustic energy. Telephone transmission of human speech originally consisted of conversion of the analog acoustic signal stream into an analog electrical voltage signal stream (e.g., microphone) for transmission and reconversion to an acoustic signal stream (e.g., loudspeaker) for reception. The advantages of digital electrical signal transmission led to a conversion from analog to digital telephone transmission beginning in the 1960s. Typically, digital telephone signals arise from sampling analog signals at 8 KHz and nonlinearly quantizing the samples with 8-bit codes according to the μ-law (pulse code modulation, or PCM). A clocked digital-to-analog converter and companding amplifier reconstruct an analog electrical signal stream from the stream of 8-bit samples. Such signals require transmission rates of 64 Kbps (kilobits per second). Many communications applications, such as digital cellular telehone, cannot handle such a high transmission rate, and this has inspired various speech compression methods. The storage of speech information in analog format (e.g., on magnetic tape in a telephone answering machine) can likewise be replaced with digital storage. However, the memory demands can become overwhelming: 10 minutes of 8-bit PCM sampled at 8 KHz would require about 5 MB (megabytes) of storage. This demands speech compression analogous to digital transmission compression. One approach to speech compression models the physiological generation of speech and thereby reduces the necessary information transmitted or stored. In particular, the linear speech production model presumes excitation of a variable filter (which roughly represents the vocal tract) by either a pulse train for voiced sounds or white noise for unvoiced sounds followed by amplification or gain to adjust the loudness. The model produces a stream of sounds simply by periodically making a voiced/unvoiced decision plus adjusting the filter coefficients and the gain. Generally, see Markel and Gray, Linear Prediction of Speech (Springer-Verlag 1976). More particularly, the linear prediction method partitions a stream of speech samples s(n) into “frames” of, for example, 180 successive samples (22.5 msec intervals for a 8 KHz sampling rate); and the samples in a frame then provide the data for computing the filter coefficients for use in coding and synthesis of the sound associated with the frame. Each frame generates coded bits for the linear prediction filter coefficients (LPC), the pitch, the voiced/unvoiced decision, and the gain. This approach of encoding only the model parameters represents far fewer bits than encoding the entire frame of speech samples directly, so the transmission rate may be only 2.4 Kbps rather than the 64 Kbps of PCM. In practice, the LPC coefficients must be quantized for transmission, and the sensitivity of the filter behavior to the quantization error has led to quantization based on the Line Spectral Frequencies (LSF) representation. To improve the sound quality, further information may be extracted from the speech, compressed and transmitted or stored along with the LPC coefficients, pitch, voicing, and gain. For example, the codebook excitation linear prediction (CELP) method first analyzes a speech frame to find the LPC filter coefficients, and then filters the frame with the LPC filter. Next, CELP determines a pitch period from the filtered frame and removes this periodicity with a comb filter to yield a noise-looking excitation signal. Lastly, CELP encodes the excitation signals using a codebook. Thus CELP transmits the LPC filter coefficients, pitch, gain, and the codebook index of the excitation signal. The advent of digital cellular telephones has emphasized the role of noise suppression in speech processing, both coding and recognition. Customer expectation of high performance even in extreme car noise situations plus the demand to move to progressively lower data rate speech coding in order to accommodate the ever-increasing number of cellular telephone customers have contributed to the importance of noise suppression. While higher data rate speech coding methods tend to maintain robust performance even in high noise environments, that typically is not the case with lower data rate speech coding methods. The speech quality of low data rate methods tends to degrade drastically with high additive noise. Noise supression to prevent such speech quality losses is important, but it must be achieved without introducing any undesirable artifacts or speech distortions or any significant loss of speech intelligibility. These performance goals for noise suppression have existed for many years, and they have recently come to the forefront due to digital cellular telephone application. One approach to noise suppression in speech employs spectral subtraction and appears in Boll, Suppression of Acoustic Noise in Speech Using Spectral Subtraction, 27 IEEE Tr.ASSP 113 (1979), and Lim and Oppenheim, Enhancement and Bandwidth Compression of Noisy Speech, 67 Proc.IEEE 1586 (1979). Spectral subtraction proceeds roughly as follows. Presume a sampled speech signal s(j) with uncorrelated additive noise n(j) to yield an observed windowed noisy speech y(j)=s(j)+n(j). These are random processes over time. Noise is assumed to be a stationary process in that the process's autocorrelation depends only on the difference of the variables; that is, there is a function r Of course, speech is not a stationary process, so Lim and Oppenheim modified the approach as follows. Take s(j) not to represent a random process but rather to represent a windowed speech signal (that is, a speech signal which has been multiplied by a window function), n(j) a windowed noise signal, and y(j) the resultant windowed observed noisy speech signal. Then Fourier transforming and multiplying by complex conjugates yields:
This resembles the preceding equation for the addition of power spectral densities. An autocorrelation approach for the windowed speech and noise signals simplifies the mathematics. In particular, the autocorrelation for the speech signal is given by
Of course, P The power spectral density P The spectral subtraction method can be interpreted as a time-varying linear filter H(ω) so that S^(ω)=H(ω)Y(ω) which the foregoing estimate then defines as:
This spectral subtraction can attenuate noise substantially, but it has problems including the introduction of fluctuating tonal noises commonly referred to as musical noises. The Lim and Oppenheim article also describes an alternative noise suppression approach using noncausal Wiener filtering which minimizes the mean-square error. That is, again S^(ω)=H(ω)Y(ω) but with H(ω) now given by:
A noncausal Wiener filter cannot be directly applied to provide an estimate for s(j) because speech is not stationary and the power spectral density P Recalling S^(ω)=H(ω)Y(ω) and then solving for |S^(ω)| in the β=½ case yields:
However, this generalized Wiener filtering has problems including how to estimate S^, and estimators usually apply an iterative approach with perhaps a half dozen iterations which increases computational complexity. Ephraim, A Minimum Mean Square Error Approach for Speech Enhancement, Conf.Proc. ICASSP 829 (1990), derived a Wiener filter by first analyzing noisy speech to find linear prediction coefficients (LPC) and then resynthesizing an estimate of the speech to use in the Wiener filter. In contrast, O'Shaughnessy, Speech Enhancement Using Vector Quantization and a Formant Distance Measure, Conf.Proc. ICASSP 549 (1988), computed noisy speech formants and selected quantized speech codewords to represent the speech based on formant distance; the speech was resynthesized from the codewords. This has problems including degradation for high signal-to-noise signals because of the speech quality limitations of the LPC synthesis. The Fourier transforms of the windowed sampled speech signals in systems The present invention provides speech noise suppression by spectral subtraction filtering improved with filter clamping, limiting, and/or smoothing, plus generalized Wiener filtering with a signal-to-noise ratio dependent noise suppression factor, and plus a generalized Wiener filter based on a speech estimate derived from codebook noisy speech analysis and resynthesis. And each frame of samples has a frame-energy-based scaling applied prior to and after Fourier analysis to preserve quiet speech resolution. The invention has advantages including simple speech noise suppression. The drawings are schematic for clarity. Overview The preferred embodiment noise suppression filters may also be realized without Fourier transforms; however, the multiplication of Fourier transforms then corresponds to convolution of functions. The preferred embodiment noise suppression filters may each be used as the noise suppression blocks in the generic systems of The smoothed spectral subtraction preferred embodiments have a spectral subtraction filter which (1) clamps attenuation to limit suppression for inputs with small signal-to-noise ratios, (2) increases noise estimate to avoid filter fluctuations, (3) smoothes noisy speech and noise spectra used for filter definition, and (4) updates a noise spectrum estimate from the preceding frame using the noisy speech spectrum. The attenuation clamp may depend upon speech and noise estimates in order to lessen the attenuation (and distortion) for speech; this strategy may depend upon estimates only in a relatively noise-free frequency band. The signal-to-noise ratio adaptive generalized Wiener filter preferred embodiments use H(ω)=[P The codebook-based generalized Wiener filter noise suppression preferred embodiments use H(ω)=[P The power estimates used in the preferred embodiment filter definitions may also be used for adaptive scaling of low power signals to avoid loss of precision during FFT or other operations. The scaling factor adapts to each frame so that with fixed-point digital computations the scale expands or contracts the samples to provide a constant overflow headroom, and after the computations the inverse scale restores the frame power level. Smoothed spectral subtraction preferred embodiments A graph of this function with logarithmic scales appears in The preferred embodiments modify this standard spectral subtraction in four independent but synergistic approaches as detailed in the following. Preliminarily, partition an input stream of noisy speech sampled at 8 KHz into 256-sample frames with a 50% overlap between successive frames; that is, each frame shares its first 128 samples with the preceding frame and shares its last 128 samples with the succeeding frame. This yields an input stream of frames with each frame having 32 msec of samples and a new frame beginning every 16 msec. Next, multiply each frame with a Hann window of width 256. (A Hann window has the form w(k)=(1+cos(2πk/K))/2 with K+1 the window width.) Thus each frame has 256 samples y(j), and the frames add to reconstruct the input speech stream. Fourier transform the windowed speech to find Y(ω) for the frame; the noise spectrum estimation differs from the traditional methods and appears in modification (4). (1) Clamp the H(ω) attenuation curve so that the attenuation cannot go below a minimum value; Of course, the 10 dB clamp could be replaced with any other desirable clamp level, such as 5 dB or 20 dB. Also, the clamping could include a sloped clamp or stepped clamping or other more general clamping curves, but a simple clamp lessens computational complexity. The following “Adaptive filter clamp” section describes a clamp which adapts to the input signal energy level. (2) Increase the noise power spectrum estimate by a factor such as 2 so that small errors in the spectral estimates for input (noisy) signals do not result in fluctuating attenuation filters. The corresponding filter for this factor alone would be:
(3) Reduce the variance of spectral estimates used in the noise suppression filter H(ω) by smoothing over neighboring frequencies. That is, for an input windowed noisy speech signal y(j) with Fourier transform Y(ω), apply a running average over frequency so that |Y(ω)| Thus a filter with all three of the foregoing features has transfer function:
Extend the definition of H(ω) by symmetry to π<ω<2π or −π<ω<0 (4) Any noise suppression by spectral subtraction requires an estimate of the noise power spectrum. Typical methods update an average noise spectrum during periods of non-speech activity, but the performance of this approach depends upon accurate estimation of speech intervals which is a difficult technical problem. Some kinds of acoustic noise may have speech-like characteristics, and if they are incorrectly classified as speech, then the noise estimated will not be updated frequently enough to track changes in the noise environment. Consequently, the preferred embodiment takes noise as any signal which is always present. At each frequency recursively estimate the noise power spectrum P Thus, the noise power spectrum estimate can increase up to 3 dB per second or decrease up to 12 dB per second. As a result, the noise estimates will only slightly increase during short speech segments, and will rapidly return to the correct value during pauses between words. The initial estimate can simply be taken as the first input frame which typically will be silence; of course, other initial estimates could he used such as a simple constant. This approach is simple to implement, and is robust in actual performance since it makes no asumptions about the characteristics of either the speech or the noise signals. Of course, multiplicative factors other than 0.978 and 1.006 could be used provided that the decrease limit exceeds the increase limit. That is, the product of the multiplicative factors is less than 1; e.g., (0.978) (1.006) is less than 1. A preferred embodiment filter may include one or more of the four modifications, and a preferred embodiment filter combining all four of the foregoing modifications will have a transfer function:
Adaptive Filter Clamp The filter attenuation clamp of the preceding section can be replaced with an adaptive filter attenuation clamp. For example, take
In particular, let YP be the sum of the signal power spectrum over the frequency range 1.8 KHz to 4.0 KHz: with a 256-sample frame sampling at 8 KHz and 256-point FFT, this corresponds to frequencies 51π/128 to π. That is,
More explicitly, presume a 16-bit fixed-point format of two's complement numbers, and presume that the noisy speech samples have been scaled so that numbers X arising in the computations will fall into the range −1≦X<+1, which in hexadecimal notation will be the range 8000 to 7FFF. Then the filter gain clamp could vary between A taken equal to 1000 (0.125), which is roughly −9 dB, and an upper limit for A+B(YP−NP) taken equal to 3000 (0.375), which is roughly −4.4 dB. More conservatively, the clamp could be constrained to the range of 1800 to 2800. Furthermore, a simpler implementation of the adaptive clamp which still provides its advantages uses the M from the previous frame (called M The preceding adaptive clamp depends linearly on the speech power; however, other dependencies such as quadratic could also be used provided that the functional dependence is monotonic. Indeed, memory in system and slow adaptation rates for M make the clamp nonlinear. The frequency range used to measure the signal and noise powers could be varied, such as 1.2 KHz to 4.0 KHz or another band (or bands) depending upon the noise environment. Note that the adaptive clamp could be taken as dependent upon the ratio YP/NP instead of just the difference or on some combination. Also, the positive slope of the adaptive clamp (see Note that the estimates YP and NP could be defined by the previous frame in order to make an implementation on a DSP more memory efficient. For most frames the YP and NP will be close to those of the preceding frame. Modified generalized Wiener filter preferred embodiments Heuristically, the preferred embodiment may be understood in terms of the following intuitive analysis. First, take P Thus by Parseval's theorem, E Now take the factor multiplying P Optionally, average α by weighting with the α from the preceding frame to limit discontinuities. Further, the value of the constant κ can be increased to obtain higher noise suppression, which does not result in fluctuations in the speech as much as it does for standard spectral subtraction because H(ω) is always nonnegative. In more detail, the modified generalized Wiener filter perferred embodiment proceeds through the following steps as illustrated in -
- (1) Partition an input stream of noisy speech sampled at 8 KHz into 256-sample frames with a 50% overlap between successive frames; that is, each frame shares its first 128 samples with the preceding frame and shares its last 128 samples with the succeeding frame. This yields an input stream of frames with each frame having 32 msec of samples and a new frame beginning every 16 msec.
- (2) Multiply each frame with a Hann window of width 256. (A Hann window has the form w(j)=(1+cos(2πj/N))/2 with N+1 the window width.) Thus each frame has 256 samples y(j) and the frames add to reconstruct the input speech stream.
- (3) For each windowed frame, find the 8th order LPC filter coefficients a
_{0 }(=1), a_{1}, a_{2}, . . . a_{8 }by solving the following eight equations for eight unknowns: Σ_{k}α_{k}r(j+k)=0 for j=1,2, . . . 8 - where r(.) is the autocorrelation function of y(.).
- (4) Form the discrete Fourier transform A(ω)=Σ
_{k}a_{k}e^{−ikω}, and then estimate P_{Y}(ω) for use in the generalized Wiener filter as E_{Y}/|A(ω)|^{2 }with E_{Y}=Σ_{k}a_{k}r(k) the energy of the LPC model. This just uses the LPC synthesis filter spectrum as a smoothed version of the noisy speech spectrum and prevents erratic spectral fluctuations from affecting the generalized Wiener filter. - (5) Estimate the noise power spectrum P
_{N}(ω) for use in the generalized Wiener filter by updating the estimate from the previous frame, P′_{N}(ω), using the current frame smoothed estimate for the noisy speech power spectrum, P_{Y}(ω), as follows:
Thus the noise spectrum estimate can increase at 3 dB per second and decrease at 12 dB per second. For the first frame, just take P Also, optionally, to handle abrupt increases in noise level, use a counter to keep track of the number of successive frames in which the condition P Of course, other multipliers and count limits could be used. -
- (6) Compute α=κE
_{N}/E_{Y }to use in the generalized Wiener filter. Typically, K will be about 6–7 with larger values for increased noise suppression and smaller values for less. Optionally, a may be filtered by averaging with the preceding frame by: α^=max(1, 0.8α+0.2α′) where α′ is the α of the preceding frame. That is, for the current frame with E_{N }the energy of the noise estimate P_{N}(ω), E_{Y }the energy of the noisy speech LPC model, and α′ is the same expression but for the previous frame.FIG. 4 shows this optional filtering with a broken line. - (7) Compute the first approximation modified generalized Wiener filter for each frequency as:
H_{1}(ω)^{2}=P_{Y}(ω)/[P_{Y}(ω)+[E_{Y}/(E_{Y}−E_{N})]αP_{N}(ω)] with P_{Y}(ω) and E_{Y }from step (4), P_{N}(ω) and E_{N }from step (5), and α from step (6). - (8) Clamp H
_{1}(ω) to avoid excess noise suppression by defining a second approximation: H_{2}(ω)=max(−10 dB, H_{1}(ω)). Alternatively, an adaptive clamp could be used. - (9) Optionally, smooth the second approximation by convolution with a window W(ω) having weights such as [0.1, 0.2, 0.4, 0.2, 0.1] to define a third approximation H
_{3}(ω)=W★H_{2}(ω).FIG. 4 indicates this optional smoothing in brackets. - (10) Extend H
_{2}(ω) (or H_{3}(ω) if used) to the range π<ω<2π or −π<ω<0 by symmetry to define H(ω). The periodicity of H(ω) makes these extensions equivalent. - (11) Compute the 256-point discrete Fourier transform of y(j) to obtain Y(ω).
- (12) Take S^(ω)=H(ω)Y(ω) as an estimate for the spectrum of the frame of speech with noise removed.
- (13) Compute the 256-point inverse discrete Fourier transform of S^(ω) and take the inverse transform to be the estimate s^(j) of speech with noise removed for the frame.
- (14) Add the s^(j) of the overlapping portions of successive frames to get s(j) as the final noise suppressed estimate.
- (6) Compute α=κE
Insertion of noise suppressor Codebook based generalized Wiener filter preferred embodiment -
- (1) Partition an input stream of speech sampled at 8 KHz into 256-sample frames with a 50% overlap between successive frames; that is, follow the first step of the modified generalized Wiener filter preferred embodiments.
- (2) Multiply each frame with a Hann window of width 256; again following the modified generalized Wiener filter preferred embodiment.
- (3) For each windowed frame with samples y(j), find the Mth (typically 8th) order LPC filter coefficients a
_{0 }(=1), a_{1}, a_{2}, . . . a_{M }by solving the M linear equations for M unknowns: Σ_{i}α_{i}r(j+i)=0 for j=1,2, . . . M where r(.) is the autocorrelation of y(.). This again follows the modified generalized Wiener filter preferred embodiments. The gain of the LPC spectrum is Σ_{i}a_{i}r(i). - (4) Compute the line spectral frequencies (LSF) from the LPC coefficients. That is, set P(z)=A(z)+A(1/z)z
^{M }and Q(z)=A(z)−A(1/z)/z^{M }where A(z)=1+a_{1}/z+a_{2}/z^{2}+ . . . +a_{M}/z^{M }is the analysis LPC filter, and solve for the roots of the polynomials P(z) and Q(z). These roots all lie on the unit circle |z|=1 and so have the form e^{jω}with the ωs being the LSFs for the noisy speech frame. Recall that the use of LSFs instead of LPC coefficients for speech coding provides better quantization error properties. - (5) Compute the distance of the noisy speech frame LSFs from each of the entries of a codebook of M-tuples of LSFs. That is, each codebook entry is a set of M LSFs in size order. The codebook has 256 of such entries which have been determined by conventional vector quantiztion training (e.g., LBG algorithm) on sets of M LSFs from noise-free speech samples.
In more detail, let (LSF -
- (6) Estimate the M LSFs (LSF
_{s,1}, LSP_{s,2}, . . . LSF_{s,M}) for the noise-free speech of the frame by a probability weighting of the codebook LSFs: LSF_{s,i}=Σ_{j}p_{j}LSF_{j,i } - where the probabilities p
_{j }derive from the distance measures of the noisy speech frame LSFs from the codebook entries: p_{j}=exp(−γd_{j})/Σ_{k }exp (−γd_{k}) - where the constant γ controls the dynamic range for the probabilities and can be taken equal 0.002. Larger values of γ imply increased emphasis on the weights of the higher probability codewords.
- (7) Convert the estimated noise-free speech LSFs to LPC coefficients, a
_{i}^, and compute the estimated noise-free speech power spectrum as P_{S}^(ω)=Σ_{i}a_{i}r(i)/|Σ_{k}a_{k}^exp(−jkω)|^{2 } - where Σ
_{i}a_{i}r(i) is the gain of the LPC spectrum from step (3). - (8) Estimate the noise power spectrum P
_{N}(ω) as before: see step (5) of the modified generalized Wiener filter section. - (9) Take a equal to 10, and form the filter transfer function
H_{1}(ω)^{2}=P_{S}^(ω)/[P_{S}^(ω)+αP_{N}(ω)] - where P
_{S}^(ω) comes from step (7) and P_{N}(ω) from step (8). - (10) Clamp H
_{1}(ω) as in the other preferred embodiments to avoid filter fluctuations to obtain the final generalized Wiener filter transfer function: H(ω)=max(−10 dB, H_{1}(ω)). Alternatively, an adaptive clamp could be used. - (11) Compute the 256-point discrete Fourier transform of y(j) to obtain Y(ω).
- (12) Take S^(ω)=H(ω)Y(ω) as an estimate for the spectrum of the frame of speech with noise removed.
- (13) Compute the 256-point inverse fast Fourier transform of S^(ω) to be the estimate s^(j) of speech with noise removed for the frame.
- (14) Iterate steps (3)–(13) six or seven times using the estimate s^(j) from step (13) for y(j) in step (3).
FIG. 5 shows the iteration path - (15) Add the s^(j) of the overlapping portions of successive frames to get s(j) as the final noise suppressed estimate.
- (6) Estimate the M LSFs (LSF
Insertion of noise suppressor Internal precision control The preferred embodiments employ various operations such as FFT, and with low power frames the signal samples are small and precision may be lost in multiplications. For example, squaring a 16-bit fixed-point sample will yield a 32-bit result, but memory limitations may demand that only 16 bits be stored and so only the upper 16 bits will be chosen to avoid overflow. Thus an input sample with only the lowest 9 bits nonzero will have an 18-bit answer which implies only the two most significant bits will be retained and thus a loss of precision. An automatic gain control to bring input samples up to a higher level avoids such a loss of precision but destroys the power level information: both loud and quiet input speech will have the same power output levels. Also, such automatic gain control typically relies on the sample stream and does not consider a frame at a time. A preferred embodiment precision control method proceeds as follows. -
- (1) Presume that an (N+1)-bit two's complement integer format for the noisy speech samples u(j) and other variables, and presume that the variables have been scaled to the range −1≦X<+1. Thus for 16-bit format with hexadecimal notation, variables lie in the range from 8000 to 7FFF. First, estimate the power for an input frame of 256 samples by Σu(j)
^{2 }with the sum over the corresponding 256 js. - (2) Count the number of significant bits, S, in the power estimate sum. Note that with |u(j)| having an average size of K significant bits, S will be about 2K+8. So the number of bits in the sum reflects the average sample magnitude with the maximum possible S equal 2N+8.
- (3) Pick the frame scaling factor so as to set the average sample size to have (2N+8−S)/2−H significant bits where H is an integer, such as 3, of additional headroom bits. That is, the frame scaling factor is 2
^{(2N+8−}_{S)/2−H}. In terms of the K of step (2), the scaling factor equals 2^{N−K−H}. For example, with 16-bit format and 3 overhead bits, if the average sample magnitude is 2^{−9 }(7 significant bits), then the scaling factor will be 2^{5 }so the average scaled sampled magnitude is 2^{−4 }which leaves 3 bits (2^{3}) before overflow occurs at 2^{0}. - (4) Apply the Hann window (see steps (1)–(2) of the modified generalized Wiener filter section) to the frame by point wise multiplication. Thus with y(j) denoting the windowed samples,
y(j)=u(j)(1+cos(2πj/256))/2 - for the variable j presumed translated into the range −128 to +127. Do this windowing before the scaling to help avoid overflow on the much larger than average samples as they could fail at the edges of the window. Of course, this windowing could follow the scaling of the next step.
- (5) Scale the windowed input samples simply by left shifting (2N+8−S)/2−H bits (if the number of bits is negative, then this is a right shift). If a sample has magnitude more than 2
^{H }times the average, then overflow will occur and in this case just replace the scaled sample with the corresponding maximum magnitude (e.g., 8000 or 7FFF). Indeed, if the sign bit changes, then overflow has occurred and the scaled sample is taken as the corresponding maximum magnitude. Thus with y_{S}(j) denoting the scaled windowed samples and no overflow: y_{S}(j)=y(j)2^{(2N+8−S)/2−H } - (6) Compute the FFT using y
_{S}(j) to find Y_{S}(ω) . The use of y_{S}(j) avoids the loss of precision which otherwise would have occurred with the FFT due to underflow avoidance. - (7) Apply a local smoothing window to Y
_{S}(ω) as in step (3) of the spectral substraction preferred embodiments. - (8) Scale down by shifting Y
_{S}(ω) (2N+8−S)/2−H bits to the right (with the new sign bit repeating the original sign bit) to have Y(ω) for noise estimation and filter application in the preferred embodiments previously described.
- (1) Presume that an (N+1)-bit two's complement integer format for the noisy speech samples u(j) and other variables, and presume that the variables have been scaled to the range −1≦X<+1. Thus for 16-bit format with hexadecimal notation, variables lie in the range from 8000 to 7FFF. First, estimate the power for an input frame of 256 samples by Σu(j)
An alternative precision control scaling uses the sum of the absolute values of the samples in a frame rather than the power estimate (sum of the squares of the samples). As with the power estimate scaling, count the number S of significant bits is the sum of absolute values and scale the input samples by a factor of 2 Further, even using the power estimate sum with S significant bits, scaling factors such as 2 Modifications The preferred embodiments may be varied in many ways while retaining one or more of the features of clamping, noise enhancing, smoothed power estimating, recursive noise estimating, adaptive clamping, adaptive noise suppression factoring, codebook based estimating, and internal precision controlling. For example, the various generalized Wiener filters of the preferred embodiments had power β equal to ½, but other powers such as 1, ¾, ¼, and so forth also apply; higher filter powers imply stronger filtering. The frame size of 256 samples could be increased or decreased, although powers of 2 are convenient for FFTs. The particular choice of 3 bits of additional headroom could be varied, especially with different size frames and different number of bits in the sample representation. The adaptive clamp could have a negative dependence upon frame noise and signal estimates (B<0). Also, the adaptive clamp could invoke a near-end speech detection method to adjust the clamp level. The α and κ coefficients could be varied and could enter the transfer functions as simple analytic functions of the ratios, and the number iterations in the codebook based generalized Wiener filter could be varied. Patent Citations
Non-Patent Citations
Referenced by
Classifications
Rotate |