HK1068481A - A device for adjusting gain in a microphone and an apparatus for controlling loudspeaker distortion in a communication device - Google Patents
A device for adjusting gain in a microphone and an apparatus for controlling loudspeaker distortion in a communication device Download PDFInfo
- Publication number
- HK1068481A HK1068481A HK05100523.1A HK05100523A HK1068481A HK 1068481 A HK1068481 A HK 1068481A HK 05100523 A HK05100523 A HK 05100523A HK 1068481 A HK1068481 A HK 1068481A
- Authority
- HK
- Hong Kong
- Prior art keywords
- difference
- gain
- value
- signal
- peak
- Prior art date
Links
Description
This application is a divisional application of patent application No. 00805802.4 filed on 29/3/2000.
Technical Field
The present invention relates generally to mobile phones, and more particularly to an audio microphone and speaker of a mobile phone.
Background
Cellular telephones and other mobile telephones are used in a wide range of different noise environments. For example, cellular telephones may be used in relatively quiet office or home environments, or in relatively noisy manufacturing or transportation environments.
In noisy environments, users tend to speak louder to the microphone of a cellular telephone than in relatively quiet environments. This is a spontaneous tendency caused by the user thinking that he must speak more loudly in order to be heard over noise. This is often undesirable or even counterproductive. The microphone of a cellular telephone may be highly directional and thus not detect and amplify all of the noise heard by the user. Thus, the user does not have to speak louder. Also, cellular telephones may be capable of processing only a limited dynamic range of sound levels, such that the user's voice is clipped when the user speaks too loudly into the microphone. Such clipping may cause a reduction in the signal-to-noise ratio (SNR) between the transmitted speech and the transmitted background noise. Thus speaking loudly into the microphone actually makes it more difficult for the listener to discern the user's voice.
The clamping phenomenon described above is illustrated in fig. 1-2. Specifically, fig. 1 shows a speech signal 10 and a background noise signal 12 input to a cellular telephone. The background noise level increases from instant 14. The user speaks correspondingly louder, resulting in an increased level of the input voice signal. As the noise level continues to rise, the user speaks increasingly louder until the clamp start point 16 is reached. Thereafter, the voice is clipped, resulting in a lower SNR and possibly distorted voice signal. Fig. 2 shows the resulting SNR variation. As can be seen, the SNR decreases from time 16.
Thus, where clipping occurs, a user attempting to speak more loudly may actually have a reduced level of comprehension. Even if clipping does not occur, the user's louder speech can be annoying to the listener, possibly prompting the listener to decrease the speaker volume of his telephone. For many phones, especially non-mobile phones, the speaker volume cannot be adjusted and therefore the listener may not achieve a comfortable volume level. Too much user sound can compromise privacy at the listener's end, and the listener cannot reduce the speaker's volume level.
Another problem caused by high noise levels is that it can be difficult for a user in a noisy environment to hear the other party's voice. For many cellular telephones, the volume or gain of the telephone speaker can be manually increased to compensate, but such manual action by the user is inconvenient. Furthermore, manual action can be dangerous, especially if the user is driving and wants to manually reduce the gain of the speaker.
In addition, some users speak relatively lightly, while others speak relatively loudly. Designing the microphone gain to provide sufficient gain for soft speakers while avoiding saturating loud speakers is inherently difficult.
Therefore, it is necessary to remedy the above problems to such an extent that the present invention is fundamentally derived.
Disclosure of Invention
A mobile telephone such as a cellular telephone is provided with means for adjusting the gain of the telephone microphone in accordance with the noise level detected in the operating environment of the cellular telephone, thereby addressing the above-mentioned problems. The microphone gain automatically decreases as the noise level increases, thereby compensating for the tendency of the telephone user to speak more loudly in a noisy environment. Also, by reducing the microphone gain, any clipping that would otherwise occur because the user speaks more loudly is avoided, thereby reducing the SNR. Also, because the microphone gain is reduced, the user's voice is not output too loud from the telephone of the other party to the telephone call. Thus, the opposite party does not need to manually reduce his telephone gain.
In an exemplary embodiment, a cellular telephone is provided that achieves automatic microphone gain adjustment by having means for detecting a background noise level of an operating environment of the mobile telephone and means for setting a microphone gain of the mobile telephone based on the detected background noise level. The means for setting the gain of the microphone operates to decrease the gain by an amount inversely proportional to the background noise in response to an increase in the background noise. In the exemplary embodiment, the microphone gain is reduced by half the measured increase in background noise in decibels.
In an exemplary embodiment, the mobile phone further comprises means for automatically setting the gain of the mobile phone speaker based on the background noise level. In particular, the means for setting the gain of the speaker operates to increase the gain in response to an increase in the background noise level. Thus, the user does not need to manually increase the speaker gain if the background noise level increases.
The invention is particularly suitable for use in cellular telephones employing Digital Signal Processing (DSP) units. Many such cellular telephones include DSP hardware or software that calculates the background noise level from the input signal for purposes of noise reduction. An exemplary embodiment of operating a background noise level is described in detail in U.S. patent No.5,414,796 entitled "Variable rate vocoder" assigned to the assignee of the present invention and incorporated herein by reference. According to such a cellular telephone, the DSP is merely reconfigured or programmed to apply the detected noise levels to a look-up table that correlates different noise levels to appropriate speaker and microphone gain levels. Moreover, a larger range of other embodiments are possible.
In one aspect of the present invention, the device for adjusting the gain of a speaker of a mobile phone advantageously comprises means for detecting the background noise level of the operating environment of the mobile phone; and means for setting a speaker gain for the mobile telephone based on the detected background noise level.
In another aspect of the present invention, the method for automatically setting the volume level of a speaker of a communication device advantageously comprises the steps of: obtaining a numerical value indicative of available headroom; estimating a background noise level; and adjusting the speaker volume level based on the digital value and the result of the estimating step.
In another aspect of the present invention, the automatic volume level setter for a speaker of a communication device advantageously comprises: means for obtaining a numerical value indicative of available headroom; means for estimating a background noise level; and means for adjusting the volume level of the loudspeaker in dependence on the digital value and the result of the estimating step.
In another aspect of the present invention, an automatic volume controller advantageously comprises: a compressor configured to provide a digital value representative of the available headroom; and gain control logic coupled to the compressor and configured to receive the digital value of the compressor, the gain control logic further configured to receive the background noise estimate and adjust the volume level based on the background noise estimate and the available headroom.
In another aspect of the present invention, a microphone gain adjuster for a communication device advantageously comprises: an adjustable digital gain logic circuit connected to the microphone; and a limiter coupled to the adjustable digital gain logic, the limiter configured to peak detect an input audio signal input to the microphone.
In another aspect of the present invention, a method for adjusting a microphone gain of a communication device advantageously comprises the steps of: applying a digital gain to a signal input to a microphone; and limiting the digital gain.
In another aspect of the present invention, a microphone gain adjuster for a communication device advantageously comprises: means for applying a digital gain to a signal input to the microphone; and means for limiting the digital gain, the limiting means being configured to perform peak detection on the signal.
In another aspect of the present invention, a mobile phone speaker gain adjuster advantageously includes means for detecting a background noise level of an operating environment of the mobile phone; and means for setting a speaker gain for the mobile telephone based on the detected background noise level.
Thus, in accordance with the present invention, the above-described problems that occur when a mobile telephone, such as a cellular telephone, is used in an environment with a high background noise level are substantially overcome. The invention has the advantage that no volume control button is required on the phone. Other advantages of the invention, as well as other features and objects, will become apparent from the following detailed description and the accompanying drawings.
A microphone gain adjuster for a communication device according to a first aspect of the present invention includes:
means for applying a digital gain to a signal input to the microphone; and
means for limiting the digital gain, the limiting means being configured to peak detect the signal as a function of the release time and the activation time.
A second aspect of the present invention is a device for controlling speaker distortion in a mobile communication apparatus, comprising:
an equalization filter configured to filter certain frequencies of the signal if their distortion levels exceed a predetermined threshold;
a compressor connected to the equalization filter; and
a speaker connected to the compressor.
Drawings
The features, objects, and advantages of the present invention will become more apparent from the detailed description set forth below when taken in conjunction with the drawings in which like reference characters identify correspondingly throughout and wherein:
FIG. 1 is a schematic diagram showing the background noise level and corresponding input speech level of a cellular telephone operating in a varying noisy environment;
FIG. 2 is a schematic diagram showing signal-to-noise ratio levels of the input speech and noise signals of FIG. 1;
FIG. 3 is a block diagram of a cellular telephone configured in accordance with an embodiment of the present invention;
FIG. 4 is a block diagram of a microphone gain look-up table of the cellular telephone of FIG. 3; and
fig. 5 is a block diagram of a speaker gain look-up table of the cellular telephone of fig. 3.
Fig. 6 is a block diagram of telephone reverse link circuitry.
Fig. 7 is a block diagram of a limiter that may be used in the reverse link circuit of fig. 6.
Fig. 8 is a block diagram of the telephone forward link circuitry.
Fig. 9 is a block diagram of a compressor that may be used in the forward link circuit of fig. 8.
Fig. 10 is a flowchart showing steps performed by the Automatic Volume Control (AVC) algorithm.
Detailed Description
Exemplary embodiments of the present invention will be described with reference to the remaining drawings. Exemplary embodiments are first described with reference to block diagrams illustrating apparatus elements. Depending on the implementation, each device element, or portions thereof, may be configured in hardware, software, firmware, or a combination thereof. It is to be understood that not all of the elements of an actual system complete set are specifically illustrated and described. But rather only to illustrate those components that are necessary for a full understanding of the invention.
Fig. 3 shows a cellular telephone 100 having a microphone 102, a speaker 104, and an antenna 106. The relevant internal components of the telephone shown in fig. 3 include a control unit 108, a Digital Signal Processor (DSP)110 and a receive/transmit unit 112. Also, a microphone gain control unit 113 and a speaker gain control unit 115 are included.
In use, a user of cellular telephone 100 speaks into the microphone 102 and his voice and any detected background noise are sent through the control unit 108 to the DSP110 for processing. In an exemplary embodiment, the processed speech signal is encoded by units not separately shown, such as those employed by the Association for the Telecommunications industryTIA/EIA/IS-95-A dual-mode wideband spread spectrum Mobile station-base station compatibility standard for cellular systemsCode Division Multiple Access (CDMA) cellular transmission protocols as specified in (a). The encoded signal is provided to a receiver/transmitter 112 and then transmitted via an antenna 106 to a local base station (not shown). The signals may thus be sent to a land-based line, which may be another cellular telephone, other mobile telephone, or a connection to a Public Switched Telephone Network (PSTN) (not shown). Voice signals transmitted to the cellular phone 100 are received by the antenna 106 and the receiver/transmitter 112, processed by the DSP110 and output via the speaker under the control of the control unit 108.
DSP110 may, in accordance with this embodiment, perform any of a variety of conventional digital processing functions on the voice signals. Additionally, DSP110 determines the background noise level of the local environment from the signals detected by microphone 102 and sets the gain of microphone 102 to a selected level to compensate for the spontaneous tendency of the user of cellular telephone 100 to speak more loudly in noisy environments. In an exemplary embodiment, the microphone gain is set to a level that is generally inversely proportional to the background noise level. In the exemplary embodiment, the microphone gain is reduced by half the measured increase in background noise decibels.
To this end, the DSP110 includes a background noise level detection unit 114, a microphone gain look-up table 116, and a speaker gain look-up table 118. Background noise level detector 114 determines the background noise level received from microphone 102 in accordance with known techniques and generates a digital value representative of the background noise level. The digital value may represent the background noise energy in decibels, for example. DSP110 applies the digital value to microphone gain look-up table 116 to read out the microphone gain value applied to microphone 102 via microphone gain control unit 113.
In an exemplary embodiment, the background noise level B' is determined from the previous frame background noise level B and the current frame energy Ef. Two values are calculated in determining the new background noise level B' used during the next frame (as was the background noise estimate B for the previous frame). The first value V1 is simply the current frame energy Ef. The second value V2 is the larger of B +1 and K · B, where K is 1.00547. The smaller of these two values, V1 or V2, is selected as the new background noise level B'.
Is mathematically expressed as
V1=R(0) (1)
V2=min(160000,max(K·B,B+1)) (2)
The new background noise level B' is
B’=min(V1,V2) (3)
Where min (x, y) is the minimum of x and y and max (x, y) is the maximum of x and y.
Fig. 4 illustrates an exemplary microphone gain look-up table 116 having various background noise level entries 120 and corresponding microphone gain value entries 122. The microphone gain value may be, for example, a digital representation of a voltage or current level applied to an amplifier (not shown) of microphone 102. Entry 120 may specify a single noise level or a range of noise levels. Each expected quantized input noise level is represented in the look-up table 116. If the detected noise level does not have a corresponding entry in the look-up table 116, a default value is used. The look-up table 116 may be implemented as part of a read-only memory (ROM) in accordance with conventional techniques. In other embodiments, the lookup table 116 may be implemented using other suitable techniques, such as software algorithms.
As described above, the background noise level value read from microphone gain look-up table 116 is used by microphone 102 to adjust its gain. The spontaneous tendency of a telephone user to speak more loudly in a noisy environment is automatically compensated for by storing values in a look-up table that give the gain of the microphone to decrease as the noise level increases. Also, by reducing the microphone gain, SNR losses due to signal clipping in the microphone 102 itself or in the DSP110 are avoided.
The background noise level may be calculated, the corresponding gain level read, and applied to the microphone 102 continuously or intermittently. In an exemplary embodiment, the microphone gain is adjusted every 2 or 3 seconds, thereby accommodating the typical delay between an increase in the background noise level and a corresponding increase in the loudness of the user's voice. In an alternative embodiment, the noise level is detected and the gain is set only once per call, or perhaps only during power-up of the cellular telephone.
In the present invention, the gain of the speaker 104 is automatically adjusted in a similar manner to the microphone gain. The background noise level value calculated by the background noise level detection unit 114 is used by the speaker gain look-up table 118 to read out the speaker gain value appropriate for the background noise level. An exemplary speaker gain look-up table 118 is shown in fig. 5. The speaker gain look-up table 118 has entries 130 for background noise levels and entries 132 for corresponding speaker gain values. The speaker gain value may represent a voltage or current level used to control the gain of a speaker amplifier (not separately shown). A default value may be used for any noise level for which the speaker gain look-up table 118 does not have an entry. Also, as with the microphone gain look-up table 116, the speaker gain look-up table 118 may be accessed continuously or intermittently, perhaps only once per call or at power-up.
However, unlike microphone gain lookup table 116 which is advantageously programmed with a selected value that decreases the gain with increasing noise level, speaker gain lookup table 118 is advantageously programmed with a selected value that increases the gain with increasing noise level. For example, the speaker gain value may be set to increase the gain by an amount substantially proportional to the increase in the background noise level. Thus, the user does not need to adjust the speaker gain with a manual control unit (not shown). But rather automatically.
Described are exemplary embodiments of a cellular telephone configured to automatically decrease microphone gain and increase speaker gain in response to an increase in the background noise level of the cellular telephone environment. In the exemplary embodiment, the decrease in microphone gain and the increase in speaker gain are both proportional to the increase in background noise level. In other embodiments, other relationships between microphone and speaker gains and background noise levels are contemplated. In general, any desired relationship may be employed simply by pre-programming the look-up table with the appropriate values. For example, the values may be initially calculated based on a mathematical relationship such as a simple ratio. In other cases, the appropriate value may be determined empirically by measuring the range to which the actual user increases his or her speaking volume in response to changes in background noise level. It will be appreciated that a wide range of possible techniques for determining the appropriate values for storing in the look-up table may be used, consistent with the general principles of the invention. Moreover, a look-up table is not required. Any suitable means may be employed to adjust the microphone and speaker gains. For example, the detected noise level may be converted to an analog voltage, scaled and converted as necessary by circuit processing, and then applied directly to the respective amplifiers of the microphone and speaker to adjust the gain.
According to one embodiment, a limiter may be added to the conventional reverse link circuitry of the phone. As shown in fig. 6, the reverse link circuitry 200 of a telephone (not shown) includes a microphone 202, analog gain logic 204 (typically a conventional operational amplifier), adder/subtractor 206, echo cancellation filter 208, static gain logic 210, noise suppressor 212, limiter 214, and analog-to-digital converter (a/D) 216.
A user speaks into the microphone 202, which converts the input audio signal in acoustic form into an input audio signal in electrical form. This form of input audio is provided to analog gain logic 204, which adds an analog gain to the input audio signal. This input audio signal is then sent to the A/D216, which samples and quantizes the analog input audio signal according to some well-known technique including, for example, Pulse Code Modulation (PCM), μ -law, or A-law, transforming the signal to digital form. The signal generated by the echo cancellation filter 208 is subtracted from the digitized input audio signal by an adder/subtractor, thereby canceling the echo component from the input audio signal. The adder/subtractor 206, the a/D216, and the echo cancellation filter 208 are advantageously conventional components well known in the relevant art.
The filtered input audio signal is provided to static gain logic 210, which applies a static digital input gain to fine tune the amplification of the input audio signal. Devices implementing static gain logic 210 are well known in the art. The static gain is advantageously combined with a limiter threshold to compensate for the reduction in analog gain. The limiter 214 is advantageously configured to operate on each spoken word to prevent clipping of the input audio signal, e.g., the loudest words spoken by a loudly speaking user.
The amplified input audio signal is provided to a noise suppressor 212 that suppresses the background noise component in the input audio signal received into the microphone 202 when the user speaks. Devices for implementing the noise suppressor 212 are well known in the art. In one embodiment, noise suppressor 212 is not employed. In another embodiment, A/D216, echo-cancellation filter 208, adder/subtractor 206, static gain logic 210, noise suppressor 212, and limiter 214 are implemented in a Digital Signal Processor (DSP). In the embodiment shown in fig. 6, the signal is provided by the noise suppressor 212 to the limiter 214. The output signal generated by limiter 214 is sent to an encoder (not shown) before being modulated and sent over a digital communication path.
A limiter 214 configured in accordance with one embodiment is shown in greater detail in fig. 7. Slicer 214 includes a peak determination logic 300, a base-2 log logic 302, an adder/subtractor 304, a slicer logic 306, a first multiplexer 308, a base-2 inverse log logic 310, a smoothing logic 312, a delay element 314, and a second multiplexer 316.
The digitized input audio samples x [ n ] are multiplied by a static input gain G by static gain logic 210. the static gain logic 210 is advantageously a conventional multiplier 210. The digital gain G serves to fine tune or adjust the amplification level of the input audio samples x n. The input audio samples x [ n ] are then provided to a limiter 214, which is advantageously implemented in the DSP. In the slicer 214, the input audio samples x [ n ] are provided to the peak detect logic 300 and the delay element 314.
Peak determination logic 300 implements the following equation to determine the peak value of the input audio sample x [ n ]:
xpeak(s)[n]=(1-RT)xPeak(s)[n-1]+ATxDifference (D)[n]
In the above equation, the audio samples x [ n ] are input]Is set to be equal to 1 minus the release time RT multiplied by the previous sample x n-1]Plus the start time and the difference xDifference (D)[n]The product of (a). The difference xDifference (D)[n]It is set to be equal to the difference between the absolute value of the current input audio sample and the peak value of the previous input audio sample if the difference is greater than 0. Otherwise the difference xDifference (D)[n]It is set equal to 0.
Calculated peak value xPeak(s)[n]Is sent to a base 2 log logic circuit 302 which operates on the peak xPeak(s)[n]The base 2 logarithm generates an output signal in decibels (dB). The dB signal is provided to adder/subtractor 304, which subtracts a limiting threshold L from the dB signalThreshold value. The resulting dB signal is provided to limiter logic 306, which performs a limiting function on the signal. The signal is then provided to a first multiplier 308 which multiplies the signal by an attenuated (negative) slope value-LSlope of. Adder/subtractor 304, limiter logic 306, and first multiplier 308 function in the event that the input dB value (and output dB value) is less than or equal to a limiting threshold LThreshold valueThe effect is to produce an output dB value equal to the input dB value. When inputting dThe value of B exceeds the clipping threshold LThreshold valueThe slope of the output signal is attenuated, or based on the slope value-LSlope ofScaling is such that the output dB value increases by 1dB when the input dB value increases by, for example, 20 dB. The clipping threshold value LThreshold valueIt may be advantageously chosen to be very close to the original saturation point of the static gain logic amplifier 210 before digital trimming for saturation reduction. The original saturation point is determined by the required transmit gain of the microphone system as implemented in the analog domain.
The first multiplier 308 provides the output dB signal to a base-2 inverse log logic circuit 310, which operates on the base-2 inverse of the dB signal by base the value 2 to the power of the dB signal value (G in dB). The base-2 inverse log logic circuit 310 generates an output signal f [ n ]. The signal f [ n ] is provided to smoothing logic 312, which generates a smoothed output signal g [ n ] according to the following equation:
g[n]=(1-k)g[n-1]+kf[n]
where the value k is a smoothing factor, it is advantageously chosen to optimize the audio quality.
The smoothed signal g [ n ] is provided to a second multiplier 316. The delay element 314, which receives the input audio samples x [ n ], is configured to delay each input audio sample x [ n ] by a time D, thereby generating a delayed output of the input audio samples x [ n-D ]. The delayed input audio samples x [ n-D ] are provided to a second multiplier 316. The second multiplier 316 multiplies the delayed input audio samples x [ n-D ] by a smoothing function g [ n ] to generate a limited output signal, which is provided to an encoder (not shown) before being modulated and transmitted over a digital communication channel.
The limiter 214 thus limits the signal level to approximately an amplitude LThreshold valueThe numerical value of (c). To provide sufficient gain for soft speakers without saturating loud speakers, the front-end analog gain is reduced by a fixed amount of dB and compensated with digital gain G where headroom is available. The limiter 214 then reduces the loud level back to the A/D216 on the other end of the digital communication channel(fig. 6) while giving adequate signal-to-quantization noise level for soft speakers. Various mathematical operations may be performed in accordance with known DSP techniques. Thus, the limiter 214 advantageously provides the ability to extend the perceived input dynamic range while avoiding loud signal saturation. Other variations in the input signal level that may be compensated for in the above-described embodiments include, for example, hands-free car kits and telephones, as well as wearable microphones and mouthpiece microphones.
Those skilled in the art will appreciate that the above-described embodiments involving reverse link circuitry may be located in any communication device in which a user is speaking. Likewise, those skilled in the art will also appreciate that the embodiments described below relating to forward link circuitry may be located in any communication device that emits sound.
According to one embodiment, the conventional forward link circuit 400 of the phone may be modified to adjust the phone speaker volume based on the available headroom and background noise estimate. As shown in fig. 8, the forward link circuitry of the telephone (not shown) includes an output filter 402, fixed gain logic 404, a compressor 406, Automatic Volume Control (AVC) logic 408, user volume setting logic 410, digital to analog converter (D/a)412, and speaker 414.
For ease of illustration, the ancillary components of the reverse link circuitry of fig. 6 in the phone are also shown, including microphone 202, analog gain logic 204, a/D216, echo cancellation filter 208, adder/subtractor 206, and noise suppressor 212. The various reverse link elements may function and be implemented as described above with reference to fig. 6. In one embodiment, the digital forward link circuitry and the digital reverse link circuitry are implemented within a DSP.
The digitized input audio samples x n are received in fig. 8 on the communication channel of another telephone and decoded by a decoder (not shown). The input audio samples x n are output from the decoder and are provided to an output filter 402 for suitable filtering, as will be appreciated by those skilled in the art. The output filter 402 provides the filtered input audio samples to the fixed gain logic 404, which multiplies the input audio samples by a fixed gain G to generate amplified input audio samples. The amplified input audio samples are provided to a compressor 406, which compresses or expands the input audio samples as described below with reference to FIG. 9.
The compressed input audio samples are provided to AVC logic 408. The AVC logic 408 is also coupled to the output of the adder/subtractor 206. The AVC logic 408 receives a Background Noise Estimate (BNE) signal from the adder/subtractor 206 that is updated in an intermittent manner. The AVC logic 408 provides AVC based on available headroom (from the compressor 406) and BNE (from the reverse link circuitry prior to noise suppression). An exemplary AVC algorithm that may be performed by the AVC logic 408 is described below with reference to FIG. 10.
When the AVC logic 408 is in the OFF state, volume control is specified by the user via volume control buttons (not shown) on the telephone and the user volume setting logic 410. If the AVC logic 408 is in the active state, the AVC logic 408 automatically provides volume control in response to changing background noise levels and available headroom. In one embodiment, the user may turn off or start the AVC mode. For example, the user may manually set the speaker volume level for the first time, then activate the AVC logic 408 to provide speaker volume control thereafter.
The AVC logic 408 generates a volume control signal to the user volume setting logic 410. The user volume setting logic 410 provides the output digitized input audio samples to the D/a412 at the appropriate volume level. The D/a412 converts the output digitized input audio samples into an analog signal and sends the analog signal to a speaker 414, which converts the signal into an audio speaker output signal for the user.
In one embodiment, compressor 406 may be implemented to provide the compression and expansion shown in FIG. 9. As shown in fig. 9, the forward link circuitry of the telephone (not shown) includes a fixed gain logic circuit 404, which is advantageously a conventional multiplier 404, and a compressor 406, which may be used as a compressor or expander, as desired.
Compressor 406 includes a delay element 500, a filter 502, a Root Mean Square (RMS) operator 504, logarithmic operation logic 506, an adder/subtractor 508, compressor logic 510, first multiplier 512, anti-logarithmic operation logic 514, attack/release time application logic 516, and second multiplier 518. In an alternative embodiment, filter 502 is not employed.
The digitized input audio samples x [ n ] are provided to a multiplier 404, which multiplies the input audio samples x [ n ] by a digital gain G. The digital gain G is advantageously selected in conjunction with the compression threshold specified below to ensure that the softest talker is boosted to the desired signal level, driving the compressor 406 during the peak. The input audio samples x [ n ] are then provided to a compressor 406, which is advantageously implemented in the DSP. In the compressor 406, the input audio samples x [ n ] are provided to the filter 502 and the delay element 500. The delay element 500 may be implemented, for example, with an output sampling FIFO for predictive control of the output signal level, thereby initiating the peak early with respect to transmission. The filter 502 may be configured to filter the input audio samples according to any of various well-known filtering techniques. For example, filter 502 may be configured as a band pass filter in order to selectively select certain frequencies for which compression decisions are made. In one embodiment, the forward link circuit 400 resides in a hands-free car kit, and the filter 502 serves to boost the severely distorted frequencies into the compressor 406. Any signal frequency for which the distortion frequency exceeds a predetermined threshold is boosted by filter 502. The filtered input audio samples are provided to the RMS operator 504.
The RMS operator 504 operates the RMS of the input audio samples by implementing the following equation:
xRMS[n]=(1-TAV)xRMS[n-1]+TAVx2[n]
in the above equation, the RMS value of the input audio sample x [ n ] is set equal to 1 minus the time-averaging coefficient TAV multiplied by the RMS value of the previous sample x [ n-1], plus the product of the time-averaging coefficient TAV and the square of the current input audio sample x [ n ]. The time averaging coefficient TAV serves to determine the RMS average rate. The RMS level of the input audio sample is advantageously calculated using a 1 st order low pass filter added to the energy domain signal. The time constant of the smoothing filter is advantageously chosen such that the smallest frequency component of interest achieves a constant RMS output for a given smoothing filter. As an example, for a 100Hz sine wave, the time constant should be close to 10 ms.
Calculated RMS value xRMS[n]To a logarithmic operation logic circuit 506 which operates on the RMS value xRMS[n]The base-2 logarithm and the calculated base-2 logarithm is multiplied by 0.5 to generate an output signal in decibels (dB). The dB signal is provided to adder/subtractor 508, which subtracts a compression threshold C from the dB signalThreshold value. The resulting dB signal is provided to compressor logic 510, which performs a compression function on the signal. The signal is then provided to a first multiplier 512 which multiplies the signal by an attenuated (negative) compression slope value-CSlope of. If the RMS level of the signal rises beyond the value CThreshold valueAccording to the value CSlope ofApplying compression to the signal (with appropriate activation and release times), the value CSlope ofAccording to the following equation: cSlope ofThe compression ratio R is specified as a dB ratio at 1-1/R. The compression ratio R may be defined as the RMS level above which all compression actually occurs. The compression threshold C for a particular signal path should be chosen based on the average dBm0 speaker voice level required for normalizationThreshold valueAnd compression slope value CSlope of。
The first multiplier 512 provides the output dB signal to an inverse logarithm arithmetic logic circuit 514, which operates the inverse logarithm to the base 2 of the dB signal by raising the base 2 to the power of the dB signal value (G in dB). The anti-log logic 514 generates an output signal f [ n ]. The signal f [ n ] is provided to the on/off time application logic 516, which generates an output signal g [ n ] according to the following equation:
g[n]=(1-k)g[n-1]+kf[n]
where the value k is a smoothing factor, it is advantageously chosen to optimize the audio quality. The attack/release time application logic 516 advantageously acts as a smoothing function. The activation and deactivation is applied using a 1 st order smoothing function to provide a smooth gain curve for the output signal (the value k advantageously varies depending on whether activation or deactivation is applied). The start-up time may advantageously be set to 1 millisecond (ms) in order to start the peak in the input sample quickly and correctly. The release time may advantageously be set between 100 and 200ms to avoid rapid gain fluctuations affecting the quality of compressor 406. In one embodiment, a predicted delay of 1ms is used to relax the start-up time. In another embodiment, the activation and deactivation are accomplished with hysteresis to prevent oscillation of the input signal from affecting the output gain curve.
The smoothed signal g [ n ] is provided to a second multiplier 518. A delay unit 500 receiving input audio samples x [ n ] is configured to delay each input audio sample x [ n ] by a time D, thereby generating delayed output input audio samples x [ n-D ]. The delayed input audio samples x [ n-D ] are provided to a second multiplier 518. The second multiplier 518 multiplies the delayed input audio samples x [ n-D ] by the smoothing function g [ n ], generating a compressed output signal that is provided to the AVC logic 408 (FIG. 8).
The compression logic 510 may also be implemented by configuring the adder/subtractor 508 to extend the threshold E fromThreshold valueIn which the dB signal is subtracted and the first multiplier 512 is arranged to multiply the signal by a positive extended slope value ESlope ofFor use as an expander logic circuit. The adder/subtractor 508 and the first multiplier 512 may advantageously be programmably reconfigurable such that the compressor logic 510 may serve both the compression and expansion functions. If the RMS value of the signal is lower than the value EThreshold valueAccording to a value E specifying the expander ratio as a ratio of dBSlope ofSpreading is applied to the signal.
According to one embodiment, the AVC algorithm is designed to track reverse link environmental conditions and automatically adjust the forward link volume to giveThe user performs the various steps shown in the flow chart of fig. 10 at the appropriate volume level. Advantageously, the user can set a desired volume level set point and then override the volume control as desired, which is then automatically performed. The AVC algorithm of FIG. 10 functions in conjunction with a compressor 406 (see FIG. 9) that limits signal levels to a programmable compression threshold CThreshold valueThe above small range. The available distortion-free headroom depends on the compression threshold CThreshold value。
According to the flowchart of FIG. 10, the AVC algorithm obtains a Background Noise Estimate (BNE) (dB value) in step 600. The AVC algorithm then proceeds to step 602. In step 602, the AVC algorithm compares the BNE to a first tunable threshold value T3 (in dB). If the BNE is greater than the first tunable threshold value T3, the AVC algorithm proceeds to step 604. If, on the other hand, the BNE is not greater than the first tunable threshold value T3, the AVC algorithm proceeds to step 606.
The volume target value for the current sample, target [ n ], is set equal to the first predetermined gain value G3 in step 604. The AVC algorithm then proceeds to step 608. In one embodiment, the first predetermined gain value G3 is set to 18dB to provide adequate volume for a high noise environment.
The AVC algorithm subtracts the hysteresis value H (in dB) from the first tunable threshold value T3 and compares the resulting difference with the BNE in step 606. If the BNE is greater than the difference between the first tunable threshold value T3 and the hysteresis value H, the AVC algorithm proceeds to step 610. If, on the other hand, the BNE is not greater than the difference between the first tunable threshold value T3 and the hysteresis value H, the AVC algorithm proceeds to step 612. The hysteresis value H serves to prevent the gain from fluctuating with the instantaneous change in the BNE.
In step 610, the AVC algorithm compares the volume target value of the previous sample, target [ n-1], to a first predetermined gain value G3. If the volume target value of the previous sample, target [ n-1], is equal to the first predetermined gain value G3, the AVC algorithm proceeds to step 604. If, on the other hand, the volume target value for the previous sample, target [ n-1], is not equal to the first predetermined gain value G3, the AVC algorithm proceeds to step 614.
In step 612, the AVC algorithm compares the BNE to a second tunable threshold T2 (in dB). If the BNE is greater than the second tunable threshold value T2, the AVC algorithm proceeds to step 614. On the other hand, if the BNE is not greater than the second tunable threshold value T2, the AVC algorithm proceeds to step 616.
In step 614, the volume target value for the current sample, target [ n ], is set equal to a second predetermined gain value G2. The AVC algorithm then proceeds to step 608. The second predetermined gain value G2 is set to 12dB in one embodiment to provide sufficient volume for a medium noise environment.
In step 616, the AVC algorithm subtracts the hysteresis value H from the second tunable threshold value T2 and compares the resulting difference with the BNE. If the BNE is greater than the difference between the second tunable threshold value T2 and the hysteresis value H, the AVC algorithm proceeds to step 608. If, on the other hand, the BNg is not greater than the difference between the second tunable threshold value T2 and the hysteresis value H, the AVC algorithm proceeds to step 620.
In step 618, the AVC algorithm compares the volume target value for the previous sample, target [ n-1], to a second predetermined gain value G2. If the volume target value of the previous sample, target [ n-1], is equal to the second predetermined gain value G2, the AVC algorithm proceeds to step 604. If, on the other hand, the volume target value for the previous sample, target [ n-1], is not equal to the second predetermined gain value G2, the AVC algorithm proceeds to step 622.
In step 620, the AVC algorithm compares the BNE to a third tunable threshold value T1 (in dB). If the BNE is greater than the third tunable threshold value T1, the AVC algorithm proceeds to step 622. On the other hand, if the BNE is not greater than the third tunable threshold value T1, the AVC algorithm proceeds to step 624.
In step 622, the volume target value for the current sample, target [ n ], is set equal to a third predetermined gain value G1. The AVC algorithm then proceeds to step 608. The third predetermined gain value G1 is set to 6dB in one embodiment to provide sufficient volume for a medium to low noise environment.
In step 624, the AVC algorithm subtracts the hysteresis value H from the third tunable threshold value T1 and compares the resulting difference with the BNE. If the BNE is greater than the difference between the third tunable threshold value T1 and the hysteresis value H, the AVC algorithm proceeds to step 626. If, on the other hand, the BNE is not greater than the difference between the third tunable threshold value T1 and the hysteresis value H, the AVC algorithm proceeds to step 628.
In step 626, the AVC algorithm compares the volume target value of the previous sample, target [ n-1], to a third predetermined gain value G1. If the volume target value for the previous sample, target [ n-1], is equal to the third predetermined gain value G1, the AVC algorithm proceeds to step 622. If, on the other hand, the volume target value for the previous sample, target [ n-1], is not equal to the third predetermined gain value G1, the AVC algorithm proceeds to step 628. In step 628, the volume target value for the current sample, target [ n ], is set equal to 0dB, i.e., no gain is applied to the signal. The AVC algorithm then proceeds to step 608.
In step 608, the threshold C is compressedThreshold valueA first sum is generated by adding the digital Headroom control parameter, AVC _ Headroom. Current sample being target [ n ]]And the current volume level is added to the target volume value of (a) to generate a second sum value. The first and second sums are compared to each other. If the first sum is greater than the second sum, the AVC algorithm proceeds to step 630. If, on the other hand, the first sum is not greater than the second sum, the AVC algorithm proceeds to step 632.
In step 630, the AVC algorithm compresses the threshold CThreshold valueAnd adds the digital Headroom control parameter, i.e., AVC _ Headroom, to generate a first sum, and then subtracts the current volume value from the first sum to generate a difference. Current sample being target [ n ]]Is set to a volume target value equal to the difference. The AVC algorithm then proceeds to step 632. It should be noted that the overall gain is limited by the available digital Headroom (given by the compressor (not shown)) and the control parameter AVC _ Headroom. The Headroom control parameter AVC _ Headroom is subtracted from the available Headroom to limit the overall gain available. Because of the compression threshold CThreshold valueThe sum of the Headroom control parameter AVC _ Headroom and the current volume level is limited to below 0The value of dBm0, so no digital clamp is assured.
In step 632, the product of the time average coefficient TAV and the volume target value of the current sample target [ n ] is added to the product of the amount of 1 minus the time average coefficient TAV and the Automatic Gain Control (AGC) value of the previous sample, i.e., AGCVo1 gain [ n-1 ]. The resulting sum is set equal to the AGC value of the current sample, AGCVol gain n. The AVC algorithm then proceeds to step 634. In step 634, the AVC algorithm applies volume control to the current sample.
In the embodiment illustrated with reference to fig. 10, 3 adjustable thresholds and 3 predetermined gain values are used. It will be apparent to those skilled in the art that any reasonable number of adjustable thresholds and predetermined gain values may be employed. In an alternative embodiment, for example, 7 adjustable thresholds and 7 predetermined gain values may be employed.
In one embodiment, when AVC is in the active state, the set point provided to the user is specified as a volume level desired by the user independent of ambient conditions. Exemplary settings are shown in table 1 below.
TABLE 1
| Peak output (0dbm0) | Ambient silence level | Ambient mid-level noise | Ambient height noise |
| 0 | 6 (high), 7 | ||
| -3 | 7 | 5 | |
| -6 | 6 (high) | 4 (middle) | |
| -9=CThreshold value | 7 | 5 | 3 |
| -12 | 6 (high) | 4 (middle) | 2 (Low) |
| -15 | 5 | 3 | 1 |
| -18 | 4 (middle) | 2 (Low) | |
| -21 | 3 | 1 | |
| -24 | 2 (Low) | ||
| -27 | 1 |
In Table 1, compression threshold CThreshold valueSet to-9 dBm0, the volume level is set to 6, 4, 2 for high, medium, and low, respectively, as set by the user. The volume setting assumes 3dB per step starting at 0dB, i.e. setting 7 to 0dB, setting 6 to-3 dB, setting 5 to-6 dB, and so on. In any setting, the AVC algorithm gives another 12dB of gain to the signal level when the user is in a high noise ambient environment. Similarly, in a medium-noise ambient environment, the AVC algorithm gives another 6dB of gain to the signal level. The column describing a quiet noisy ambient environment is equivalent to the AVC off mode. It should be understood that any number of set points other than these three levels (high, medium, low) may be employed.
In one embodiment, AVC logic such as that described above with reference to FIG. 8 may be used in conjunction with a variable rate input audio encoder such as a variable rate CELP codec as described in U.S. Pat. No.5,414,796, which is assigned to the assignee of the present invention and is hereby incorporated by reference in its entirety. As described above, when the input audio samples are multiplied by the fixed digital gain G, the sample amplitude increases. Compression threshold CThreshold valueAs a smooth roof on the sampled level. But for no input audio (silence) samples, the increased gain will cause relatively loud background noise to the user. Therefore, the user may perceive a lower signal-to-noise ratio (SNR). But retained knowledge of the input audio codec may be utilized to determine which sample frames are encoded/decoded at the rate 1/8 (i.e., which frames belong to non-input audio frames). Thus, to compensate for the relative increase in background noise during silence, each frame encoded/decoded at the rate 1/8 is not multiplied by a fixed digital gain G.
Thus, a novel and improved method and apparatus for automatically adjusting the gain of a microphone and speaker in a mobile telephone is described. Those of skill in the art will understand that the various illustrative logical blocks and algorithm steps described in connection with the embodiments disclosed herein may be implemented within a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), discrete gate device or transistor logic, discrete hardware components such as registers and FIFO, a processor executing a set of firmware instructions, or any conventional programmable software block and processor. The processor may advantageously be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The software modules may reside in RAM memory, flash memory, registers, or any form of writable storage medium known in the art. Those of skill would further appreciate that the data, instructions, commands, information, signals, bits, symbols, and chips that may be referenced throughout the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.
The previous description of the preferred embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to the above-described embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without the use of the inventive concepts. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. A microphone gain adjuster for a communication device, comprising:
means for applying a digital gain to a signal input to the microphone; and
means for limiting the digital gain, the limiting means being configured to peak detect the signal as a function of the release time and the activation time.
2. The regulator of claim 1, further comprising means for suppressing noise and means for digitizing the signal to thereby generate digitized samples.
3. The regulator of claim 1, further comprising: the limiter is configured to perform peak detection according to the following equation:
xpeak(s)[n]=(1-RT)xPeak(s)[n-1]+ATxDifference (D)[n]
Wherein x isPeak(s)[n]Is digitally sampled x [ n ]]Is the release time value, RT is the start time value, xPeak(s)[n-1]Is the previous digitized sample x [ n-1]]Peak value of (x)Difference (D)[n]Is the difference between the values of the first and second characteristic,
if sampled digitally x [ n ]]Is compared with the previous digitized sample x [ n-1]]Peak value of (x [ n-1]]The difference is greater than 0, the difference xDifference (D)[n]Is equal to the digitized sample x n]Is compared with the previous digitized sample x [ n-1]]Peak value of (x [ n-1]]A difference between, and
if sampled digitally x [ n ]]Is compared with the previous digitized sample x [ n-1]]Peak value of (x [ n-1]]The difference x is not more than 0Difference (D)[n]It is equal to 0.
4. The regulator of claim 1, wherein the input to the microphone is an input audio signal.
5. The regulator of claim 4, further comprising a noise suppressor coupled to the adjustable digital gain logic and the limiter.
6. The regulator of claim 4, further comprising: the microphone comprises an analog gain logic circuit connected with the microphone and an analog-to-digital converter connected with the analog gain logic circuit.
7. The regulator of claim 4, wherein the limiter is configured to perform peak detection according to the following equation:
xpeak(s)[n]=(1-RT)xPeak(s)[n-1]+ATxDifference (D)[n]
Wherein x isPeak(s)[n]Is a digitized input audio sample x [ n ]]Is the release time value, RT is the start time value, xPeak(s)[n-1]Is the previous digitized input audio sample x [ n-1]]Peak value of (x)Difference (D)[n]Is the difference between the values of the first and second characteristic,
if digitized, the input audio samples x [ n ]]Is compared to the previous digitized input audio sample x [ n-1]]Peak value of (x [ n-1]]The difference is greater than 0, the difference xDifference (D)[n]Is equal to the digitized input audio samples x n]Is compared to the previous digitized input audio sample x [ n-1]]Peak value of (x [ n-1]]A difference between, and
if digitized, the input audio samples x [ n ]]Is compared to the previous digitized input audio sample x [ n-1]]Peak value of (x [ n-1]]The difference x is not more than 0Difference (D)[n]It is equal to 0.
8. An apparatus for controlling speaker distortion in a mobile communication device, comprising:
an equalization filter configured to filter certain frequencies of the signal if their distortion levels exceed a predetermined threshold;
a compressor connected to the equalization filter; and
a speaker connected to the compressor.
9. The apparatus of claim 8, wherein the mobile communication device is a hands-free car kit.
10. The apparatus of claim 8, wherein the compressor comprises logic configured to compress the signal and logic configured to expand the signal.
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US09/281,568 | 1999-03-30 | ||
| US09/281,564 | 1999-03-30 | ||
| US09/281,567 | 1999-03-30 |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| HK03102104.6A Addition HK1049927B (en) | 1999-03-30 | 2000-03-29 | Method and apparatus for automatically adjusting speaker and microphone gains within a mobile telephone |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| HK03102104.6A Division HK1049927B (en) | 1999-03-30 | 2000-03-29 | Method and apparatus for automatically adjusting speaker and microphone gains within a mobile telephone |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| HK1068481A true HK1068481A (en) | 2005-04-29 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN1168207C (en) | Automatic regulating method and device for loudspeaker and microphone gain in mobile telephone | |
| US6766176B1 (en) | Method and apparatus for automatically adjusting speaker and microphone gains within a mobile telephone | |
| JP5102273B2 (en) | Method and apparatus for automatically adjusting speaker gain and microphone gain in a mobile telephone | |
| CN101669284B (en) | Automatic volume and dynamic range adjustment method and device for mobile audio devices | |
| KR101311028B1 (en) | Intelligibility control using ambient noise detection | |
| RU2347282C2 (en) | System and method of sound signal processing | |
| JP3670962B2 (en) | Dynamic automatic gain control in hearing aids | |
| CN1910816A (en) | System for audio signal processing | |
| CN88102826A (en) | Volume range control circuit | |
| WO1999005840A1 (en) | Method and apparatus for automatically adjusting speaker and microphone gains within a mobile telephone | |
| US8630427B2 (en) | Telecommunications terminal and method of operation of the terminal | |
| CN1214171A (en) | Appts. and method for non-linear processing in communication system | |
| HK1068481A (en) | A device for adjusting gain in a microphone and an apparatus for controlling loudspeaker distortion in a communication device | |
| WO2007049222A1 (en) | Adaptive volume control for a speech reproduction system | |
| HK1112330A (en) | Method and apparatus for automatically adjusting speaker gain within a mobile telephone |