CN109887522B - Microphone array gain adjusting method and device and terminal equipment - Google Patents

Microphone array gain adjusting method and device and terminal equipment Download PDF

Info

Publication number
CN109887522B
CN109887522B CN201910077644.3A CN201910077644A CN109887522B CN 109887522 B CN109887522 B CN 109887522B CN 201910077644 A CN201910077644 A CN 201910077644A CN 109887522 B CN109887522 B CN 109887522B
Authority
CN
China
Prior art keywords
gain
voice
amplitude
preset
voice signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910077644.3A
Other languages
Chinese (zh)
Other versions
CN109887522A (en
Inventor
余超宝
王丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Weina Perception Computing Technology Co ltd
Original Assignee
Shenzhen Weina Perception Computing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Weina Perception Computing Technology Co ltd filed Critical Shenzhen Weina Perception Computing Technology Co ltd
Priority to CN201910077644.3A priority Critical patent/CN109887522B/en
Publication of CN109887522A publication Critical patent/CN109887522A/en
Application granted granted Critical
Publication of CN109887522B publication Critical patent/CN109887522B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Circuit For Audible Band Transducer (AREA)

Abstract

The application is applicable to the technical field of signal processing, and provides a method, a device and a terminal device for adjusting the gain of a microphone array, wherein the method comprises the following steps: acquiring a first gain of an analog-to-digital converter and a voice amplitude of a voice signal amplified by the analog-to-digital converter; judging whether a voice amplitude which is greater than a preset highest voice signal amplitude threshold value or less than a preset lowest voice signal amplitude threshold value exists; when a voice amplitude larger than a preset highest voice signal amplitude threshold exists, calculating a second gain according to the first gain and the maximum value in the voice amplitudes; when a voice amplitude smaller than a preset lowest voice signal amplitude threshold exists, calculating a second gain according to the minimum value of the first gain and the voice amplitude; the first gain of the analog-to-digital converter is updated to a second gain. The method and the device can solve the problems that the gain of an ADC is usually set to be a fixed value by the existing microphone array, the clipping phenomenon possibly occurs at the position of a wave crest, or the situation that the voice energy is too small to be identified occurs.

Description

Microphone array gain adjusting method and device and terminal equipment
Technical Field
The application belongs to the technical field of signal processing, and particularly relates to a microphone array gain adjusting method, a microphone array gain adjusting device and terminal equipment.
Background
Along with the development of the AI intelligent voice product, the AI intelligent voice product is more and more concerned by families, and simultaneously, the problems of more and more AI intelligent voice products need to be optimized and solved.
In all AI intelligent voice products, a microphone array technology is used to collect and process voice information in an environment, and since the energy value of voice signals collected by microphones is relatively small, for the convenience of back-end processing, an ADC (Analog-to-Digital Converter) is usually used to amplify and perform Analog-to-Digital conversion on the voice signals collected by the microphones.
At present, the gain of an ADC is usually set to a fixed value in a microphone array, and a speech signal acquired by the microphone array is amplified according to a fixed proportion, but when the gain of the microphone array is fixed, if a sound source is too close to the microphone or the energy of the speech signal is large, a clipping phenomenon is easily generated at a peak position, if the sound source is too far from the microphone or the energy of the speech signal is small, the amplitude of the acquired speech signal is small, meanwhile, the speech signal-to-noise ratio is small, the accuracy of the acquired speech signal is affected, and a situation that the speech signal is too small and cannot be identified may occur in a subsequent processing process.
In summary, the gain of the ADC of the conventional microphone array is usually set to a fixed value, and a clipping phenomenon may occur at a peak position because a sound source is too close to the microphone or the energy of a voice signal is large, or a situation that the voice energy is too small to be identified because the sound source is too far away from the microphone or the energy of the voice signal is small may occur.
Disclosure of Invention
In view of this, embodiments of the present application provide a method and an apparatus for adjusting a gain of a microphone array, and a terminal device, so as to solve the problem that the existing microphone array usually sets the gain of an ADC to a fixed value, and a clipping phenomenon may occur at a peak position because a sound source is too close to a microphone or the energy of a voice signal is large, or a situation that the voice energy is too small to be identified because the sound source is too far from the microphone or the energy of the voice signal is small occurs.
A first aspect of an embodiment of the present application provides a microphone array gain adjustment method, including:
acquiring a first gain of an analog-to-digital converter and a voice amplitude of a voice signal amplified by the analog-to-digital converter;
judging whether a voice amplitude which is greater than a preset highest voice signal amplitude threshold value or less than a preset lowest voice signal amplitude threshold value exists;
when a voice amplitude larger than a preset highest voice signal amplitude threshold exists, calculating a second gain according to the first gain and the maximum value in the voice amplitudes;
when a voice amplitude smaller than a preset lowest voice signal amplitude threshold exists, calculating a second gain according to the minimum value of the first gain and the voice amplitude;
updating the first gain of the analog-to-digital converter to the second gain.
A second aspect of an embodiment of the present application provides a microphone array gain adjustment apparatus, including:
the data acquisition module is used for acquiring a first gain of the analog-to-digital converter and a voice amplitude of a voice signal amplified by each microphone through the analog-to-digital converter;
the amplitude judgment module is used for judging whether a voice amplitude which is greater than a preset highest voice signal amplitude threshold value or less than a preset lowest voice signal amplitude threshold value exists or not;
the high-pitch adjusting module is used for calculating a second gain according to the first gain and the maximum value in the voice amplitude when the voice amplitude which is greater than the preset highest voice signal amplitude threshold exists;
the bass adjusting module is used for calculating a second gain according to the minimum value of the first gain and the voice amplitude when the voice amplitude smaller than a preset lowest voice signal amplitude threshold exists;
and the gain updating module is used for updating the first gain of the analog-to-digital converter to the second gain.
A third aspect of the embodiments of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, in which a computer program is stored, which, when executed by a processor, implements the steps of the method as described above.
Compared with the prior art, the embodiment of the application has the advantages that:
in the microphone array gain adjusting method, the gain of the analog-to-digital converter is dynamically adjusted, whether a voice amplitude which is larger than a preset highest voice signal amplitude threshold value or smaller than a preset lowest voice signal amplitude threshold value exists in the voice amplitudes of the voice signals amplified by the analog-to-digital converter or not is judged, when the voice amplitude which is larger than the preset highest voice signal amplitude threshold value exists, the situation that the voice energy cannot be identified due to the fact that the voice source is too far away from the microphone or the voice signal energy is small is indicated, a second gain is calculated according to the maximum value of the first gain and the voice amplitude, and when the voice amplitude which is smaller than the preset lowest voice signal amplitude threshold value exists, the situation that the voice energy cannot be identified due to the fact that the voice source is too far away from the microphone or the voice signal energy is small is indicated, the first gain is updated by the second gain, so that the purpose of reducing the voice amplitude or increasing the voice amplitude is achieved, the voice amplitudes of all voice signals are in a limited range, the phenomenon of clipping or the situation that the voice energy is too small to be identified is avoided, and the problem that the situation that the voice energy is too small to be identified is caused because the clipping phenomenon occurs at the position of a wave crest because the sound source is too close to the microphone or the voice signal energy is larger or the sound source is too far away from the microphone or the voice signal energy is smaller because the gain of the ADC is usually set to be a fixed value by the conventional microphone array is solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flow chart illustrating an implementation process of a gain adjustment method for a microphone array according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a microphone array gain adjustment apparatus according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a terminal device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In addition, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not intended to indicate or imply relative importance.
The first embodiment is as follows:
referring to fig. 1, a microphone array gain adjustment method according to an embodiment of the present invention is described as follows, where the microphone array gain adjustment method according to the embodiment of the present invention includes:
step S101, acquiring a first gain of an analog-to-digital converter and a voice amplitude of a voice signal amplified by the analog-to-digital converter;
when adjusting the gain of the adc, it is necessary to first obtain a current first gain of the adc and a speech amplitude of the speech signal amplified by the adc
Step S102, judging whether a voice amplitude which is larger than a preset highest voice signal amplitude threshold value or smaller than a preset lowest voice signal amplitude threshold value exists or not;
after the voice amplitude of the voice signal amplified by the analog-to-digital converter is obtained, whether the voice amplitude which is larger than a preset highest voice signal amplitude threshold or smaller than a preset lowest voice signal amplitude threshold exists or not is judged, the preset highest voice signal amplitude threshold and the preset lowest voice signal amplitude threshold are used as judgment conditions of gain adjustment, if the voice amplitude which is larger than the preset highest voice signal amplitude threshold or smaller than the preset lowest voice signal amplitude threshold exists, the gain adjustment is needed, and if the voice amplitude which is not larger than the preset highest voice signal amplitude threshold exists, the gain adjustment is not needed.
Step S103, when a voice amplitude larger than a preset highest voice signal amplitude threshold exists, calculating a second gain according to the first gain and the maximum value in the voice amplitudes;
when the voice amplitude value larger than the preset highest voice signal amplitude value threshold exists, it is indicated that at this time, a clipping phenomenon occurs at the peak position because the sound source is too close to the microphone or the voice signal energy is larger, therefore, a second gain needs to be calculated according to the maximum value of the first gain and the voice amplitude value, the voice amplitude value of each voice signal is reduced through the second gain, and the voice amplitude value of each voice signal is enabled to be in a proper amplitude value range through adjusting the gain.
Step S104, when a voice amplitude smaller than a preset lowest voice signal amplitude threshold exists, calculating a second gain according to the minimum value of the first gain and the voice amplitude;
when the voice amplitude smaller than the preset lowest voice signal amplitude threshold exists, it indicates that the situation that the voice energy is too small to be recognized possibly occurs because the sound source is too far away from the microphone or the voice signal energy is small at this time, therefore, a second gain needs to be calculated according to the minimum value of the first gain and the voice amplitude, the voice amplitude of each voice signal is improved through the second gain, and the voice amplitude of each voice signal is enabled to be in a proper amplitude range through adjusting the gain.
Step S105, updating the first gain of the analog-to-digital converter to the second gain.
After the second gain is obtained through calculation, the first gain of the analog-to-digital converter is updated to the second gain, and the analog-to-digital converter can amplify signals according to the second gain, so that the voice amplitude of the amplified voice signals is within a proper amplitude range, the situation that the voice amplitude is clipped or the voice energy is too small to be identified is avoided, and the voice signals acquired by the microphone array are ensured to be in an identifiable but undistorted state.
When the gain adjustment is performed, a gain adjustment period may be set, and the gain adjustment is performed at preset time intervals to ensure dynamic update of the gain of the analog-to-digital converter, for example, the gain adjustment may be set at intervals of 0.05s to ensure real-time tracking and update of the gain of the analog-to-digital converter.
In the process of gain adjustment, gain adjustment can be performed according to the ratio of the preset tuning amplitude to the voice amplitude, and feedback adjustment can also be performed according to the difference value of the preset tuning amplitude and the voice amplitude.
When gain adjustment is performed according to a ratio of a preset tuning amplitude value to a voice amplitude value, and when a voice amplitude value larger than a preset highest voice signal amplitude value threshold exists, calculating a second gain according to a maximum value of the first gain and the voice amplitude value specifically includes:
a1, when a voice amplitude larger than a preset highest voice signal amplitude threshold exists, calculating a first ratio of a first preset tuning amplitude to the maximum value in the voice amplitudes;
when the voice amplitude value larger than the preset highest voice signal amplitude value threshold exists, the fact that the distance between a possible sound source and a microphone is too close or the voice signal energy is larger at the moment is indicated, the gain of the analog-to-digital converter needs to be reduced, and a first ratio of the first preset tuning amplitude value to the maximum value in the voice amplitude value is calculated.
The first preset tuning amplitude value may be set according to an actual situation, for example, the first preset tuning amplitude value may be set as a preset maximum speech signal amplitude threshold value, or may be set as another value that does not cause a clipping phenomenon.
And A2, multiplying the first gain by the first ratio to obtain a second gain.
And multiplying the first gain by the first ratio to obtain a second gain, wherein when the analog-to-digital converter amplifies the signal by using the second gain, the voice amplitude of each voice signal can be smaller than or equal to the first preset tuning amplitude, and the clipping phenomenon is avoided.
Further, when there is a speech amplitude smaller than a preset lowest speech signal amplitude threshold, calculating a second gain according to the minimum value of the first gain and the speech amplitude specifically includes:
b1, when a voice amplitude smaller than a preset lowest voice signal amplitude threshold exists, calculating a second ratio of a second preset tuning amplitude to the minimum value in the voice amplitudes;
when the voice amplitude smaller than the preset lowest voice signal amplitude threshold exists, the situation that the voice energy is too small to be recognized possibly occurs because the sound source is too far away from the microphone or the voice signal energy is small at the moment is shown, the gain of the analog-to-digital converter needs to be increased, and a second ratio of a second preset tuning amplitude to the minimum value in the voice amplitudes is calculated.
The second preset tuning amplitude value can be set according to actual conditions, for example, the first preset tuning amplitude value can be set as a preset minimum voice signal amplitude threshold value, and also can be set as other amplitude values easy to recognize.
And B2, multiplying the first gain by the second ratio to obtain a second gain.
And multiplying the first gain by a second ratio to obtain a second gain, wherein when the analog-to-digital converter amplifies signals by using the second gain, the voice amplitude of each voice signal can be larger than or equal to a first preset tuning amplitude, and the situation that the voice amplitude is too small to be identified is avoided.
When feedback adjustment is performed according to a difference value between a preset tuning amplitude value and a voice amplitude value, and when a voice amplitude value larger than a preset highest voice signal amplitude value threshold exists, calculating a second gain according to a maximum value of the first gain and the voice amplitude value specifically includes:
c1, when a voice amplitude larger than a preset highest voice signal amplitude threshold exists, calculating a first difference value between a third preset tuning amplitude and the maximum value in the voice amplitude;
in the feedback adjustment process, adjustment and feedback need to be performed according to the difference between the ideal value and the actual value as an adjustment quantity, so that when a voice amplitude greater than a preset highest voice signal amplitude threshold exists, a first difference between a third preset tuning amplitude and the maximum value of the voice amplitudes is calculated first, and the first difference is used as the adjustment quantity.
The third preset tuning amplitude value may be set according to an actual situation, for example, the third preset tuning amplitude value may be set as a preset maximum speech signal amplitude threshold value, or may be set as another value that does not cause a clipping phenomenon.
C2, inputting the first difference value into a first preset transfer function, and calculating a first gain variable;
the first difference is input into a first preset transfer function to calculate a first gain variable, and the first preset transfer function may be set according to actual conditions, for example, may be set as one or a combination of a plurality of proportional elements, integral elements, and differential elements.
And C3, adding the first gain and the first gain variable to obtain a second gain.
And adding the first gain and the first gain variable to obtain a second gain, wherein the second gain is smaller than the first gain, so that the voice amplitude of each voice signal can be reduced, and the clipping phenomenon is avoided.
Further, when there is a speech amplitude smaller than a preset lowest speech signal amplitude threshold, calculating a second gain according to the minimum value of the first gain and the speech amplitude specifically includes:
d1, when a voice amplitude smaller than the preset lowest voice signal amplitude threshold exists, calculating a second difference value between a fourth preset tuning amplitude and the minimum value of the voice amplitudes;
when the voice amplitude smaller than the preset lowest voice signal amplitude threshold exists, a second difference value of a fourth preset tuning amplitude and the minimum value of the voice amplitude is calculated, and the second difference value is used as the adjustment quantity.
D2, inputting the second difference value into a second preset transfer function, and calculating a second gain variable;
the second difference is input into a second preset transfer function to calculate the first gain variable, and the second preset transfer function may be set according to actual conditions, for example, may be set as one or a combination of a plurality of proportional elements, integral elements, and differential elements.
And D3, adding the first gain and the second gain variable to obtain a second gain.
And adding the first gain and the second gain variable to obtain a second gain, wherein the second gain is larger than the first gain, so that the voice amplitude of each voice signal can be increased, and the condition that the voice energy is too small to be identified is avoided.
In the microphone array gain adjustment method provided by this embodiment, the gain of the analog-to-digital converter is dynamically adjusted, so as to achieve the purpose of reducing the speech amplitude or increasing the speech amplitude according to the actual situation, so that the speech amplitude of each speech signal is within a limited range, thereby avoiding the situation that the clipping phenomenon occurs or the speech energy is too small to be recognized, and solving the problem that the existing microphone array usually sets the gain of the ADC as a fixed value, and the clipping phenomenon occurs at the peak position because the sound source is too close to the microphone or the speech signal energy is too large, or the situation that the speech energy is too small to be recognized because the sound source is too far from the microphone or the speech signal energy is small.
The gain adjustment mode can be set according to actual conditions, for example, the gain adjustment mode can be set to gain adjustment according to a ratio of preset tuning amplitude to voice amplitude, and also can be set to feedback adjustment according to a difference between the preset tuning amplitude and voice reproduction.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Example two:
the second embodiment of the present application provides a microphone array gain adjustment device, which is only shown in relevant parts for the purpose of illustration, as shown in fig. 2, the microphone array gain adjustment device includes,
the data acquisition module 201 is configured to acquire a first gain of an analog-to-digital converter and a voice amplitude of a voice signal amplified by each microphone through the analog-to-digital converter;
an amplitude determination module 202, configured to determine whether a voice amplitude greater than a preset highest voice signal amplitude threshold or smaller than a preset lowest voice signal amplitude threshold exists;
the high pitch adjusting module 203 is configured to, when a voice amplitude greater than a preset highest voice signal amplitude threshold exists, calculate a second gain according to a maximum value of the first gain and the voice amplitude;
the bass adjusting module 204 is configured to, when a voice amplitude smaller than a preset lowest voice signal amplitude threshold exists, calculate a second gain according to a minimum value of the first gain and the voice amplitude;
a gain updating module 205, configured to update the first gain of the analog-to-digital converter to the second gain.
Further, the treble adjusting module 203 specifically includes:
the first ratio submodule is used for calculating a first ratio of a first preset tuning amplitude to the maximum value in the voice amplitudes when the voice amplitudes larger than the preset highest voice signal amplitude threshold exist;
and the first calculation submodule is used for multiplying the first gain by the first ratio to obtain a second gain.
Further, the bass adjustment module 204 specifically includes:
the second ratio submodule is used for calculating a second ratio of a second preset tuning amplitude to the minimum value in the voice amplitudes when the voice amplitudes smaller than the preset lowest voice signal amplitude threshold exist;
and the second calculation submodule is used for multiplying the first gain by the second ratio to obtain a second gain.
Further, the treble adjusting module 203 specifically includes:
the first difference submodule is used for calculating a first difference between a third preset tuning amplitude and the maximum value in the voice amplitudes when the voice amplitudes larger than the preset highest voice signal amplitude threshold exist;
the first variable submodule is used for inputting the first difference value into a first preset transfer function and calculating a first gain variable;
and the third calculation submodule is used for adding the first gain and the first gain variable to obtain a second gain.
Further, the bass adjustment module 204 specifically includes:
the second difference submodule is used for calculating a second difference value of a fourth preset tuning amplitude and the minimum value in the voice amplitude when the voice amplitude smaller than the preset lowest voice signal amplitude threshold exists;
the second variable submodule is used for inputting the second difference value into a second preset transfer function and calculating a second gain variable;
and the fourth calculation submodule is used for adding the first gain and the second gain variable to obtain a second gain.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
Example three:
fig. 3 is a schematic diagram of a terminal device provided in the third embodiment of the present application. As shown in fig. 3, the terminal device 3 of this embodiment includes: a processor 30, a memory 31 and a computer program 32 stored in said memory 31 and executable on said processor 30. The processor 30, when executing the computer program 32, implements the steps in the above-described embodiment of the microphone array gain adjustment method, such as the steps S101 to S105 shown in fig. 1. Alternatively, the processor 30, when executing the computer program 32, implements the functions of each module/unit in the above-mentioned device embodiments, for example, the functions of the modules 201 to 205 shown in fig. 2.
Illustratively, the computer program 32 may be partitioned into one or more modules/units that are stored in the memory 31 and executed by the processor 30 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 32 in the terminal device 3. For example, the computer program 32 may be divided into a data acquisition module, an amplitude determination module, a treble adjustment module, a bass adjustment module, and a gain update module, and the specific functions of each module are as follows:
the data acquisition module is used for acquiring a first gain of the analog-to-digital converter and a voice amplitude of a voice signal amplified by each microphone through the analog-to-digital converter;
the amplitude judgment module is used for judging whether a voice amplitude which is greater than a preset highest voice signal amplitude threshold value or less than a preset lowest voice signal amplitude threshold value exists or not;
the high-pitch adjusting module is used for calculating a second gain according to the first gain and the maximum value in the voice amplitude when the voice amplitude which is greater than the preset highest voice signal amplitude threshold exists;
the bass adjusting module is used for calculating a second gain according to the minimum value of the first gain and the voice amplitude when the voice amplitude smaller than a preset lowest voice signal amplitude threshold exists;
and the gain updating module is used for updating the first gain of the analog-to-digital converter to the second gain.
The terminal device 3 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 30, a memory 31. It will be understood by those skilled in the art that fig. 3 is only an example of the terminal device 3, and does not constitute a limitation to the terminal device 3, and may include more or less components than those shown, or combine some components, or different components, for example, the terminal device may also include an input-output device, a network access device, a bus, etc.
The Processor 30 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 31 may be an internal storage unit of the terminal device 3, such as a hard disk or a memory of the terminal device 3. The memory 31 may also be an external storage device of the terminal device 3, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the terminal device 3. The memory 31 is used for storing the computer program and other programs and data required by the terminal device. The memory 31 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (4)

1. A microphone array gain adjustment method, comprising:
acquiring a first gain of an analog-to-digital converter and a voice amplitude of a voice signal amplified by the analog-to-digital converter;
judging whether a voice amplitude which is greater than a preset highest voice signal amplitude threshold value or less than a preset lowest voice signal amplitude threshold value exists;
when a voice amplitude larger than a preset highest voice signal amplitude threshold exists, calculating a second gain according to the first gain and the maximum value in the voice amplitudes;
when a voice amplitude smaller than a preset lowest voice signal amplitude threshold exists, calculating a second gain according to the minimum value of the first gain and the voice amplitude;
updating the first gain of the analog-to-digital converter to the second gain;
when the voice amplitude greater than the preset highest voice signal amplitude threshold exists, calculating a second gain according to the maximum value of the first gain and the voice amplitude specifically includes:
when a voice amplitude larger than a preset highest voice signal amplitude threshold exists, calculating a first difference value between a third preset tuning amplitude and the maximum value in the voice amplitude;
inputting the first difference value into a first preset transfer function, and calculating a first gain variable, wherein the first preset transfer function is a combination of proportion, integral and differential;
adding the first gain and the first gain variable to obtain a second gain;
when a voice amplitude smaller than a preset lowest voice signal amplitude threshold exists, calculating a second gain according to the minimum value of the first gain and the voice amplitude specifically comprises:
when a voice amplitude smaller than a preset lowest voice signal amplitude threshold exists, calculating a second difference value between a fourth preset tuning amplitude and the minimum value of the voice amplitudes;
inputting the second difference value into a second preset transfer function, and calculating a second gain variable, wherein the second preset transfer function is a combination of proportion, integral and differential;
and adding the first gain and the second gain variable to obtain a second gain.
2. A microphone array gain adjustment apparatus, comprising:
the data acquisition module is used for acquiring a first gain of the analog-to-digital converter and a voice amplitude of a voice signal amplified by each microphone through the analog-to-digital converter;
the amplitude judgment module is used for judging whether a voice amplitude which is greater than a preset highest voice signal amplitude threshold value or less than a preset lowest voice signal amplitude threshold value exists or not;
the high-pitch adjusting module is used for calculating a second gain according to the first gain and the maximum value in the voice amplitude when the voice amplitude which is greater than the preset highest voice signal amplitude threshold exists;
the bass adjusting module is used for calculating a second gain according to the minimum value of the first gain and the voice amplitude when the voice amplitude smaller than a preset lowest voice signal amplitude threshold exists;
a gain updating module for updating the first gain of the analog-to-digital converter to the second gain;
the high pitch adjustment module includes:
the first difference submodule is used for calculating a first difference between a third preset tuning amplitude and the maximum value in the voice amplitudes when the voice amplitudes larger than the preset highest voice signal amplitude threshold exist;
the first variable submodule is used for inputting the first difference into a first preset transfer function and calculating a first gain variable, wherein the first preset transfer function is a combination of proportion, integral and differential;
a third calculation submodule, configured to add the first gain and the first gain variable to obtain a second gain;
the bass adjustment module includes:
the second difference submodule is used for calculating a second difference value of a fourth preset tuning amplitude and the minimum value in the voice amplitude when the voice amplitude smaller than the preset lowest voice signal amplitude threshold exists;
the second variable submodule is used for inputting the second difference value into a second preset transfer function and calculating a second gain variable, wherein the second preset transfer function is a combination of proportion, integral and differential;
and the fourth calculation submodule is used for adding the first gain and the second gain variable to obtain a second gain.
3. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method as claimed in claim 1 when executing the computer program.
4. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method as set forth in claim 1.
CN201910077644.3A 2019-01-24 2019-01-24 Microphone array gain adjusting method and device and terminal equipment Active CN109887522B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910077644.3A CN109887522B (en) 2019-01-24 2019-01-24 Microphone array gain adjusting method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910077644.3A CN109887522B (en) 2019-01-24 2019-01-24 Microphone array gain adjusting method and device and terminal equipment

Publications (2)

Publication Number Publication Date
CN109887522A CN109887522A (en) 2019-06-14
CN109887522B true CN109887522B (en) 2021-05-04

Family

ID=66927125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910077644.3A Active CN109887522B (en) 2019-01-24 2019-01-24 Microphone array gain adjusting method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN109887522B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110648678B (en) * 2019-09-20 2022-04-22 厦门亿联网络技术股份有限公司 Scene identification method and system for conference with multiple microphones
CN111161750B (en) * 2019-12-13 2022-09-06 西安讯飞超脑信息科技有限公司 Voice processing method and related device
CN111417053B (en) 2020-03-10 2023-07-25 北京小米松果电子有限公司 Sound pickup volume control method, sound pickup volume control device and storage medium
CN113748688A (en) * 2020-06-10 2021-12-03 深圳市大疆创新科技有限公司 Recording method, device and chip for unmanned aerial vehicle, unmanned aerial vehicle and system
CN111935572B (en) * 2020-07-02 2022-07-05 浙江大华技术股份有限公司 Audio signal adjusting circuit, method, electronic equipment and storage medium
CN112333606B (en) * 2020-10-21 2022-03-25 浙江华创视讯科技有限公司 Microphone gain abnormity adjusting method and device
CN116153321B (en) * 2023-04-19 2023-07-14 中国传媒大学 Sound processing operation server and sound processing operation method suitable for audio system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090163153A1 (en) * 2005-08-29 2009-06-25 Kyocera Corporation Wireless Communication System, Wireless Communication Apparatus, Amplification Factor Determination Method, and Storage Medium
US7908134B1 (en) * 2006-07-26 2011-03-15 Starmark, Inc. Automatic volume control to compensate for speech interference noise
US20120050087A1 (en) * 2010-08-24 2012-03-01 Yasunori Aoki Ad converter and ad converter circuit voltage control method
JP2013141101A (en) * 2011-12-28 2013-07-18 Icom Inc Signal processing apparatus, signal processing method and program
CN103840863A (en) * 2012-11-23 2014-06-04 京信通信系统(中国)有限公司 Automatic gain control method and device having temperature compensation function, and digital communication system having temperature compensation function
CN103916797A (en) * 2014-04-04 2014-07-09 安徽森力汽车电子有限公司 Vehicle-mounted audible device
CN106791280A (en) * 2017-02-20 2017-05-31 上海顺久电子科技有限公司 The method and apparatus for determining gain and side-play amount and its corresponding relation in ADC

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7088794B2 (en) * 2002-02-19 2006-08-08 The United States Of America As Represented By The Secretary Of The Navy Automatic gain control for digitized RF signal processing
KR20050090283A (en) * 2004-03-08 2005-09-13 엘지전자 주식회사 Method for adjusting gain of down-loaded music file
CN101567672B (en) * 2009-05-15 2013-04-17 杭州华三通信技术有限公司 Method and system for acquiring gain
KR101726738B1 (en) * 2010-12-01 2017-04-13 삼성전자주식회사 Sound processing apparatus and sound processing method
CN102638746B (en) * 2012-04-26 2014-04-16 中国科学院微电子研究所 Analog front-end circuit with low power consumption for medical equipment
GB2506458B (en) * 2013-01-15 2015-01-14 Imagination Tech Ltd Method and circuit for controlling an automatic gain control circuit
TWI545556B (en) * 2013-10-02 2016-08-11 宏達國際電子股份有限公司 Electronic device and gain controlling method
JP2015149609A (en) * 2014-02-06 2015-08-20 株式会社東芝 Receiver and reception method
CN106714038B (en) * 2016-12-27 2019-07-26 维沃移动通信有限公司 A kind of control method and mobile terminal of sound intensity
CN107659279B (en) * 2017-09-30 2023-10-27 浙江芯劢微电子股份有限公司 Audio automatic gain control method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090163153A1 (en) * 2005-08-29 2009-06-25 Kyocera Corporation Wireless Communication System, Wireless Communication Apparatus, Amplification Factor Determination Method, and Storage Medium
US7908134B1 (en) * 2006-07-26 2011-03-15 Starmark, Inc. Automatic volume control to compensate for speech interference noise
US20120050087A1 (en) * 2010-08-24 2012-03-01 Yasunori Aoki Ad converter and ad converter circuit voltage control method
JP2013141101A (en) * 2011-12-28 2013-07-18 Icom Inc Signal processing apparatus, signal processing method and program
CN103840863A (en) * 2012-11-23 2014-06-04 京信通信系统(中国)有限公司 Automatic gain control method and device having temperature compensation function, and digital communication system having temperature compensation function
CN103916797A (en) * 2014-04-04 2014-07-09 安徽森力汽车电子有限公司 Vehicle-mounted audible device
CN106791280A (en) * 2017-02-20 2017-05-31 上海顺久电子科技有限公司 The method and apparatus for determining gain and side-play amount and its corresponding relation in ADC

Also Published As

Publication number Publication date
CN109887522A (en) 2019-06-14

Similar Documents

Publication Publication Date Title
CN109887522B (en) Microphone array gain adjusting method and device and terminal equipment
CN108733342B (en) Volume adjusting method, mobile terminal and computer readable storage medium
CN110673096B (en) Voice positioning method and device, computer readable storage medium and electronic equipment
CN112703781B (en) Wireless signal sending method, wireless signal sending device and terminal equipment
CN105553434A (en) Intelligent terminal audio control method and system and intelligent terminal
CN115616266B (en) Waveform amplitude value measuring method and device, terminal equipment and storage medium
CN112652320A (en) Sound source positioning method and device, computer readable storage medium and electronic equipment
US9154096B2 (en) Apparatus and method for controlling sound output
CN113613123A (en) Audio data processing method and device, earphone and storage medium
WO2023143544A1 (en) Voice control method and apparatus, device, medium, and intelligent voice acquisition system
CN112217486A (en) Audio playing control method and system, electronic equipment and storage medium
CN112420066A (en) Noise reduction method, noise reduction device, computer equipment and computer readable storage medium
EP3057344B1 (en) Sound field measurement device, sound field measurement method, and sound field measurement program
CN113613144B (en) Temperature compensation method, device, playing equipment and readable storage medium
CN115097196A (en) Output voltage acquisition method and analog-to-digital conversion circuit of digital arc welding power supply
US20190245522A1 (en) Method and device for adjusting passband width of filter
CN112837695A (en) Filtering method, filtering device, filtering terminal and storage medium
JP2024503917A (en) Motor, its harmonic noise optimization method, and device
CN113055329B (en) Variable parameter nonlinear companding peak-to-average power ratio restraining method and device
CN111968620B (en) Algorithm testing method and device, electronic equipment and storage medium
CN112929803B (en) Microphone gain adjustment method and related device
CN116388696B (en) Noise signal generation method and device
CN111669104B (en) Motor driving method, device, terminal and storage medium
CN116343812B (en) Voice processing method
CN117912462A (en) Voice gain control method, device, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information

Inventor after: Wang Dan

Inventor after: Yu Chaobao

Inventor before: Yu Chaobao

Inventor before: Wang Dan

CB03 Change of inventor or designer information