Automatic gain control device, echo canceller, automatic gain control method, and automatic gain control program
Patent Information
- Application Number
- JP2023050149
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-27
- Publication Date
- 2025-09-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing automatic gain control systems require high processing capacity CPUs, making them unsuitable for use with low-capacity CPUs and prone to signal discontinuity and abnormal noise due to gain changes.
An automatic gain control method and device that utilizes a frequency domain conversion of input signals, calculates gains based on average power, and employs discontinuity reduction techniques to minimize processing load and signal discontinuity, using a CPU with low processing capacity.
Enables appropriate gain control with reduced processing load and minimizes abnormal noise by using a CPU with low processing capacity, ensuring smooth gain transitions and comfortable user experience.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical field]
[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. [Background technology]
[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 the time average of the input signal over a relatively short time, 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. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2004-129187 A Summary of the Invention [Problem to be solved by the invention]
[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. [Means for solving the problem]
[0006] In order to solve the above problem, the automatic gain control device of 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 from a receiver side 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 side signal path and multiplies the received signal by the first gain, and is characterized in that the reference signal is a signal obtained after the received signal is 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, a step 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 a frequency domain, a step of calculating a first gain based on the second input signal, and a step of multiplying the received signal by the first gain, which is provided in the receiver signal path, and is characterized in that the reference signal is a signal obtained after the received signal is multiplied by the first gain.
[0008] In order to solve the above problem, an automatic gain control program according to another aspect of the present invention causes a computer to function as, 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 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, and the reference signal is a signal obtained after the received signal is multiplied by the first gain in the gain multiplication unit. The computer program can be provided by downloading via a network such as the Internet, or can be provided by recording it on various computer-readable recording media such as a CD-ROM.
[0009] According to the automatic gain control device, the automatic gain control method, and the automatic gain control program of the present invention, a first input signal, which is a received signal (reference signal) that is a signal after being 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 generated by the speaker, based on a plurality of the instantaneous power values acquired 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 target value of gain, 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. In this way, by calculating the first gain based on the average power during the second time period, it is possible to perform more appropriate gain control that appropriately reflects the magnitude of the reference signal. In addition, it is possible to reduce the occurrence of abnormal sounds due to discontinuity of the signal accompanying a change in gain.
[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 target value of the gain, an averaging unit that calculates a second gain by averaging the third gain calculated during a second time period 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 setting the 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 during the second time period, more appropriate gain control that appropriately reflects the magnitude of the reference signal can be performed. In addition, the generation of abnormal sounds due to discontinuity of the signal accompanying the change in gain 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, since a user is unlikely to feel uncomfortable even if the gain is abruptly changed at the zero crossing point where the volume becomes zero, switching the gain at the zero crossing point contributes to comfortable user use.
[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 manner, reliably switching the gain by a time when the user is likely to notice that an inappropriate gain has been multiplied contributes to comfortable user use.
[0014] The speech recognition device may further include 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 the gain determination unit may 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. 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 making it possible to prevent 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. This makes it possible to prevent clipping caused by excessive amplification of the signal, and also to prevent damage to the device.
[0017] An echo canceller according to another aspect of the present invention includes, for example, an automatic gain control device and an echo canceller that is provided in a transmitting side signal path that transmits an input signal input from a microphone of the terminal and that cancels an echo generated when a voice output from the speaker is input to the microphone, and the echo canceller performs echo cancellation based on the second input signal converted by the frequency domain conversion unit. That is, the frequency domain conversion unit can be shared by the automatic gain control device and the echo canceller. This makes it possible to appropriately determine gain and cancel echo with low processing cost. Effect of the Invention
[0018] According to the present invention, it is possible to perform appropriate gain control while reducing the processing load on the arithmetic unit. [Brief description of the drawings]
[0019] [Figure 1] FIG. 1 is a diagram illustrating a voice communication system 100 provided with an echo canceller 1 according to a first embodiment. [Diagram 2] 1 is a block diagram showing a schematic configuration of an echo canceller 1. FIG. [Diagram 3] FIG. 2 is a schematic diagram illustrating the processing of an automatic gain control device 9. [Figure 4] FIG. 13 is a diagram illustrating an example of a weighting function. [Diagram 5] 11 is a schematic diagram illustrating the number of samples T1 and an overlap rate. FIG. [Figure 6] 13A and 13B are diagrams illustrating another embodiment of the discontinuity reducing section 22d, in which (a) is a graph showing a reference signal, and (b) and (c) are graphs showing gains. [Figure 7] 13A and 13B are diagrams illustrating another embodiment of the discontinuity reducing section 22d, where (a) is a graph showing a reference signal, and (b) is a graph showing a gain. [Figure 8] FIG. 11 is a block diagram showing a schematic configuration of an echo canceller 2 according to a second embodiment. [Figure 9] FIG. 11 is a block diagram showing a schematic configuration of an echo canceller 3 according to a third embodiment. [Figure 10] FIG. 2 is a schematic diagram for explaining the processing of an automatic gain control device 9A. [Figure 11] FIG. 11 is a block diagram showing a schematic configuration of an echo canceller 4 according to a fourth embodiment. [Figure 12] FIG. 13 is a block diagram showing a schematic configuration of an echo canceller 5 according to a fifth embodiment. [Figure 13] FIG. 13 is a block diagram showing a schematic configuration of an echo canceller 6 according to a sixth embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0020] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an embodiment of an automatic gain control device, an automatic gain control method, and an automatic gain control program according to the present invention will be described in detail with reference to the drawings.
[0021] The 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. The echo canceller is a device that suppresses echoes that occur during a call in a voice communication system.
[0022] <First embodiment> 1 is a diagram showing a voice communication system 100 provided with an echo canceller 1 having an automatic gain control device 9 according to a first embodiment. The voice 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 canceller 1.
[0023] The voice communication system 100 is a system in which a near-end talker (user A on the near-end side) using a terminal 50 (near-end terminal) performs voice communication with a user (user B on the far-end side) using a communication device 54 (far-end terminal). A voice signal (hereinafter referred to as a received signal) input via the communication device 54 is amplified and output by a speaker 52, and a voice emitted by user A on the near-end side is collected by a microphone 51 and transmitted to the communication device 54, so that user A can make a voice call (hands-free call) without holding the communication device 53. The communication devices 53 and 54 are connected by a general telephone line.
[0024] The echo canceller 1 and the automatic gain control device 9 may be constructed as a dedicated board mounted on a communication terminal or the like (for example, an in-vehicle device, a conference system, or a mobile terminal) in the voice communication system 100. The echo canceller 1 may be configured, for example, mainly by a computer system including an arithmetic unit such as a CPU (Central Processing Unit) for executing information processing, a storage device such as a RAM (Random Access Memory) or a ROM (Read Only Memory), and software (echo suppression program). The echo suppression program may be stored in advance 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 installed from there into the computer. The echo suppression program may be temporarily or permanently stored (stored) 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 a schematic configuration of the echo canceller 1 and the automatic gain control device 9. Functionally, the echo canceller 1 mainly includes 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, in the figure, arrows indicate the flow of signals (flow of processing).
[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 a plurality of components.
[0027] The echo canceller 11 cancels the echo using, for example, an adaptive filter. The echo canceller 11 updates a filter coefficient 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 is processed by a gain multiplier 23 (described in detail later) and an EQ / gain compressor 16 (described in detail later). Note that the adaptive filter is already 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 a time series (time domain) into a signal represented by a set of frequencies (frequency domain).
[0030] For the sake of convenience, the FFT unit 12 and the FFT unit 21 are illustrated as 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, a nonlinear echo that could not be removed by the echo removal unit 11 that removes the linear echo. The noise / echo suppressor 14 may perform a nonlinear echo suppression process that refers to an instantaneous power value in addition to 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, discrete FT), and the IFFT unit 15 may perform an inverse discrete Fourier transform (IDFT, Inverse DFT).
[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 specified frequency band, and a compressor that compresses the range of volume intensity. Note that the EQ / gain / compressor 16 is not essential. In this case, the signal 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 includes an FFT unit 21, a gain determination unit 22, and a gain multiplication unit 23. The gain determination unit 22 mainly includes 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 of the present invention) that sets the level of the output signal within a certain range, and the gain multiplication unit 23 multiplies the received signal by this gain.
[0037] Fig. 3 is a schematic diagram for explaining the processing of the automatic gain control device 9. In the figure, the 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. 3.
[0038] If the first received signal obtained at time ta (corresponding to the first time of the present invention) is x(s), the reference signal y(s) is expressed by the following formula (1). Also, the reference signal y(s+F1-1) of the last received signal obtained during time ta is expressed by the following formula (2). Here, G(s) and G(s+F1-1) are gains (corresponding to the first gain of 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.
number
number
[0039] The FFT unit 21 performs frequency conversion on the signal, similar to the FFT unit 12. The frequency conversion is, for example, a fast Fourier transform (FFT). The FFT unit 21 performs a fast Fourier transform every time F1 samples (for example, 128 samples) obtained at time ta are acquired. The FFT unit 21 obtains a power spectrum as Y[k](t) by the above-mentioned process. Here, t is a frame, and for example, the first F1 samples are one frame (t=1), and the next F1 samples are two frames (t=2). Also, k is a frequency band, and the number of k (frequency resolution) is the same as the number of samples F1. In this way, the power spectrum Y[k](t) is 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 an 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) by the following formula (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.
number
[0042] Here, A[k] is a weighting function. FIG. 4 is a diagram showing an example of the weighting function. For example, A characteristics, C characteristics, Z characteristics without weighting, etc. can be adopted as the weighting function. By making the weighting different for each frequency band, it is possible to obtain a desired instantaneous power value P(t). For example, by applying weighting using A characteristics, C characteristics, etc. that cut off the low frequency range that is difficult for humans to hear, it is possible to obtain an instantaneous power value P(t) that is closer to human senses.
[0043] The instantaneous power value acquiring unit 22a obtains 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 an average value of the instantaneous power values based on a plurality of instantaneous power values P(t) obtained by the instantaneous power value acquisition unit 22a during a time tb (corresponding to the second time of the present invention) longer than the time ta. The average power Ave(t) is a numerical value which represents an approximate value of the loudness of the sound generated by the speaker 52 (see FIG. 2, etc.).
[0046] For example, the average power estimation unit 22b obtains the sum of the instantaneous power values P(t) in a certain section from T1 to T2 as the average power Ave(t) using the following formula (4). The time period from T1 to T2 is the same as the time tb.
number
[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 a value that indicates the power for an instant (several milliseconds). Since the instantaneous power value P(t) repeatedly increases and decreases, in this embodiment, the average power Ave(t) is calculated over a relatively long period of time (time tb) of about 1 to 3 seconds.
[0048] Although the average power estimation unit 22b has calculated the sum of the power instantaneous values P(t) in the fixed section T1 to T2 as the average power Ave(t), the calculation method of the average power Ave(t) is not limited to this. For example, the average power estimation unit 22b may set the average value of the power instantaneous values P(t) in the fixed section T1 to T2 as the average power Ave(t), may set the time-weighted average value (see formula (5)) of the power instantaneous values P(t) in the fixed section T1 to T2 as the average power Ave(t), or may set the maximum value of the power instantaneous values P(t) in the fixed section T1 to T2 as the average power Ave(t). However, it is most accurate to calculate the average power Ave(t) using the average value. Also, it is lightest to calculate the average power Ave(t) using the time-weighted average value.
number
[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) by, for example, the following formula (6).
number
[0050] In this embodiment, since a signal multiplied by a gain in the gain multiplier 23 is used to calculate the average power Ave(t), the target value is multiplied by a gain G(t-1) to eliminate this.
[0051] The discontinuity reducing unit 22d reduces the discontinuity of the signal caused by the change in gain, and adjusts G(t) obtained by the gain calculating unit 22c to obtain a gain G(s+k) (corresponding to the first gain of the present invention) so that the signal change becomes smooth. The discontinuity reducing unit 22d sets the rate of change of the gain G(s+k) within a predetermined range.
[0052] In the gain calculation unit 22c, the gain G(t) is calculated 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 change in gain, and there is a risk of abnormal noise. Therefore, the discontinuity reduction unit 22d sets the rate of change of the gain G(s+k) within a predetermined range and reduces the discontinuity in the signal.
[0053] The process by the discontinuity reducing unit 22d is performed, for example, according to the following formula (7). In 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, and is, for example, 64 samples.
number
[0054] The processing by the discontinuity reduction unit 22d is not limited to the processing by equation (7), and various processing that smoothly connects signals before and after the gain change can be adopted. For example, the discontinuity reduction unit 22d may adjust the gain G(s+k) by the following equation (8). In equation (8), the signals before and after the gain change are connected by a curve (here, a quadratic curve that has a minimum value at k=t-1) between any sample number k=0 to T1-1. This makes it possible to realize a smoother gain change.
number
[0055] In formulas (7) and (8), the gain is discontinuous at k=T1-1, and the gain is changed continuously between k=0 and T1-1. By changing the gain continuously in this way, the degree of the gain discontinuity at k=T1-1 is reduced, and the near-end talker (user A, see Figure 1) can 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 to set the number of samples T1 to 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 processing in the FFT unit 21 divides the acquired data into a plurality of frames (overlap processing), applies a window function to each divided frame, and then performs 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. Then, the received signals x(0) to x(F1-1) for obtaining the power spectrum Y[k](0) and the received signals x(a) to x(a+F1-1) for obtaining 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) to when it obtains the gain G(t+1) of the next frame (G(1) in FIG. 5), i.e., T1≦(1−overlap rate)*F1.
[0060] According to this embodiment, since the automatic gain control device 9 performs calculations at regular time intervals ta, the processing load on the calculation device can be reduced. Therefore, gain control can be performed using a CPU with low processing performance. Furthermore, since the automatic gain control device 9 determines the gain G(s+k) using the power of the reference signal, appropriate gain control can be performed. In particular, since the gain G(s+k) is determined based on the average power Ave(t) over time tb, i.e., a result that appropriately reflects the magnitude of the reference signal, more appropriate gain control can be performed.
[0061] Furthermore, in conventional automatic gain control that is usually performed, gain multiplication unit 23 has an FFT unit and obtains a gain using the result after Fourier transform, but in this embodiment, since gain G(s+k) is obtained using a reference signal, there is no 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 removes the echo based on the power spectrum Y[k](t) obtained by the FFT unit 21. More specifically, the noise / echo suppressor 14 suppresses the nonlinear echo 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, so that the noise / echo suppressor 14 does not need to calculate the power spectrum Y[k](t) and the instantaneous power value P(t) separately. 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 the gain and remove the echo with low processing costs.
[0063] In this embodiment, the echo removal device 1 removes the echo using the echo removal unit 11 and the noise / echo suppressor 14, but the form of echo removal is not limited to this. For example, the echo removal unit 11 is not essential. Also, for example, instead of the noise / echo suppressor 14, the echo removal unit 11 may be provided at the position of the noise / echo suppressor 14. In this case, the echo removal unit 11 corresponds to the echo removal unit of the present invention. Also, for example, the echo removal unit 11 may be eliminated, and the noise / echo suppressor 14 may have the function of the echo removal unit 11.
[0064] Also, for example, the noise / echo suppressor 14 may be provided between the FFT unit 21 and the instantaneous power acquisition unit 22a. If the reference signal contains noise, it is difficult to calculate the instantaneous power P(t), so the calculation can be easily performed by removing noise in advance from the reference signal input to the instantaneous power acquisition unit 22a.
[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 displacement of the amplitude of the reference signal is inverted 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). Also, 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. Since the volume becomes zero at the zero crossing point, the user is unlikely to feel uncomfortable even if the gain is changed suddenly. Therefore, switching the gain at the zero crossing point contributes to comfortable user use. The zero crossing point can be detected by an appropriate known method.
[0067] Also, for example, the discontinuity reducing unit 22d may detect the maximum point where the displacement of the amplitude of the reference signal is maximum as shown in Fig. 7(a), and change the gain G(s+k) linearly or quadratically up to the maximum point as shown in Fig. 7(b). At the time when the signal is at its maximum, the user is likely to sense that an inappropriate gain has been multiplied, so reliably switching the gain before the signal is at its maximum contributes to comfortable user use. The detection of the maximum point may be performed by any known method.
[0068] In addition, in this embodiment, the number of frames 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 formulas (7) and (8). However, in terms of the 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 number of frames T1.
[0069] <Second embodiment> The echo canceller 2 according to the second embodiment of the present invention will be described below, focusing on the differences from the first embodiment. In the following description, the same components as those in the first embodiment are denoted by the same reference numerals, and the 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 includes an automatic gain control device 9, 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. The echo canceller 2 differs from the echo canceller 1 in that the echo canceller 11 is configured after the FFT section 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 from the FFT unit 12 .
[0072] <Third embodiment> The echo canceller 3 according to the third embodiment of the present invention will be described below, focusing on the differences from the first embodiment. In the following description, the same components as those in the first embodiment are denoted by the same reference numerals, and the description thereof will be omitted.
[0073] 9 is a block diagram showing a schematic configuration of an echo canceller 3 according to a 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] Fig. 10 is a schematic diagram for explaining the processing of the automatic gain control device 9A. In the figure, the 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. 10.
[0076] In 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 FFT unit 21, and this gain is multiplied by the received signal in gain multiplication unit 23.
[0077] The gain calculation unit 22e (corresponding to a second gain calculation unit of the present invention) obtains 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 by the following formula (9).
number
[0078] The averaging unit 22f calculates the gain G(t) (corresponding to the second gain of the present invention) at 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).
number
[0079] According to this embodiment, it is possible to perform appropriate gain control while reducing the processing load of the calculation device, similarly to the automatic gain control device 9. Also, by averaging the gain G[k](t) for each frequency from F0 to F1 in the frequency axis direction and averaging it 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 gains in the frequency axis direction and then averages the gains in the time axis direction, but the averaging unit 22f may average the gains in the time axis direction and then average the gains in the frequency axis direction. The averaging unit 22f may also weight the gains for each frequency. The averaging unit 22f may also be configured to average the gains in a specific frequency band.
[0081] <Fourth embodiment> The echo canceller 4 according to the fourth embodiment of the present invention will be described, focusing on the differences from the first embodiment. The automatic gain control device 9B of the echo canceller 4 of the fourth embodiment 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 are 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 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.
[0083] The automatic gain control device 9B determines a gain based on a received signal transmitted through a receiving side 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 estimation unit 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 estimation unit 22b.
[0084] In the automatic gain control device 9B, a gain (corresponding to the first gain of the present invention) that brings the output signal level into 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, when the positive rate of change of the instantaneous power value P(t) is equal to or greater than a threshold value, i.e., when the instantaneous power value P(t) increases rapidly, there is a high probability that speech has started. Also, for example, when the negative rate of change of the instantaneous power value P(t) is equal to or greater than a threshold value, i.e., when 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] If there is a speech, an unvoiced sound, a consonant, or an ending speech, there is a risk that the error in the instantaneous power value P(t) will become large. Therefore, when the power change detection unit 40 detects a speech, an unvoiced sound, a consonant, or an ending speech, it does not change the gain, but maintains the previous gain (G(t)=G(t-1)). Then, the power change detection unit 40 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. Also, when there is an unvoiced sound or an utterance at the end of a word, 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 P(t) (speech) and a decrease in the instantaneous power P(t) (unvoiced sounds, consonants, and endings), but the power change detection unit 40 may detect either the instantaneous power P(t) or a decrease in the instantaneous power P(t).
[0089] Furthermore, in this embodiment, 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> The echo canceller 5 according to the 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 release time when calculating gain. In the following description, the same components as those in the first embodiment are denoted by the same reference numerals, and description thereof 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 section) 12, a noise / echo suppressor 14, a restoration section (IFFT section) 15, and an EQ / gain / compressor 16.
[0092] The automatic gain control device 9C determines a gain based on a received signal transmitted through a receiving side signal path, and multiplies the received signal by this gain. The automatic gain control device 9C mainly functionally comprises an FFT section 21, a gain determination section 22C, and a gain multiplication section 23. Based on the signal processed by the FFT section 21, the gain determination section 22C determines a gain (corresponding to a first gain of the present invention) that brings the level of the output signal into a certain range, and the gain multiplication section 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 estimator 22b, a gain calculation unit 22g, and a discontinuity reduction unit 22d.
[0094] The gain calculation unit 22g calculates the gain G(t) based on the average power Ave(t) and the gain target value D1 using Equation (5). 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 of the present invention) longer than a time tb (corresponding to a second time of the present invention) at which the average power estimation unit 22b calculates 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, when 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) changed in one frame to a magnitude obtained by dividing 1 by the number of frames in 10 seconds.
[0098] The discontinuity reducing unit 22d inputs the 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 more effective when performed in conjunction with processing by the discontinuity reduction unit 22d that reduces discontinuity in gain over a period of several frames (e.g., about 0.01 to 0.1 seconds).
[0100] Sixth embodiment The echo canceller 6 according to the 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 reference numerals are used for the same components as those of the first embodiment, and the description thereof will be omitted.
[0101] Clipping occurs when the signal is output with any parts that exceed a specified level cut off, resulting in abnormal noise (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 section) 12, a noise / echo suppressor 14, a restoration section (IFFT section) 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 of the present invention) that brings the level of the output signal into a certain range, and the gain is multiplied by the received signal in the gain multiplication unit 23 A.
[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 when the magnitude of the received signal is equal to or greater than an arbitrary threshold value. Furthermore, the gain multiplication unit 23A may reduce the gain to 1 (stop the multiplication of the gain) 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 a signal, and also to prevent damage to the device.
[0106] Although an embodiment of the present invention has been described in detail above with reference to the drawings, the specific configuration is not limited to this embodiment, and design changes and the like that do not deviate from the gist of the present invention are also included. [Explanation of symbols]
[0107] 1, 2, 3, 4, 5, 6: Echo Canceller 9, 9A, 9B, 9C, 9D: Automatic gain control device 11: Echo Cancellation Section 12:FFT section 14: Noise / echo suppressor 15:IFFT section 16: EQ, Gain, Compressor 21:FFT section 22, 22A, 22B, 22C: Gain determination section 22a: Power instantaneous value acquisition section 22b: Average power estimation unit 22c, 22e, 22g: Gain calculation section 22d: Discontinuity reduction section 22f: Average part 23, 23A: Gain multiplication section 40: Power change detection section 50: Terminal 51: Microphone 52: Speaker 53: Communication equipment 54: Communication equipment 55: Speaker amplifier 100: Voice communication systems 531: Output section 532: Input section
Claims
1. a frequency domain transform unit that transforms 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 the 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; a gain multiplication unit provided in the receiving side signal path and multiplying the receiving signal by the first gain; Equipped with The reference signal is a signal obtained by multiplying the received signal by the first gain in the gain multiplication unit.
1. An automatic gain control device comprising:
2. The gain determination unit an instantaneous power value acquiring unit that calculates an instantaneous power value that 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 by quantifying an approximate value of the loudness of the sound produced by the speaker based on the plurality of instantaneous power values obtained by the instantaneous power acquisition unit during a second time period that is longer than the first time period; a gain calculation unit that calculates a desired second gain based on the average power and a target value of the gain; 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; 2. The automatic gain control device according to claim 1, further comprising:
3. The gain determination unit 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 a 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 a frequency direction and a time direction; 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; 2. The automatic gain control device according to claim 1, further comprising:
4. The discontinuity reduction unit causes the first gain to become discontinuous at a zero crossing point where a displacement of the amplitude of the reference signal is inverted.
4. An automatic gain control device according to claim 2 or 3.
5. The discontinuity reduction unit gradually changes the first gain until a maximum point at which a displacement of the amplitude of the reference signal is maximized.
4. An automatic gain control device according to claim 2 or 3.
6. 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; When the gain determination unit detects that the rate of change of the instantaneous power value is equal to or greater than the predetermined value, the gain determination unit does not change the first gain.
3. The automatic gain control device according to claim 2.
7. The gain determination unit varies the second gain over a third time period that is longer than the second time period.
4. An automatic gain control device according to claim 2 or 3.
8. The gain multiplication unit reduces the first gain when the magnitude of the received signal is equal to or greater than a threshold.
4. An automatic gain control device according to claim 1, wherein the automatic gain control device is a gain control circuit.
9. An automatic gain control device according to any one of claims 1 to 3; an echo canceller provided on a transmitting side signal path for transmitting an input signal input from a microphone of the terminal, the echo canceller canceling an echo generated when a voice output from the speaker is input to the microphone; The echo canceller performs echo cancellation based on the second input signal converted by the frequency domain converter.
1. An echo canceller comprising:
10. 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 the terminal, into a second input signal in a frequency domain; calculating a first gain based on the second input signal; a step of multiplying the received signal by the first gain, the step being provided in the received signal path; The reference signal is a signal obtained by multiplying the received signal by the first gain.
1. An automatic gain control method comprising:
11. Computer, a frequency domain transform unit that transforms a first input signal, which is a time domain reference signal input during a first time period from a receiver side signal path that transmits a received signal to a speaker included in the 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; a gain multiplication unit provided in the receiving side signal path and multiplying the receiving signal by the first gain; The reference signal is a signal obtained by multiplying the received signal by the first gain in the gain multiplication unit.
1. An automatic gain control program comprising: