1. Field of the Invention
The present invention relates to a method for controlling a gain of a voice signal, and more particularly, to a method for controlling a gain of a voice signal according to a distance between a user and an audio system.
2. Description of the Prior Art
As related technology keeps improving, various types of electronic devices are capable of executing complex audio/video functions. For example, a mobile phone can play MP3 music, record voice, or even handle a video conference. When in a video conference, a user usually keeps a distance away from a microphone or a speaker of the mobile phone (or related devices), and sometimes the user may move around. However, an audio system of the mobile phone controls an input gain of the microphone and an output gain of the speaker as constants until the user changes them manually. When the user is far away from the mobile phone, the volume of the speaker will be too small to hear if the output gain of the speaker is not enough. Similarly, the microphone will not be able to receive the user's voice if the input gain of the microphone is not enough.
In conclusion, audio system of the prior art cannot adaptively change the input gain of the microphone or the output gain of the speaker according to the distance between a user and the audio system.
It is therefore an objective of the claimed invention to provide a method for controlling a gain of a voice signal in order to solve the problems of the prior art.
The present invention provides a method for controlling a gain of a voice signal that comprises detecting a size of an image of an object; determining a signal gain according to the size of the image of the object; and applying the signal gain to a voice signal.
The present invention further provides an audio system comprising an image detector for detecting a size of an image of an object; a gain estimator coupled to the image detector for determining a signal gain according to a focus value of the image detector and the size of the image of the object; and a gain controller coupled to the gain estimator for applying the signal gain a voice signal.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
Please refer to
D=K×F/Y (1)
D is the distance between the user 200 and the audio system 100, F if the focus value of the image detector 110, Y is the size of the captured image of the user's face 210, and K is a known constant. If the image detector 110 has a variable focus lens module, the audio system 100 determines the distance D according to both the focus value F of the image detector 110 and the size Y of the captured image of the user's face 210. On the other hand, if the image detector 110 has a fixed focus lens module, the audio system 100 determines the distance D only according to the size Y of the captured image of the user's face 210.
Please refer to
G2=(D12/D22)×G1 (2)
Thereafter, the gain controller 150 applies the new output gain G2 to the voice signal through the speaker 120, such that the user 200 can hear clearly even while moving around. Similarly, an input gain of a voice signal through a microphone 130 can be adaptively controlled according the above method as well.
In addition, the gain estimator 140 of the present invention can also generate a new gain of a voice signal directly according to the size Y of the captured image of the user's face 210. Please refer to
Therefore, the audio system 100 can adaptively change the input gain of the microphone 130 or the output gain of the speaker 120 according to the distance between the user 200 and the audio system 100. For example, when the user 200 is moving away from the audio system 100, the audio system 100 will increasing the volume (output gain) of the speaker 120 and the sensitivity (input gain) of the microphone 130 correspondingly. On the other hand, when the user 200 is moving toward the audio system 100, the audio system 100 will decreasing the volume of the speaker 120 and the sensitivity of the microphone 130 correspondingly. Such that the audio system 100 of the present invention is able to provide proper outputting and inputting performance even when the user 200 is moving around.
To more clearly illustrate the method for controlling a gain of a voice signal,
Step 410: Detect a size of a captured image of an object;
Step 420: Determine a gain of a voice signal according to the size of the captured image of the object;
Step 430: Apply the gain to the voice signal, and return to step 410.
Basically, to achieve the same result, the steps of the flowchart 400 need not be in the exact order shown and need not be contiguous, that is, other steps can be intermediate.
Summarizing the above, the present invention utilizes an image detector 110 to sense a size of a captured image of an object in order to estimate a distance between a user 200 and the audio system 100, and then controls a gain of a voice signal according to the distance between the user 200 and the audio system 100.
In contrast to the prior art, the present invention can adaptively change the input gain of the microphone 130 or the output gain of the speaker 120 according to the distance between the user 200 and the audio system 100, such that the audio system 100 of the present invention is able to provide proper outputting and inputting performance even when the user 200 is moving around.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.