CN114812789B - Sound detection method, device and equipment - Google Patents

Sound detection method, device and equipment Download PDF

Info

Publication number
CN114812789B
CN114812789B CN202110120672.6A CN202110120672A CN114812789B CN 114812789 B CN114812789 B CN 114812789B CN 202110120672 A CN202110120672 A CN 202110120672A CN 114812789 B CN114812789 B CN 114812789B
Authority
CN
China
Prior art keywords
digital signal
digital
signals
sound
time domain
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
CN202110120672.6A
Other languages
Chinese (zh)
Other versions
CN114812789A (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.)
Leedarson Lighting Co Ltd
Original Assignee
Leedarson Lighting 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 Leedarson Lighting Co Ltd filed Critical Leedarson Lighting Co Ltd
Priority to CN202110120672.6A priority Critical patent/CN114812789B/en
Publication of CN114812789A publication Critical patent/CN114812789A/en
Application granted granted Critical
Publication of CN114812789B publication Critical patent/CN114812789B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01HMEASUREMENT OF MECHANICAL VIBRATIONS OR ULTRASONIC, SONIC OR INFRASONIC WAVES
    • G01H11/00Measuring mechanical vibrations or ultrasonic, sonic or infrasonic waves by detecting changes in electric or magnetic properties
    • G01H11/06Measuring mechanical vibrations or ultrasonic, sonic or infrasonic waves by detecting changes in electric or magnetic properties by electric means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Measurement Of Mechanical Vibrations Or Ultrasonic Waves (AREA)

Abstract

The application is applicable to the technical field of sound detection, and provides a sound detection method, a sound detection device and sound detection equipment, wherein sound signals are collected and converted into current signals; amplifying the current signals with N different amplification rates to obtain N amplified current signals; wherein N is more than or equal to 2 and N is an integer; filtering each amplified current signal to obtain N analog signals; respectively performing analog-to-digital conversion on each analog signal to obtain N digital signals; the N digital signals are processed and analyzed to determine the digital signal with the minimum waveform distortion degree, the collected same sound signal can be amplified with different amplification rates, and no matter how far or near the sound source is or the sound volume is, the digital signal with the minimum distortion degree of one sound waveform exists in all finally obtained digital signals, and the digital signal is not influenced by the limitation of the sound source distance and the sound volume.

Description

Sound detection method, device and equipment
Technical Field
The application belongs to the technical field of sound detection, and particularly relates to a sound detection method, device and equipment.
Background
The sensitivity of the existing sound detection device is usually fixed, the sound receiving volume and the detection distance of the sound detection device are limited, the use is inconvenient, if the sound source is too close to the sound source, the sound detection device can easily detect distorted sound waveforms, and if the sound source is too far from the sound source, the sound receiving volume is too small, and the sound detection device can not detect sound waveforms.
Disclosure of Invention
The embodiment of the application provides a sound detection method, a device and equipment, which are used for solving the problems that the sensitivity of the existing sound detection equipment is usually fixed, and the sound receiving volume and the detection distance of the sound detection equipment are limited.
A first aspect of an embodiment of the present application provides a sound detection method, including:
collecting a sound signal and converting the sound signal into a current signal;
amplifying the current signals with N different amplification rates to obtain N amplified current signals; wherein N is more than or equal to 2 and N is an integer;
filtering each amplified current signal to obtain N analog signals;
respectively performing analog-to-digital conversion on each analog signal to obtain N digital signals;
and processing and analyzing the N digital signals to determine the digital signal with the minimum waveform distortion degree.
A second aspect of embodiments of the present application provides a sound detection device, including:
the sound collection unit is used for collecting sound signals and converting the sound signals into current signals;
the amplifying unit is used for amplifying the current signals with N different amplification rates respectively to obtain N amplified current signals; wherein N is more than or equal to 2 and N is an integer;
the filtering unit is used for respectively carrying out filtering processing on each amplified current signal to obtain N analog signals;
an analog-to-digital conversion unit for performing analog-to-digital conversion on each of the analog signals to obtain N digital signals;
and the processing unit is used for processing and analyzing the N digital signals and determining the digital signal with the minimum waveform distortion degree.
A third aspect of the embodiments of the present application provides a sound detection device, including a sound collection device, a first communication module, a memory, a first processor, and a computer program stored in the memory and executable on the first processor, where the sound collection device, the first communication module, and the memory are respectively connected to the first processor, and the first processor implements the steps of the sound detection method according to the first aspect of the embodiments of the present application when executing the computer program.
A fourth aspect of the embodiments of the present application provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the sound detection method according to the first aspect of the embodiments of the present application.
According to the sound detection method provided by the first aspect of the embodiment of the application, the sound signals are collected and converted into the current signals; amplifying the current signals with N different amplification rates to obtain N amplified current signals; wherein N is more than or equal to 2 and N is an integer; filtering each amplified current signal to obtain N analog signals; respectively performing analog-to-digital conversion on each analog signal to obtain N digital signals; the N digital signals are processed and analyzed to determine the digital signal with the minimum waveform distortion degree, the collected same sound signal can be amplified with different amplification rates, and no matter how far or near the sound source is or the sound volume is, the digital signal with the minimum distortion degree of one sound waveform exists in all finally obtained digital signals, and the digital signal is not influenced by the limitation of the sound source distance and the sound volume.
It will be appreciated that the advantages of the second to fourth aspects may be found in the relevant description of the first aspect and are not repeated here.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following description will briefly introduce the drawings that are needed in the embodiments or the description of the prior art, it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a sound detection method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a second flow chart of a sound detection method according to an embodiment of the present disclosure;
FIG. 3 is a third flow chart of a sound detection method according to the embodiment of the present disclosure;
FIG. 4 is a fourth flowchart of a sound detection method according to the embodiment of the present disclosure;
FIG. 5 is a fifth flowchart of a sound detection method according to the embodiment of the present disclosure;
FIG. 6 is a flowchart of a sixth method for detecting sound according to the embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a sound detecting device according to an embodiment of the present disclosure;
Fig. 8 is a schematic structural diagram of a sound detection device according to an embodiment of the present disclosure.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The embodiment of the application provides a sound detection method, which can be executed by a first processing module of sound detection equipment when a corresponding computer program is run, and is used for collecting sound signals in an environment, amplifying the sound signals with at least two different amplification rates and processing the sound signals into at least two corresponding digital signals, then processing and analyzing all the digital signals to determine digital signals with the minimum waveform distortion degree, wherein no matter how far or near a sound source is or the sound receiving volume is, the digital signals with the minimum distortion degree of a sound waveform can exist in all finally obtained digital signals, and the digital signals are not influenced by the limitation of the distance of the sound source and the sound receiving volume.
As shown in fig. 1, the sound detection method provided in the embodiment of the present application includes the following steps S101 to S105:
step S101, collecting a sound signal and converting the sound signal into a current signal.
Step S102, amplifying the current signals with N different amplification rates respectively to obtain N amplified current signals; wherein N is more than or equal to 2 and N is an integer;
step S103, respectively carrying out filtering processing on each amplified current signal to obtain N analog signals;
step S104, performing analog-to-digital conversion on each analog signal to obtain N digital signals.
In application, the sound collection device comprises a first processing module and a sound collection device, the sound collection device can comprise N amplification modules which are connected with the first processing module and have different amplification rates, the sound collection device also comprises N filtering modules and N analog-digital conversion modules which are connected with the first processing module, each amplification module corresponds to one filtering module and one analog-digital conversion module, the sound collection module is respectively connected with each amplification module, each amplification module is connected with one filtering module, and each filtering module is connected with one analog-digital conversion module. The number of the amplifying modules, the filtering modules and the analog-digital conversion modules can be set according to actual needs, and the more the number is and the larger the range of the amplification ratios of all the amplifying modules is, the lower the distortion degree of the sound waveform of the sound signal acquired by the sound acquisition device is. Because the amplification rate of each amplifying module of the sound collecting device is different, the sound collecting device can amplify the same collected sound signal with different amplification rates, whether the sound source is far or near or the volume of the sound is large or small, the digital signal with the minimum distortion degree of one sound waveform in all finally obtained digital signals can be ensured, and compared with the sound collecting device with fixed sensitivity, the sound collecting device can effectively improve the collection accuracy of the sound signal.
In one embodiment, each amplifying module corresponds to a sound receiving volume range, the amplifying rate of the ith amplifying module is smaller than that of the (i+1) th amplifying module, and the upper limit value of the sound receiving volume range corresponding to the ith amplifying module is smaller than or equal to the lower limit value of the sound receiving volume range corresponding to the (i+1) th amplifying module;
where i=1, 2, …, N-1.
In the application, the N amplifying modules may respectively correspond to N different sound volume ranges from near to far. Each amplifying module corresponds to a sound receiving volume range, the sound receiving volume corresponding to the amplifying module with small amplifying rate is large, and the sound receiving volume corresponding to the amplifying module with large amplifying rate is small. By reasonably setting the amplification rate of each amplification module, at least one digital signal with undistorted sound waveform or low distortion degree can be obtained in all digital signals through final processing.
In application, the first processing module may include a first processor, which may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The general purpose processor may be a microprocessor or any conventional processor or the like. The sound receiving module can be realized by a microphone, the amplifying module can be realized by an amplifier, the filtering module can be realized by a first filter, and the analog-to-digital conversion module can be realized by an analog-to-digital converter (AnalogtoDigital Converter, ADC).
In application, firstly, a first processor is used for controlling a sound receiving module to convert collected sound signals into current signals; then, each amplifying module is controlled by a first processor to amplify the current signal; then, each filtering module is controlled by the first processor to perform filtering processing on the amplified current Signal output by the amplifying module connected with the first processor to obtain an Analog Signal, wherein the filtering processing can comprise spectrum response (Frequency Spectrum Response) adjustment, sound reinforcement, equalization (Equalization) processing, clutter filtering and the like; finally, each analog-Digital conversion module is controlled by the first processor to carry out Digital conversion on the analog signals output by the filtering module connected with the first processor, so as to obtain Digital signals.
Step S105, processing and analyzing the N digital signals to determine the digital signal with the minimum waveform distortion degree.
In application, after obtaining N digital signals, the first processor may process and analyze all the digital signals to determine a digital signal with the minimum distortion, and then complete other operations according to the digital signal with the minimum distortion, for example, detect the type of the sound signal according to the digital signal with the minimum distortion; analyzing the tone of the sound signal according to the digital signal with the minimum distortion degree; the digital signal with the minimum distortion degree is stored, and the method can be applied to various fields such as sound detection alarm, sound unlocking, voiceprint recognition and the like.
As shown in fig. 2, in one embodiment, step S105 may include steps S201, S202, and S203, or steps S201, S204, and S205, as follows:
step S201, performing frame extraction on each digital signal to obtain all frames of each digital signal.
In application, after the first processor acquires the digital signals, a Frame is extracted from each digital signal to extract each digital signal into frames with a plurality of preset time lengths, and the preset time lengths can be set according to actual needs, for example, 30ms (milliseconds). The first processor may intercept the frames of the digital signal for a preset time length by using a Window function (Window function) to reduce distortion on a frequency spectrum, and obtain all frames of each digital signal, where the Window function may be a Hamming Window (Hamming Window), fei Jie Window (FejerWindow), hanning Window (Hanning Window), gaussian Window (Gaussian Window), and the like. The first processing module may further include N second filters, each of which is connected to one of the analog-to-digital conversion modules, and is configured to perform noise reduction processing on all frames of each of the digital signals output by the analog-to-digital conversion modules, so as to reduce a spectral response of a frequency band that does not need to be detected or filter clutter, where the second filters may be digital filters.
Step S202, performing time domain conversion on all voice frames of each digital signal to obtain a time domain waveform diagram of each digital signal.
In an application, the first processor performs time domain conversion on all frames of each digital signal after obtaining all frames of each digital signal, to obtain a time domain waveform diagram of each digital signal. The time domain waveform chart is a graph in which the time is on the abscissa and the time domain amplitude is on the ordinate, and is used to reflect the time-dependent change in the amplitudes of all frames of each digital signal.
Step S203, determining the digital signal with the minimum waveform distortion degree according to the time domain waveform diagram of the N digital signals.
In application, a crest factor (crest factor) of each digital signal can be obtained according to all time domain amplitudes in a time domain waveform diagram of each digital signal, and then the digital signal with the minimum waveform distortion degree in all digital signals is determined according to the crest factor; the number of the time domain peak amplitudes of each digital signal can be obtained according to all the time domain amplitudes in the time domain waveform diagram of each digital signal, and then the digital signal with the minimum waveform distortion degree in all the digital signals can be determined according to the number of the time domain peak amplitudes. The number of the time domain peak amplitudes is the number of the time domain amplitudes which are larger than or equal to the preset time domain peak amplitude in the time domain waveform diagram.
Step S204, frequency domain conversion is carried out on all sound frames of each digital signal, and a frequency domain waveform diagram of each digital signal is obtained.
In application, the first processor, after obtaining all the frames of each digital signal, performs frequency domain conversion on all the frames of each digital signal to obtain a frequency domain waveform map, i.e., an amplitude spectrogram (AmplitudeFrequency Spectrum Map), of each digital signal. The frequency domain waveform is a graph in which the frequency is on the abscissa and the time domain amplitude is on the ordinate, and is used to reflect the change of the amplitude of all the frames of each digital signal with the frequency. All the bins of each digital signal may be spectrally transformed using a fourier transform (Fourier Transformation, FT), which may be a fast fourier transform (Fast Fourier Transformation, FFT). The resolution fr of the frequency domain waveform is determined by the preset sampling frequency Fs and the length K of the fourier transform, fr=fs/K, each frequency domain amplitude may be expressed as Xf (K), k=1, 2, …, K, and the frequency position fp= (K-1) Fs/k= (K-1) fr where each frequency domain amplitude is located.
Step S205, determining the digital signal with the minimum waveform distortion degree according to the frequency domain waveform diagram of the N digital signals.
In application, the first processor may adjust the frequency domain waveform diagrams of all the digital signals to the same amplification ratio, obtain a new frequency domain waveform diagram of each digital signal, then obtain all the frequency domain amplitudes in the new frequency domain waveform diagram of each digital signal, and finally determine the digital signal with the minimum distortion degree in all the digital signals according to all the frequency domain amplitudes of all the digital signals.
As shown in fig. 3, in one embodiment, step S203 includes steps S301 and S302, or steps S303 and S304, as follows:
step S301, obtaining the crest factor of each digital signal according to the time domain waveform diagram of each digital signal.
In application, the crest factor of each digital signal may be obtained from the energy and the time-domain peak amplitude of each digital signal, the crest factor being equal to the ratio of the time-domain peak amplitude to the energy. The energy of each digital signal may be obtained from the root mean square (Root of Mean Square, RMS) of all time domain amplitudes of each digital signal.
Step S302, determining the digital signal with the minimum waveform distortion degree according to the crest factors of the N digital signals.
In the application, after the crest factors of all the digital signals are obtained, the magnitudes of the crest factors of all the digital signals are compared, and the digital signal with the largest crest factor is determined as the digital signal with the smallest waveform distortion degree. Taking a sine waveform as an example, the crest factor of the undistorted sine waveform is about 1.414, when the sound source volume becomes larger than the saturation value, the sine waveform is cut off, the larger the sound source volume is, the more serious the distortion degree of the sine waveform is, until approaching a square wave, and the crest factor of the square wave is equal to 1, so that the larger the crest factor is, the smaller the distortion degree is.
In one embodiment, step S302 includes:
determining a first target digital signal and a second target digital signal according to crest factors of the N digital signals; wherein the crest factor of the first target digital signal is maximum, and the difference between the crest factor of the first target digital signal and the crest factor of the second target digital signal is within a preset crest factor error range;
determining that the waveform distortion degree of the digital signal with the largest amplification rate in the first target digital signal and the second target digital signal is the smallest when the second target digital signal exists;
when the second target digital signal is not present, it is determined that the waveform distortion of the first target digital signal is minimal.
In the application, other crest factors which are relatively close to the maximum crest factor may exist in all crest factors, and because a certain calculation error may exist in calculating the crest factor, the digital signal with the maximum crest factor is not necessarily the digital signal with the minimum distortion degree, and at this time, the amplification rates of the digital signals corresponding to the crest factors need to be further compared, and the digital signal with the maximum amplification rate is selected as the digital signal with the minimum distortion degree. If no other crest factors relatively close to the maximum crest factor exist in all the crest factors, the digital signal with the maximum crest factor is directly used as the digital signal with the minimum distortion degree. The preset crest factor error range can be set according to actual needs.
Step S303, obtaining the number of time domain peak amplitudes of each digital signal according to the time domain waveform diagram of each digital signal.
In application, all time domain amplitudes of each digital signal can be obtained according to the time domain waveform diagram of each digital signal; and then, acquiring the number of the time domain amplitudes which are larger than or equal to the preset time domain peak amplitude in all the time domain amplitudes of each digital signal, and obtaining the number of the time domain peak amplitudes of each digital signal.
Step S304, determining the digital signal with the minimum waveform distortion degree according to the number of the time domain peak amplitudes of the N digital signals.
In the application, after the number of the time domain peak amplitudes of all the digital signals is obtained, the magnitudes of the number of the time domain peak amplitudes of all the digital signals are compared, and the digital signal with the minimum number of the time domain peak amplitudes is determined as the digital signal with the minimum waveform distortion degree. Since the distortion caused by the saturation of the waveform is cut off at the saturation position of the waveform, and the amplitude of the waveform at the cut-off position is maximum, the number of the time domain waveforms (i.e. the number of the time domain peak amplitudes) of each digital signal at the maximum amplitude can be counted, and the smaller the number is, the smaller the distortion degree is.
In one embodiment, step S304 includes:
determining a third target digital signal and a fourth target digital signal according to the number of time domain peak amplitudes of the N digital signals; wherein the number of time domain peak amplitudes of the third target digital signal is minimal, and a difference between the number of time domain peak amplitudes of the third target digital signal and the number of time domain peak amplitudes of the fourth target digital signal is within a preset number error range;
determining that the waveform distortion degree of the digital signal with the largest amplification rate in the third target digital signal and the fourth target digital signal is the smallest when the fourth target digital signal exists;
when the fourth target digital signal is not present, it is determined that the waveform distortion degree of the third target digital signal is minimum.
In the application, there may be other time domain peak amplitude numbers that are closer to the minimum time domain peak amplitude number in all the time domain peak amplitude numbers, and since there may be a certain calculation error when counting the time domain peak amplitude numbers, the digital signal with the minimum time domain peak amplitude number is not necessarily the digital signal with the minimum distortion degree, at this time, it is necessary to further compare the amplification rates of the digital signals corresponding to the time domain peak amplitude numbers, and select the digital signal with the maximum amplification rate as the digital signal with the minimum distortion degree. If no other time domain peak amplitude quantity which is relatively close to the minimum crest factor exists in all time domain peak amplitude quantities, the digital signal with the minimum time domain peak amplitude quantity is directly used as the digital signal with the minimum distortion degree. The error range of the preset number can be set according to actual needs.
As shown in fig. 4, in one embodiment, step S301 includes the following steps S401 to S403:
step S401, obtaining all the time domain amplitudes and the time domain peak amplitudes of each digital signal according to the time domain waveform diagram of each digital signal.
In an application, after all the time-domain amplitudes of each digital signal are obtained, the magnitudes of all the time-domain amplitudes of each digital signal are compared, the largest of which is obtained, also the time-domain peak amplitude.
Step S402, obtaining the energy of each digital signal according to all the time domain amplitudes of each digital signal.
In application, the calculation formula for obtaining the energy of each digital signal in step S402 is as follows:
wherein E is n Representing the energy of an nth digital signal of the N digital signals, M representing the number of all time-domain amplitudes of the time-domain waveform of the nth digital signal, S (M) representing the mth time-domain amplitude of the time-domain waveform of the nth digital signal, n=1, 2, …, N, m=1, 2, …, M being ≡2 and M being an integer.
Step S403, obtaining a crest factor of each digital signal according to the time domain peak amplitude and energy of each digital signal.
In application, the calculation formula for obtaining the crest factor of each digital signal in step S603 is as follows:
wherein CF is as follows n Representing the crest factor of the nth digital signal, A n Representing the time domain peak amplitude of the nth digital signal.
As shown in fig. 5, in one embodiment, step S205 includes the following steps S501 to S503:
step S501, adjusting the frequency domain waveform diagrams of the N digital signals to the same amplification ratio, and obtaining a new frequency domain waveform diagram of each digital signal.
In application, each digital signal is obtained by amplifying, filtering and analog-to-digital converting a current signal, and the amplification factor of the frequency domain waveform of each digital signal is the amplification factor adopted when amplifying the current signal. Since the preset sampling frequencies used in obtaining the frequency domain waveform of each digital signal are the same, adjusting the frequency domain waveform of the N digital signals to the same amplification ratio means adjusting the amplification ratio of the frequency domain amplitudes of the frequency domain waveform of the N digital signals to the same.
Step S502, obtaining all frequency domain amplitudes of each digital signal according to a new frequency domain waveform diagram of each digital signal;
Step S503, determining the digital signal with the least waveform distortion degree according to all the frequency domain amplitudes of the N digital signals.
In an application, the You La distance (Euclidean Distance) between all digital signals can be calculated from all frequency domain amplitudes (magnitudes) of all digital signals, and then the digital signal with the least distortion can be determined from the You La distance.
In one embodiment, step S503 includes:
acquiring You La distances between every two N digital signals according to all frequency domain amplitudes of the N digital signals;
when the you-go distance between the two digital signals is larger than or equal to the preset distance, determining that the waveform distortion degree of the digital signal with smaller amplification ratio in the two digital signals is smaller;
when the You La distance between the two digital signals is smaller than the preset distance, determining that the waveform distortion degree of the digital signal with larger amplification rate in the two digital signals is smaller;
and acquiring the digital signal with the largest amplification factor in all the digital signals with the smaller waveform distortion degree, and obtaining the digital signal with the smallest waveform distortion degree.
In application, the calculation formula for acquiring the you-go distance between every two of the N digital signals is as follows:
Wherein D represents You La distance between the ith digital signal and the jth digital signal in the N digital signals, K represents the number of frequency amplitudes in each of the digital signals, X i f (k) represents the kth frequency domain amplitude, X, of the ith digital signal j f (K) represents the kth frequency domain amplitude of the jth digital signal, k=1, 2, …, K, i=1, 2, …, N, j=1, 2, …, N and i+.j.
In application, when the you-go distance between two digital signals is greater than or equal to the preset distance, it indicates that the waveforms of the two digital signals differ greatly, and the digital signal with larger amplification is used as the digital signal with smaller waveform distortion; when the You La distance between the two digital signals is smaller than the preset distance, the fact that the waveforms of the two digital signals are smaller is indicated, the digital signal with smaller amplification rate is taken as the digital signal with smaller waveform distortion degree, and finally the digital signal with the largest amplification rate is obtained from all the digital signals with smaller waveform distortion degree and is taken as the digital signal with the smallest waveform distortion degree.
As shown in fig. 6, in one embodiment, following step S105, the following steps S601 and S602 are included:
step S601, detecting the type of the sound signal according to the digital signal with the minimum waveform distortion.
In application, after determining the digital signal with the minimum waveform distortion degree, detecting the type of the sound signal according to the digital signal, comparing the waveform characteristics of the digital signal with the waveform characteristics of the preset sound signal, and if the waveform characteristics of the digital signal and the waveform characteristics of the preset sound signal are matched, determining that the sound signal is the preset sound signal. Waveform characteristics may include, but are not limited to, total positive and negative period duration, number of phase change cycles, positive and negative period timing, time length of positive period, time length of negative period, and the like.
Step S602, when the sound signal is a preset sound signal, sending an alarm signal to the client.
In the application, when the sound signal is determined to be the preset sound signal to be detected, an alarm signal is sent to the client, and a user of the client is notified in time. The preset Sound signal may be an alarm Sound signal sent by an alarm, or may be a Sound signal sent by a specific object to be detected, for example, a whistle signal sent by a vehicle, a Sound signal sent by a rare animal, a Sound (earth Sound) signal formed by Earthquake waves, etc. The alarm may include, but is not limited to, a smoke alarm, a carbon monoxide alarm, a burglar alarm, etc. various alarms that can emit an alarm sound signal. The client may be a mobile phone, smart ring (smart bracelet, smart collar, etc.), tablet, notebook, netbook, digital assistant (Digntal Assistant, DA), ultra-mobile personal computer (Ultra-Mobile Personal Computer, UMPC), server, etc. computing devices available to individual users or related rescue units.
In application, parameters such as an amplification rate, a preset time length, a preset time domain peak amplitude, a preset sampling frequency, a sampling frequency and a bit number of the analog-digital conversion module, a preset crest factor error range, a preset quantity error range, a preset distance, a preset sound signal and the like can be set by a user through a first human-computer interaction module of the sound detection device or a second human-computer interaction module of the client according to actual needs. The first man-machine interaction module and the second man-machine interaction module may include at least one of an entity key, a touch sensor, a gesture recognition sensor and a voice recognition device (for example, a microphone and a voice processing chip), so that a user may set each parameter in a corresponding touch manner, gesture control manner or voice control manner.
In application, the sound detection device may further include a first communication module, where the first communication module may be configured as any device capable of directly or indirectly performing long-range wired or wireless communication with the client according to actual needs, for example, the first communication module may provide a solution of communication including wireless local area network (Wireless Localarea Networks, WLAN) (such as Wi-Fi network), bluetooth, zigbee, mobile communication network, global navigation satellite system (Global Navigation Satellite System, GNSS), frequency modulation (Frequency Modulation, FM), short-range wireless communication technology (Near Field Communication, NFC), infrared technology (Infrared, IR), and the like, which is applied to the network device. The first communication module may be one or more devices integrating at least one communication first processing module. The first communication module may include an antenna, which may have only one array element, or may be an antenna array including a plurality of array elements. The first communication module can receive electromagnetic waves through the antenna, frequency-modulate and filter the electromagnetic wave signals, and send the processed signals to the processor. The first communication module can also receive signals to be transmitted from the processor, frequency modulate and amplify the signals, and convert the signals into electromagnetic waves through the antenna to radiate.
In application, the client may further include a second communication module supporting an equal communication manner with the sound detection device, for receiving the alarm signal, where an implementation principle of the second communication module may be the same as that of the first communication module, and will not be described herein. The client may further include a second processor, configured to process the alarm signal into information capable of informing the user through the second man-machine interaction module, where a principle of implementation of the second processor may be the same as that of the first processor, and will not be described herein. The second man-machine interaction module may further include at least one of a display, a voice playing device (e.g. a speaker), and an LED lamp, so that the client may inform the user of the alarm signal through a corresponding display mode, a voice broadcasting mode, a voice prompt or a light prompt mode.
According to the sound detection method provided by the embodiment of the application, the collected same sound signal can be amplified at different amplification rates, and whether the sound source is far or near or the sound receiving volume is large, all the finally obtained digital signals can have the digital signal with the minimum distortion degree of a sound waveform, and the digital signal is not influenced by the limitation of the sound source distance and the sound receiving volume; the system can also communicate and link with the alarm, and can timely inform a user or a related rescue unit at a remote place to carry out emergency rescue treatment when detecting that the alarm sends out an alarm sound signal, so that the disaster can be effectively prevented or the life and property loss caused by the disaster can be reduced; the method can also be used for detecting whistle signals sent by vehicles, sound signals sent by rare animals, ground sound signals formed by earthquake waves and the like, so that the method can be used for detecting whether vehicles are whistle or approaching, whether rare animals exist or not, whether earthquake occurs or not and the like.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
The embodiment of the application also provides a sound detection device which is applied to the sound detection equipment and is used for executing the method steps in the embodiment of the sound detection method. The sound detection means may be virtual means (virtual appliance) in the sound detection device, executed by the first processor of the sound detection device, or may be the sound detection device itself.
As shown in fig. 7, a sound detection device 100 provided in an embodiment of the present application includes:
an acquisition unit 101 for acquiring a sound signal and converting the sound signal into a current signal;
the amplifying unit 102 is configured to amplify the current signals with N different amplification rates, to obtain N amplified current signals; wherein N is more than or equal to 2 and N is an integer;
a filtering unit 103, configured to perform filtering processing on each of the amplified current signals, respectively, to obtain N analog signals;
an analog-to-digital conversion unit 104 for performing analog-to-digital conversion on each of the analog signals to obtain N digital signals;
And the processing unit 105 is used for processing and analyzing the N digital signals and determining the digital signal with the minimum waveform distortion degree.
In one embodiment, the sound detection device further comprises:
and the detection unit is used for detecting the type of the sound signal according to the digital signal with the minimum waveform distortion degree.
And the alarm unit is used for sending an alarm signal to the client when the sound signal is a preset sound signal.
In application, each unit in the sound detection device may be a software program unit, may be implemented by different logic circuits integrated in a processor, or may be implemented by a plurality of distributed processors.
As shown in fig. 8, the embodiment of the present application further provides a sound detection device 200, including: at least one first processor 201 (only one processor is shown in fig. 8), a memory 202, a computer program 203 stored in the memory 202 and executable on the at least one first processor 201, a sound collection device 204, and a first communication module 205, the memory 202, the sound collection device 204, and the first communication module 205 being communicatively connected to the at least one first processor 201, respectively, the first processor 201 implementing the steps in the respective sound detection method embodiments described above when the computer program 203 is executed.
In applications, the sound detection device may include, but is not limited to, a first processor, a memory, a sound collection device, a first communication module, and the like. It will be appreciated by those skilled in the art that fig. 8 is merely an example of a sound detection device, and is not meant to be limiting, and may include more or fewer components than shown, or may combine certain components, or different components, and may include, for example, a human-machine interaction device, a power device, an input-output device, a network access device, etc.
In applications, the memory may in some embodiments be an internal storage unit of the sound detection device, such as a hard disk or a memory of the sound detection device. The memory may also be an external storage device of the sound detection device in other embodiments, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like. The memory may also include both internal memory units of the sound detection device and external memory devices. The memory is used to store an operating system, application programs, boot loader (BootLoader), data, and other programs, etc., such as program code for a computer program, etc. The memory may also be used to temporarily store data that has been output or is to be output.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein again.
It will be apparent to those skilled in the art that the above-described functional units are merely illustrated in terms of division for convenience and brevity, and that in practical applications, the above-described functional units may be allocated to different functional units, i.e., the internal structure of the apparatus may be divided into different functional units, so as to perform all or part of the above-described functions. The functional units in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present application. The specific working process of the units in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Embodiments of the present application also provide a computer readable storage medium storing a computer program that, when executed by a processor, implements steps in each of the above-described embodiments of the sound detection method.
Embodiments of the present application provide a computer program product that, when executed on a sound detection device, enables the sound detection device to implement the steps of the above-described embodiments of the sound detection method.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying the computer program code to the sound detection apparatus, a recording medium, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a U-disk, removable hard disk, magnetic or optical disk, etc.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (8)

1. A method for detecting sound, comprising:
collecting a sound signal and converting the sound signal into a current signal;
amplifying the current signals with N different amplification rates to obtain N amplified current signals; wherein N is more than or equal to 2 and N is an integer;
Filtering each amplified current signal to obtain N analog signals;
respectively performing analog-to-digital conversion on each analog signal to obtain N digital signals;
respectively performing sound frame extraction on each digital signal to obtain all sound frames of each digital signal;
performing time domain conversion on all voice frames of each digital signal to obtain a time domain waveform diagram of each digital signal;
obtaining the crest factor of each digital signal according to the time domain waveform diagram of each digital signal;
determining the digital signal with the minimum waveform distortion degree according to the crest factors of the N digital signals;
or, according to the time domain waveform diagram of each digital signal, obtaining the number of time domain peak amplitudes of each digital signal;
determining the digital signal with the minimum waveform distortion degree according to the number of the time domain peak amplitudes of the N digital signals;
or, performing frequency domain conversion on all voice frames of each digital signal to obtain a frequency domain waveform diagram of each digital signal;
adjusting the frequency domain waveform diagrams of the N digital signals to the same amplification ratio to obtain a new frequency domain waveform diagram of each digital signal;
Acquiring all frequency domain amplitudes of each digital signal according to a new frequency domain waveform diagram of each digital signal;
and determining the digital signal with the minimum waveform distortion degree according to all the frequency domain amplitudes of the N digital signals.
2. The method of claim 1, wherein said obtaining a crest factor of each of said digital signals based on a time domain waveform of each of said digital signals comprises:
acquiring all time domain amplitudes and time domain peak amplitudes of each digital signal according to the time domain oscillogram of each digital signal;
acquiring energy of each digital signal according to all time domain amplitudes of each digital signal;
and obtaining the crest factor of each digital signal according to the time domain peak amplitude and energy of each digital signal.
3. The sound detection method of claim 2, wherein the calculation formula for obtaining the energy of each digital signal according to all the time-domain amplitudes of each digital signal is:
wherein E is n Representing the energy of an nth digital signal of the N digital signals, M representing the number of all time-domain amplitudes of the time-domain waveform of the nth digital signal, S (M) representing the mth time-domain amplitude of the time-domain waveform of the nth digital signal, n=1, 2, …, N, m=1, 2, …, M being ≡2 and M being an integer;
The calculation formula for obtaining the crest factor of each digital signal according to the time domain peak amplitude and energy of each digital signal is as follows:
wherein CF is as follows n Representing the crest factor of the nth digital signal, A n Representing the time domain peak amplitude of the nth digital signal.
4. The method of claim 1, wherein determining the digital signal with the least degree of waveform distortion based on crest factors of the N digital signals comprises:
determining a first target digital signal and a second target digital signal according to crest factors of the N digital signals; wherein the crest factor of the first target digital signal is maximum, and the difference between the crest factor of the first target digital signal and the crest factor of the second target digital signal is within a preset crest factor error range;
determining that the waveform distortion degree of the digital signal with the largest amplification rate in the first target digital signal and the second target digital signal is the smallest when the second target digital signal exists;
when the second target digital signal is not present, it is determined that the waveform distortion of the first target digital signal is minimal.
5. The method of claim 1, wherein determining the digital signal with the least degree of waveform distortion based on the number of time-domain peak amplitudes of the N digital signals comprises:
determining a third target digital signal and a fourth target digital signal according to the number of time domain peak amplitudes of the N digital signals; wherein the number of time domain peak amplitudes of the third target digital signal is minimal, and a difference between the number of time domain peak amplitudes of the third target digital signal and the number of time domain peak amplitudes of the fourth target digital signal is within a preset number error range;
determining that the waveform distortion degree of the digital signal with the largest amplification rate in the third target digital signal and the fourth target digital signal is the smallest when the fourth target digital signal exists;
when the fourth target digital signal is not present, it is determined that the waveform distortion degree of the third target digital signal is minimum.
6. The method of claim 1, wherein determining the digital signal with the least degree of waveform distortion based on all frequency domain amplitudes of the N digital signals comprises:
acquiring You La distances between every two N digital signals according to all frequency domain amplitudes of the N digital signals;
When the you-go distance between the two digital signals is larger than or equal to the preset distance, determining that the waveform distortion degree of the digital signal with smaller amplification ratio in the two digital signals is smaller;
when the You La distance between the two digital signals is smaller than the preset distance, determining that the waveform distortion degree of the digital signal with larger amplification rate in the two digital signals is smaller;
and acquiring the digital signal with the largest amplification factor in all the digital signals with the smaller waveform distortion degree, and obtaining the digital signal with the smallest waveform distortion degree.
7. A sound detection device, comprising:
the acquisition unit is used for acquiring sound signals and converting the sound signals into current signals;
the amplifying unit is used for amplifying the current signals with N different amplification rates respectively to obtain N amplified current signals; wherein N is more than or equal to 2 and N is an integer;
the filtering unit is used for respectively carrying out filtering processing on each amplified current signal to obtain N analog signals;
an analog-to-digital conversion unit for performing analog-to-digital conversion on each of the analog signals to obtain N digital signals;
a processing unit for:
Respectively performing sound frame extraction on each digital signal to obtain all sound frames of each digital signal;
performing time domain conversion on all voice frames of each digital signal to obtain a time domain waveform diagram of each digital signal;
obtaining the crest factor of each digital signal according to the time domain waveform diagram of each digital signal;
determining the digital signal with the minimum waveform distortion degree according to the crest factors of the N digital signals;
or, according to the time domain waveform diagram of each digital signal, obtaining the number of time domain peak amplitudes of each digital signal;
determining the digital signal with the minimum waveform distortion degree according to the number of the time domain peak amplitudes of the N digital signals;
or, performing frequency domain conversion on all voice frames of each digital signal to obtain a frequency domain waveform diagram of each digital signal;
adjusting the frequency domain waveform diagrams of the N digital signals to the same amplification ratio to obtain a new frequency domain waveform diagram of each digital signal;
acquiring all frequency domain amplitudes of each digital signal according to a new frequency domain waveform diagram of each digital signal;
and determining the digital signal with the minimum waveform distortion degree according to all the frequency domain amplitudes of the N digital signals.
8. A sound detection device comprising a sound collection means, a first communication module, a memory, a first processor and a computer program stored in the memory and operable on the first processor, the sound collection means, the first communication module and the memory being connected to the first processor, respectively, the first processor executing the computer program to carry out the steps of the sound detection method according to any one of claims 1 to 6.
CN202110120672.6A 2021-01-28 2021-01-28 Sound detection method, device and equipment Active CN114812789B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110120672.6A CN114812789B (en) 2021-01-28 2021-01-28 Sound detection method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110120672.6A CN114812789B (en) 2021-01-28 2021-01-28 Sound detection method, device and equipment

Publications (2)

Publication Number Publication Date
CN114812789A CN114812789A (en) 2022-07-29
CN114812789B true CN114812789B (en) 2024-03-08

Family

ID=82526036

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110120672.6A Active CN114812789B (en) 2021-01-28 2021-01-28 Sound detection method, device and equipment

Country Status (1)

Country Link
CN (1) CN114812789B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004227115A (en) * 2003-01-21 2004-08-12 Omron Corp Information processing device and method
DE102005032982A1 (en) * 2004-07-14 2006-02-16 Technische Universität München Signal-conversion method for converting an incoming analog/digital signal splits the incoming signal into numerous amplitude ranges to make it available to multiple channels for digitalizing
CN110213695A (en) * 2019-05-31 2019-09-06 广州市锐丰智能科技有限公司 Improve the method and intelligent sound reinforcement system of the output audio signal-to-noise ratio of sound reinforcement system
CN111345047A (en) * 2019-04-17 2020-06-26 深圳市大疆创新科技有限公司 Audio signal processing method, apparatus and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004227115A (en) * 2003-01-21 2004-08-12 Omron Corp Information processing device and method
DE102005032982A1 (en) * 2004-07-14 2006-02-16 Technische Universität München Signal-conversion method for converting an incoming analog/digital signal splits the incoming signal into numerous amplitude ranges to make it available to multiple channels for digitalizing
CN111345047A (en) * 2019-04-17 2020-06-26 深圳市大疆创新科技有限公司 Audio signal processing method, apparatus and storage medium
CN110213695A (en) * 2019-05-31 2019-09-06 广州市锐丰智能科技有限公司 Improve the method and intelligent sound reinforcement system of the output audio signal-to-noise ratio of sound reinforcement system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
音频信号分析仪设计;任翔;鹿璇;罗国军;;电声技术(03);第23-28页 *

Also Published As

Publication number Publication date
CN114812789A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
CN102246228B (en) Sound identification systems
US6570500B1 (en) Infra-sound surveillance system
CN104240422B (en) Ultrasonic wave space monitoring anti-theft method based on distance images
CN103948398B (en) Be applicable to the heart sound location segmentation method of android system
EP1953734A2 (en) Sound determination method and sound determination apparatus
CN101414847B (en) Jamming detector and jamming detecting method
US8121222B2 (en) Systems and methods for construction of time-frequency surfaces and detection of signals
EP3382426B1 (en) Switching method and portable electronic device
US20170296081A1 (en) Frame based spike detection module
CN113721213B (en) Living body detection method, terminal and storage medium
US20030197616A1 (en) Weather warning system and method
CN106611596A (en) Time-based frequency tuning of analog-to-information feature extraction
WO2023284764A1 (en) Method and apparatus for detecting living body in vehicle by means of radar, and terminal device
CN113008361A (en) Substation boundary noise anti-environmental interference detection method and device
CN113674763B (en) Method, system, device and storage medium for identifying whistle by utilizing line spectrum characteristics
CN114812789B (en) Sound detection method, device and equipment
CN104282303A (en) Method for conducting voice recognition by voiceprint recognition and electronic device thereof
US20130162317A1 (en) System and method for processing signal
CN109377982B (en) Effective voice obtaining method
CN109074707A (en) glass breakage detection system
CN114827823A (en) Sound collection device, sound detection equipment and system
Song et al. Specific emitter identification based on intrinsic time-scale decomposition
CN111128219A (en) Laser Doppler sound taking method and device
CN214413019U (en) Sound collection device, sound detection equipment and system
US20070087697A1 (en) Detection of lightning

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