A pop detection method, a pop detection system, a storage medium and an electronic device
By calculating the energy value of audio and recording files using Fourier transform, the system automatically detects pops in audio files, solving the problems of low efficiency and high misjudgment rate of manual detection, and achieving efficient and accurate pop detection and fault repair.
Patent Information
- Application Number
- CN202211418166.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-14
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-11-14
AI Technical Summary
In existing technologies, it is difficult to detect popping sounds during audio file playback, and manual detection is inefficient and has a high false positive rate.
The energy values of audio and recording files are calculated by Fourier transform, and it is determined whether the energy difference between the two exceeds a set threshold. The system can also automatically detect whether there are pops in the audio file.
It enables automatic detection of popping sounds in audio files, improving detection accuracy and efficiency. No manual listening is required, and popping sound detection reports are generated to help users identify and repair faults.
Smart Images

Figure CN115731943B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of signal processing, in particular to a pop detection method, a pop detection system, a storage medium and an electronic device. BACKGROUND
[0002] With the development of set-top box / television technology, audio files enrich people's entertainment life, but there may be pops in the audio playing process, affecting user experience. A pop is a short pulse in the music waveform, which sounds like a "click". Therefore, in order to smoothly play audio files on set-top box / television products, it is necessary to check the pop part in the playing process. Usually, the human ear is used, but there are many inconveniences such as listeners cannot test for a long time, poor auditory sensitivity, subjective judgment, etc. SUMMARY
[0003] The purpose of the present application is to provide a pop detection method, a pop detection system, a computer readable storage medium and an electronic device, which can overcome manual detection of pops and reduce the pop misjudgment rate.
[0004] To solve the above technical problems, the present application provides a pop detection method, and the specific technical solutions are as follows:
[0005] An audio file and a corresponding recording file are obtained;
[0006] The first energy value corresponding to the audio file and the second energy value corresponding to the recording file are calculated by using Fourier transform;
[0007] If the difference between the first energy value and the second energy value at the same time exceeds a set threshold, it is determined that the audio file has a pop.
[0008] Optionally, obtaining an audio file and a corresponding recording file comprises:
[0009] Obtaining a source file from an audio playing device;
[0010] Decoding the source file to obtain the audio file;
[0011] Sending the audio file to a playback device, and recording the audio file played by the playback device using a recording device to obtain the recording file.
[0012] Optionally, before calculating the first energy value corresponding to the audio file and the second energy value corresponding to the recording file by using Fourier transform, the method further comprises:
[0013] Splitting the audio file into a sub-audio file and splitting the recording file into a sub-recording file with the same time period as the sub-audio file;
[0014] Correspondingly, the calculating the first energy value corresponding to the audio file and the second energy value corresponding to the recording file by using Fourier transform comprises:
[0015] The calculating the first energy value corresponding to each of the sub-audio files and the second energy value corresponding to each of the sub-recording files by using Fourier transform.
[0016] Optionally, the determining that the audio file has the pop noise comprises:
[0017] determining whether the difference between the first energy value corresponding to the sub-audio file and the second energy value corresponding to the sub-recording file in the same target time period exceeds the set threshold value;
[0018] If yes, it is determined that the audio file has the pop noise in the target time period.
[0019] Optionally, the determining that the audio file has the pop noise comprises:
[0020] determining a first energy spectrum corresponding to the first energy value;
[0021] determining a second energy spectrum corresponding to the second energy value;
[0022] merging the first energy spectrum and the second energy spectrum to obtain an energy comparison graph; wherein the first coordinate axis of the first energy spectrum, the second energy spectrum and the energy comparison graph represents time, and the second coordinate axis represents energy value;
[0023] If there is a coordinate point in the energy comparison graph, in which the difference between the first energy value and the second energy value is greater than the set threshold value, it is determined that the sub-audio file corresponding to the coordinate point has the pop noise.
[0024] Optionally, the calculating the first energy value corresponding to the audio file and the second energy value corresponding to the recording file by using Fourier transform comprises:
[0025] converting the audio file from a time domain signal to a first frequency domain signal by using Fourier transform, and calculating the first energy value corresponding to the frequency domain signal;
[0026] converting the recording file from a time domain signal to a second frequency domain signal by using Fourier transform, and calculating the second energy value corresponding to the frequency domain signal.
[0027] Optionally, after the determining that the audio file has the pop noise, the method further comprises:
[0028] The pop noise detection report includes the sub-audio file in which the pop noise exists.
[0029] The pop noise detection system comprises:
[0030] The file acquisition module is configured to acquire an audio file and a corresponding recording file.
[0031] The energy value calculation module is configured to calculate a first energy value corresponding to the audio file and a second energy value corresponding to the recording file by using Fourier transform.
[0032] The pop noise detection module is configured to determine that the audio file has pop noise when a difference between the first energy value and the second energy value at the same time exceeds a set threshold.
[0033] The application further provides a computer readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the steps of the method.
[0034] The application further provides an electronic device comprising a memory and a processor, and the memory has a computer program stored therein, and the processor invokes the computer program in the memory to implement the steps of the method.
[0035] The application provides a pop noise detection method, which comprises the following steps: acquiring an audio file and a corresponding recording file; calculating a first energy value corresponding to the audio file and a second energy value corresponding to the recording file by using Fourier transform; and determining that the audio file has pop noise when a difference between the first energy value and the second energy value at the same time exceeds a set threshold.
[0036] The application calculates the first energy value corresponding to the audio file and the second energy value corresponding to the recording file respectively, and determines the difference between the first energy value and the second energy value, so as to detect whether the audio file has pop noise. The pop noise can be detected without manual listening to the audio file, and the automatic detection of the pop noise phenomenon of the audio file is realized. On this basis, a corresponding pop noise detection report can be generated, which further helps users to identify and repair the pop noise fault.
[0037] The application further provides a pop noise detection system, a computer readable storage medium and an electronic device, which have the above beneficial effects, and details are not repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the accompanying drawings in the following description only are part of the present application, and for those skilled in the art, other drawings can be obtained based on the provided drawings without creative labor.
[0039] Figure 1 A flow chart of a pop sound detection method provided by an embodiment of the present application;
[0040] Figure 2 A pop sound judgment process schematic diagram provided by an embodiment of the present application;
[0041] Figure 3 An energy comparison diagram schematic diagram provided by an embodiment of the present application;
[0042] Figure 4 A flow chart of another pop sound detection method provided by an embodiment of the present application;
[0043] Figure 5 A pop sound detection system structure schematic diagram provided by an embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0045] Reference is made to Figure 1 , Figure 1 A flow chart of a pop sound detection method provided by an embodiment of the present application, the method comprising:
[0046] S101: obtaining an audio file and a corresponding recording file;
[0047] This step needs to obtain an audio file and a corresponding recording file. Herein, how to obtain the audio file and the recording file is not limited, and the audio file can be from a source file played by an audio playing device such as a set top box / television product. In a feasible mode, this step can comprise the following steps:
[0048] S1011: obtaining a source file from an audio playing device;
[0049] S1012: decoding the source file to obtain the audio file;
[0050] S1013: send the audio file to a playback device, and record the audio file played by the playback device by using a recording device to obtain the recording file.
[0051] In the process of obtaining the audio file, the audio file can be obtained directly from the audio playback device. If the source file is obtained, the source file can be decoded by using a corresponding decoder to obtain the audio file. The audio file can be sent to any playback device for playing via a sound card, and the audio file played by the playback device can be recorded by using a recording device to obtain the recording file.
[0052] It should be noted that whether the audio is loud has nothing to do with the quality of the playback device and the recording device itself, so any playback device and recording device can be used to implement this step.
[0053] S102: calculate a first energy value corresponding to the audio file and a second energy value corresponding to the recording file by using Fourier transform;
[0054] This step aims to calculate the first energy value corresponding to the audio file and the second energy value corresponding to the recording file. It should be noted that the process of calculating the first energy value and the second energy value is independent of each other and does not affect each other, and there is no established order.
[0055] In the process of performing this step, the audio file can be converted from a time domain signal to a corresponding first frequency domain signal by using Fourier transform, and the first energy value corresponding to the frequency domain signal is calculated. Then the recording file is converted from a time domain signal to a corresponding second frequency domain signal by using Fourier transform, and the second energy value corresponding to the frequency domain signal is calculated. It can be seen that the calculation method used in the process of calculating the first energy value and the second energy value is usually the same, and only different energy values are obtained for different targets. Of course, in the specific implementation of this step, those skilled in the art can also use various deformation formulas of Fourier transform or other calculation methods based on Fourier transform that can obtain energy, which should also be within the protection scope of the present application.
[0056] S103: if the difference between the first energy value and the second energy value at the same time exceeds a set threshold, it is determined that the audio file has loudness.
[0057] After obtaining the first energy value and the second energy value, the energy difference between the two can be determined. Since the audio file and the recording file corresponding to the first energy value and the second energy value have the same playing time, i.e., the two have the same playing time, this step actually determines the energy difference between the two at the same time. Once the difference between the first energy value and the second energy value at the same time exceeds the set threshold, it is determined that the audio file has loudness.
[0058] In one possible implementation, the first energy value can be taken as a reference value, the energy difference between the second energy value and the first energy value is calculated, and compared with a set threshold. If the set threshold is exceeded, it is determined that the audio file has a pop sound, and the pop sound time point is the time point at which the set threshold is exceeded.
[0059] The set threshold is not specifically limited in the embodiments of the present application, and can be set by a person skilled in the art according to prior knowledge or pop sound related parameters.
[0060] The embodiments of the present application can detect whether the audio file has a pop sound by calculating the first energy value corresponding to the audio file and the second energy value corresponding to the recording file respectively, and determining the difference between the first energy value and the second energy value. The pop sound in the audio file is detected without manual listening to the audio file, the automatic detection of the pop sound in the audio file is realized, and the detection accuracy and efficiency are improved.
[0061] Based on the above embodiments, as a preferred embodiment, before the first energy value corresponding to the audio file and the second energy value corresponding to the recording file are calculated by using Fourier transform, the audio file can be split into sub-audio files, and the recording file can be split into sub-recording files with the same time period as the sub-audio files.
[0062] Correspondingly, when the first energy value corresponding to the audio file and the second energy value corresponding to the recording file are calculated by using Fourier transform, the first energy value corresponding to each sub-audio file can be calculated by using Fourier transform, and the second energy value corresponding to each sub-recording file can be calculated.
[0063] Compared with the previous embodiment, the audio file and the recording file are split in the same way in the embodiments of the present application. When the playing time of the audio file is too long, the audio file and the corresponding recording file are split, which can reduce the time for calculating the energy value corresponding to each sub-audio file and sub-recording file, so that the process of calculating the energy value of each sub-audio file or sub-recording file can be performed synchronously. In the specific application of the embodiments of the present application, parallel threads can be used to perform the calculation of the energy value corresponding to each sub-audio file or each sub-recording file, so as to improve the calculation efficiency of the first energy value corresponding to the audio file and the second energy value corresponding to the recording file.
[0064] Here, how to split is not limited, and the audio file can be equally divided according to the time length of the audio file, for example, split at a period of 1 minute, or the audio file can be unequally divided.
[0065] Based on the split of the audio file and the corresponding recording file, the process of pop sound determination can include the following steps:
[0066] The first step is to determine whether the difference between the first energy value corresponding to the sub-audio file and the second energy value corresponding to the sub-recording file in the same target time period exceeds the set threshold value; if yes, go to the second step;
[0067] The second step is to determine whether the audio file has a pop sound in the target time period.
[0068] If the sub-audio file and the sub-recording file are numbered in time sequence, the numbers of the sub-audio file and the sub-recording file in the same target time period should be the same. The remaining determination process is not repeated.
[0069] The audio file and the recording file are split in the same way in this embodiment, which can effectively improve the efficiency of the calculation ability value, thereby improving the detection efficiency of the pop sound detection on the audio file.
[0070] Based on the above embodiment, as a preferred embodiment, in the detection process of whether the audio file has a pop sound based on the first energy value and the second energy value, a spectrum diagram can also be used for intuitive display, as shown in Figure 2 , Figure 2 A pop sound determination process diagram is provided for the embodiment of the application, and the specific process can be as follows:
[0071] S201: Determine the first energy spectrum diagram corresponding to the first energy value;
[0072] S202: Determine the second energy spectrum diagram corresponding to the second energy value;
[0073] S203: Merge the first energy spectrum diagram and the second energy spectrum diagram to obtain an energy comparison diagram;
[0074] S204: If there is a coordinate point in the energy comparison diagram, the difference between the first energy value and the second energy value is greater than the set threshold value, it is determined that the sub-audio file corresponding to the coordinate point has a pop sound.
[0075] In specific embodiments, the execution order of steps S201 and S202 is not limited and can be arbitrarily exchanged. The first coordinate axis of the first energy spectrum diagram, the second energy spectrum diagram, and the energy comparison diagram represents time, which is not longer than the playing time of the audio file, and the second coordinate axis represents the energy value. In the process of merging to obtain the energy comparison diagram, the first energy spectrum diagram and the second energy spectrum diagram can be overlapped, or they can be arranged above and below each other, as shown in Figure 3 , Figure 3 An energy comparison diagram is provided for the embodiment of the application, Figure 3In the middle, the time point corresponding to the dashed line belongs to the sub-audio file corresponding to the number N1, and it can be obviously seen that there is a large difference between the respective energies in the audio file and the recording file. If it is determined through calculation that the difference between the two at the time point is greater than a set threshold, it can be determined that there is a pop noise at the time point.
[0076] Further, after determining that the audio file has a pop noise, a corresponding pop noise detection report can be generated and output. The specific content of the pop noise detection report is not limited here, and can include information such as a pop noise time point or a sub-audio file number corresponding to the pop noise time point, for user detection, further helping the user to quickly identify pop noise faults and repair the audio file.
[0077] At this time, the specific application process of the embodiment can be seen from Figure 4 , Figure 4 The flowchart of another pop noise detection method provided by the embodiment of the application.
[0078] The embodiment of the application applies the energy spectrum diagram to determine the pop noise, can intuitively and conveniently display the respective energy values of the audio file and the recording file, quickly determine the pop noise, and further improves the pop noise detection efficiency.
[0079] The pop noise detection system provided by the embodiment of the application will be introduced below, and the pop noise detection system described below can be mutually corresponding and referred to the pop noise detection method described above.
[0080] Referring to Figure 5 , Figure 5 The structure diagram of a pop noise detection system provided by the embodiment of the application, the pop noise detection system comprises:
[0081] A file acquisition module is configured to acquire an audio file and a corresponding recording file.
[0082] An energy value calculation module is configured to calculate a first energy value corresponding to the audio file and a second energy value corresponding to the recording file by using Fourier transform.
[0083] A pop noise detection module is configured to determine that the audio file has a pop noise when a difference between the first energy value and the second energy value at the same time exceeds a set threshold.
[0084] Based on the above embodiment, as a preferred embodiment, the file acquisition module comprises:
[0085] A source file acquisition unit is configured to acquire a source file from an audio playing device.
[0086] A source file analysis unit is configured to decode the source file to obtain the audio file.
[0087] The audio file obtaining unit is configured to send the audio file to a playback device and record the audio file played by the playback device by using a recording device to obtain the recording file.
[0088] Based on the above-mentioned embodiments, as a preferred embodiment, further comprising:
[0089] The splitting module is configured to split the audio file into a sub-audio file and split the recording file into a sub-recording file with the same time period as the sub-audio file.
[0090] Correspondingly, the energy value calculation module is a module configured to calculate the first energy value corresponding to each sub-audio file by using Fourier transform and calculate the second energy value corresponding to each sub-recording file.
[0091] Based on the above-mentioned embodiments, as a preferred embodiment, the pop noise detection module comprises:
[0092] The sub-file judgment unit is configured to judge whether the difference between the first energy value corresponding to the sub-audio file and the second energy value corresponding to the sub-recording file in the same target time period exceeds the set threshold value; if yes, it is determined that the audio file has pop noise in the target time period.
[0093] Based on the above-mentioned embodiments, as a preferred embodiment, the pop noise detection module comprises:
[0094] The first spectrum determination unit is configured to determine the first energy spectrum corresponding to the first energy value.
[0095] The second spectrum determination unit is configured to determine the second energy spectrum corresponding to the second energy value.
[0096] The spectrum processing unit is configured to combine the first energy spectrum and the second energy spectrum to obtain an energy comparison graph; wherein the first coordinate axis of the first energy spectrum, the second energy spectrum and the energy comparison graph represents time, and the second coordinate axis represents energy value.
[0097] The pop noise detection unit is configured to determine that the sub-audio file corresponding to the coordinate point has pop noise if the energy comparison graph has a coordinate point with a difference between the first energy value and the second energy value greater than the set threshold value.
[0098] Based on the above-mentioned embodiments, as a preferred embodiment, the energy value calculation module comprises:
[0099] The first calculation unit is configured to convert the audio file from a time domain signal to a corresponding first frequency domain signal by using Fourier transform and calculate the first energy value corresponding to the frequency domain signal.
[0100] The second computing unit is configured to convert the recording file from a time domain signal to a corresponding second frequency domain signal by Fourier transform, and calculate a second energy value corresponding to the frequency domain signal.
[0101] Based on the above embodiments, as a preferred embodiment, further comprising:
[0102] The report output module is configured to output a pop noise detection report containing the sub-audio file with the pop noise.
[0103] The present application also provides a computer readable storage medium, which has a computer program stored thereon, and the computer program can implement the steps provided by the above embodiments when executed. The storage medium can include a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage medium capable of storing program codes.
[0104] The present application also provides an electronic device, which can include a memory and a processor, the memory has a computer program stored therein, and the processor can implement the steps provided by the above embodiments when calling the computer program in the memory. Of course, the electronic device can also include various network interfaces, power supplies and other components.
[0105] The embodiments in the description are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the system provided by the embodiments, since it corresponds to the method provided by the embodiments, the description is relatively simple, and the related parts can be referred to the method part.
[0106] The principles and implementation manners of the present application are described by using specific examples in the present application. The above embodiment description is only used to help understand the method and its core idea of the present application. It should be pointed out that, for ordinary skilled in the art, without departing from the principles of the present application, the present application can be improved and modified in several ways, and these improvements and modifications also fall within the protection scope of the claims of the present application.
[0107] It also needs to be explained that in the present specification, the 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 variations 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 can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
Claims
1. A pop detection method, characterized by, The method comprises: obtaining an audio file and a corresponding recording file; calculating a first energy value corresponding to the audio file and a second energy value corresponding to the recording file by using Fourier transform; if the difference between the first energy value and the second energy value at the same time exceeds a set threshold, determining that the audio file has a pop sound; wherein, before calculating the first energy value corresponding to the audio file and the second energy value corresponding to the recording file by using Fourier transform, the method further comprises: splitting the audio file into a sub-audio file and splitting the recording file into a sub-recording file with the same time period as the sub-audio file; correspondingly, calculating the first energy value corresponding to the audio file and the second energy value corresponding to the recording file by using Fourier transform comprises: calculating the first energy value corresponding to each sub-audio file and calculating the second energy value corresponding to each sub-recording file by using Fourier transform.
2. The pop noise detection method of claim 1, wherein, Obtaining an audio file and a corresponding recording file comprises: obtaining a source file from an audio playing device; decoding the source file to obtain the audio file; sending the audio file to a playback device and recording the audio file played by the playback device using a recording device to obtain the recording file.
3. The pop noise detection method of claim 1, wherein, If the difference between the first energy value and the second energy value at the same time exceeds a set threshold, determining that the audio file has a pop sound comprises: determining whether the difference between the first energy value corresponding to the sub-audio file and the second energy value corresponding to the sub-recording file in the same target time period exceeds the set threshold; if so, determining that the audio file has a pop sound in the target time period.
4. The pop noise detection method of claim 1, wherein, If the difference between the first energy value and the second energy value at the same time exceeds a set threshold, determining that the audio file has a pop sound comprises: determining a first energy spectrum corresponding to the first energy value; determining a second energy spectrum corresponding to the second energy value; merging the first energy spectrum and the second energy spectrum to obtain an energy comparison graph; wherein the first coordinate axis of the first energy spectrum, the second energy spectrum and the energy comparison graph represents time, and the second coordinate axis represents energy value; if there is a coordinate point in the energy comparison graph where the difference between the first energy value and the second energy value is greater than the set threshold, determining that the sub-audio file corresponding to the coordinate point has a pop sound.
5. The pop noise detection method of claim 1, wherein, Calculating the first energy value corresponding to the audio file and the second energy value corresponding to the recording file by using Fourier transform comprises: converting the audio file from a time domain signal to a corresponding first frequency domain signal by using Fourier transform, and calculating the first energy value corresponding to the frequency domain signal; converting the recording file from a time domain signal to a corresponding second frequency domain signal by using Fourier transform, and calculating the second energy value corresponding to the frequency domain signal.
6. The pop noise detection method of claim 1, wherein, After determining that the audio file has a pop sound, the method further comprises: outputting a pop sound detection report containing the sub-audio file having a pop sound.
7. A pop detection system characterized by, The method comprises: a file obtaining module for obtaining an audio file and a corresponding recording file; An energy value calculation module is configured to calculate a first energy value corresponding to the audio file and a second energy value corresponding to the recording file by using Fourier transform; A pop noise detection module is configured to determine that the audio file contains pop noise when a difference between the first energy value and the second energy value at the same time exceeds a preset threshold value; A splitting module is configured to split the audio file into a sub-audio file and split the recording file into a sub-recording file with the same time period as the sub-audio file. Correspondingly, the energy value calculation module is configured to calculate a first energy value corresponding to each sub-audio file and a second energy value corresponding to each sub-recording file by using Fourier transform.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by a processor to implement the steps of the pop noise detection method according to any one of claims 1-6.
9. An electronic device, comprising: The computer program is executed by a processor to implement the steps of the pop noise detection method according to any one of claims 1-6. The computer program is executed by a processor to implement the steps of the pop noise detection method according to any one of claims 1-6.
Citation Information
Patent Citations
Audio playing device detection method, device and system and storage medium
CN114640939A
Audio detection method and device and storage medium
CN115243183A