CN-122026843-A - Electronic equipment and signal automatic gain control method
Abstract
The embodiment of the application discloses electronic equipment and a signal automatic gain control method, wherein after a first sound signal acquired by a sound acquisition device based on first acquisition volume is acquired, the signal intensity of the first sound signal is acquired, if the signal intensity is larger than a first threshold value, the clipping probability of clipping of the first sound signal is calculated, if the clipping probability is larger than a second threshold value, the target acquisition volume is calculated according to the first acquisition volume, the acquisition volume adjustable range supported by the sound acquisition device and the clipping probability, the acquisition volume of the sound acquisition device is adjusted to be the target acquisition volume, after the second sound signal acquired by the sound acquisition device based on the target acquisition volume is acquired, the gain processing is carried out on the second sound signal based on the first gain, and the processed second sound signal is output. Therefore, when the intensity of the sound signal is too high, clipping detection is automatically carried out, the collection volume of the front-end sound collector is automatically adapted and adjusted, and the clipping problem of the sound signal is eliminated.
Inventors
- YOU CHANGFU
- WU CHAOYANG
Assignees
- 聚好看科技股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260126
Claims (10)
- 1. An electronic device, comprising: a sound collector configured to collect sound signals; an audio output device configured to output a sound signal; a controller coupled with the sound collector and the audio output device, the controller configured to: after a first sound signal acquired by the sound collector based on a first acquisition volume is acquired, acquiring the signal intensity of the first sound signal; if the signal strength is greater than a first threshold, calculating clipping probability of clipping of the first sound signal; If the clipping probability is larger than a second threshold, calculating a target acquisition volume according to the first acquisition volume, an acquisition volume adjustable range supported by the sound collector and the clipping probability, and adjusting the acquisition volume of the sound collector to the target acquisition volume; After the second sound signal acquired by the sound acquirer based on the target acquisition volume is acquired, gain processing is performed on the second sound signal based on the current first gain, and the audio output device is controlled to output the processed second sound signal.
- 2. The electronic device of claim 1, wherein the controller performs calculating a clipping probability if the signal strength is greater than a first threshold, specifically configured to: Obtaining a set of audio samples, the set of audio samples comprising a first number of audio samples, the audio samples being discrete and digitized amplitude data points; Determining a third threshold according to the quantization bit number of the amplitude fluctuation range of the first sound signal, wherein the third threshold is a signal amplitude upper limit value used for measuring clipping risks; obtaining a second number of target audio samples from the set of audio samples, the target audio samples having an amplitude greater than the third threshold; and calculating the ratio of the second quantity to the first quantity to obtain the clipping probability.
- 3. The electronic device of claim 1, wherein the controller is further configured to: If the signal strength is not greater than the first threshold value or the clipping probability is not greater than the second threshold value, calculating the voice probability that the first voice signal is a voice signal through a voice activity detection algorithm; Calculating a target gain based on the signal strength and the speech probability; and performing gain processing on the first sound signal based on the target gain, and controlling the audio output device to output the processed first sound signal.
- 4. The electronic device of claim 3, wherein the controller performs gain processing on the first sound signal based on the target gain, controls the audio output apparatus to output the processed first sound signal, and is specifically configured to: calculating a gain step for representing a gain variation amplitude every time gain processing is performed based on the target gain, the signal strength, and the speech probability; And performing gain processing on the first sound signal based on the gain step and the target gain.
- 5. The electronic device of claim 1, wherein prior to acquiring the signal strength of the first sound signal, the controller is further configured to: acquiring a voice mode of current operation, wherein the voice mode comprises a personal mode and a multi-person mode; If the current running voice mode is the personal mode, acquiring first voiceprint information corresponding to a speaker; Extracting second voice information corresponding to the current speaker from the first voice signal; and if the similarity between the second voiceprint information and the first voiceprint information is not greater than a fourth threshold, performing gain processing on the first sound signal based on the first gain, and controlling the audio output device to output the processed first sound signal.
- 6. The electronic device of claim 5, wherein the controller is further configured to: And if the current running voice mode is the multi-person mode or the similarity between the second voice print information and the first voice print information is larger than the fourth threshold value, executing the step of acquiring the signal strength of the first voice signal.
- 7. The electronic device of claim 5, wherein the controller is configured to obtain the first voiceprint information corresponding to the presenter if the currently operating voice mode is the personal mode, and is specifically configured to: A voiceprint registration prompt message is sent out, and the voiceprint registration prompt message is used for prompting the speaker to singly speak voice content with the duration not shorter than a first preset duration; acquiring a first voice signal acquired by the sound acquisition device; and extracting the first voiceprint information from the first voice signal and storing the first voiceprint information.
- 8. The electronic device of claim 5, wherein the controller is configured to obtain the first voiceprint information corresponding to the presenter if the currently operating voice mode is the personal mode, and is specifically configured to: identifying at least one human voice signal from the first voice signal within a second preset time period; and determining the voiceprint information extracted from the target voice signal with the maximum signal strength as the first voiceprint information.
- 9. A method for automatic gain control of a signal, comprising: After a first sound signal acquired by a sound acquisition device based on first acquisition volume is acquired, acquiring the signal intensity of the first sound signal; if the signal strength is greater than a first threshold, calculating clipping probability of clipping of the first sound signal; If the clipping probability is larger than a second threshold, calculating a target acquisition volume according to the first acquisition volume, an acquisition volume adjustable range supported by the sound collector and the clipping probability, and adjusting the acquisition volume of the sound collector to the target acquisition volume; After the second sound signal acquired by the sound acquirer based on the target acquisition volume is acquired, gain processing is performed on the second sound signal based on the current first gain, and the audio output device is controlled to output the processed second sound signal.
- 10. The method of claim 9, wherein the step of calculating clipping probabilities if the signal strength is greater than a first threshold value comprises: Obtaining a set of audio samples, the set of audio samples comprising a first number of audio samples, the audio samples being discrete and digitized amplitude data points; Determining a third threshold according to the quantization bit number of the amplitude fluctuation range of the first sound signal, wherein the third threshold is a signal amplitude upper limit value used for measuring clipping risks; obtaining a second number of target audio samples from the set of audio samples, the target audio samples having an amplitude greater than the third threshold; and calculating the ratio of the second quantity to the first quantity to obtain the clipping probability.
Description
Electronic equipment and signal automatic gain control method Technical Field The present application relates to the field of speech processing technologies, and in particular, to an electronic device and a signal automatic gain control method. Background The electronic device may collect the voice signal through a sound collector (e.g., a microphone array) and perform gain processing on the voice signal, thereby adjusting the amplitude of the voice signal to improve the auditory comfort and improve the voice playing quality. Factors such as the volume of the user's voice and the distance of the user from the sound collector affect the quality of the voice signal. For example, a user "breaking down" or a user's mouth being too close to the microphone may result in clipping of the speech signal, which cannot be eliminated by conventional automatic gain control, which may affect the acoustic characteristics and quality of the speech signal, resulting in speech understanding errors or auditory perception discomfort. Disclosure of Invention Some embodiments of the present application provide an electronic device and a signal automatic gain control method, which automatically perform clipping detection when the intensity of a sound signal is too high, and automatically adapt and adjust the collection volume of a front-end sound collector based on the clipping probability, the current first collection volume of the sound collector, and the collection volume adjustable range supported by the performance of the sound collector, so as to eliminate the clipping problem of the sound signal. In a first aspect, some embodiments of the present application provide an electronic device, including: a sound collector configured to collect sound signals; an audio output device configured to output a sound signal; a controller coupled with the sound collector and the audio output device, the controller configured to: after a first sound signal acquired by the sound collector based on a first acquisition volume is acquired, acquiring the signal intensity of the first sound signal; if the signal strength is greater than a first threshold, calculating clipping probability of clipping of the first sound signal; If the clipping probability is larger than a second threshold, calculating a target acquisition volume according to the first acquisition volume, an acquisition volume adjustable range supported by the sound collector and the clipping probability, and adjusting the acquisition volume of the sound collector to the target acquisition volume; After the second sound signal acquired by the sound acquirer based on the target acquisition volume is acquired, gain processing is performed on the second sound signal based on the current first gain, and the audio output device is controlled to output the processed second sound signal. The embodiment of the first aspect has the advantages that in the initial situation, the sound collector collects the sound signals with a first collection volume (first sound signals for short), the signal intensity of the first sound signals is obtained, if the signal intensity is larger than a first threshold value, the situation that the decibel of the first sound signals is too large is indicated, possibly due to the fact that the sound volume of a user is too large or is close to the sound collector, clipping probability is further calculated, the possibility of clipping of the first sound signals is measured through the clipping probability, if the clipping probability is larger than a second threshold value, it is determined that clipping problems exist in the first sound signals, clipping needs to be eliminated from the collection source of the sound signals, namely the collection volume used by the sound collector needs to be adjusted, the target collection volume is dynamically configured according to the collection volume of the first sound collector, the collection volume adjustable range supported by the hardware performance of the sound collector, and the clipping probability, the collection volume of the sound collector is adjusted to be the target collection volume, and the sound signals collected after the hardware gain processing of the sound collector are second sound signals. The embodiment realizes the dynamic and self-adaptive matching of the collection volume of the sound collector in the clipping scene, and eliminates the harshness and distortion of the output sound signal caused by the overload collection of the sound signal. The analog gain control of the front-end sound collector is scheduled from the hardware level, so that the analog gain acts on the originally collected sound signal, namely the amplitude of the second sound signal is adjusted appropriately, and the digital gain of the tail end does not need to be modified at the software level. In some embodiments of the first aspect, the controller is configured to calculate a clipping probability if the signal strength is