Detecting and Compensating for the Presence of a Speaker Mask in a Speech Signal

20230005498 · 2023-01-05

    Inventors

    Cpc classification

    International classification

    Abstract

    Compensating a speech signal for the presence of a speaker mask includes receiving a speech signal, dividing the speech signal into subframes, generating speech parameters for a subframe, and determining whether the subframe is suitable for use in detecting a mask. If the subframe is suitable for use in detecting a mask, the speech parameters for the subframe are used in determining whether a mask is present. If a mask is present, the speech parameters for the subframe are modified to produce modified speech parameters that compensate for the presence of the mask.

    Claims

    1. A method of compensating a speech signal for the presence of a speaker mask, the method comprising: receiving a speech signal; dividing the speech signal into subframes; generating speech parameters for a subframe; determining whether the subframe is suitable for use in detecting a mask; if the subframe is suitable for use in detecting a mask, using the speech parameters for the subframe in determining whether a mask is present; and if a mask is present, modifying the speech parameters for the subframe to produce modified speech parameters that compensate for the presence of the mask.

    2. The method of claim 1, wherein the speech parameters for the subframe include a speech spectrum and spectral band energies for multiple voice bands.

    3. The method of claim 2, wherein using the speech parameters for the subframe in determining whether a mask is present comprises examining a spectral slope for a subset of the voice bands.

    4. The method of claim 3, wherein using the speech parameters for the subframe in determining whether a mask is present comprises examining a spectral slope for a subset of the voice bands in a frequency range from 750 Hz to 4000 Hz.

    5. The method of claim 3, wherein determining whether a mask is present comprises comparing the spectral slope to a threshold value and determining that a mask is present when the spectral slope exceeds the threshold value.

    6. The method of claim 2, wherein using the speech parameters for the subframe in determining whether a mask is present comprises updating an average spectral slope corresponding to multiple subframes using the speech parameters for the subframe and examining the updated average spectral slope for a subset of the voice bands.

    7. The method of claim 1, wherein determining whether the subframe is suitable for use in detecting a mask comprises determining whether signal energy of the subframe exceeds a threshold value.

    8. The method of claim 1, wherein modifying the speech parameters for the subframe to produce modified speech parameters that compensate for the presence of the mask comprises boosting gains in a subset of voice bands affected by the presence of a mask.

    9. The method of claim 8, wherein boosting gains in a subset of voice bands affected by the presence of a mask comprises using boost levels that vary between voice bands in the subset of voice bands.

    10. The method of claim 9, wherein boosting gains in a subset of voice bands affected by the presence of a mask comprises reducing boost levels for any voice bands in the subset of voice bands that do not include signal energy that exceeds noise energy by a threshold margin.

    11. The method of claim 1, wherein the speech parameters comprise model parameters of a Multi-Band Excitation speech model.

    12. A communications device configured to compensate a speech signal for the presence of a speaker mask, the communications device comprising: a microphone; a speech encoder that receives a speech signal from the microphone and generates digital speech parameters; and a transmitter that receives the digital speech parameters from the speech encoder and transmits the digital speech parameters; wherein the speech encoder is configured to: divide the speech signal into subframes; generate speech parameters for a subframe; determine whether the subframe is suitable for use in detecting a mask; if the subframe is suitable for use in detecting a mask, use the speech parameters for the subframe in determining whether a mask is present; if a mask is present, modify the speech parameters for the subframe to produce modified speech parameters that compensate for the presence of the mask; and provide the modified speech parameters to the transmitter as the digital speech parameters.

    13. The communications device of claim 12, wherein the speech parameters for the subframe include a speech spectrum and spectral band energies for multiple voice bands.

    14. The communications device of claim 13, wherein using the speech parameters for the subframe in determining whether a mask is present comprises examining a spectral slope for a subset of the voice bands.

    15. The communications device of claim 14, wherein using the speech parameters for the subframe in determining whether a mask is present comprises examining a spectral slope for a subset of the voice bands in a frequency range from 750 Hz to 4000 Hz.

    16. The communications device of claim 14, wherein determining whether a mask is present comprises comparing the spectral slope to a threshold value and determining that a mask is present when the spectral slope exceeds the threshold value.

    17. The communications device of claim 13, wherein using the speech parameters for the subframe in determining whether a mask is present comprises updating an average spectral slope corresponding to multiple subframes using the speech parameters for the subframe and examining the updated average spectral slope for a subset of the voice bands.

    18. The communications device of claim 12, wherein determining whether the subframe is suitable for use in detecting a mask comprises determining whether signal energy of the subframe exceeds a threshold value.

    19. The communications device of claim 12, wherein determining whether the subframe is suitable for use in detecting a mask comprises determining whether signal energy of the subframe exceeds a minimum threshold value.

    20. The communications device of claim 12, wherein modifying the speech parameters for the subframe to produce modified speech parameters that compensate for the presence of the mask comprises boosting gains in a subset of voice bands affected by the presence of a mask.

    21. The communications device of claim 20, wherein boosting gains in a subset of voice bands affected by the presence of a mask comprises using boost levels that vary between voice bands in the subset of voice bands.

    22. The communications device of claim 21, wherein boosting gains in a subset of voice bands affected by the presence of a mask comprises reducing boost levels for any voice bands in the subset of voice bands that do not include signal energy that exceeds noise energy by a threshold margin.

    23. A speech encoder configured to compensate a speech signal for the presence of a speaker mask, the speech encoder being operable to: receive a speech signal; divide the speech signal into subframes; generate speech parameters for a subframe; determine whether the subframe is suitable for use in detecting a mask; if the subframe is suitable for use in detecting a mask, use the speech parameters for the subframe in determining whether a mask is present; and if a mask is present, modify the speech parameters for the subframe to produce modified speech parameters that compensate for the presence of the mask.

    Description

    DESCRIPTION OF DRAWINGS

    [0020] FIG. 1 is a block diagram of a speech processing system employing mask detection and compensation.

    [0021] FIG. 2 is a graph of the frequency response of a cloth mask.

    [0022] FIG. 3 is a flow chart showing operation of a speech processing system.

    [0023] FIG. 4 is a block diagram of a communications device.

    DETAILED DESCRIPTION

    [0024] Referring to FIG. 1, a speech processing system 100 may be employed to detect the presence of a mask and to compensate for the mask to improve quality and intelligibility of a speech signal. The system 100 includes a mask detector 105 and a mask compensator 110. The mask detector 105 receives an analog or digital speech signal 115 and processes the speech signal 115 to determine whether the speaker who spoke the speech corresponding to the speech signal 115 was wearing a mask when doing so. The mask detector 105 provides the mask compensator 110 with an indication 120 of whether a mask is present and speech parameters 125 corresponding to the speech signal (which may include the speech signal itself).

    [0025] The mask compensator 110 receives the indication 120 and speech parameters 125 and, when a mask is present, modifies the speech parameters 125 to account for the presence of the mask. The mask compensator then produces output speech 130 that has been modified to account for the presence of a mask. The output speech may include speech parameters, an analog or digital speech signal, or sound produced by a speaker within the mask compensator 110.

    [0026] Wearing a mask while speaking has been observed to cause negative impact to the quality and intelligibility of speech, such as speech corresponding to the speech signal 115. The mask, whether it is a cloth mask or an N95 mask, acts like a filter. As shown in FIG. 2, the frequency response 200 of a speech signal is generally attenuated most at higher frequencies. The attenuation of speech in dB has been observed to be generally linear with frequency. At frequencies below 750 Hz, the attenuation is negligible, but the attenuation increases linearly to around 12 dB at 4 kHz for a typical cloth mask.

    [0027] In one implementation, the mask detector 105 determines whether a mask is present by examining the spectral slope of the speech signal. When a mask is detected, the mask compensator 110 applies an inverse filter to correct for the mask by boosting impacted portions of the speech signal. This correction is complicated by the presence of background noise, as simply applying a static inverse filter to the signal would amplify the background noise as well as the signal. To account for noise, the mask compensator 110 dynamically weights the filter such that the mask correcting boost is eliminated when the signal is primarily noise. The mask compensator 110 also may apply the boost in frequency bands that contain primarily signal while not applying the boost in frequency bands that are dominated by noise.

    [0028] Referring to FIG. 3, the speech processing system 100 may operate according to a procedure 300. Initially, the speech signal 115 is divided into subframes (step 305). Each subframe corresponds to a 10 ms window of the speech signal 115 generated using a 25 ms hamming window.

    [0029] Speech parameters then are generated for a subframe (step 310). This includes computing a 256-point DFT on the windowed speech corresponding to the subframe to produce a speech spectrum. The speech spectrum is used to calculate sixteen spectral band energies for bands that are each 250 Hz wide, where the mask detector 105 examines the spectral slope of voice bands in the spectrum between 750 Hz and 4000 Hz to determine whether a mask is present. The spectral band energies are used to estimate noise levels in the sixteen bands. The noise estimation is made by averaging the signal levels in each band over time and by tracking the minimum signal level observed in each band.

    [0030] The mask detector 105 maintains a Boolean state variable that tracks whether a mask has been detected. The average gain and the average spectral slope over multiple subframes also computed and tracked. Certain subframes that are low in energy or have a slope that is too small are excluded from the average spectral slope calculation. Bands that are dominated by noise also are excluded from the slope calculation.

    [0031] When a subframe is processed, the mask detector 105 determines whether the subframe is suitable for use in updating the average spectral slope (step 315). If the subframe is suitable, the mask detector 105 updates the average spectral slope (step 320) and compares the updated average to a threshold (step 325). If the average exceeds the threshold, a mask is determined to be present and the mask detector 105 updates the Boolean state variable to indicate that a mask is present (step 330). If the average does not exceed the threshold, no mask is determined to be present and the mask detector 105 updates the Boolean state variable to indicate that no mask is present (step 335).

    [0032] The mask compensator 110 generates an initial frequency boost curve for the subframe (step 340). The mask compensator does so using the speech parameters for the subframe and the state variable indicating whether a mask is present. When a mask is present, the initial boost curve provides 12 dB of gain at 4 kHz and tapers linearly to 0 dB of gain at 750 Hz. When no mask is present, the boost is 0 dB for all frequencies. This initial boost curve would be the best filter to correct the signal if no background noise were present.

    [0033] The mask compensator 110 then weights the boost curve to account for noise (step 345). This weighting is undertaken to prevent boosting of bands that are dominated by noise. For each band, the mask compensator 110 compares the signal level for the band to the noise level for the band. When the signal level exceeds the noise level by enough margin, the boost weighting for the band is set to 1.0 (full boost) for the current subframe and several subsequent subframes. When the signal level exceeds the noise level by another smaller margin, then the boost weighting for the band is set to 0.5 (half boost) for the current subframe and several subsequent subframes. Otherwise, the boost weighting for the band is set to 0.0 (no boost) to disable boosting for the band. As long as the presence or absence of a mask doesn't change, the weights are held for several subframes because it is not desirable to switch the dynamic weighting excessively. The overall effect is to reduce or eliminate the boost for bands where the signal-to-noise ratio is low.

    [0034] The mask compensator 110 then applies the weighted boost curve to the spectrum (step 350). For example, the log.sub.2 boost curve may be converted to a linear scale at each DFT frequency and the DFT coefficients may be scaled accordingly. This eliminates or reduces the attenuation to the spectrum imposed by the mask without boosting the background noise. The resulting boosted spectrum then may be used to estimate the spectral magnitudes of each voice harmonic.

    [0035] The modified spectrum then is used to generate enhanced output speech (step 355) before proceeding to the next subframe.

    [0036] The speech processing system 100 may be operated independently to enhance a signal that is potentially degraded by a mask, or it may be incorporated into a speech coder, such as a AMBE vocoder that uses the spectrum to estimate the magnitudes for each voice harmonic. When mask detection and compensation is employed, this spectrum gets scaled to compensate for the mask. However, an inverse-DFT also may be applied to the spectrum to produce a modified spectrum that then is overlap-added with neighboring spectra to get a resulting compensated speech signal.

    [0037] FIG. 4 shows a communications device 400 that samples analog speech or some other signal from a microphone 405. An analog-to-digital (“A-to-D”) converter 410 digitizes the sampled speech to produce a digital speech signal. The digital speech is processed by a MBE speech encoder unit 415 to produce a digital bit stream 420 suitable for transmission by a transmitter or storage. The speech encoder processes each subframe of the digital speech signal to produce a corresponding frame of bits in the bit stream output of the encoder. This includes estimating generalized MBE model parameters for the subframe. The MBE model parameters include a fundamental frequency, a set of voicing errors, a gain value, and a set of spectral magnitudes.

    [0038] FIG. 4 also depicts a received bit stream 425 entering a MBE speech decoder unit 430 that processes each frame of bits to produce a corresponding frame of synthesized speech samples. A digital-to-analog (“D-to-A”) converter unit 435 then converts the digital speech samples to an analog signal that can be passed to a speaker unit 440 for conversion into an acoustic signal suitable for human listening.

    [0039] A mask detector and a mask compensator, such as the mask detector 105 and the mask compensator 110, may be incorporated most efficiently in the MBE speech encoder unit 415, but may also be employed in the MBE speech decoder unit 430. And the mask detector and the mask compensator may be divided, with the mask detector being included in the MBE speech encoder unit 415 and the mask compensator being included in the MBE speech decoder unit 430. And some implementations may include only a mask compensator, with the presence of the mask being determined by other means, such as a camera or an indication by a user (e.g., by pressing a button).

    [0040] The details of a particular implementation of the procedure 300 in an MBE vocoder are provided below.

    [0041] Spectrum Measurement

    [0042] The input to the process is an 8 kHz speech signal, s(n). However, the process can be adjusted to work for different sampling rates. For each subframe, the spectrum, S.sub.m(k), is measured from s(n) and stored for later use in estimating the MBE spectral amplitude model parameters. The spectrum is measured by first windowing s(n) and transforming the result into the frequency domain using DFT:

    [00001] S w m ( k ) = .Math. n = - 127 127 w m ( n ) s ( n + 127 ) ? for 0 k < 128 ? indicates text missing or illegible when filed

    [0043] Where w.sub.m(n) is a 25 ms hamming window defined as follows:

    [00002] w m ( n ) = { 0.54 + 0.46 cos [ π 100 n ] for - 100 n < 100 0 otherwise

    The square magnitude of the result is stored as the spectrum measurement, S.sub.m(k) for the subframe:


    S.sub.m(k)=|S.sub.w.sub.m(k)|.sup.2 for 0≤k≤128

    [0044] Computation of Spectral Band Energies

    [0045] The spectrum, S.sub.m(k), is used to compute the spectral energy in 16 frequency bands:


    e.sub.i=0.5 log.sub.2[Σ.sub.k=8i.sup.8i+15S.sub.m(k)]−7.0 for 0≤i<16

    [0046] Estimation of the Noise Spectrum

    [0047] The spectral energies in each band are then used to update an estimate of the noise energy in each band. The following process is used:

    TABLE-US-00001 if v.sub.count < 8 then  a.sub.i.sup.(0) ⇐ (v.sub.count .Math. a.sub.i.sup.(−1) + e.sub.i)/(v.sub.count + 1)  m.sub.i.sup.(0) ⇐ 16.0  c.sub.i.sup.(0) ⇐ 300 else if e.sub.i < a.sub.i.sup.(−1) + 2 then  if e.sub.i < a.sub.i.sup.(−1) and e.sub.i < 2 then   a.sub.i.sup.(0) ⇐ 0.5 .Math. a.sub.i.sup.(−1) + 0.5 .Math. e.sub.i  else   a.sub.i.sup.(0) ⇐ 0.9 .Math. a.sub.i.sup.(−1) + 0.1 .Math. e.sub.i  endif  m.sub.i.sup.(0) ⇐ 16.0  c.sub.i.sup.(0) ⇐ 300 else if c.sub.i.sup.(−1) > 0 then  if e.sub.i < m.sub.i.sup.(−1) − 2 then   a.sub.i.sup.(0) ⇐ e.sub.i  else   a.sub.i.sup.(0) ⇐ a.sub.i.sup.(−1)   m.sub.i.sup.(0) ⇐ 0.9 .Math. m.sub.i.sup.(−1) + 0.1 .Math. e.sub.i  endif  c.sub.i.sup.(0) ⇐ c.sub.i.sup.(−1) − 1 else a.sub.i.sup.(0) ⇐ m.sub.i.sup.(−1) m.sub.i.sup.(0) ⇐ 16.0  c.sub.i.sup.(0) ⇐ 300 end if

    [0048] The process updates three vectors. The vector a.sub.i for 0≤i<16 stores the average noise level for each band. The vector m.sub.i for 0≤i<16 tracks the minimum noise level for each band. The vector c.sub.i for 0≤i<16 contains a 3 second counter for each band. Note that the process is designed to be called at 10 ms intervals such that 300 iterations of the process corresponds to 3 seconds. Generally, a speaker pauses to breathe more often than once every 3 seconds.

    [0049] The initial conditions for each of the state variables above are as follows:

    [0050] a.sub.0=7.0, a.sub.1=6.0, a.sub.2=5.0, a.sub.3=4.0, a.sub.4=3.0, a.sub.5=2.0

    [0051] a.sub.i=1.0 where 6≤i<16

    [0052] m.sub.i=16.0 where 0≤i<16

    [0053] c.sub.i=16.0 where 0≤i<16

    [0054] V.sub.count=0

    [0055] Note that, in the process above, the superscript notation, v.sup.(0), refers to the new value for variable v in the current subframe. Whereas, v.sup.(−1), refers to the prior value for variable in the prior subframe.

    [0056] Calculating the Dynamic Boost Weighting

    [0057] The spectral band energies from the current subframe, S.sub.b(n), and the current estimate of noise spectrum, are used to compute a set of weights. Integer counters, C.sub.FB(n) for 0≤n<16, are updated as follows:

    [00003] C FB ( n ) = { 5 when S b ( n ) > S N ( n ) + 1. max [ 2 , C FB ( n ) ] when S N ( n ) + 1. > S b ( n ) > S N ( n ) + 0.5 max [ 0 , C FB ( n ) - 1 ] otherwise

    [0058] When C.sub.FB(n)>0, for band n, the weight for that band will allow full boost. Additionally, integer counters, C.sub.HB(n) for 0≤n<16, are updated as follows:

    [00004] C HB ( n ) = { 10 when S b ( n ) > S N ( n ) + 1. max [ 4 , C HB ( n ) ] when S N ( n ) + 1. > S b ( n ) > S N ( n ) + 0.5 max [ 0 , C HB ( n ) - 1 ] otherwise

    [0059] When C.sub.FB(n)>0, for band n, the weight for that band is 1.0, enabling full boost for that band. When C.sub.HB(n)>0, for band n, the weight for that band is 0.5, which will allow half boost for the band. Otherwise, the weight for the band is 0.0, which disables boost for the band.

    [00005] w ( n ) = { 1. when C FB ( n ) > 0 0.5 when C FB ( n ) = 0 and C HB ( n ) > 0 0. otherwise

    [0060] Later, these weights will be applied to the boost filter. The weights can reduce or eliminate the boost in particular bands that are noisy.

    [0061] Mask Detection

    [0062] Mask detection uses the spectral band energies, e.sub.i for 0≤i<16, and the average noise levels, a.sub.i for 0≤i<16. Mask detection also uses three state variables: is the detector state, G.sub.M is the maximum gain, and M.sub.A is the average slope. Variable d is a Boolean where 0 indicates that a mask has not been detected and 1 means that a mask has been detected. d.sup.(−1) refers to the value of variable d in the prior subframe, whereas d.sup.(0) (or simply d) refers to the value of variable d in the current subframe. The initial value for d is 0. Similarly, the superscripts .sup.(−1) and .sup.(0) can be used to refer to values of variables G.sub.M and M.sub.A in the prior and current subframes. The initial values are: G.sub.M=0 and M.sub.A=9.0/16.

    [0063] As an initial step in mask detection, the noise cutoff band is determined. This is the lowest frequency band for which the signal energy does not exceed the noise energy by at least 3 dB.


    if e.sub.i←1−0.5<a.sub.i.fwdarw.1 then C=i

    [0064] If C<6, then this subframe does not have enough bands with voice and the mask detection process ends and returns the detection state of the prior subframe. If the mask detection process ends at this point, then state variables G.sub.M and M.sub.A are not updated.


    If C<6 then {d.sup.(0)=d.sup.(−1),G.sub.M.sup.(0)=G.sub.M.sup.(−1),M.sub.A.sup.(0)=M.sub.A.sup.(−1)}

    [0065] Next, a gain value is computed by computing the average spectral band energy in the lowest 6 frequency bands.

    [00006] G = .Math. i = 0 5 e i 6

    [0066] Next, the maximum gain is updated as follows:

    [00007] G M ( 0 ) = { G when G > G M ( - 1 ) - 0.01 G M ( - 1 ) - 0.01 otherwise

    [0067] If G<G.sub.M−1.0, then the mask detection process ends and returns the detection state of the prior subframe. The mask detector excludes low energy subframes from detection.


    d.sup.(0)=d.sup.(−1) when G<G.sub.M−1.0


    M.sub.A.sup.(0)=M.sub.A.sup.(−1) when G<G.sub.M−1.0

    [0068] Otherwise, the detection process continues and the spectral slope of the current subframe is computed as follows:

    [00008] M c = 13 ( e 2 - e C ) C - 3

    [0069] If the spectral slope is less than 3.0, then the detection process ends and returns the detection state from the prior subframe.


    d.sup.(0)=d.sup.(−1) when M.sub.C<3.0


    M.sub.A.sup.(0)=M.sub.A.sup.(−1) when M.sub.C<3.0

    [0070] The average spectral slope, M.sub.A, is then computed as follows:

    [00009] M A ( 0 ) = { 0.75 M A ( - 1 ) + 0.25 M C if M C > M A ( - 1 ) + 2. 0.875 M A ( - 1 ) + 0.125 M C else if M C > M A ( - 1 ) + 1. 0.96 M A ( - 1 ) + 0.04 M C else if M C > M A ( - 1 ) + 0.5 0.98 M A ( - 1 ) + 0.02 M C otherwise

    Note that this approach allows the average slope to capture abrupt increases in slope, while accounting for decreases in slope over a longer time period. This allows for earlier detection when a mask is present.

    [0071] The average spectral slope is used to update the current mask detection state, d.sup.(0), as follows:

    [00010] d ( 0 ) = { 1 when M A > 9.5 0 otherwise

    [0072] Next, the log.sub.2 boost at 4 Khz is computed. If a mask was detected, the log.sub.2 boost is 2.0, representing a 12 dB gain at 4 kHz. Otherwise, the log boost is set to 0.0 if no mask is detected.


    M.sub.B=2.0d.sup.(0)

    [0073] As a variation of the mask detection process, the boost required to compensate for the mask can be derived from the average spectral slope in relation to a typical spectral slope. This allows the amount of boost to vary depending upon different mask characteristics. This also may allow for correction of muffling caused by something other than a mask.

    [0074] Calculation of the Boost Required to Compensate for the Mask

    [0075] After the mask detection process determines the appropriate boost, M.sub.B, the amount of boost, B(i), to be applied to the spectrum at each DFT frequency is calculated as follows

    [00011] B ( i ) = { 0 for 0 i < 24 ( i - 24 ) M B 104 for 24 i < 128

    [0076] The variable corresponds to frequency, where i=0 represents 0 Hz and i=128 represents 4 KHz

    [0077] Applying the Boost Weighting Function to the Boost Filter

    [0078] The weighting function, w(n), was computed previously for sixteen bands. The weighting is next applied to the boost as follows:

    [00012] B . ( i ) = B ( i ) * w ( .Math. i 8 .Math. )

    [0079] Applying the Boost to the Spectrum

    [0080] {dot over (B)}(i) represents the log.sub.2 boost to be applied to the spectrum, S.sub.m(i). The boosted spectrum is denoted, {dot over (S)}.sub.m(i), and is calculated as follows:


    {dot over (S)}.sub.m(i)=2.sup.2{dot over (B)}(i).Math.S.sub.m(i)

    Since S.sub.m(t) represents the squared magnitude, the scale factor is 2.sup.2B(i) rather than just 2.sup.B(i).

    [0081] This is what would happen if the scale factor was applied to the real and imaginary components of the spectrum prior to squaring and summing them.

    [0082] Magnitude Estimation

    [0083] The magnitudes for each harmonic of the subframe are estimated by using a weighted sum of the boosted spectral energies.

    [00013] M ( l ) = 0.5 log 2 [ 0.001 + .Math. k = 0 128 w ME ( k , l , f ) S . m ( k ) ] - 7.

    [0084] The spectral weighting function, w.sub.ME(k,l,f), is defined as

    [00014] w ME ( k , l , f ) = { 1. if .Math. "\[LeftBracketingBar]" k - 256 ( l + 1 ) f .Math. "\[RightBracketingBar]" < 128 f - 0.5 0. if .Math. "\[LeftBracketingBar]" k - 256 ( l + 1 ) f .Math. "\[RightBracketingBar]" < 128 f + 0.5 128 f + 0.5 - .Math. "\[LeftBracketingBar]" k - 256 ( l + 1 ) f .Math. "\[RightBracketingBar]" otherwise

    [0085] As can be seen in this equation, the weight at a particular frequency is 0.0 for energy that is wholly contained in another harmonic (or band). The weight is 1.0 when the energy is entirely contained within the current harmonic (or band). The weight is between 0.0 and 1.0 when the energy at a particular frequency is split between the current harmonic (or band) and an adjacent harmonic (or band).

    [0086] While the techniques are described largely in the context of a MBE vocoder, the described techniques may be readily applied to other systems and/or vocoders. For example, other MBE type vocoders may also benefit from the techniques regardless of the bit rate or frame size. In addition, the techniques described may be applicable to many other speech coding systems that use a different speech model with alternative parameters (such as STC, MELP, MB-HTC, CELP, HVXC or others) or which use different methods for analysis, quantization. Other implementations are within the scope of the following claims.