Automatic gain control device, echo removal device, automatic gain control method, and automatic gain control program
The automatic gain control system addresses the high processing load issue by using a frequency domain conversion and power-based gain calculation, enabling efficient gain control with low-processing-capacity CPUs and reducing noise and discomfort in user experience.
Patent Information
- Application Number
- PCT/JP2023/046903
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-27
- Filing Date
- 2023-12-27
- Publication Date
- 2024-10-03
AI Technical Summary
Existing automatic gain control systems require high processing capacity CPUs, making it impossible to perform appropriate gain control using low-processing-capacity CPUs due to the load placed on the arithmetic unit by calculating the average value of input signals.
An automatic gain control system that uses a time domain reference signal to convert the input signal into the frequency domain, calculates a gain based on the signal's power, and applies this gain to the received signal, reducing processing load by performing calculations at fixed intervals and using a power-based gain determination method.
This approach allows for appropriate gain control while reducing the processing load on the arithmetic device, preventing abnormal noise due to signal discontinuity and ensuring comfortable user experience by smoothing gain changes, and preventing signal clipping.
Smart Images

Figure JP2023046903_03102024_PF_FP_ABST
Abstract
Description
Automatic gain control device, echo canceller, automatic gain control method, and automatic gain control program
[0001] The present invention relates to an automatic gain control device, an echo canceller, an automatic gain control method, and an automatic gain control program.
[0002] Patent Document 1 discloses an automatic gain control device that controls the gain when amplifying an input signal according to the level of the input signal. This device includes a noise detection unit that detects the level of noise contained in the input signal, a short-term average level detection unit that detects a time average of the input signal over a relatively short time period, a gain function selection unit that selects one gain function from a plurality of gain functions prepared in advance according to the level of noise detected by the noise detection unit, and a gain calculation unit that calculates the gain when amplifying the input signal from the short-term average value of the input signal detected by the short-term average level detection unit and the gain function selected by the gain function selection unit.
[0003] Japanese Patent Application Laid-Open No. 2004-129187
[0004] In the invention described in Patent Document 1, since the average value of the input signal is acquired, a load is placed on the calculation device, and a CPU with high processing power is required. Therefore, in the invention described in Patent Document 1, it is not possible to perform appropriate gain control using a CPU with low processing power.
[0005] The present invention has been made in consideration of the above circumstances, and aims to provide an automatic gain control device, an echo cancellation device, an automatic gain control method, and an automatic gain control program that can perform appropriate gain control while reducing the processing load on the calculation device.
[0006] In order to solve the above problem, the automatic gain control device according to the present invention includes, for example, a frequency domain conversion unit that converts a first input signal, which is a time domain reference signal input during a first time period from a receiver signal path that transmits a received signal to a speaker of a terminal, into a second input signal in the frequency domain; a gain determination unit that calculates a first gain based on the second input signal; and a gain multiplication unit that is provided in the receiver signal path and multiplies the received signal by the first gain, wherein the reference signal is a signal obtained after the received signal has been multiplied by the first gain in the gain multiplication unit.
[0007] In order to solve the above problem, an automatic gain control method according to another aspect of the present invention includes, for example, the steps of converting a first input signal, which is a time-domain reference signal input during a first time period from a receiver signal path that transmits a received signal to a speaker of a terminal, into a second input signal in the frequency domain; calculating a first gain based on the second input signal; and multiplying the received signal by the first gain, which is provided in the receiver signal path, wherein the reference signal is a signal obtained after the received signal has been multiplied by the first gain.
[0008] In order to solve the above problem, another aspect of the present invention provides an automatic gain control program that causes a computer to function as: a frequency domain conversion unit that converts a first input signal, which is a time-domain reference signal input during a first time period from a receiver signal path that transmits a received signal to a speaker of a terminal, into a frequency-domain second input signal; a gain determination unit that calculates a first gain based on the second input signal; and a gain multiplication unit that is provided in the receiver signal path and multiplies the received signal by the first gain, wherein the reference signal is a signal obtained after the received signal has been multiplied by the first gain in the gain multiplication unit. Note that the computer program can be provided by downloading via a network such as the Internet, or by recording it on various computer-readable recording media such as a CD-ROM.
[0009] According to the automatic gain control device, automatic gain control method, and automatic gain control program of the present invention, a first input signal, which is a received signal (reference signal) multiplied by a first gain in a gain multiplication unit, is converted into a second input signal in the frequency domain, and the first gain is calculated based on the second input signal. Since the processing is performed every first time, the processing load of the calculation device can be reduced. Furthermore, by calculating the first gain using the power of the reference signal, appropriate gain control can be performed.
[0010] The gain determination unit may include an instantaneous power value acquisition unit that calculates an instantaneous power value, which is an instantaneous value of the power of the reference signal, based on the second input signal; an average power estimation unit that calculates an average power that quantifies an approximate value of the loudness of the sound produced by the speaker based on multiple instantaneous power values obtained by the instantaneous power value acquisition unit during a second time period longer than the first time period; a gain calculation unit that calculates a desired second gain based on the average power and a gain target value; and a discontinuity reduction unit that calculates the first gain based on the second gain, the discontinuity reduction unit adjusting a rate of change of the first gain within a predetermined range. In this way, by calculating the first gain based on the average power during the second time period, more appropriate gain control that appropriately reflects the loudness of the reference signal can be performed. Furthermore, the generation of abnormal noise due to signal discontinuities accompanying gain changes can be reduced.
[0011] The gain determination unit may include a second gain calculation unit that calculates a third gain for each frequency band based on the second input signal and a gain target value, an averaging unit that calculates a second gain by averaging the third gain calculated over a second time period longer than the first time period in both the frequency and time directions, and a discontinuity reduction unit that calculates the first gain based on the second gain, the discontinuity reduction unit setting a rate of change of the first gain within a predetermined range. In this way, by using the second gain, which is the average value of the gains obtained over the second time period, more appropriate gain control that appropriately reflects the magnitude of the reference signal can be performed. Furthermore, the generation of abnormal noise due to signal discontinuities accompanying gain changes can be reduced.
[0012] The discontinuity reduction unit may cause the first gain to be discontinuous at a zero crossing point where a displacement of the amplitude of the reference signal is inverted. In this way, a user is unlikely to feel uncomfortable even if the gain is abruptly changed at the zero crossing point where the volume becomes zero, so switching the gain at the zero crossing point contributes to a comfortable user experience.
[0013] The discontinuity reduction unit may gradually change the first gain until a maximum point at which the amplitude of the reference signal is maximized. In this way, reliably switching the gain by a point at which a user is likely to notice that an inappropriate gain has been multiplied contributes to a comfortable user experience.
[0014] The speech recognition device may further include a power change detection unit that detects whether a rate of change in the instantaneous power value is equal to or greater than a predetermined value, and the gain determination unit may not change the first gain when detecting that the rate of change in the instantaneous power value is equal to or greater than the predetermined value. In this way, by not changing the gain during speech, when an unvoiced sound or an end of a word is being spoken, and by maintaining the gain immediately before, it is possible to ensure speech that is easy to hear.
[0015] The gain determination section may change the second gain over a third time period that is longer than the second time period, thereby preventing abrupt changes in gain.
[0016] The gain multiplication unit may reduce the first gain when the magnitude of the received signal is equal to or greater than a threshold value, thereby preventing clipping due to excessive signal amplification and damage to the device.
[0017] Another aspect of the present invention provides an echo cancellation device, which includes, for example, an automatic gain control device and an echo cancellation unit that is provided in a transmitting-side signal path that transmits an input signal input from a microphone of the terminal and that cancels echoes generated when a voice output from the speaker is input to the microphone, and the echo cancellation unit performs echo cancellation based on the second input signal converted by the frequency domain conversion unit. In other words, the frequency domain conversion unit can be shared by the automatic gain control device and the echo cancellation unit. This makes it possible to appropriately determine gain and cancel echoes with low processing costs.
[0018] According to the present invention, it is possible to perform appropriate gain control while reducing the processing load on the arithmetic unit.
[0019] 1 is a diagram schematically showing an audio communication system 100 provided with an echo cancellation device 1 according to a first embodiment. FIG. 2 is a block diagram showing the general configuration of the echo cancellation device 1. FIG. 3 is a schematic diagram explaining the processing of an automatic gain control device 9. FIG. 4 is a diagram showing an example of a weighting function. FIG. 5 is a schematic diagram explaining the number of samples T1 and an overlap rate. FIG. 6 is a diagram explaining another form of the discontinuity reduction unit 22d, where (a) is a graph showing a reference signal, and (b) and (c) are graphs showing gain. FIG. 7 is a diagram explaining another form of the discontinuity reduction unit 22d, where (a) is a graph showing a reference signal, and (b) is a graph showing gain. FIG. 8 is a block diagram showing the general configuration of an echo cancellation device 2 according to a second embodiment. FIG. 9 is a block diagram showing the general configuration of an echo cancellation device 3 according to a third embodiment. FIG. 10 is a schematic diagram explaining the processing of an automatic gain control device 9A. FIG. 11 is a block diagram showing the general configuration of an echo cancellation device 4 according to a fourth embodiment. FIG. 12 is a block diagram showing the general configuration of an echo cancellation device 5 according to a fifth embodiment. FIG. 13 is a block diagram showing the general configuration of an echo cancellation device 6 according to a sixth embodiment.
[0020] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An automatic gain control device, an automatic gain control method, and an automatic gain control program according to embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0021] An automatic gain control device is a device that automatically adjusts the gain of a signal. In the following embodiment, the automatic gain control device is provided in an echo canceller. An echo canceller is a device that suppresses echoes that occur during calls in a voice communication system.
[0022] 1 is a diagram schematically illustrating an audio communication system 100 provided with an echo cancellation device 1 having an automatic gain control device 9 according to a first embodiment. The audio communication system 100 mainly includes a terminal 50 having a microphone 51 and a speaker 52, two communication devices 53 and 54, a speaker amplifier 55, and the echo cancellation device 1.
[0023] Voice communication system 100 is a system in which a near-end talker (user A on the near-end side) using terminal 50 (near-end terminal) performs voice communication with a user (user B on the far-end side) using communication device 54 (far-end terminal). A voice signal (hereinafter referred to as a received signal) input via communication device 54 is amplified and output by speaker 52, and voice uttered by user A on the near-end side is collected by microphone 51 and transmitted to communication device 54, thereby enabling user A to make a voice call (hands-free call) without holding communication device 53. Communication device 53 and communication device 54 are connected by a general telephone line.
[0024] The echo cancellation device 1 and the automatic gain control device 9 may be constructed as a dedicated board mounted on a communication terminal or the like (e.g., an in-vehicle device, a conference system, or a mobile terminal) in the voice communication system 100. The echo cancellation device 1 may also be configured, for example, primarily by a computer system including an arithmetic unit such as a CPU (Central Processing Unit) for executing information processing, and storage devices such as a RAM (Random Access Memory) and a ROM (Read Only Memory), and software (echo suppression program). The echo suppression program may be pre-stored in an SSD as a storage medium built into a device such as a computer, or in a ROM in a microcomputer having a CPU, and then installed into the computer from there. The echo suppression program may also be temporarily or permanently stored (memorized) in a removable storage medium such as a semiconductor memory, a memory card, an optical disk, a magneto-optical disk, or a magnetic disk.
[0025] Fig. 2 is a block diagram showing the schematic configuration of the echo canceller 1 and the automatic gain control device 9. Functionally, the echo canceller 1 mainly comprises an automatic gain control device 9, an echo canceller 11, a frequency analyzer (FFT section) 12, a noise / echo suppressor 14 (corresponding to the echo canceller of the present invention), a restoration section (IFFT section) 15, and an EQ / gain compressor 16. In Fig. 2, the upper signal path is a transmitting-side signal path that transmits an input signal input from a microphone 51, and the lower signal path is a receiving-side signal path that transmits a receiving signal to a speaker 52. In addition, arrows in the figure indicate the flow of signals (processing flow).
[0026] The functional components of the echo canceller 1 may be further divided into more components depending on the processing content, or one component may execute the processing of multiple components.
[0027] The echo canceller 11 cancels the echo using, for example, an adaptive filter. The echo canceller 11 updates filter coefficients according to a given procedure based on a reference signal, generates a pseudo echo signal from a signal transmitted through the receiving-side signal path, and subtracts the pseudo echo signal from an input signal transmitted through the transmitting-side signal path, thereby canceling the echo. Here, the reference signal is a signal for sounding the speaker 52, and is a signal obtained after the received signal transmitted through the receiving-side signal path has been processed by a gain multiplier 23 (described in detail later) and an EQ / gain compressor 16 (described in detail later). Note that adaptive filters are already well known, so a description thereof will be omitted.
[0028] In this embodiment, an adaptive filter is applied to the echo canceller 11, but other known echo cancelling techniques can also be applied to the echo canceller 11.
[0029] The frequency analyzer (FFT unit) 12 performs a fast Fourier transform (FFT) on the signal. The FFT unit 12 is a functional unit that performs frequency conversion in the processing of the echo removal unit 11. The FFT unit 12 converts a signal arranged in time series (time domain) into a signal represented by a set of frequencies (frequency domain).
[0030] For convenience, the FFT unit 12 and the FFT unit 21 are shown in different blocks in the figure, but they may be processed by the same functional unit.
[0031] The noise / echo suppressor 14 is a functional unit that removes, for example, nonlinear echoes that could not be removed by the echo removal unit 11 that removes linear echoes. The noise / echo suppressor 14 may perform nonlinear echo suppression processing that references instantaneous power values, in addition to using an appropriate frequency filter, for example. The output value from the noise / echo suppressor 14 is subjected to an inverse fast Fourier transform (IFFT, Inverse FFT) by the IFFT unit 15, and is output as an output signal from the output unit 531 of the communication device 53.
[0032] In this embodiment, the FFT unit 12 performs a fast Fourier transform and the IFFT unit 15 performs an inverse fast Fourier transform, but the processes performed by the FFT unit 12 and the IFFT unit 15 are not limited to this. For example, the FFT unit 12 may perform a discrete Fourier transform (DFT) and the IFFT unit 15 may perform an inverse discrete Fourier transform (IDFT).
[0033] The automatic gain control device 9 determines a gain based on the received signal input from the input unit 532 and transmitted through the receiving side signal path, and multiplies the received signal by this gain. In this embodiment, the gain is determined based on a reference signal.
[0034] The received signal multiplied by the gain is output to the speaker amplifier 55 via the EQ / gain (gain control or gain multiplication) compressor 16. The EQ / gain compressor 16 includes an equalizer that suppresses the volume of a predetermined frequency band and a compressor that compresses the range of volume fluctuations. Note that the EQ / gain compressor 16 is not essential. In this case, the signal obtained after processing the received signal in the gain multiplication unit 23 (described in detail later) can be used as the reference signal.
[0035] The echo canceller 1 may have a configuration related to general speech detection and noise cancelling. The processing of each configuration is already known, so a description thereof will be omitted.
[0036] Next, the automatic gain control device 9 will be described. The automatic gain control device 9 mainly has an FFT unit 21, a gain determination unit 22, and a gain multiplication unit 23. The gain determination unit 22 mainly has an instantaneous power value acquisition unit 22a, an average power estimation unit 22b, a gain calculation unit 22c, and a discontinuity reduction unit 22d. Based on the signal processed by the FFT unit 21, the gain determination unit 22 determines a gain (corresponding to a first gain according to the present invention) that keeps the level of the output signal within a certain range, and the gain multiplication unit 23 multiplies the received signal by this gain.
[0037] 3 is a schematic diagram illustrating the processing of the automatic gain control device 9. In the diagram, arrows indicate the signal flow (processing flow). Since the EQ / gain compressor 16 is not essential, the processing of the EQ / gain compressor 16 is omitted in FIG.
[0038] If the first received signal obtained at time ta (corresponding to the first time in the present invention) is x(s), the reference signal y(s) is expressed by the following mathematical formula (1). Also, the reference signal y(s+F1-1) of the last received signal obtained during time ta, x(s+F1-1), is expressed by the following mathematical formula (2). Here, G(s) and G(s+F1-1) are gains (corresponding to the first gain in the present invention) multiplied by the gain multiplication unit 23. The F1 reference signals y(s) to y(s+F1-1) thus obtained are input to the FFT unit 21. ...(1) ...(2)
[0039] The FFT unit 21, like the FFT unit 12, performs frequency transformation on the signal. The frequency transformation is, for example, a fast Fourier transform (FFT). The FFT unit 21 performs a fast Fourier transform each time F1 samples (e.g., 128 samples) are acquired at time ta. The FFT unit 21 obtains the power spectrum Y[k](t) through the above-described process. Here, t is the frame, and for example, the first F1 samples are one frame (t=1), and the next F1 samples are two frames (t=2). Furthermore, k is the frequency band, and the number k (frequency resolution) is the same as the number of samples F1. In this way, the power spectrum Y[k](t) contains a mixture of frequency information (k) and time information (t).
[0040] The power spectrum Y[k](t) (corresponding to the second input signal of the present invention) obtained by the FFT unit 21 is input to the gain determination unit 22. The gain determination unit 22 (instantaneous power value acquisition unit 22a, average power estimator 22b, gain calculator 22c, and discontinuity reducer 22d) calculates the gain of the output signal based on the power spectrum Y[k](t) obtained by the FFT unit 21 so that the rate of change of the gain of the output signal becomes a predetermined value.
[0041] The instantaneous power acquisition unit 22a calculates an instantaneous power P(t), which is the instantaneous value of the power of the reference signal, based on the power spectrum Y[k](t). More specifically, the instantaneous power acquisition unit 22a calculates the instantaneous power P(t) using the following equation (3). That is, the instantaneous power P(t) is the sum of the power of each power spectrum in the target frequency range F0 to F1. ...(3)
[0042] Here, A[k] is a weighting function. FIG. 4 is a diagram showing an example of a weighting function. For example, A-weighting, C-weighting, Z-weighting without weighting, etc. can be used as the weighting function. By varying the weighting for each frequency band, a desired instantaneous power value P(t) can be obtained. For example, by weighting using A-weighting, C-weighting, etc., which discard low-frequency ranges that are difficult for humans to hear, it is possible to obtain an instantaneous power value P(t) that is closer to human perception.
[0043] The instantaneous power value acquiring unit 22a calculates the power spectrum Y[k](t) not every time but every predetermined number of samples F1 (time ta), so that the calculation frequency is low and processing costs can be reduced.
[0044] The power spectrum obtained by the FFT unit 21 and the instantaneous power value obtained by the instantaneous power value acquisition unit 22a are input to the noise / echo suppressor 14. The noise / echo suppressor 14 suppresses nonlinear echoes using the instantaneous power value P(t). Note that the FFT unit 21 and the instantaneous power value acquisition unit 22a may be included in the noise / echo suppressor 14.
[0045] The average power estimation unit 22b calculates an average power Ave(t), which is the average of the instantaneous power values P(t), based on the multiple instantaneous power values P(t) obtained by the instantaneous power value acquisition unit 22a during a time tb (corresponding to a second time period according to the present invention) that is longer than the time ta. The average power Ave(t) is a numerical value that roughly quantifies the loudness of the sound generated by the speaker 52 (see FIG. 2, etc.).
[0046] For example, the average power estimation unit 22b calculates the sum of instantaneous power values P(t) in a certain interval from T1 to T2 as average power Ave(t) using the following equation (4). The time between T1 and T2 is the same as time tb. ...(4)
[0047] For example, if the number of samples F1 is 128 and the sampling frequency is 16 kHz, the time ta is several milliseconds, and the instantaneous power value P(t) is used to calculate the power for an instant (several milliseconds). Because the instantaneous power value P(t) repeatedly increases and decreases, in this embodiment, the average power Ave(t) is calculated over a relatively long time (time tb) of about 1 to 3 seconds.
[0048] Although the average power estimator 22b calculates the sum of the instantaneous power values P(t) over the fixed interval T1 to T2 as the average power Ave(t), the method for calculating the average power Ave(t) is not limited to this. For example, the average power estimator 22b may calculate the average value of the instantaneous power values P(t) over the fixed interval T1 to T2 as the average power Ave(t), or may calculate the time-weighted average value (see Equation (5)) of the instantaneous power values P(t) over the fixed interval T1 to T2 as the average power Ave(t), or may calculate the maximum value of the instantaneous power values P(t) over the fixed interval T1 to T2 as the average power Ave(t). However, calculating the average power Ave(t) using the average value is the most accurate. Furthermore, calculating the average power Ave(t) using the time-weighted average requires the least amount of processing. ...(5)
[0049] The gain calculation unit 22c calculates a gain G(t) (corresponding to a second gain of the present invention) based on the average power Ave(t) and the gain target value D1. The gain calculation unit 22c calculates the gain G(t) using, for example, the following equation (6): ...(6)
[0050] In this embodiment, since the signal multiplied by the gain in the gain multiplication unit 23 is used to calculate the average power Ave(t), the target value is multiplied by the gain G(t-1) to eliminate this.
[0051] The discontinuity reduction unit 22d reduces the discontinuity of the signal caused by the change in gain and adjusts G(t) obtained by the gain calculation unit 22c to obtain a gain G(s+k) (corresponding to the first gain of the present invention) so that the change rate of the gain G(s+k) falls within a predetermined range.
[0052] The gain calculation unit 22c calculates the gain G(t) only once for every F1 samples, but the received signal is continuously input. If the gain G(t) is suddenly changed at this time, discontinuity in the signal occurs due to the gain change, which may result in abnormal noise. Therefore, the discontinuity reduction unit 22d limits the rate of change of the gain G(s+k) within a predetermined range to reduce the discontinuity in the signal.
[0053] The processing by the discontinuity reduction unit 22d is performed, for example, using the following mathematical formula (7). In mathematical formula (7), the gain G(s+k) is the gain G(t-1) of the previous frame when k=0, and is the gain G(t) of the current frame when k=T1-1, and the gain G(s+k) changes linearly between any number of samples k=0 to T1-1. The number of samples T1 can be determined in advance, for example, 64 samples. ... (7)
[0054] The processing by the discontinuity reduction unit 22d is not limited to processing using Equation (7), and various processing methods that smoothly connect signals before and after a gain change can be used. For example, the discontinuity reduction unit 22d may adjust the gain G(s+k) using the following Equation (8). In Equation (8), signals before and after a gain change are connected by a curve (here, a quadratic curve that reaches its minimum value at k=t-1) between any sample numbers k=0 and T1-1. This allows for a smoother gain change. ...(8)
[0055] In equations (7) and (8), the gain is discontinuous at k = T1-1, and is changed continuously between k = 0 and T1-1. By changing the gain continuously in this way, the degree of gain discontinuity at k = T1-1 is reduced, allowing the near-end talker (user A, see Figure 1) to hear a comfortable voice.
[0056] The gain multiplication unit 23 is provided on the receiving side signal path and multiplies the receiving signal by a gain G(s+k).
[0057] It is desirable that the number of samples T1 be equal to or less than the value obtained by subtracting the overlap rate from 1 and multiplying the result by the number of samples F1 (T1≦(1−overlap rate)*F1). The reason for this will be explained below with reference to FIG. 5. The horizontal axis in FIG. 5 is the time axis.
[0058] Generally, the FFT unit 21 performs FFT by dividing the acquired data into multiple frames (overlap processing), applying a window function to each divided frame, and then performing FFT. Specifically, as shown in FIG. 5, first, FFT is performed on F1 received signals x(0) to x(F1-1) obtained after time S=0 to obtain a power spectrum Y[k](0), and gain G(0) is calculated based on this. Next, FFT is performed on F1 received signals x(a) to x(a+F1-1) obtained after time S=a to obtain a power spectrum Y[k](1), and gain G(1) is calculated based on this. The received signals x(0) to x(F1-1) used to obtain the power spectrum Y[k](0) and the received signals x(a) to x(a+F1-1) used to obtain the power spectrum Y[k](1) partially overlap. The ratio of this overlap to the frame size is the overlap rate.
[0059] Therefore, it is desirable that the number of frames T1 until the gain G(s+k) multiplied by the gain multiplication unit 23 completes the transition from the gain G(t-1) of the previous frame to the gain G(t) of the current frame is equal to or less than the number of frames from when the gain determination unit 22 obtains the gain G(t) of the current frame (G(0) in FIG. 5) until when it obtains the gain G(t+1) of the next frame (G(1) in FIG. 5), i.e., T1≦(1−overlap rate)*F1 or less.
[0060] According to this embodiment, the automatic gain control device 9 performs calculations at regular intervals ta, thereby reducing the processing load on the calculation device. Therefore, gain control can be performed using a CPU with low processing performance. Furthermore, the automatic gain control device 9 calculates the gain G(s+k) using the power of the reference signal, thereby enabling appropriate gain control. In particular, the gain G(s+k) is calculated based on the average power Ave(t) over time tb, i.e., a result that appropriately reflects the magnitude of the reference signal, enabling more appropriate gain control.
[0061] Furthermore, in conventional automatic gain control that is typically performed, gain multiplication unit 23 has an FFT unit and calculates the gain using the result of a Fourier transform, but in this embodiment, gain G(s+k) is calculated using a reference signal, eliminating the need for an FFT unit in gain multiplication unit 23. Therefore, according to this embodiment, gain control can be performed using a CPU with low processing performance.
[0062] Furthermore, according to this embodiment, the noise / echo suppressor 14 performs echo cancellation based on the power spectrum Y[k](t) obtained by the FFT unit 21. More specifically, the noise / echo suppressor 14 suppresses nonlinear echoes using the power spectrum Y[k](t) obtained by the FFT unit 21 and the instantaneous power value P(t) obtained by the instantaneous power value acquisition unit 22a, eliminating the need for the noise / echo suppressor 14 to separately calculate the power spectrum Y[k](t) and the instantaneous power value P(t). Furthermore, the FFT unit 21 and the instantaneous power value acquisition unit 22a can be shared by the automatic gain control device 9 and the noise / echo suppressor 14. This makes it possible to effectively use the configuration of the noise / echo suppressor 14 to appropriately determine gain and cancel echoes with low processing costs.
[0063] In this embodiment, the echo canceller 1 cancels echoes using the echo canceller 11 and the noise / echo suppressor 14, but the form of echo cancellation is not limited to this. For example, the echo canceller 11 is not essential. Also, for example, instead of the noise / echo suppressor 14, the echo canceller 11 may be provided at the position of the noise / echo suppressor 14. In this case, the echo canceller 11 corresponds to the echo canceller of the present invention. Also, for example, the echo canceller 11 may be eliminated, and the noise / echo suppressor 14 may also have the function of the echo canceller 11.
[0064] Furthermore, for example, the noise / echo suppressor 14 may be provided between the FFT unit 21 and the instantaneous power value acquiring unit 22 a. Since it is difficult to calculate the instantaneous power value P(t) if the reference signal contains noise, the calculation can be easily performed by removing noise in advance from the reference signal input to the instantaneous power value acquiring unit 22 a.
[0065] Furthermore, in this embodiment, the discontinuity reduction unit 22d changes the gain G(s+k) linearly or quadratically between a predetermined number of samples, but the form of processing performed by the discontinuity reduction unit 22d is not limited to this.
[0066] For example, the discontinuity reduction unit 22d may detect a zero-crossing point where the amplitude displacement of the reference signal inverts, as shown in FIG. 6(a), and then change the gain linearly or quadratically up to the zero-crossing point, as shown in FIG. 6(b). Alternatively, for example, the discontinuity reduction unit 22d may not change the gain up to the zero-crossing point, but may change the gain at the zero-crossing point, as shown in FIG. 6(c). In this way, the discontinuity reduction unit 22d changes the gain G(s+k) so that the gain becomes discontinuous at the zero-crossing point. Because the volume becomes zero at the zero-crossing point, a sudden change in gain is unlikely to cause discomfort to the user. Therefore, switching the gain at the zero-crossing point contributes to a comfortable user experience. Detection of the zero-crossing point can be performed using any known method.
[0067] Furthermore, for example, the discontinuity reduction unit 22d may detect the maximum point at which the amplitude displacement of the reference signal is at its maximum, as shown in Fig. 7(a), and vary the gain G(s+k) linearly or quadratically up to the maximum point, as shown in Fig. 7(b). At the point at which the signal is at its maximum, the user is likely to notice that an inappropriate gain has been multiplied, so ensuring that the gain is switched before the signal reaches its maximum contributes to a comfortable user experience. The detection of the maximum point can be performed using any known method.
[0068] Furthermore, in this embodiment, the number of frames is T1≦(1−overlap rate)*F1, but it is not impossible to make T1>(1−overlap rate)*F1. However, it should be noted that when T1>(1−overlap rate)*F1, it is necessary to use the previous G(s+k) (k=(1−overlap rate)*F1) instead of G(t−1) in equations (7) and (8). However, in terms of performance of the echo cancellation device 1, it is desirable to make the number of frames T1≦(1−overlap rate)*F1 so that the target value is reached by the time the number of frames T1 is reached.
[0069] Second Embodiment An echo canceller 2 according to a second embodiment of the present invention will be described, focusing on differences from the first embodiment. In the following description, the same components as those in the first embodiment will be denoted by the same reference numerals, and description thereof will be omitted.
[0070] 8 is a block diagram showing a schematic configuration of an echo canceller 2 and an automatic gain control device 9 according to the second embodiment. Functionally, the echo canceller 2 mainly comprises an automatic gain control device 9, an echo canceller 11, a frequency analyzer (FFT unit) 12, a noise / echo suppressor 14, a restoration unit (IFFT unit) 15, and an EQ / gain compressor 16. The echo canceller 2 differs from the echo canceller 1 in that the echo canceller 11 is configured after the FFT unit 12.
[0071] According to this embodiment, the echo can be cancelled by the echo canceller 11 and the noise / echo suppressor 14 using the processing result of the FFT unit 12 .
[0072] Third Embodiment An echo canceller 3 according to a third embodiment of the present invention will be described, focusing on differences from the first embodiment. In the following description, the same components as those in the first embodiment will be denoted by the same reference numerals, and description thereof will be omitted.
[0073] 9 is a block diagram showing a schematic configuration of an echo canceller 3 according to the third embodiment. Functionally, the echo canceller 3 mainly includes an automatic gain control device 9A, an echo canceller 11, a frequency analyzer (FFT section) 12, a noise / echo suppressor 14, a restoration section (IFFT section) 15, and an EQ / gain compressor 16.
[0074] The automatic gain control device 9A determines a gain (corresponding to a first gain of the present invention) based on a reference signal and multiplies the received signal by this gain. The automatic gain control device 9A mainly functionally includes an FFT unit 21, a gain determination unit 22A, and a gain multiplication unit 23. The gain determination unit 22 mainly functionally includes a gain calculation unit 22e, an averaging unit 22f, and a discontinuity reduction unit 22d. The gain determination unit 22A differs from the gain determination unit 22 according to the first embodiment in that the gain calculation unit 22e is provided before the averaging unit 22f.
[0075] 10 is a schematic diagram illustrating the processing of the automatic gain control device 9A. In the diagram, arrows indicate the signal flow (processing flow). Since the EQ / gain compressor 16 is not essential, the processing of the EQ / gain compressor 16 is omitted in FIG.
[0076] In the gain determination unit 22A, a gain (corresponding to the first gain of the present invention) that brings the level of the output signal into a certain range is determined based on the power spectrum Y[k](t) obtained in the FFT unit 21, and this gain is multiplied by the received signal in the gain multiplication unit 23.
[0077] The gain calculation unit 22e (corresponding to a second gain calculation unit of the present invention) calculates a desired gain for each frequency band based on the power spectrum Y[k](t). More specifically, the gain calculation unit 22e calculates a gain G[k](t) for each frequency band using the following equation (9): ...(9)
[0078] The averaging unit 22f calculates the gain G(t) (corresponding to the second gain of the present invention) in any frame by averaging the gain G[k](t) for each frequency from F0 to F1 in the frequency axis direction and from T1 to T2 in the time axis direction using the following formula (10). ...(10)
[0079] According to this embodiment, it is possible to perform appropriate gain control while reducing the processing load of the calculation device, similar to the automatic gain control device 9. Furthermore, by averaging the gain G[k](t) for each frequency from F0 to F1 in the frequency axis direction and from T1 to T2 in the time axis direction to obtain the gain G(t), it is possible to perform more appropriate gain control that appropriately reflects the magnitude of the reference signal.
[0080] In this embodiment, the averaging unit 22f averages the gain in the frequency axis direction and then averages the gain in the time axis direction. However, the averaging unit 22f may average the gain in the time axis direction and then average the gain in the frequency axis direction. The averaging unit 22f may also weight the gain for each frequency. Furthermore, the averaging unit 22f may be configured to average the gain in a specific frequency band.
[0081] <Fourth embodiment> An echo canceller 4 according to a fourth embodiment of the present invention will be described, focusing on the differences from the first embodiment. The echo canceller 4 of the fourth embodiment has an automatic gain control device 9B that differs from the previously described embodiments in that it includes a power change detection unit 40. In the following description, the same components as those in the first embodiment will be denoted by the same reference numerals, and description thereof will be omitted.
[0082] 11 is a block diagram showing a schematic configuration of an echo canceller 4 and an automatic gain control device 9B according to the fourth embodiment. Functionally, the echo canceller 4 mainly includes an automatic gain control device 9B, an echo canceller 11, a frequency analyzer (FFT unit) 12, a noise / echo suppressor 14 (corresponding to the echo canceller of the present invention), a restoration unit (IFFT unit) 15, and an EQ / gain compressor 16.
[0083] The automatic gain control device 9B determines a gain based on a received signal transmitted through the receiver signal path and multiplies the received signal by this gain. The automatic gain control device 9B mainly functionally includes an FFT unit 21, a gain determination unit 22B, a gain multiplication unit 23, and a power change detection unit 40. Like the gain determination unit 22, the gain determination unit 22B mainly functionally includes an instantaneous power value acquisition unit 22a, an average power estimator 22b, a gain calculation unit 22c, and a discontinuity reduction unit 22d, but differs from the gain determination unit 22 in that a power change detection unit 40 is provided between the instantaneous power value acquisition unit 22a and the average power estimator 22b.
[0084] In the automatic gain control device 9B, a gain (corresponding to the first gain of the present invention) that keeps the output signal level within a certain range is determined in the gain determination unit 22A and the power change detection unit 40 based on the signal processed in the FFT unit 21, and this gain is multiplied by the received signal in the gain multiplication unit 23.
[0085] The power change detection unit 40 detects whether the rate of change of the instantaneous power value P(t) calculated by the instantaneous power value acquisition unit 22a is equal to or greater than a predetermined value. For example, if the positive rate of change of the instantaneous power value P(t) is equal to or greater than a threshold, i.e., if the instantaneous power value P(t) increases rapidly, there is a high probability that speech has started. Furthermore, if the negative rate of change of the instantaneous power value P(t) is equal to or greater than a threshold, i.e., if the instantaneous power value P(t) decreases rapidly, there is a high probability that an unvoiced sound, a consonant, or a word ending is being uttered during speech. Therefore, the power change detection unit 40 detects an increase in the instantaneous power value P(t) (speech) or a decrease in the instantaneous power value P(t) (unvoiced sound, a consonant, or a word ending).
[0086] The presence of a speech, an unvoiced sound, a consonant, or a word ending may cause a large error in the instantaneous power value P(t). Therefore, when the power change detection unit 40 detects a speech, an unvoiced sound, a consonant, or a word ending, it does not change the gain but maintains the previous gain (G(t) = G(t-1)). The power change detection unit 40 then outputs the previous gain G(t-1) as the gain G(t) to the discontinuity reduction unit 22d.
[0087] According to this embodiment, when there is no speech, the immediately preceding gain is used, thereby reducing the amount of processing. Furthermore, when an unvoiced sound or the end of a word is spoken, the gain is not changed and the immediately preceding gain is maintained, thereby preventing unnecessary gain changes and ensuring easy-to-listen-to speech.
[0088] In this embodiment, the power change detection unit 40 detects an increase in the instantaneous power value P(t) (speech) and a decrease in the instantaneous power value P(t) (unvoiced sounds, consonants, and word endings). However, the power change detection unit 40 may detect either the instantaneous power value P(t) or a decrease in the instantaneous power value P(t).
[0089] Furthermore, in this embodiment, the automatic gain control device 9B detects speech based on the rate of change of the power spectrum, but it may also detect the presence or absence of speech by referring to frequency characteristics or the like.
[0090] <Fifth embodiment> An echo canceller 5 according to a fifth embodiment of the present invention will be described, focusing on the differences from the first embodiment. The automatic gain control device 9C of the echo canceller 5 of the fifth embodiment differs from the previously described embodiments in that it provides a so-called attack time and a release time when calculating the gain. In the following description, the same components as those in the first embodiment will be denoted by the same reference numerals, and their description will be omitted.
[0091] 12 is a block diagram showing a schematic configuration of an echo canceller 5 and an automatic gain control device 9C according to the fifth embodiment. Functionally, the echo canceller 5 mainly includes an automatic gain control device 9C, an echo canceller 11, a frequency analyzer (FFT unit) 12, a noise / echo suppressor 14, a restoration unit (IFFT unit) 15, and an EQ / gain compressor 16.
[0092] The automatic gain control device 9C determines a gain based on a received signal transmitted through the receiver signal path and multiplies the received signal by this gain. The automatic gain control device 9C mainly functionally comprises an FFT unit 21, a gain determination unit 22C, and a gain multiplication unit 23. Based on the signal processed by the FFT unit 21, the gain determination unit 22C determines a gain (corresponding to a first gain according to the present invention) that keeps the output signal level within a certain range, and the gain multiplication unit 23 multiplies the received signal by this gain.
[0093] The gain determination unit 22C calculates the gain of the output signal so that the rate of change of the gain of the output signal becomes a predetermined value, based on the power spectrum Y[k](t) obtained by the FFT unit 21. The gain determination unit 22 mainly functionally includes an instantaneous power value acquisition unit 22a, an average power estimation unit 22b, a gain calculation unit 22g, and a discontinuity reduction unit 22d.
[0094] The gain calculation unit 22g calculates the gain G(t) using Equation (5) based on the average power Ave(t) and the target gain value D1. At this time, the gain calculation unit 22g sets a so-called attack time or release time to gradually change the gain G(t).
[0095] The attack time is the time required to increase the gain to the desired gain when a signal is first input, and the longer the attack time, the more gradually the gain increases. The release time is the time required to decrease the gain to the desired gain when the gain has decreased, and the longer the release time, the more gradually the gain decreases.
[0096] The attack time and release time are set in advance, and the gain calculation unit 22g holds the attack time and release time. The attack time and release time are a time tc (corresponding to a third time according to the present invention) that is longer than a time tb (corresponding to a second time according to the present invention) that is used by the average power estimation unit 22b to calculate the average power Ave(t), and are, for example, about 1 to 10 seconds.
[0097] The gain calculation unit 22g changes the gain G(t) over the attack time and release time. For example, if the attack time is 10 seconds and the change in the gain G(t) is 1, the gain calculation unit 22g sets the gain G(t)' (corresponding to the second gain of the present invention) that is changed per frame to a magnitude obtained by dividing 1 by the number of frames in 10 seconds.
[0098] The discontinuity reducing unit 22d inputs G(t)′ obtained by the gain calculating unit 22c into G(t) in the formula (7) to obtain the gain G(s+k) (corresponding to the first gain of the present invention).
[0099] According to this embodiment, it is possible to prevent abrupt changes in gain. Note that the configuration of providing an attack time or a release time is even more effective when performed in conjunction with processing by the discontinuity reduction unit 22d, which reduces gain discontinuities over a period of several frames (e.g., approximately 0.01 to 0.1 seconds).
[0100] Sixth Embodiment An echo canceller 6 according to a sixth embodiment of the present invention will be described, focusing on the differences from the first embodiment. The automatic gain control device 9D of the echo canceller 6 of the fifth embodiment differs from the previously described embodiments in that it takes measures against clipping during gain multiplication. In the following description, the same components as those in the first embodiment will be assigned the same reference numerals, and description thereof will be omitted.
[0101] Clipping occurs when the signal is output with the part that exceeds a specified level cut off, resulting in an abnormal sound (clip noise).
[0102] 13 is a block diagram showing a schematic configuration of an echo canceller 6 and an automatic gain control device 9D according to the sixth embodiment. Functionally, the echo canceller 6 mainly includes an automatic gain control device 9D, an echo canceller 11, a frequency analyzer (FFT unit) 12, a noise / echo suppressor 14, a restoration unit (IFFT unit) 15, and an EQ / gain compressor 16.
[0103] The automatic gain control device 9D mainly functionally comprises an FFT unit 21, a gain determination unit 22, and a gain multiplication unit 23 A. Based on the signal processed by the FFT unit 21, the gain determination unit 22 determines a gain (corresponding to a first gain according to the present invention) that keeps the level of the output signal within a certain range, and the gain multiplication unit 23 A multiplies the received signal by this gain.
[0104] The gain multiplication unit 23A is provided on the receiving side signal path and multiplies the received signal by the gain G(s+k) calculated by the discontinuity reduction unit 22d. At this time, the gain multiplication unit 23A acquires the magnitude (level) of the received signal, and reduces the gain to be multiplied if the magnitude of the received signal is equal to or greater than a given threshold. Furthermore, the gain multiplication unit 23A may reduce the gain to 1 (stop the gain multiplication) depending on the magnitude (level) of the received signal.
[0105] According to this embodiment, it is possible to prevent clipping caused by excessive amplification of the signal, and also to prevent damage to the device.
[0106] Although an embodiment of the present invention has been described above in detail with reference to the drawings, the specific configuration is not limited to this embodiment, and design changes and the like are also included within the scope that does not deviate from the gist of the present invention.
[0107] 1, 2, 3, 4, 5, 6: Echo canceller 9, 9A, 9B, 9C, 9D: Automatic gain control device 11: Echo canceller 12: FFT unit 14: Noise / echo suppressor 15: IFFT unit 16: EQ / gain compressor 21: FFT unit 22, 22A, 22B, 22C: Gain determiner 22a: Instantaneous power value acquirer 22b: Average power estimator 22c, 22e, 22g: Gain calculator 22d: Discontinuity reducer 22f: Averaging unit 23, 23A: Gain multiplier 40: Power change detector 50: Terminal 51: Microphone 52: Speaker 53: Communication device 54: Communication device 55: Speaker amplifier 100: Voice communication system 531: Output section 532: Input section
Claims
1. An automatic gain control device comprising: a frequency domain conversion unit that converts a first input signal, which is a time domain reference signal input during a first time from a receiver signal path that transmits a received signal to a speaker of a terminal, into a second input signal in the frequency domain; a gain determination unit that calculates a first gain based on the second input signal; and a gain multiplication unit that is provided in the receiver signal path and multiplies the received signal by the first gain, wherein the reference signal is a signal obtained after the received signal is multiplied by the first gain in the gain multiplication unit.
2. The automatic gain control device according to claim 1, characterized in that the gain determination unit comprises: an instantaneous power acquisition unit that calculates an instantaneous power value, which is the instantaneous value of the power of the reference signal, based on the second input signal; an average power estimation unit that calculates an average power that quantifies an approximate value of the loudness of the sound produced by the speaker, based on a plurality of the instantaneous power values obtained by the instantaneous power acquisition unit during a second time period that is longer than the first time; a gain calculation unit that calculates a desired second gain based on the average power and a target gain value; and a discontinuity reduction unit that calculates the first gain based on the second gain, the discontinuity reduction unit setting the rate of change of the first gain within a predetermined range.
3. The automatic gain control device as described in claim 1, characterized in that the gain determination unit comprises: a second gain calculation unit that calculates a third gain for each frequency band based on the second input signal and a target value of gain; an averaging unit that calculates a second gain by averaging the third gain calculated during a second time period that is longer than the first time period in the frequency direction and the time direction; and a discontinuity reduction unit that calculates the first gain based on the second gain, the discontinuity reduction unit keeping the rate of change of the first gain within a predetermined range.
4. An automatic gain control device according to claim 2 or 3, characterized in that the discontinuity reducing section makes the first gain discontinuous at a zero cross point where the displacement of the amplitude of the reference signal is inverted.
5. An automatic gain control device according to claim 2 or 3, characterized in that the discontinuity reducing section gradually changes the first gain until the amplitude of the reference signal changes to a maximum point.
6. An automatic gain control device as described in claim 2, further comprising a power change detection unit that detects that the rate of change of the instantaneous power value is equal to or greater than a predetermined value, and wherein the gain determination unit does not change the first gain when it detects that the rate of change of the instantaneous power value is equal to or greater than the predetermined value.
7. An automatic gain control device according to any one of claims 2 to 6, characterized in that the gain determination section changes the second gain over a third time period that is longer than the second time period.
8. An automatic gain control device according to any one of claims 1 to 7, characterized in that the gain multiplication section reduces the first gain when the magnitude of the received signal is equal to or greater than a threshold value.
9. An echo cancellation device comprising: an automatic gain control device according to any one of claims 1 to 8; and an echo cancellation unit provided in a transmitting side signal path that transmits an input signal input from a microphone possessed by the terminal, the echo cancellation unit canceling an echo generated when a voice output from the speaker is input to the microphone, the echo cancellation unit canceling the echo based on the second input signal converted by the frequency domain conversion unit.
10. An automatic gain control method comprising the steps of: converting a first input signal, which is a time domain reference signal input during a first time from a receiver signal path that transmits a received signal to a speaker of a terminal, into a second input signal in the frequency domain; calculating a first gain based on the second input signal; and multiplying the received signal by the first gain, the step being provided in the receiver signal path, wherein the reference signal is a signal obtained after the received signal has been multiplied by the first gain.
11. An automatic gain control program for making a computer function as: a frequency domain conversion unit that converts a first input signal, which is a time domain reference signal input during a first time from a receiver signal path that transmits a received signal to a speaker of a terminal, into a second input signal in a frequency domain; a gain determination unit that calculates a first gain based on the second input signal; and a gain multiplication unit that is provided in the receiver signal path and multiplies the received signal by the first gain, wherein the reference signal is a signal obtained after the received signal has been multiplied by the first gain in the gain multiplication unit.
Citation Information
Patent Citations
Automatic gain control instrument
JP2004129187A
Audio signal processing device, audio signal processing method and audio signal processing program
JP2014192585A
Gain and spectral shape adjustment in audio signal processing
US20090225980A1
Automatic Gain Control Circuit and Method for Automatic Gain Control
US20120206195A1
