CN109584901B - Emergency broadcast audio processing method and device - Google Patents

Emergency broadcast audio processing method and device Download PDF

Info

Publication number
CN109584901B
CN109584901B CN201910090162.1A CN201910090162A CN109584901B CN 109584901 B CN109584901 B CN 109584901B CN 201910090162 A CN201910090162 A CN 201910090162A CN 109584901 B CN109584901 B CN 109584901B
Authority
CN
China
Prior art keywords
amplitude
value
interval
gain
analog
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
CN201910090162.1A
Other languages
Chinese (zh)
Other versions
CN109584901A (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.)
Chengdu Dexin Digital Technology Co ltd
Original Assignee
Chengdu Dexin Digital 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 Chengdu Dexin Digital Technology Co ltd filed Critical Chengdu Dexin Digital Technology Co ltd
Priority to CN201910090162.1A priority Critical patent/CN109584901B/en
Publication of CN109584901A publication Critical patent/CN109584901A/en
Application granted granted Critical
Publication of CN109584901B publication Critical patent/CN109584901B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Processing of the speech or voice signal to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/02Speech enhancement, e.g. noise reduction or echo cancellation
    • G10L21/0316Speech enhancement, e.g. noise reduction or echo cancellation by changing the amplitude
    • G10L21/0324Details of processing therefor
    • G10L21/034Automatic adjustment
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/10Calibration or testing
    • H03M1/1009Calibration
    • H03M1/1028Calibration at two points of the transfer characteristic, i.e. by adjusting two reference values, e.g. offset and gain error
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/12Analogue/digital converters
    • H03M1/124Sampling or signal conditioning arrangements specially adapted for A/D converters
    • H03M1/1245Details of sampling arrangements or methods

Abstract

The embodiment of the invention relates to the technical field of signal processing, in particular to an emergency broadcast audio processing method and device.

Description

Emergency broadcast audio processing method and device
Technical Field
The embodiment of the invention relates to the technical field of signal processing, in particular to an emergency broadcast audio processing method and device.
Background
The emergency broadcast is a rapid and fast information transmission channel which can be provided when sudden public crisis such as serious natural disaster, sudden event, public health and social security occurs. The emergency broadcast can transmit disaster information or possible damage caused by the disaster to people at the first time, so that people can know what happens at the first time, how to evacuate and avoid risks, and the loss of lives and properties is reduced to the minimum.
Emergency broadcasts can receive a variety of audio inputs, such as line audio inputs, microphone audio inputs, and cable telephone audio inputs, but most emergency broadcast systems have difficulty playing these audio inputs efficiently and with high quality.
Disclosure of Invention
In view of this, the present invention provides an emergency broadcast audio processing method and apparatus.
The embodiment of the invention provides an emergency broadcast audio processing method which is applied to a server side, wherein the server side is in communication connection with an analog-to-digital converter, and the method comprises the following steps:
controlling the analog-to-digital converter to receive an audio signal in real time;
enabling the analog-to-digital converter to convert the audio signal into a plurality of digital signals according to a set sampling rate;
acquiring the amplitude of each digital signal;
judging whether the amplitude is positioned outside a set amplitude interval or not for each acquired amplitude, judging whether each amplitude in a set time length with the moment of acquiring the amplitude as a starting point is positioned outside the set amplitude interval or not if the amplitude is positioned outside the set amplitude interval, and adjusting the gain of the analog-to-digital converter according to a set gain increment until at least one target amplitude positioned in the set amplitude interval exists in the set time length if each amplitude in the set time length is positioned outside the set amplitude interval; and the target amplitude is the amplitude corresponding to the digital signal converted by the analog-to-digital converter after the gain adjustment.
Optionally, the step of determining whether each amplitude value within a set time period starting from the time when the amplitude value is obtained is located outside the set amplitude value interval, and if each amplitude value within the set time period is located outside the set amplitude value interval, adjusting the gain of the analog-to-digital converter according to a set gain increment until at least one target amplitude value within the set amplitude value interval exists within the set time period includes:
judging whether each amplitude value in a first set time length with the moment of obtaining the amplitude value as a starting point is lower than a first set value or not;
if each amplitude value in the first set time length is lower than the first set value, accumulating the gain of the analog-to-digital converter according to a first set gain increment until at least one first target amplitude value which is not lower than the first set value exists in the first set time length; the first target amplitude is an amplitude corresponding to a digital signal obtained by conversion of an analog-to-digital converter after gain accumulation, and the first set value is a lower limit value of the set amplitude interval.
Optionally, the step of determining whether each amplitude value within a set time period starting from the time when the amplitude value is obtained is located outside the set amplitude value interval, and if each amplitude value within the set time period is located outside the set amplitude value interval, adjusting the gain of the analog-to-digital converter according to a set gain increment until at least one target amplitude value within the set amplitude value interval exists within the set time period includes:
judging whether each amplitude value in a second set time length with the moment of obtaining the amplitude value as a starting point reaches a second set value or not;
if each amplitude value in the second set time period reaches the second set value, accumulating and reducing the gain of the analog-to-digital converter according to a second set gain increment until at least one second target amplitude value which does not reach the second set value exists in the second set time period; the second target amplitude is an amplitude corresponding to a digital signal obtained by conversion of the analog-to-digital converter after gain accumulation and subtraction, and the second set value is an upper limit value of the set amplitude interval.
Optionally, the method further comprises:
acquiring a modification instruction for modifying the first set gain increment, and analyzing to obtain a first target gain increment included in the modification instruction;
acquiring an interval length value of the set amplitude interval;
and judging whether the first target gain increment reaches the interval length value, if so, refusing to execute the modification instruction, and if not, modifying the first set gain increment to the first target gain increment according to the modification instruction.
Optionally, the step of obtaining the interval length value of the set amplitude interval includes:
acquiring the amplitude at one endpoint of the set amplitude interval and using the amplitude as a first set value, and acquiring the amplitude at the other endpoint of the set amplitude interval and using the amplitude as a second set value;
calculating an absolute value of a difference between the first set value and the second set value;
and taking the absolute value as the length value of the interval and obtaining the length value.
The embodiment of the invention also provides an emergency broadcast audio processing device, which is applied to a server side, wherein the server side is in communication connection with an analog-to-digital converter, and the device comprises:
the audio signal receiving module is used for controlling the analog-to-digital converter to receive the audio signal in real time;
the digital signal acquisition module is used for enabling the analog-to-digital converter to convert the audio signals into a plurality of digital signals according to a set sampling rate;
the amplitude acquisition module is used for acquiring the amplitude of each digital signal;
a gain adjustment module, configured to determine, for each obtained amplitude, whether the amplitude is outside a set amplitude interval, determine, if the amplitude is outside the set amplitude interval, whether each amplitude within a set time period starting from a time at which the amplitude is obtained is outside the set amplitude interval, and adjust, if each amplitude within the set time period is outside the set amplitude interval, a gain of the analog-to-digital converter according to a set gain increment until at least one target amplitude within the set amplitude interval exists within the set time period; and the target amplitude is the amplitude corresponding to the digital signal converted by the analog-to-digital converter after the gain adjustment.
Optionally, the gain adjustment module determines whether each amplitude value in a set duration starting from the time when the amplitude value is obtained is located outside the set amplitude value interval, and if each amplitude value in the set duration is located outside the set amplitude value interval, adjusts the gain of the analog-to-digital converter according to a set gain increment until at least one target amplitude value in the set amplitude value interval exists in the set duration by:
judging whether each amplitude value in a first set time length with the moment of obtaining the amplitude value as a starting point is lower than a first set value or not;
if each amplitude value in the first set time length is lower than the first set value, accumulating the gain of the analog-to-digital converter according to a first set gain increment until at least one first target amplitude value which is not lower than the first set value exists in the first set time length; the first target amplitude is an amplitude corresponding to a digital signal obtained by conversion of an analog-to-digital converter after gain accumulation, and the first set value is a lower limit value of the set amplitude interval.
Optionally, the gain adjustment module determines whether each amplitude value in a set duration starting from the time when the amplitude value is obtained is located outside the set amplitude value interval, and if each amplitude value in the set duration is located outside the set amplitude value interval, adjusts the gain of the analog-to-digital converter according to a set gain increment until at least one target amplitude value in the set amplitude value interval exists in the set duration by:
judging whether each amplitude value in a second set time length with the moment of obtaining the amplitude value as a starting point reaches a second set value or not;
if each amplitude value in the second set time period reaches the second set value, accumulating and reducing the gain of the analog-to-digital converter according to a second set gain increment until at least one second target amplitude value which does not reach the second set value exists in the second set time period; the second target amplitude is an amplitude corresponding to a digital signal obtained by conversion of the analog-to-digital converter after gain accumulation and subtraction, and the second set value is an upper limit value of the set amplitude interval.
Optionally, the apparatus further comprises:
the modification module is used for acquiring a modification instruction for modifying the first set gain increment, and analyzing and acquiring a first target gain increment included in the modification instruction; acquiring an interval length value of the set amplitude interval; and judging whether the first target gain increment reaches the interval length value, if so, refusing to execute the modification instruction, and if not, modifying the first set gain increment to the first target gain increment according to the modification instruction.
Optionally, the modification module obtains the interval length value of the set amplitude interval by:
acquiring the amplitude at one endpoint of the set amplitude interval and using the amplitude as a first set value, and acquiring the amplitude at the other endpoint of the set amplitude interval and using the amplitude as a second set value;
calculating an absolute value of a difference between the first set value and the second set value;
and taking the absolute value as the length value of the interval and obtaining the length value.
The embodiment of the invention also provides a server, which comprises a memory, a processor and a computer program which is stored on the memory and can be run on the processor, wherein when the processor executes the computer program, the emergency broadcast audio processing method is realized.
The embodiment of the invention also provides a computer-readable storage medium, which comprises a computer program, and the computer program controls the server side where the computer-readable storage medium is located to execute the emergency broadcast audio processing method when running.
Advantageous effects
The emergency broadcast audio processing method and the emergency broadcast audio processing device provided by the embodiment of the invention can enable the analog-to-digital converter to convert the audio signal into a plurality of digital signals, further obtain the amplitude of each digital signal, and adjust the gain of the analog-to-digital converter according to the set gain increment based on the set amplitude interval and the set duration, further realize the indirect adjustment of the amplitude of each digital signal, thus, the adaptive adjustment can be carried out on the audio signals with different amplitudes, the signal-to-noise ratio provided by the analog-to-digital converter is far higher than that provided by a pure digital automatic gain controller, the distortion can be avoided on the premise of ensuring that the playing volume of the audio signals is as large as possible, and the audio signals with different amplitudes can be effectively played with high quality.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a block diagram of a server according to an embodiment of the present invention.
Fig. 2 is a flowchart of an emergency broadcast audio processing method according to an embodiment of the present invention.
Fig. 3 is a block diagram of an emergency broadcasting system according to an embodiment of the present invention.
Fig. 4 is another flowchart of an emergency broadcast audio processing method according to an embodiment of the present invention.
Fig. 5 is a flowchart of a method for processing stress broadcast audio according to an embodiment of the present invention.
Fig. 6 is a block diagram of an emergency broadcast audio processing apparatus according to an embodiment of the present invention.
Icon:
10-a server side; 11-a memory; 12-a processor; 13-a network module;
20-emergency broadcast audio processing means; 21-an audio signal receiving module; 22-a digital signal acquisition module; 23-an amplitude acquisition module; 24-gain adjustment module.
30-a client;
40-an analog-to-digital converter;
50-output end.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The inventor has found through investigation that most emergency broadcast systems have difficulty playing different audio inputs efficiently and with high quality. The reason is that the amplitude of different audio inputs may be different, which causes the emergency broadcast system to play too loud or too loud, and further affects the listening effect of the broadcast.
However, most of the common methods for adjusting the volume adopt an Automatic Gain Control (AGC), but it is difficult to improve the listening effect of the broadcast by using the AGC.
The above prior art solutions have shortcomings which are the results of practical and careful study of the inventor, and therefore, the discovery process of the above problems and the solutions proposed by the following embodiments of the present invention to the above problems should be the contribution of the inventor to the present invention in the course of the present invention.
Based on the above research, embodiments of the present invention provide an emergency broadcast audio processing method and apparatus, which can avoid distortion on the premise of ensuring that the volume of the broadcast is as large as possible, and ensure that audio signals with different amplitudes can be played effectively and with high quality.
Fig. 1 is a block diagram illustrating a server 10 according to an embodiment of the present invention. The server 10 in the embodiment of the present invention has data storage, transmission, and processing functions, and as shown in fig. 1, the server 10 includes: memory 11, processor 12, network module 13 and emergency broadcast audio processing device 20.
The memory 11, the processor 12 and the network module 13 are electrically connected directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The memory 11 stores an emergency broadcast audio processing device 20, the emergency broadcast audio processing device 20 includes at least one software functional module which can be stored in the memory 11 in the form of software or firmware (firmware), and the processor 12 executes various functional applications and data processing by running software programs and modules stored in the memory 11, such as the emergency broadcast audio processing device 20 in the embodiment of the present invention, so as to implement the emergency broadcast audio processing method in the embodiment of the present invention.
The Memory 11 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 11 is used for storing a program, and the processor 12 executes the program after receiving an execution instruction.
The processor 12 may be an integrated circuit chip having data processing capabilities. The Processor 12 may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (NP), and the like. The various methods, steps and logic blocks disclosed in embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The network module 13 is used for establishing communication connection between the server 10 and other communication terminal devices through a network, and implementing transceiving operation of network signals and data. The network signal may include a wireless signal or a wired signal.
It is understood that the configuration shown in fig. 1 is merely illustrative, and that the server 10 may include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
An embodiment of the present invention also provides a computer-readable storage medium, which includes a computer program. The computer program controls the server 10 where the readable storage medium is located to execute the following emergency broadcast audio processing method.
Through a plurality of tests, the ideal digital volume range is (-6dBU, 0dBU), and in order to ensure that the audio signal output by the emergency broadcast system is not distorted, it needs to ensure that no amplitude limiting occurs when the digital volume is full (0dBU), however, through research and analysis of pure digital AGC, the inventor finds that the pure digital AGC cannot recover the limited signal, and amplifies the noise when the audio signal with lower digital volume is amplified, so that even if the pure digital AGC is adopted, different audio signals are difficult to be played effectively and with high quality.
Further, since an Analog-to-Digital Converter (ADC) has a gain adjustment function, and a signal-to-noise ratio provided by the ADC is much higher than that provided by a pure Digital ADC, the core idea of the embodiment is: the amplitude of the audio signal is indirectly adjusted by directly adjusting the gain of the analog-to-digital converter ADC, and then the volume output by the emergency broadcasting system is controlled.
Fig. 2 is a flowchart illustrating an emergency broadcast audio processing method according to an embodiment of the present invention. The method steps defined by the flow related to the method are applied to the server 10 and can be implemented by the processor 12. The specific process shown in FIG. 2 will be described in detail below:
referring to fig. 3, the server 10 is communicatively connected to the analog-to-digital converter 40, and the analog-to-digital converter 30 is communicatively connected to the client 30 and the output 50, respectively, it can be understood that the server 10, the analog-to-digital converter 40, and the output 50 form an emergency broadcasting system, which can process different audio signals and further output the audio signals effectively and with high quality.
And step S21, controlling the analog-to-digital converter to receive the audio signal sent by the client.
The server 10 sends a control instruction to the analog-to-digital converter 40 to control the analog-to-digital converter 40 to receive the audio signal sent by the client 30, and it is understood that the audio signal is an analog signal.
In this embodiment, the client 30 may be a mobile phone, a wired phone, an MP3, or the like.
Step S22 is to make the analog-to-digital converter convert the audio signal into a plurality of digital signals according to the set sampling rate.
It is understood that the analog-to-digital converter 40 can convert the analog signal into a digital signal, and in the present embodiment, the set sampling rate can be 48 kHz.
The analog-to-digital converter 40 is capable of converting the audio signal into a plurality of digital signals. Wherein each digital signal is a pulse code modulated signal.
In step S23, the amplitude of each digital signal is acquired.
In this embodiment, the server 10 obtains the amplitude of each digital signal from the analog-to-digital converter 40 in real time, and it can be understood that the obtained amplitudes are continuous in time, so as to facilitate subsequent judgment and processing.
Step S24, obtaining, for each obtained amplitude, a determination result of whether the amplitude is outside the set amplitude interval, and adjusting the gain of the analog-to-digital converter according to the determination result to indirectly adjust the amplitude of each converted digital signal.
For example, for each amplitude value, it is determined whether the amplitude value is outside a set amplitude value interval, in this embodiment, the set amplitude value interval is (-6dBU, 0dBU), if the amplitude value is outside the (-6dBU, 0dBU) interval, it is determined whether the amplitude values in a set time period starting from the time when the amplitude value is obtained are all outside the (-6dBU, 0dBU) interval, if so, the gain of the analog-to-digital converter 40 is adjusted according to the set gain increment until at least one target amplitude value in the (-6dBU, 0dBU) interval exists in the set time period, where the target amplitude value is an amplitude value corresponding to the digital signal obtained by the analog-to-digital converter 40 after the gain adjustment.
It can be understood that the amplitude outside the (-6dBU, 0dBU) interval is divided into two cases: one is an amplitude lower than-6 dBU, and the other is an amplitude exceeding 0dBU, and when the amplitude exceeds 0dBU, the analog-to-digital converter 40 will clip the amplitude, and assuming that the amplitude is 5dBU, the analog-to-digital converter 40 will clip 5dBU to 0dBU, so that the indirect adjustment of the amplitude of each converted digital signal by adjusting the gain of the analog-to-digital converter 40 according to the determination result is divided into two cases: the gain of the analog-to-digital converter 40 is accumulated and the gain of the analog-to-digital converter 40 is subtracted.
After the gain accumulation or the gain accumulation, the analog-to-digital converter 40 can adjust the amplitudes of the converted digital signals, thereby adjusting the output volume of the audio signal.
The gain accumulation and the gain subtraction will be explained below by means of fig. 4 and 5.
For convenience of description, the lower limit value and the upper limit value of the (-6dBU, 0dBU) interval are defined as a first set value and a second set value, respectively, wherein the first set value and the second set value are used for the judgment of gain accumulation or gain subtraction.
First, the gain accumulation determination process of the adc 40 will be described with reference to fig. 4.
At an amplitude A lying outside the (-6dBU, 0dBU) intervalxThe description of step S31 and the subsequent steps is made for the sake of example:
in step S31, it is determined whether each amplitude value within a first set time period starting from the time at which the amplitude value is obtained is lower than a first set value.
If the amplitude A is obtainedxIs lower than-6 dBU for each amplitude within the first set period of time starting from the time point of (a), the process goes to step S32, otherwise, the process goes to step S33.
It is found by the actual measurement that when the amplitude value obtained by the server 10 is lower than-6 dBU, the volume of the broadcast at the output terminal 50 is small, and therefore, the situation when the amplitude value is lower than-6 dBU must be detected, further, the amplitude value of some special audio signals may be low in a certain short period of time, and in order to avoid false detection of these special signals, a first set time period needs to be set, and in this embodiment, the first set time period may be 5 min. In other words, in the non-mute state, if each amplitude value within a certain first set time period is lower than-6 dBU, the process goes to step S32, otherwise, the process goes to step S33.
Step S32, the gain of the adc is accumulated according to the first set gain increment until at least a first target amplitude not lower than the first set value exists for a first set time period.
When the server 10 determines that each amplitude value in a certain first set time period is lower than-6 dBU, it indicates that the volume of the audio signal at the output end 50 is low at this time, and the volume needs to be increased, so the server 10 adjusts the gain of the analog-to-digital converter 40 according to the first set gain increment to realize indirect adjustment of the amplitude value of each digital signal, thereby realizing adjustment of the volume of the audio signal.
In this embodiment, in order to avoid overshoot, the first setting gain increment needs to be reasonably selected, for example, the first setting gain increment may be 5dB, and for example, each amplitude value in a certain first setting time duration is-8 dBU, at this time, the service end 10 controls the analog-to-digital converter 40 to add 5dB of gain so that each amplitude value in a certain first setting time duration is changed from-8 dBU to-3 dBU, at this time, the-3 dBU (first target amplitude value) is located in the (-6dBU, 0dBU) interval, which indicates that the gain adjustment of the analog-to-digital converter 40 is completed, and then it is determined that the processing of the audio signal is completed, at this time, the volume of the audio signal output by the output end 50 is in a stable range, so as to ensure the listening efficiency, further, because the signal-to-noise ratio of the analog-to-digital converter 40 is higher, when the gain is increased, the increase of noise in the audio signal can be avoided, so that the quality of the audio signal can be ensured under the condition of ensuring the increase of volume.
Alternatively, if each amplitude value in a certain first set time period is-13 dBU, after the gain accumulation of the analog-to-digital converter 40 is completed once, each amplitude value in a certain first set time period becomes-8 dBU (the first target amplitude value), which still lies outside the (-6dBU, 0dBU) interval, so that the gain accumulation of the analog-to-digital converter 40 needs to be continued until each amplitude value in a certain first set time period lies within the (-6dBU, 0dBU) interval after the accumulation, so that the selection of the first set increment also needs to be combined with the actual situation, and if a smaller number of adjustments is needed, the first set increment can be appropriately increased.
In step S33, the audio signal is determined to be a normal signal.
It is understood that, for a plurality of digital signals, if the amplitudes within any first set time period are not less than-6 dBU, the plurality of digital signals can be determined to be normal signals, in other words, the audio signal is determined to be normal signals, and therefore, the adc 40 does not need to be controlled to perform gain adjustment.
It is understood that the above description is to amplify the audio signal, that is, the amplitude of the audio signal can be increased, and the quality of the audio signal can be ensured, and the noise can be reduced.
Further, the gain accumulation determination process of the analog-to-digital converter 40 is described with reference to fig. 5.
In step S41, it is determined whether each amplitude value within a second set time period starting from the time at which the amplitude value is obtained reaches a second set value.
It is understood that, in the present embodiment, the second set time period is 0.3ms, and the amplitude a is assumedyGreater than 0dBU, the ADC 40 will compare the amplitude AyClipping is performed with amplitude AyWill be limited to 0dBU if the amplitude A is obtainedyReaches 0dBU for each amplitude within 0.3ms from the start point, indicating that the plurality of digital signals are clipped, and thus it can be concluded that the amplitude of the audio signal may be too large and distortion is likely to occur, at which point the process goes to step S42, otherwise, the process goes to step S43.
Step S42, the gain of the adc is decremented by a second set gain increment until there is at least a second target amplitude value that does not reach the second set value for a second set period of time.
When the server 10 determines that the amplitudes within a second set time period (0.3ms) all reach-0.1 dBU, it indicates that the analog-to-digital converter 40 performs amplitude limiting on the audio signal, which may cause distortion of the audio signal and require to turn down the volume, and therefore, the server 10 may adjust the gain of the analog-to-digital converter 40 according to the second set gain increment.
In this embodiment, the second set increment may be 6dB, and for example, each amplitude value in a second set duration is 10dBU, at which time the service end 10 controls the adc 40 to reduce the gain by 6dB so that each amplitude value in the second set duration is changed from 10dBU to 4dBU, at which time 4dBU (the second target amplitude value) still lies outside the (-6dBU, 0dBU) interval, so that the service end 10 needs to further reduce the gain of the adc 40, and each amplitude value within a certain second set time period is within the (-6dBU, 0dBU) interval, and for another example, after two gain decrements of the analog-to-digital converter 40 are completed, therefore, each amplitude value within a certain second set period of time is-2 dBU, which is within the (-6dBU, 0dBU) interval, and thus, it can be considered that the audio signal is finished.
Considering the mutual influence of the gain increase adjustment and the gain decrease adjustment, neither the first set gain increment nor the second set gain increment should be selected to be too large, otherwise a dead-loop of infinite adjustment would be entered. The first set gain increment and the second set gain increment may be modified reasonably according to actual situations, where the server 10 may obtain a modification instruction for modifying the first gain increment, and analyze the modification instruction to obtain a first target gain increment included in the modification instruction.
Further, the server 10 may determine whether the first target gain increment reaches the interval length value, and if so, refuse to set the first gain increment, otherwise, modify the first gain increment to the first target gain increment according to the modification instruction.
In this embodiment, the interval length value is an absolute value of a difference between the first setting value and the second setting value, and for example, the first setting value is-6 dBU and the second setting value is-0.1 dBU in consideration of the accuracy of the analog-to-digital converter 40, in other words, when the analog-to-digital converter 40 performs clipping on the digital signal, the limitation to-0.1 dBU may be considered to limit the digital signal to 0 dBU. Therefore, the interval length is 5.9dB, that is, when the first set gain increment is modified, the first target gain increment cannot reach 5.9dB, otherwise, when the gain accumulation is performed, the first target gain increment may directly pass through the (-6dBU, 0dBU) interval, and similarly, when the second set gain increment is modified, the above requirement should be met, so that the adc 40 can be effectively prevented from entering the gain adjustment dead cycle.
In step S43, the audio signal is determined to be a normal signal.
It is understood that, in an actual application environment, if the amplitudes of the plurality of digital signals within any second predetermined time period do not reach-0.1 dBU, the plurality of digital signals can be determined as normal signals, in other words, the audio signal is determined as a normal signal, and therefore the adc 40 does not need to be controlled to perform gain adjustment.
In this embodiment, the server 10 can both control the adc 40 to perform gain accumulation to amplify the audio signal under the condition of high signal-to-noise ratio, and can also control the adc 40 to perform gain accumulation to reduce the limited audio signal, so that distortion can be avoided on the premise that the play volume is as large as possible, and the audio signals with different amplitudes can be effectively and high-quality played.
On the basis of the above, as shown in fig. 6, an embodiment of the present invention provides an emergency broadcast audio processing apparatus 20, where the emergency broadcast audio processing apparatus 20 includes: an audio signal receiving module 21, a digital signal obtaining module 22, an amplitude obtaining module 23 and a gain adjusting module 24.
And the audio signal receiving module 21 is configured to control the analog-to-digital converter to receive an audio signal in real time.
Since the audio signal receiving module 21 is similar to the implementation principle of step S21 in fig. 2, it will not be further described here.
A digital signal obtaining module 22, configured to enable the analog-to-digital converter to convert the audio signal into a plurality of digital signals according to a set sampling rate.
Since the digital signal obtaining module 22 is similar to the implementation principle of step S22 in fig. 2, it will not be further described here.
An amplitude obtaining module 23, configured to obtain an amplitude of each of the digital signals.
Since the amplitude obtaining module 23 is similar to the implementation principle of step S23 in fig. 2, it will not be further described here.
A gain adjustment module 24, configured to determine, for each obtained amplitude, whether the amplitude is outside a set amplitude interval, determine, if the amplitude is outside the set amplitude interval, whether each amplitude within a set time period starting from a time when the amplitude is obtained is outside the set amplitude interval, and adjust, if each amplitude within the set time period is outside the set amplitude interval, a gain of the analog-to-digital converter according to a set gain increment until at least one target amplitude within the set amplitude interval exists within the set time period; and the target amplitude is the amplitude corresponding to the digital signal converted by the analog-to-digital converter after the gain adjustment.
Since the gain adjustment module 24 is implemented in a similar manner as step S24 in fig. 2, it will not be further described here.
In summary, the emergency broadcast audio processing method and apparatus provided by the embodiments of the present invention can avoid distortion on the premise of ensuring that the volume of playing is as large as possible, and ensure that audio signals with different amplitudes can be played effectively and with high quality.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus and method embodiments described above are illustrative only, as the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or a part of the technical solution that substantially contributes to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server 10, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. An emergency broadcast audio processing method applied to a server, wherein the server is communicatively connected to an analog-to-digital converter, the method comprising:
controlling the analog-to-digital converter to receive an audio signal in real time;
enabling the analog-to-digital converter to convert the audio signal into a plurality of digital signals according to a set sampling rate;
acquiring the amplitude of each digital signal;
judging whether the amplitude is positioned outside a set amplitude interval or not for each acquired amplitude, judging whether each amplitude in a set time length with the moment of acquiring the amplitude as a starting point is positioned outside the set amplitude interval or not if the amplitude is positioned outside the set amplitude interval, and adjusting the gain of the analog-to-digital converter according to a set gain increment until at least one target amplitude positioned in the set amplitude interval exists in the set time length if each amplitude in the set time length is positioned outside the set amplitude interval; the target amplitude is an amplitude corresponding to a digital signal obtained by the conversion of the analog-to-digital converter after the gain adjustment;
judging whether each amplitude value in a set time length with the moment of obtaining the amplitude value as a starting point is positioned outside the set amplitude value interval, if so, adjusting the gain of the analog-to-digital converter according to a set gain increment until at least one target amplitude value positioned in the set amplitude value interval exists in the set time length, wherein the step comprises the following steps:
judging whether each amplitude value in a first set time length with the moment of obtaining the amplitude value as a starting point is lower than a first set value or not;
if each amplitude value in the first set time length is lower than the first set value, accumulating the gain of the analog-to-digital converter according to a first set gain increment until at least one first target amplitude value which is not lower than the first set value exists in the first set time length; the first target amplitude is an amplitude corresponding to a digital signal obtained by conversion of an analog-to-digital converter after gain accumulation, and the first set value is a lower limit value of the set amplitude interval;
judging whether each amplitude value in a set time length with the moment of obtaining the amplitude value as a starting point is positioned outside the set amplitude value interval, if so, adjusting the gain of the analog-to-digital converter according to a set gain increment until at least one target amplitude value positioned in the set amplitude value interval exists in the set time length, wherein the step comprises the following steps:
judging whether each amplitude value in a second set time length with the moment of obtaining the amplitude value as a starting point reaches a second set value or not;
if each amplitude value in the second set time period reaches the second set value, accumulating and reducing the gain of the analog-to-digital converter according to a second set gain increment until at least one second target amplitude value which does not reach the second set value exists in the second set time period; the second target amplitude is an amplitude corresponding to a digital signal obtained by conversion of the analog-to-digital converter after gain accumulation and subtraction, and the second set value is an upper limit value of the set amplitude interval.
2. The emergency broadcast audio processing method according to claim 1, further comprising:
acquiring a modification instruction for modifying the first set gain increment, and analyzing to obtain a first target gain increment included in the modification instruction;
acquiring an interval length value of the set amplitude interval;
and judging whether the first target gain increment reaches the interval length value, if so, refusing to execute the modification instruction, and if not, modifying the first set gain increment to the first target gain increment according to the modification instruction.
3. The emergency broadcast audio processing method according to claim 2, wherein the step of obtaining the interval length value of the set amplitude interval comprises:
acquiring the amplitude at one endpoint of the set amplitude interval and using the amplitude as a first set value, and acquiring the amplitude at the other endpoint of the set amplitude interval and using the amplitude as a second set value;
calculating an absolute value of a difference between the first set value and the second set value;
and taking the absolute value as the length value of the interval and obtaining the length value.
4. An emergency broadcast audio processing apparatus, applied to a server, the server being communicatively connected to an analog-to-digital converter, the apparatus comprising:
the audio signal receiving module is used for controlling the analog-to-digital converter to receive the audio signal in real time;
the digital signal acquisition module is used for enabling the analog-to-digital converter to convert the audio signals into a plurality of digital signals according to a set sampling rate;
the amplitude acquisition module is used for acquiring the amplitude of each digital signal;
a gain adjustment module, configured to determine, for each obtained amplitude, whether the amplitude is outside a set amplitude interval, determine, if the amplitude is outside the set amplitude interval, whether each amplitude within a set time period starting from a time at which the amplitude is obtained is outside the set amplitude interval, and adjust, if each amplitude within the set time period is outside the set amplitude interval, a gain of the analog-to-digital converter according to a set gain increment until at least one target amplitude within the set amplitude interval exists within the set time period; the target amplitude is an amplitude corresponding to a digital signal obtained by the conversion of the analog-to-digital converter after the gain adjustment;
the gain adjusting module judges whether each amplitude value in a set time length with the moment of obtaining the amplitude value as a starting point is positioned outside the set amplitude value interval or not in the following mode, if each amplitude value in the set time length is positioned outside the set amplitude value interval, the gain of the analog-to-digital converter is adjusted according to a set gain increment until at least one target amplitude value positioned in the set amplitude value interval exists in the set time length:
judging whether each amplitude value in a first set time length with the moment of obtaining the amplitude value as a starting point is lower than a first set value or not;
if each amplitude value in the first set time length is lower than the first set value, accumulating the gain of the analog-to-digital converter according to a first set gain increment until at least one first target amplitude value which is not lower than the first set value exists in the first set time length; the first target amplitude is an amplitude corresponding to a digital signal obtained by conversion of an analog-to-digital converter after gain accumulation, and the first set value is a lower limit value of the set amplitude interval;
the gain adjusting module judges whether each amplitude value in a set time length with the moment of obtaining the amplitude value as a starting point is positioned outside the set amplitude value interval or not in the following mode, if each amplitude value in the set time length is positioned outside the set amplitude value interval, the gain of the analog-to-digital converter is adjusted according to a set gain increment until at least one target amplitude value positioned in the set amplitude value interval exists in the set time length:
judging whether each amplitude value in a second set time length with the moment of obtaining the amplitude value as a starting point reaches a second set value or not;
if each amplitude value in the second set time period reaches the second set value, accumulating and reducing the gain of the analog-to-digital converter according to a second set gain increment until at least one second target amplitude value which does not reach the second set value exists in the second set time period; the second target amplitude is an amplitude corresponding to a digital signal obtained by conversion of the analog-to-digital converter after gain accumulation and subtraction, and the second set value is an upper limit value of the set amplitude interval.
5. The emergency broadcast audio processing device according to claim 4, further comprising:
the modification module is used for acquiring a modification instruction for modifying the first set gain increment, and analyzing and acquiring a first target gain increment included in the modification instruction; acquiring an interval length value of the set amplitude interval; and judging whether the first target gain increment reaches the interval length value, if so, refusing to execute the modification instruction, and if not, modifying the first set gain increment to the first target gain increment according to the modification instruction.
6. The emergency broadcast audio processing device according to claim 5, wherein the modification module obtains the interval length value of the set amplitude interval by:
acquiring the amplitude at one endpoint of the set amplitude interval and using the amplitude as a first set value, and acquiring the amplitude at the other endpoint of the set amplitude interval and using the amplitude as a second set value;
calculating an absolute value of a difference between the first set value and the second set value;
and taking the absolute value as the length value of the interval and obtaining the length value.
CN201910090162.1A 2019-01-29 2019-01-29 Emergency broadcast audio processing method and device Active CN109584901B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910090162.1A CN109584901B (en) 2019-01-29 2019-01-29 Emergency broadcast audio processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910090162.1A CN109584901B (en) 2019-01-29 2019-01-29 Emergency broadcast audio processing method and device

Publications (2)

Publication Number Publication Date
CN109584901A CN109584901A (en) 2019-04-05
CN109584901B true CN109584901B (en) 2021-04-23

Family

ID=65918209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910090162.1A Active CN109584901B (en) 2019-01-29 2019-01-29 Emergency broadcast audio processing method and device

Country Status (1)

Country Link
CN (1) CN109584901B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11387838B1 (en) 2021-03-19 2022-07-12 Microsoft Technology Licensing, Llc SAR analog-to-digital converter calibration
US11677409B2 (en) 2021-03-19 2023-06-13 Microsoft Technology Licensing, Llc Cloud assisted calibration of analog-to-digital converters
CN113659987B (en) * 2021-08-20 2023-07-11 合肥御微半导体技术有限公司 Signal processing device and method thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101483445A (en) * 2008-01-09 2009-07-15 联发科技股份有限公司 Methods for preventing unwanted sound and electronic devices thereof
CN103050119A (en) * 2012-12-30 2013-04-17 安徽科大讯飞信息科技股份有限公司 Self-adaptive detection method for synchronism of lamplight/motor and sound
CN106448690A (en) * 2016-10-20 2017-02-22 广州视源电子科技股份有限公司 Automatic gain control method and apparatus of audio signals
CN106817483A (en) * 2016-12-26 2017-06-09 建荣半导体(深圳)有限公司 A kind of method and apparatus for adjusting speech volume
US9847092B2 (en) * 2010-12-22 2017-12-19 Alon Konchitsky Methods and system for wideband signal processing in communication network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101483445A (en) * 2008-01-09 2009-07-15 联发科技股份有限公司 Methods for preventing unwanted sound and electronic devices thereof
US9847092B2 (en) * 2010-12-22 2017-12-19 Alon Konchitsky Methods and system for wideband signal processing in communication network
CN103050119A (en) * 2012-12-30 2013-04-17 安徽科大讯飞信息科技股份有限公司 Self-adaptive detection method for synchronism of lamplight/motor and sound
CN106448690A (en) * 2016-10-20 2017-02-22 广州视源电子科技股份有限公司 Automatic gain control method and apparatus of audio signals
CN106817483A (en) * 2016-12-26 2017-06-09 建荣半导体(深圳)有限公司 A kind of method and apparatus for adjusting speech volume

Also Published As

Publication number Publication date
CN109584901A (en) 2019-04-05

Similar Documents

Publication Publication Date Title
CN109584901B (en) Emergency broadcast audio processing method and device
CN106878866B (en) Audio signal processing method and device and terminal
US10015591B2 (en) Pickup apparatus and pickup method
EP2811485A1 (en) Sound correcting apparatus, sound correcting program, and sound correcting method
US11302306B2 (en) Time-based frequency tuning of analog-to-information feature extraction
CN106961509B (en) Call parameter processing method and device and electronic equipment
US10312874B2 (en) Volume control methods and devices, and multimedia playback control methods and devices
EP2330807A1 (en) Method and electronic device for improving communication quality based on ambient noise sensing
CN101699831A (en) Terminal speech transmitting method, system and equipment
EP0948787A1 (en) Improved audio reproduction arrangement and telephone terminal
US9251803B2 (en) Voice filtering method, apparatus and electronic equipment
EP2418770A1 (en) Automatic gain control
CN105848061B (en) Control method and electronic equipment
JP2009171208A (en) Automatic sound volume control device and voice communication equipment employing same
US10312875B2 (en) Sound pickup device and sound pickup method
CN112333606A (en) Microphone gain abnormity adjusting method and device
CN110401772B (en) Ringtone setting method, ringtone setting device, mobile terminal, and storage medium
CN110808064B (en) Audio processing method and device
CN111815877A (en) White noise warning method and device
KR100906676B1 (en) Voice recognition apparatus of intelligence robot and method thereof
CN112393799A (en) Far-field voice equipment detection method and device and television terminal
CN108156307B (en) Voice processing method and voice communication device
CN109462809B (en) Detection method and system of power amplifier
EP4068809A1 (en) Smart home appliance and audio control method thereof
CN105827807A (en) Volume control method and terminal device

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