CN116346267B - Audio trigger broadcast detection method, device, equipment and readable storage medium - Google Patents

Audio trigger broadcast detection method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN116346267B
CN116346267B CN202310305001.6A CN202310305001A CN116346267B CN 116346267 B CN116346267 B CN 116346267B CN 202310305001 A CN202310305001 A CN 202310305001A CN 116346267 B CN116346267 B CN 116346267B
Authority
CN
China
Prior art keywords
pulse code
code modulation
modulation data
energy
broadcasting
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
CN202310305001.6A
Other languages
Chinese (zh)
Other versions
CN116346267A (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.)
Guangzhou DSPPA Audio Co Ltd
Original Assignee
Guangzhou DSPPA Audio 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 Guangzhou DSPPA Audio Co Ltd filed Critical Guangzhou DSPPA Audio Co Ltd
Priority to CN202310305001.6A priority Critical patent/CN116346267B/en
Publication of CN116346267A publication Critical patent/CN116346267A/en
Application granted granted Critical
Publication of CN116346267B publication Critical patent/CN116346267B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04HBROADCAST COMMUNICATION
    • H04H60/00Arrangements for broadcast applications with a direct linking to broadcast information or broadcast space-time; Broadcast-related systems
    • H04H60/29Arrangements for monitoring broadcast services or broadcast-related services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Circuits Of Receivers In General (AREA)

Abstract

The application provides an audio triggering broadcast detection method, device, equipment and readable storage medium, when whether audio access exists or not is required to be judged, the method provided by the embodiment of the application can detect whether audio input exists or not without independently connecting hardware to a chip pin with AD, and can determine whether audio input exists or not only according to whether the frame average energy of pulse code modulation data reaches a specific energy value or not, and determine whether broadcasting can be triggered or whether broadcasting exists or not.

Description

Audio trigger broadcast detection method, device, equipment and readable storage medium
Technical Field
The present application relates to the field of information processing technologies, and in particular, to an audio triggering broadcast detection method, apparatus, device, and readable storage medium.
Background
In the broadcasting industry, the audio triggering broadcasting is to connect an audio input to an AD sampling pin of a chip, and if the program sampling exceeds a preset volt number, the audio input is considered to exist currently, so that the broadcasting is triggered. However, in the prior art, the audio input requires additional hardware to be connected to the chip pins with AD samples. When hardware is not additionally connected to a chip pin with AD sampling, whether audio access exists or not cannot be accurately judged, broadcasting cannot be triggered in time, and broadcasting accidents are easily caused.
Disclosure of Invention
The present application is directed to at least solving one of the above-mentioned technical drawbacks, and accordingly, the present application provides an audio trigger broadcast detection method, apparatus, device and readable storage medium, which are used for solving the technical drawbacks that it is difficult to quickly determine whether there is an audio input trigger broadcast in the prior art.
An audio triggered broadcast detection method comprising:
acquiring pulse code modulation data of a current frame in real time;
calculating the total energy value of the pulse code modulation data from the cut-off to the current moment;
judging whether the current total frame number of the pulse code modulation data reaches a preset frame number or not;
if the current total frame number of the pulse code modulation data reaches the preset frame number, calculating the frame average energy of the pulse code modulation data according to the current total frame number of the pulse code modulation data and the energy total value of the pulse code modulation data;
judging whether the frame average energy of the pulse code modulation data exceeds a preset energy value or not;
if the frame average energy of the pulse code modulation data exceeds the preset energy value, judging whether broadcasting is performed at the current moment;
and if the current moment is determined not to be broadcasted, determining to trigger broadcasting.
Preferably, the method further comprises:
if the frame average energy of the pulse code modulation data does not exceed the preset energy value, judging whether broadcasting is performed at the current moment;
if the current time is determined to be broadcasting, judging whether the broadcasting is overtime;
if the broadcasting is overtime, stopping broadcasting, clearing the current total frame number of the pulse code modulation data and the energy total value of the pulse code modulation data, and returning to execute the operation of collecting the pulse code modulation data of the current frame in real time;
and if the broadcasting is not overtime, clearing the current total frame number of the pulse code modulation data and the energy total value of the pulse code modulation data, and returning to execute the operation of collecting the pulse code modulation data of the current frame in real time.
Preferably, the method further comprises:
if the current time is determined to be broadcasting, recording the current time as the starting time for judging whether the broadcasting is overtime, and returning to execute the operation of collecting the pulse code modulation data of the current frame in real time.
Preferably, the method further comprises:
and if the current total frame number of the pulse code modulation data does not reach the preset frame number, returning to execute the operation of collecting the pulse code modulation data of the current frame in real time.
Preferably, the calculating, up to the current time, the total energy value of the pulse code modulation data includes:
calculating the energy value of each frame of data of the pulse code modulation data;
counting the current total frame number of the pulse code modulation data;
and accumulating the energy of each frame of data of the pulse code modulation data to obtain the energy total value of the pulse code modulation data.
Preferably, the preset frame number is calculated according to parameters of the acquired audio data and the data acquisition time,
the preset frame number calculating process is as follows:
wherein, the liquid crystal display device comprises a liquid crystal display device,
p represents the number of frames to be preset;
a represents the number of points of the acquired audio data per second;
b represents the volume of data acquired per frame;
c represents the sampling depth of the collected audio data;
t represents time;
the preset energy value is set according to hardware equipment for collecting data;
wherein the value range of the preset energy value is [0,45db ].
An audio triggered broadcast detection apparatus comprising:
the data acquisition unit is used for acquiring the pulse code modulation data of the current frame in real time;
the energy total value calculation unit is used for calculating the energy total value of the pulse code modulation data from the current moment;
A first judging unit, configured to judge whether a current total frame number of the pulse code modulation data reaches a preset frame number;
a frame average energy calculating unit, configured to calculate, when an execution result of the first judging unit is that it is determined that the current total frame number of the pulse code modulation data reaches the preset frame number, frame average energy of the pulse code modulation data according to the current total frame number of the pulse code modulation data and an energy total value of the pulse code modulation data;
a second judging unit, configured to judge whether the frame average energy of the pulse code modulation data exceeds a preset energy value;
a third judging unit, configured to judge whether broadcasting is being performed at the current time when an execution result of the second judging unit is that it is determined that the frame average energy of the pulse code modulation data exceeds the preset energy value;
and the determining unit is used for determining to trigger broadcasting when the execution result of the third judging unit is that the broadcasting is not performed at the current moment.
Preferably, the energy total value calculation unit includes:
a frame energy calculating unit for calculating an energy value of each frame of data of the pulse code modulation data;
The statistics unit is used for counting the current total frame number of the pulse code modulation data;
and the accumulation unit is used for accumulating the energy of each frame of data of the pulse code modulation data to obtain the total energy value of the pulse code modulation data.
An audio triggered broadcast detection apparatus comprising: one or more processors, and memory;
stored in the memory are computer readable instructions which, when executed by the one or more processors, implement the steps of the audio triggered broadcast detection method as set forth in any one of the preceding introduction.
A readable storage medium having stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to implement the steps of the audio triggered broadcast detection method of any of the preceding introduction.
According to the technical scheme, when whether audio access exists or not is required to be judged, the method provided by the embodiment of the application can acquire the pulse code modulation data of the current frame in real time; the pulse code modulation data comprises at least one parameter, wherein the parameter of the pulse code modulation data can feed back whether audio access exists at the current moment or not, so that whether broadcasting is triggered or needs to be triggered can be determined, and therefore, after each current frame of pulse code modulation data is acquired, the energy total value of the pulse code modulation data can be further calculated and cut off to the current moment; judging whether the current total frame number of the pulse code modulation data reaches a preset frame number or not; if the current total frame number of the pulse code modulation data reaches the preset frame number, the method indicates that the audio data access can trigger broadcasting or broadcasting is performed. Therefore, in order to determine whether the broadcasting is already performed at the current moment or the broadcasting can be triggered, after determining that the current total frame number of the pulse code modulation data reaches the preset frame number, the frame average energy of the pulse code modulation data can be calculated according to the current total frame number of the pulse code modulation data and the energy total value of the pulse code modulation data; judging whether the frame average energy of the pulse code modulation data exceeds a preset energy value or not through the frame average energy of the pulse code modulation data; if the frame average energy of the pulse code modulation data exceeds the preset energy value, it is indicated that broadcasting is possible at the current moment, therefore, after determining that the frame average energy of the pulse code modulation data exceeds the preset energy value, it is indicated that audio input exists, and it can be further determined whether broadcasting is being performed at the current moment; if it is determined that the broadcasting is not performed at the current time, it may be determined to trigger the broadcasting.
Therefore, the method provided by the embodiment of the application can detect whether the audio input exists without independently connecting hardware to the chip pin with AD, can determine whether the audio input exists only according to whether the frame average energy of the pulse code modulation data reaches a specific energy value, and can determine whether the broadcasting can be triggered or the broadcasting already exists, and compared with the existing method for detecting the broadcasting triggered by the audio input, the method is more convenient and has higher accuracy, and the detection cost of the broadcasting triggered by the audio input is effectively reduced.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the application, and that other drawings can be obtained from these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a flowchart of a method for implementing audio triggering broadcast detection according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an audio triggering broadcast detection apparatus according to an example of the embodiment of the present application;
Fig. 3 is a block diagram of a hardware structure of an audio triggered broadcast detection apparatus according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In view of the fact that most of the current audio trigger broadcast detection schemes are difficult to adapt to complex and changeable service requirements, the inventor researches an audio trigger broadcast detection scheme, and the audio trigger broadcast detection method can detect whether audio input exists or not without separately connecting hardware to a chip pin with an AD, can determine whether audio input exists or not only according to whether the frame average energy of pulse code modulation data reaches a specific energy value, and can determine whether broadcasting can be triggered or whether broadcasting is performed or not.
The methods provided by embodiments of the present application may be used in a number of general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor devices, distributed computing environments that include any of the above devices or devices, and the like.
The embodiment of the application provides an audio triggering broadcast detection method, which can be applied to various broadcast control systems or television station program broadcasting control systems, and also can be applied to various computer terminals or intelligent terminals, wherein an execution subject can be a processor or a server of the computer terminal or the intelligent terminal.
The following describes, with reference to fig. 1, a flow of an audio triggered broadcast detection method according to an embodiment of the present application, as shown in fig. 1, where the flow may include the following steps:
step S101, current frame pulse code modulation data are collected in real time.
In particular, in the practical application process, the cable broadcast may utilize a transmission distribution network formed by metal wires or optical fibers to directly transmit the broadcast program to the regional broadcast of the user receiving device.
In the practical application process, the sound can be transmitted in a wired broadcasting mode. In the cable broadcasting, the broadcasting program of the broadcasting station generally converts the sound into the audio signal through the microphone, and then is modulated by the high frequency signal (carrier wave) after being amplified, at this time, a certain parameter of the high frequency carrier wave signal changes correspondingly with the audio signal, so that the audio signal to be transmitted is contained in the high frequency carrier wave signal, the high frequency signal is amplified again, and when the high frequency current flows through the antenna, a wireless is formed The wave is emitted outwards, and the propagation speed of the radio wave is 3×10 8 m/s。
The formed radio wave is received by the radio antenna, amplified and demodulated, and the radio wave is restored into an audio signal which is sent into the loudspeaker voice coil to cause corresponding vibration of the loudspeaker voice coil, so that the sound can be restored, namely, the process of sound-electricity conversion transmission-electroacoustic conversion.
In the practical application process, wireless broadcasting can be performed through electromagnetic waves.
Electromagnetic waves are a form of motion of electromagnetic fields. It is known from physical electromagnetic phenomena that an alternating magnetic field is generated around an alternating current. The alternating magnetic field induces an alternating electric field around the alternating magnetic field; the alternating electric field in turn generates an alternating magnetic field around it, which is constantly generated alternately with the changing electric field and is constantly propagated to the surrounding space.
In the practical application process, the broadcasting station can perform wireless broadcasting through electromagnetic waves.
In radio broadcasting, a broadcasting station converts sound into electromagnetic waves by using a transmitter, then the electromagnetic waves are transmitted to a place farther away by a relay station, and finally a receiver receives a signal of the broadcasting station and restores the received signal into sound.
Radio broadcasting is transmitted by using radio waves to propagate audio signals in a distant place. The frequency of the audio signal is very low, typically in the range of 20-20000Hz, belonging to the low frequency signal.
In the generation of radio broadcasting, a sound signal is converted into an audio signal by a signal sensor (microphone) and is sent to an audio amplifier, the audio signal is amplified in the audio amplifier, and the audio signal after the amplification is sent to a modulator as a modulation signal. The high-frequency oscillator generates a high-frequency signal with constant amplitude, the high-frequency signal is also sent to the modulator as a carrier wave, the carrier wave is modulated in amplitude or frequency by the modulating signal in the modulator to form a modulating wave or a frequency modulating wave, the modulating wave and the frequency modulating wave are collectively called as modulated wave, the modulated wave is sent to the high-frequency power amplifier, amplified by the high-frequency power amplifier and sent to the transmitting antenna, and the space is transmitted.
Thus, the audio signal is a signal that triggers broadcasting, which can be triggered when an audio data access is detected.
PCM (Pulse Code Modulation, pulse code modulated) audio data is a bare stream of uncompressed audio sample data, which is standard digital audio data that is sampled, quantized, and transcoded from an analog signal.
Wherein, the liquid crystal display device comprises a liquid crystal display device,
the 6 parameters describing PCM data may include the following:
sample Rate, sampling frequency; 8kHz (telephone), 44.1kHz (CD), 48kHz (DVD).
Sample Size, the number of quantization bits, typically this value is 16-bits.
Number of Channels the number of channels, the common audio is of two types, stereo (stereo) and mono (mono), the stereo comprising left and right channels, and in addition other less common types such as surround stereo.
Sign is a symbol indicating whether the sample data is signed bit, for example, the sample data expressed in one byte, if signed, the range is-128 to 127, and if unsigned, the range is 0 to 255.
Byte Ordering; whether the endian is lite-endian or big-endian. Typically all of the materials are lite-endian; the byte order description is provided in section 4.
Integer Or Floating Point integer or floating point; PCM sample data in most formats is represented using integer representations, while in some applications requiring high precision, it is common to represent PCM sample data using floating point types.
In the practical application process, in order to confirm whether audio data is accessed, the pulse code modulation data of the current frame can be acquired in real time, so that whether the audio data is accessed can be judged through parameters of the pulse code modulation data.
Wherein, the liquid crystal display device comprises a liquid crystal display device,
the pulse code modulated data may comprise at least one parameter.
Parameters of the pulse code modulated data may include sampling frequency, quantization bit number, number of channels, sign bit identification, byte order, and data format type.
Step S102, calculating the energy total value of the pulse code modulation data until the current moment.
Specifically, as can be seen from the above description, the method provided by the embodiment of the present application can collect the pulse code modulation data of the current frame in real time.
The pulse code modulation data can feed back the current acquisition frequency and the energy information of the current acquired data.
In real life, the sound heard by the human ear is an analog signal, PCM is a technology for converting sound from analog to digital, the principle of PCM technology is simply to sample an analog signal with a fixed frequency, the sampled signal looks like a series of continuous pulses with different amplitudes on the waveform, the amplitudes of the pulses are quantized with a certain precision, and the quantized values are continuously output, transmitted, processed or recorded in a storage medium, all of which constitute a digital audio generation process.
The energy value of the pulse code modulated data may be used to evaluate the energy or decibel value of the audio data.
The total energy value of the pulse code modulation data can feed back whether audio data is accessed.
Therefore, after the pulse code modulation data of the current frame is acquired in real time, the energy total value of the pulse code modulation data up to the current time can be further calculated, so that whether audio data is accessed can be judged by the energy total value of the pulse code modulation data at the current time.
Step S103, judging whether the current total frame number of the pulse code modulation data reaches a preset frame number.
Specifically, as can be seen from the above description, the method provided by the embodiment of the present application can collect the pulse code modulation data of the current frame in real time.
After a certain amount of pulse code modulated data has been acquired, it may be further analyzed whether enough pulse code modulated data has been acquired to analyze whether a broadcast is in progress or whether audio data is entered to trigger a broadcast.
Therefore, after the pulse code modulation data of the current frame is acquired in real time, it can be further judged whether the current total frame number of the pulse code modulation data reaches the preset frame number.
If the current total frame number of the pulse code modulation data reaches the preset frame number, it indicates that broadcasting may have already started, or that audio data has been input, and broadcasting may be triggered, so step S104 may be executed to determine whether broadcasting has already been performed at the current time;
if the current total frame number of the pulse code modulation data does not reach the preset frame number, the current acquired pulse code modulation data sample is too few, and the operation of continuously executing the real-time acquisition of the current frame pulse code modulation data can be returned, so that the pulse code modulation data can be continuously analyzed.
The preset frame number can be calculated according to parameters of the collected audio data and the data collection time.
The preset frame number calculating process may include the following steps:
wherein, the liquid crystal display device comprises a liquid crystal display device,
p may represent a preset number of frames;
a may represent a sampling rate at which audio data is collected;
b may represent the volume of data acquired per frame;
for example, the number of the cells to be processed,
if it is desired to trigger detection of a primary energy value for approximately 1 second, then the parameters in acquiring pulse code modulated data may be mono, a 32KHz sampling rate, and a sampling depth of 16 bits.
If the pulse code modulation data collected by each frame is 1024KB, the preset frame number may be: (32000 x 2)/1024, that is, 62.5 frames, the preset number of frames can be reached, but the preset number of frames needs to be rounded, and when 62.5 frames are determined to be reached, the preset number of frames is generally 62 or 63 frames.
Step S104, according to the current total frame number of the pulse code modulation data and the energy total value of the pulse code modulation data, calculating the frame average energy of the pulse code modulation data.
Specifically, as can be seen from the above description, the method provided by the embodiment of the present application can determine whether the current total frame number of the pulse code modulation data reaches the preset frame number.
If it is determined that the current total frame number of the pulse code modulation data reaches the preset frame number, it is indicated that broadcasting may have started, or audio data is input, and broadcasting may be triggered, so, in order to determine whether broadcasting has been performed at the current moment, the frame average energy of the pulse code modulation data may be calculated according to the current total frame number of the pulse code modulation data and the energy total value of the pulse code modulation data, so that whether broadcasting has been performed or audio data has been accessed may be analyzed according to the frame average energy of the pulse code modulation data.
Step S105, determining whether the frame average energy of the pulse code modulation data exceeds a preset energy value.
Specifically, as can be seen from the above description, the method provided by the embodiment of the present application can calculate the frame average energy of the pulse code modulation data.
The frame average energy of the pulse code modulation data can feed back whether the current moment is broadcasting.
Accordingly, after determining the frame average energy of the pulse code modulation data, it may be further judged whether the frame average energy of the pulse code modulation data exceeds a preset energy value.
If it is determined that the frame average energy of the pulse code modulation data exceeds the preset energy value, it indicates that broadcasting may be already performed or audio data access may be possible, and step S106 may be performed.
The preset energy value can be set according to hardware equipment for collecting data;
wherein, the value range of the preset energy value can be [0,45db ].
Step S106, judging whether broadcasting is in progress at the current moment.
Specifically, as can be seen from the above description, the method provided by the embodiment of the present application can determine whether the frame average energy of the pwm data exceeds a preset energy value, and if it is determined that the frame average energy of the pwm data exceeds the preset energy value, it indicates that broadcasting may be already performed or audio data access may be performed, and further determine whether broadcasting is performed at the current moment.
If it is determined that the broadcasting is not performed at the current time, it is indicated that although audio data is accessed, broadcasting is not triggered, and step S107 may be performed.
If it is determined that broadcasting is currently in progress, step S108 may be performed.
Step S107, it is determined to trigger broadcasting.
Specifically, as can be seen from the foregoing description, the method provided by the embodiment of the present application may further determine whether the current time is broadcasting after determining that the frame average energy of the pulse code modulation data exceeds the preset energy value.
If it is determined that the broadcasting is not performed at the current time, it is determined that the broadcasting is not triggered although the audio data is accessed, and the triggering of the broadcasting can be determined.
Step S108, the current time is recorded as a start time for judging whether the broadcast is overtime.
Specifically, as can be seen from the foregoing description, the method provided by the embodiment of the present application may further determine whether the current time is broadcasting after determining that the frame average energy of the pulse code modulation data exceeds the preset energy value.
If it is determined that the broadcasting is currently being performed, the current time may be recorded as a start time for judging whether the broadcasting is overtime, so that it may be used to judge whether the broadcasting timeout is triggered.
Further, the operation of collecting the pulse code modulation data of the current frame in real time can be performed, so that the pulse code modulation data can be continuously collected to continuously analyze the broadcasting condition.
According to the technical scheme, when whether audio access exists or not is judged, whether audio input exists or not can be detected without independently connecting hardware to a chip pin with AD, whether audio input exists or not can be determined only according to whether the frame average energy of pulse code modulation data reaches a specific energy value, whether broadcasting can be triggered or whether broadcasting is performed or not is determined, and compared with an existing method for detecting the triggering of the broadcasting by the audio input, the method is more convenient, higher in accuracy and capable of effectively reducing the detection cost of the triggering of the broadcasting by the audio input.
As can be seen from the above description, the method provided by the embodiment of the present application may determine whether the frame average energy of the pulse code modulation data exceeds the preset energy value, and if the frame average energy of the pulse code modulation data does not exceed the preset energy value, the implementation manner of the method provided by the embodiment of the present application may also be different, and the following description will describe the process, where the process may include the following result steps:
Step S201, it is determined whether broadcasting is being performed at the current time.
Specifically, as can be seen from the above description, the method provided by the embodiment of the present application can calculate and determine whether the frame average energy of the pulse code modulation data exceeds the preset energy value.
If it is determined that the frame average energy of the pulse code modulation data does not exceed the preset energy value, it may be that broadcasting cannot be triggered in time due to a broadcasting timeout, or it may be that broadcasting is currently performed, and in order to determine whether broadcasting is currently performed on time, it may be further determined whether broadcasting is performed at the current time, and if it is determined that broadcasting is performed at the current time, step S202 may be performed.
Step S202, judging whether the broadcasting is overtime.
Specifically, as can be seen from the above description, the method provided by the embodiment of the present application can determine that the frame average energy of the pulse code modulation data does not exceed the preset energy value, and further determine whether the current moment is broadcasting.
Wherein, the liquid crystal display device comprises a liquid crystal display device,
the time interval of the broadcast timeout may be set according to the actual application requirements.
For example, the number of the cells to be processed,
a user may read a sentence and pause for 10 seconds before reading the next sentence, and the time interval for the broadcast timeout may be set to 10 seconds.
In particular, the timeout time of the broadcasting device used in the method provided by the embodiment of the present application may be set to 30 seconds.
In order to confirm whether the broadcast is triggered on time, it may be judged whether the broadcast is timed out, and if it is determined that the broadcast is timed out, step S203 may be performed.
If it is determined that the broadcast has not timed out, step S204 may be performed.
Step S203, stopping broadcasting and clearing the current total frame number of the pulse code modulation data and the energy total value of the pulse code modulation data.
Specifically, as can be seen from the foregoing description, when it is determined that the frame average energy of the pulse code modulation data does not exceed the preset energy value, the method provided by the embodiment of the present application further determines whether the broadcast is being performed at the current time and determines whether the broadcast is overtime, and if it is determined that the broadcast is overtime, it is indicated that the broadcast may have an error or a fault. Accordingly, broadcasting may be stopped and the current total frame number of the pulse code modulation data and the total energy value of the pulse code modulation data may be cleared.
Further, after the current total frame number of the pulse code modulation data and the energy total value of the pulse code modulation data are cleared, the operation of collecting the pulse code modulation data of the current frame in real time can be performed again, so that the pulse code modulation data can be continuously collected to continuously analyze the broadcasting condition.
Step S204, the current total frame number of the pulse code modulation data and the energy total value of the pulse code modulation data are cleared.
Specifically, as can be seen from the foregoing description, when it is determined that the frame average energy of the pulse code modulation data does not exceed the preset energy value, the method provided by the embodiment of the present application further determines whether the broadcast is being performed at the current time and determines whether the broadcast is overtime, and if it is determined that the broadcast is overtime, it is indicated that the broadcast may have an error or a fault. Thus, the current total frame number of the pulse code modulation data and the total energy value of the pulse code modulation data can be cleared.
After the current total frame number of the pulse code modulation data and the energy total value of the pulse code modulation data are cleared, the operation of collecting the pulse code modulation data of the current frame in real time can be performed in a returning mode, so that the pulse code modulation data can be continuously collected to continuously analyze the broadcasting condition.
According to the technical scheme, when the frame average energy of the pulse code modulation data is not more than the preset energy value, the method provided by the embodiment of the application can judge whether the broadcasting is being carried out at the current moment or not, and further judge whether the broadcasting is overtime or not when the broadcasting is being carried out at the current moment, so that whether the broadcasting is triggered on time or has errors or not is analyzed, and whether the broadcasting is being carried out at the current moment or not can be rapidly determined.
As can be seen from the foregoing description, the method provided by the embodiment of the present application may calculate the total energy value of the pulse code modulation data up to the current time, and the process is described next, and may include the following steps:
step S301, calculating an energy value of each frame of data of the pulse code modulation data.
Specifically, as can be seen from the above description, the method provided by the embodiment of the present application can collect pulse code modulation data in real time.
After the acquisition of the pulse code modulated data, the energy value of each frame of data of the pulse code modulated data may be further calculated.
Wherein, the liquid crystal display device comprises a liquid crystal display device,
the energy value of each frame of data of the pulse code modulation data may be calculated based on the relevant parameters of the pulse code modulation data.
For example, the number of the cells to be processed,
the relevant parameters of the collected pulse code modulation data are as follows: a mono, 32KHz sampling rate, sampling depth 16 bits, i.e. a data length acquired in one second is 64000 bytes (defined as length len), then the step of calculating a frame energy value is as follows:
(1) Sum of absolute values (noted sum): since each sampling point is 16 bits, i.e. 2 bytes, the data takes absolute value in 2 bytes, there may be And adding the absolute values to obtain the sum of the absolute values.
Wherein, the liquid crystal display device comprises a liquid crystal display device,
sum represents the sum of absolute values;
len represents the acquired data length.
(2) Average absolute sum (defined as av): because each sample point is 2 bytes, representing the amplitude of a sound;
thus, the first and second substrates are bonded together,
wherein, the liquid crystal display device comprises a liquid crystal display device,
av represents the average value of the sum of absolute values;
sum represents the sum of absolute values;
the number of absolute values is represented.
(3) The pcm energy value (defined as db) for each frame is found:
determining Root Mean Square (RMS), i.e., the sum of squares of the N terms divided by N and then the square;
the energy value, decibel (db), is defined as the logarithmic ratio of two values, the measured value and the reference value (also referred to as the reference value), respectively.
There are two defined cases of existence,
one of them is the ratio of power:
dB=10lg(W n /W 0 ) 2
wherein, the liquid crystal display device comprises a liquid crystal display device,
W n representing the measured value;
W 0 representing the reference value.
The other is the ratio of the magnitudes:
dB=10lg(X n /X 0 ) 2 =20lg(X n /X 0 )
wherein, the liquid crystal display device comprises a liquid crystal display device,
X n root mean square RMS, i.e., the sum of the squares of the audio sample point values divided by the open square of the sample point (the number of absolute values);
X 0 a reference value (reference value) representing the audio amplitude, i.e., the value of av described above.
The formula for calculating the energy value of each frame of pulse code modulation data in the method provided by the embodiment of the application by combining the theory and a plurality of experiments can be as follows:
unsing int db=(unsing int)(20*log10(av))
Wherein, the liquid crystal display device comprises a liquid crystal display device,
unsigned int db represents an unsigned integer variable.
Step S302, counting the current total frame number of the pulse code modulation data.
Specifically, as can be seen from the above description, the method provided by the embodiment of the present application can calculate the energy of each acquired frame of pulse code modulation data.
Further, the current total frame number of the pulse code modulation data at the current time can be counted, so that the total energy of the pulse code modulation data at the current time can be further calculated.
Step S303, accumulating the energy of each frame of data of the pulse code modulation data to obtain the total energy value of the pulse code modulation data.
Specifically, as can be seen from the above description, the method provided by the embodiment of the present application can calculate the energy of each acquired pulse code modulation data frame, and can count the total frame number of the pulse code modulation data at the current time.
And after determining the energy of each frame of pulse code modulation data and stopping the total frame number of the pulse code modulation data at the current moment, accumulating the energy of each frame of the pulse code modulation data to obtain the energy total value of the pulse code modulation data.
As can be seen from the above-described technical solutions, when it is required to determine whether there is an audio access, the method provided by the embodiments of the present application may accumulate energy of each frame of data of the pulse code modulation data to obtain an energy total value of the pulse code modulation data, so as to analyze whether broadcasting is currently performed or whether there is an audio data access may trigger broadcasting through the energy total value of the pulse code modulation data.
The following describes the audio triggering broadcast detection apparatus provided by the embodiment of the present application, and the audio triggering broadcast detection apparatus described below and the audio triggering broadcast detection method described above may be referred to correspondingly.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an audio triggering broadcast detection apparatus according to an embodiment of the present application.
As shown in fig. 2, the audio triggered broadcast detection apparatus may include:
a data acquisition unit 101, configured to acquire pulse code modulation data of a current frame in real time;
an energy total value calculation unit 102, configured to calculate an energy total value of the pulse code modulation data up to a current time;
a first judging unit 103, configured to judge whether the current total frame number of the pulse code modulation data reaches a preset frame number;
A frame average energy calculating unit 104, configured to calculate, when the execution result of the first judging unit 103 is that it is determined that the current total frame number of the pulse code modulation data reaches the preset frame number, a frame average energy of the pulse code modulation data according to the current total frame number of the pulse code modulation data and an energy total value of the pulse code modulation data;
a second judging unit 105, configured to judge whether the frame average energy of the pulse code modulation data exceeds a preset energy value;
a third judging unit 106, configured to judge whether broadcasting is being performed at the current time when the execution result of the second judging unit 105 is that it is determined that the frame average energy of the pulse code modulation data exceeds the preset energy value;
a determining unit 107, configured to determine to trigger broadcasting when the execution result of the third judging unit 106 is that it is determined that broadcasting is not performed at the current time.
According to the technical scheme, when whether audio access exists or not is required to be judged, the device provided by the embodiment of the application can acquire the pulse code modulation data of the current frame in real time; the pulse code modulation data comprises at least one parameter, wherein the parameter of the pulse code modulation data can feed back whether audio access exists at the current moment or not, so that whether broadcasting is triggered or needs to be triggered can be determined, and therefore, after each current frame of pulse code modulation data is acquired, the energy total value of the pulse code modulation data can be further calculated and cut off to the current moment; judging whether the current total frame number of the pulse code modulation data reaches a preset frame number or not; if the current total frame number of the pulse code modulation data reaches the preset frame number, the method indicates that the audio data access can trigger broadcasting or broadcasting is performed. Therefore, in order to determine whether the broadcasting is already performed at the current moment or the broadcasting can be triggered, after determining that the current total frame number of the pulse code modulation data reaches the preset frame number, the frame average energy of the pulse code modulation data can be calculated according to the current total frame number of the pulse code modulation data and the energy total value of the pulse code modulation data; judging whether the frame average energy of the pulse code modulation data exceeds a preset energy value or not through the frame average energy of the pulse code modulation data; if the frame average energy of the pulse code modulation data exceeds the preset energy value, it is indicated that broadcasting is possible at the current moment, therefore, after determining that the frame average energy of the pulse code modulation data exceeds the preset energy value, it is indicated that audio input exists, and it can be further determined whether broadcasting is being performed at the current moment; if it is determined that the broadcasting is not performed at the current time, it may be determined to trigger the broadcasting.
Therefore, the device provided by the embodiment of the application can detect whether the audio input exists without independently connecting hardware to the chip pin with the AD, can determine whether the audio input exists only according to whether the frame average energy of the pulse code modulation data reaches a specific energy value, and can determine whether the broadcasting can be triggered or the broadcasting already exists, and compared with the existing detection method of the broadcasting triggered by the audio input, the method is more convenient and has higher accuracy, and the detection cost of the broadcasting triggered by the audio input is effectively reduced.
Further alternatively, the energy total value calculating unit 102 may include:
a frame energy calculating unit for calculating an energy value of each frame of data of the pulse code modulation data;
the statistics unit is used for counting the current total frame number of the pulse code modulation data;
and the accumulation unit is used for accumulating the energy of each frame of data of the pulse code modulation data to obtain the total energy value of the pulse code modulation data.
The specific process flow of each unit included in the above-mentioned audio triggering broadcast detection apparatus may be described in part by referring to the foregoing Wen Yinpin triggering broadcast detection method, which is not described herein again.
The audio triggering broadcast detection device provided by the embodiment of the application can be applied to audio triggering broadcast detection equipment, such as a terminal: cell phones, computers, etc. Optionally, fig. 3 shows a block diagram of a hardware structure of the audio triggered broadcast detection apparatus, and referring to fig. 3, the hardware structure of the audio triggered broadcast detection apparatus may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4.
In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3 and the communication bus 4 is at least one, and the processor 1, the communication interface 2 and the memory 3 complete communication with each other through the communication bus 4.
Processor 1 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present application, etc.;
the memory 3 may comprise a high-speed RAM memory, and may further comprise a non-volatile memory (non-volatile memory) or the like, such as at least one magnetic disk memory;
wherein the memory stores a program, the processor is operable to invoke the program stored in the memory, the program operable to: and realizing each processing flow in the terminal audio triggering broadcast detection scheme.
The embodiment of the present application also provides a readable storage medium storing a program adapted to be executed by a processor, the program being configured to: and realizing each processing flow of the terminal in the audio triggering broadcast detection scheme.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. The various embodiments may be combined with one another. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An audio triggered broadcast detection method, comprising:
acquiring pulse code modulation data of a current frame in real time;
calculating the total energy value of the pulse code modulation data from the cut-off to the current moment;
judging whether the current total frame number of the pulse code modulation data reaches a preset frame number or not;
if the current total frame number of the pulse code modulation data reaches the preset frame number, calculating the frame average energy of the pulse code modulation data according to the current total frame number of the pulse code modulation data and the energy total value of the pulse code modulation data;
Judging whether the frame average energy of the pulse code modulation data exceeds a preset energy value or not;
if the frame average energy of the pulse code modulation data exceeds the preset energy value, judging whether broadcasting is performed at the current moment;
if the current moment is determined not to be broadcasted, determining to trigger broadcasting;
if the frame average energy of the pulse code modulation data does not exceed the preset energy value, judging whether broadcasting is performed at the current moment;
if the current time is determined to be broadcasting, judging whether the broadcasting is overtime;
if the broadcasting is overtime, stopping broadcasting, clearing the current total frame number of the pulse code modulation data and the energy total value of the pulse code modulation data, and returning to execute the operation of collecting the pulse code modulation data of the current frame in real time.
2. The method according to claim 1, characterized in that the method further comprises: and if the broadcasting is not overtime, clearing the current total frame number of the pulse code modulation data and the energy total value of the pulse code modulation data, and returning to execute the operation of collecting the pulse code modulation data of the current frame in real time.
3. The method according to claim 1, characterized in that the method further comprises:
If the current time is determined to be broadcasting, recording the current time as the starting time for judging whether the broadcasting is overtime, and returning to execute the operation of collecting the pulse code modulation data of the current frame in real time.
4. The method according to claim 1, characterized in that the method further comprises:
and if the current total frame number of the pulse code modulation data does not reach the preset frame number, returning to execute the operation of collecting the pulse code modulation data of the current frame in real time.
5. The method of claim 1, wherein said calculating the total energy value of the pulse code modulated data up to the current time instant includes:
calculating the energy value of each frame of data of the pulse code modulation data;
counting the current total frame number of the pulse code modulation data;
and accumulating the energy of each frame of data of the pulse code modulation data to obtain the energy total value of the pulse code modulation data.
6. The method of any one of claims 1-5, wherein the predetermined number of frames is calculated based on parameters of the acquired audio data and a data acquisition time,
the preset frame number calculating process is as follows:
Wherein, the liquid crystal display device comprises a liquid crystal display device,
p represents the number of frames to be preset;
a represents the number of points of the acquired audio data per second;
b represents the volume of data acquired per frame;
c represents the sampling depth of the collected audio data;
t represents time;
the preset energy value is set according to hardware equipment for collecting data;
wherein the value range of the preset energy value is [0,45db ].
7. An audio triggered broadcast detection apparatus comprising:
the data acquisition unit is used for acquiring the pulse code modulation data of the current frame in real time;
the energy total value calculation unit is used for calculating the energy total value of the pulse code modulation data from the current moment;
a first judging unit, configured to judge whether a current total frame number of the pulse code modulation data reaches a preset frame number;
a frame average energy calculating unit, configured to calculate, when an execution result of the first judging unit is that it is determined that the current total frame number of the pulse code modulation data reaches the preset frame number, frame average energy of the pulse code modulation data according to the current total frame number of the pulse code modulation data and an energy total value of the pulse code modulation data;
A second judging unit, configured to judge whether the frame average energy of the pulse code modulation data exceeds a preset energy value;
a third judging unit, configured to judge whether broadcasting is being performed at the current time when an execution result of the second judging unit is that it is determined that the frame average energy of the pulse code modulation data exceeds the preset energy value;
a determining unit, configured to determine to trigger broadcasting when the execution result of the third judging unit is that it is determined that broadcasting is not performed at the current time;
a fourth judging unit, configured to judge whether broadcasting is being performed at the current moment if the frame average energy of the pulse code modulation data does not exceed the preset energy value;
a fifth judging unit, configured to judge whether the broadcast is overtime if it is determined that the broadcast is currently being broadcast;
and the clear unit is used for stopping broadcasting if the broadcasting is overtime, clearing the current total frame number of the pulse code modulation data and the energy total value of the pulse code modulation data, and returning to execute the operation of collecting the pulse code modulation data of the current frame in real time.
8. The apparatus according to claim 7, wherein the energy total value calculation unit includes:
A frame energy calculating unit for calculating an energy value of each frame of data of the pulse code modulation data;
the statistics unit is used for counting the current total frame number of the pulse code modulation data;
and the accumulation unit is used for accumulating the energy of each frame of data of the pulse code modulation data to obtain the total energy value of the pulse code modulation data.
9. An audio triggered broadcast detection apparatus comprising: one or more processors, and memory;
stored in the memory are computer readable instructions which, when executed by the one or more processors, implement the steps of the audio triggered broadcast detection method of any one of claims 1 to 6.
10. A readable storage medium, characterized by: the readable storage medium has stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to implement the steps of the audio triggered broadcast detection method of any of claims 1 to 6.
CN202310305001.6A 2023-03-24 2023-03-24 Audio trigger broadcast detection method, device, equipment and readable storage medium Active CN116346267B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310305001.6A CN116346267B (en) 2023-03-24 2023-03-24 Audio trigger broadcast detection method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310305001.6A CN116346267B (en) 2023-03-24 2023-03-24 Audio trigger broadcast detection method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN116346267A CN116346267A (en) 2023-06-27
CN116346267B true CN116346267B (en) 2023-10-31

Family

ID=86889115

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310305001.6A Active CN116346267B (en) 2023-03-24 2023-03-24 Audio trigger broadcast detection method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116346267B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1902845A (en) * 2003-12-30 2007-01-24 森海赛尔电子两合公司 Digital microphone
CN103326801A (en) * 2012-03-23 2013-09-25 联想(北京)有限公司 Method and system for controlling on-line information playing and mobile terminal
WO2019114950A1 (en) * 2017-12-13 2019-06-20 Sonobeacon Gmbh Efficient near-field communication based on audio signals
CN110047471A (en) * 2019-05-13 2019-07-23 深圳市智宇盟科技有限公司 Voice awakening method
CN114005469A (en) * 2021-10-20 2022-02-01 广州市网星信息技术有限公司 Audio playing method and system capable of automatically skipping mute segment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9454975B2 (en) * 2013-11-07 2016-09-27 Nvidia Corporation Voice trigger
US9824719B2 (en) * 2015-09-30 2017-11-21 Apple Inc. Automatic music recording and authoring tool
US11451526B2 (en) * 2020-04-10 2022-09-20 Crestron Electronics Inc. Encrypted 1-bit audio distribution system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1902845A (en) * 2003-12-30 2007-01-24 森海赛尔电子两合公司 Digital microphone
CN103326801A (en) * 2012-03-23 2013-09-25 联想(北京)有限公司 Method and system for controlling on-line information playing and mobile terminal
WO2019114950A1 (en) * 2017-12-13 2019-06-20 Sonobeacon Gmbh Efficient near-field communication based on audio signals
CN110047471A (en) * 2019-05-13 2019-07-23 深圳市智宇盟科技有限公司 Voice awakening method
CN114005469A (en) * 2021-10-20 2022-02-01 广州市网星信息技术有限公司 Audio playing method and system capable of automatically skipping mute segment

Also Published As

Publication number Publication date
CN116346267A (en) 2023-06-27

Similar Documents

Publication Publication Date Title
CN101448180B (en) Test system of mobile telephone speaker
WO2016180100A1 (en) Method and device for improving audio processing performance
CN103152480B (en) Method and device for arrival prompt by mobile terminal
CN101099209A (en) Loudness of normalizing sound recording
EP2571288B1 (en) Mobile device for multi-channel sound collection and output using common connector, and driving method thereof
JP2014512113A (en) Method and system for realizing near field communication
CN108964787A (en) A kind of information broadcast method based on ultrasound
CN116346267B (en) Audio trigger broadcast detection method, device, equipment and readable storage medium
CN113314133A (en) Audio transmission method and electronic equipment
CN103559878A (en) Method for eliminating noise in audio information and device thereof
CN102820937A (en) Measuring method of received signal strength indicator (RSSI), measuring device of RSSI and receiver
CN102393811B (en) Transmission method, device and electronic equipment for digital signals of audio frequency interface
CN102322928B (en) Electronic scale, mobile equipment, body weight measuring system and wireless transmission method
CN105261363A (en) Voice recognition method, device and terminal
CN106612487B (en) System and method for testing terminal audio index of private network system
CN112863545A (en) Performance test method and device, electronic equipment and computer readable storage medium
CN108574905B (en) Sound production device, audio transmission system and audio analysis method thereof
US5089770A (en) Frequency measuring system
CN108605191A (en) abnormal sound detection method and device
CN102980605A (en) An apparatus and a method for signal acquisition
CN115494739A (en) Intelligent sound and intelligent home linkage method and linkage system
CN114302278A (en) Headset wearing calibration method, electronic device and computer-readable storage medium
CN109874083A (en) A kind of news sound pick-up outfit with monitoring device
CN104299617A (en) Method for inlaying and detecting digital information in audio frequency
CN203104777U (en) Communication device for realizing transmission for position signal to mobile communication terminal by virtue of broadcast system

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