CN112689872B - Audio detection method, computer-readable storage medium and electronic device - Google Patents
Audio detection method, computer-readable storage medium and electronic device Download PDFInfo
- Publication number
- CN112689872B CN112689872B CN201880097551.0A CN201880097551A CN112689872B CN 112689872 B CN112689872 B CN 112689872B CN 201880097551 A CN201880097551 A CN 201880097551A CN 112689872 B CN112689872 B CN 112689872B
- Authority
- CN
- China
- Prior art keywords
- data
- audio
- file
- target
- processing unit
- 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
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 124
- 238000012545 processing Methods 0.000 claims abstract description 279
- 230000002159 abnormal effect Effects 0.000 claims abstract description 78
- 238000006243 chemical reaction Methods 0.000 claims description 34
- 238000000034 method Methods 0.000 claims description 34
- 238000001228 spectrum Methods 0.000 claims description 31
- 238000010586 diagram Methods 0.000 description 18
- 230000006870 function Effects 0.000 description 10
- 238000004590 computer program Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 230000005856 abnormality Effects 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000005070 sampling Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000012952 Resampling Methods 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000001208 nuclear magnetic resonance pulse sequence Methods 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 238000004148 unit process Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L25/00—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
- G10L25/48—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L25/00—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
- G10L25/48—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
- G10L25/51—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination
Landscapes
- Engineering & Computer Science (AREA)
- Computational Linguistics (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
- Debugging And Monitoring (AREA)
Abstract
An audio detection method, comprising: when the detection instruction is acquired, acquiring an audio file (202) according to the detection instruction; inputting an audio file into at least two processing units which are sequentially arranged for processing (204); matching (206) the target data with pre-stored data each time the processing unit outputs the target data; and outputting abnormal information corresponding to the target data when the target data is not matched with the pre-stored data, wherein the abnormal information is used for prompting that a processing unit outputting the target data is abnormal (208).
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to an audio detection method, a computer-readable storage medium, and an electronic device.
Background
When the electronic device plays the audio file, the electronic device needs to read and decode the audio file first, and then plays and processes the sound corresponding to the audio file through the speaker. When the sound played by the loudspeaker is abnormal, such as silence during playing, noise during playing and the like, the developer can determine the abnormal processing unit by reproducing the abnormal phenomenon and acquiring the corresponding log for analysis. However, the conventional technique has a problem of low processing efficiency.
Disclosure of Invention
An audio detection method, a computer-readable storage medium, and an electronic device are provided according to various embodiments of the present application.
An audio detection method, comprising:
when a detection instruction is obtained, obtaining an audio file according to the detection instruction;
inputting the audio file into at least two processing units which are sequentially arranged for processing;
matching the target data with pre-stored data each time the processing unit outputs the target data; and
and when the target data is not matched with pre-stored data, outputting abnormal information corresponding to the target data, wherein the abnormal information is used for prompting that a processing unit outputting the target data is abnormal.
One or more computer-readable storage media embodying computer-executable instructions that, when executed by one or more processors, cause the processors to:
when a detection instruction is obtained, obtaining an audio file according to the detection instruction;
inputting the audio file into at least two processing units which are sequentially arranged for processing;
matching the target data with pre-stored data each time the processing unit outputs the target data; and
and when the target data is not matched with pre-stored data, outputting abnormal information corresponding to the target data, wherein the abnormal information is used for prompting that a processing unit outputting the target data is abnormal.
An electronic device comprising a memory and a processor, the memory having computer-readable instructions stored therein that, when executed by the processor, cause the processor to:
when a detection instruction is obtained, obtaining an audio file according to the detection instruction;
inputting the audio file into at least two processing units which are sequentially arranged for processing;
matching the target data with pre-stored data each time the processing unit outputs the target data; and
and when the target data is not matched with the pre-stored data, outputting abnormal information corresponding to the target data, wherein the abnormal information is used for prompting that a processing unit outputting the target data is abnormal.
According to the audio detection method, the computer-readable storage medium and the electronic device, when the detection instruction is obtained, the audio file is obtained according to the detection instruction, the audio file is input to the at least two processing units which are sequentially arranged for processing, when each processing unit outputs target data, the target data is matched with pre-stored data, when the target data is not matched with the pre-stored data, abnormal information corresponding to the target data is output, and the abnormal information is used for prompting that the processing unit which outputs the target data is abnormal, so that the detection efficiency of the audio processing unit can be improved.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the application will be apparent from the description and drawings, and from the claims.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of an exemplary audio detection method.
FIG. 2 is a flow diagram of a method for audio detection in one embodiment.
FIG. 3 is a flow diagram of processing an audio file by a processing unit in one embodiment.
FIG. 4 is a flow diagram of processing document data by a data processing unit in one embodiment.
FIG. 5 is a flow diagram of matching audio data with pre-stored data in one embodiment.
FIG. 6 is a flow diagram of a method for audio detection in one embodiment.
FIG. 7 is a block diagram of an audio detection device according to an embodiment.
Fig. 8 is a schematic diagram of an internal structure of an electronic device in one embodiment.
Fig. 9 is a block diagram of a partial structure of a mobile phone related to an electronic device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, the first audio data may be referred to as second audio data, and similarly, the second audio data may be referred to as first audio data, without departing from the scope of the present application. The first audio data and the second audio data are both audio data, but they are not the same audio data.
FIG. 1 is a diagram of an exemplary audio detection method. As shown in fig. 1, the application environment includes an electronic device 110. The electronic device 110 may process the audio file and play the processed audio data through a speaker. Specifically, when the electronic device 110 acquires the detection instruction, the audio file is acquired according to the detection instruction, the audio file is input to at least two processing units arranged in sequence for processing, the target data is matched with the pre-stored data each time the processing unit outputs the target data, and when the target data is not matched with the pre-stored data, abnormal information corresponding to the target data is output, and the abnormal information is used for prompting that the processing unit outputting the target data is abnormal. It is understood that the electronic device 110 may be a mobile phone, a computer, a wearable device, etc., and is not limited thereto.
FIG. 2 is a flow diagram of a method for audio detection in one embodiment. The audio detection method in the present embodiment is described by taking the electronic device 110 in fig. 1 as an example. As shown in fig. 2, the audio detection method includes operations 202 to 208. Wherein:
in operation 202, when the detection instruction is acquired, the audio file is acquired according to the detection instruction.
The detection instruction may be generated by a user by clicking a button on the display screen, or generated by the user by pressing a control on the touch screen, or automatically generated by the electronic device, and the electronic device may acquire the detection instruction for the audio processing unit. The user may trigger the detection instruction when the sound played by the speaker of the electronic device is abnormal, for example, when the audio file is played without sound, noise occurs, or the played sound does not correspond to the audio file, the electronic device may obtain the detection instruction triggered by the user. An audio file refers to a file containing binary data of real audio. The audio file can be processed by the electronic equipment and played through a loudspeaker of the electronic equipment after the processing. In this embodiment of the application, the audio file acquired by the electronic device according to the detection instruction may be an audio file pre-stored by the electronic device, or may also be an audio file downloaded by the electronic device from a network, and the like, which is not limited thereto. The format of the Audio file may be various, such as mp3 (Moving Picture Experts Group Audio Layer III, moving Picture Experts compression standard Audio Layer 3), wave (wave), mpeg (Moving Picture Experts Group) format, and the like. In one embodiment, the detection instruction may include an audio format, and the electronic device may pre-store audio files in different formats, so as to obtain a corresponding audio file according to the audio format included in the detection instruction.
In operation 204, the audio file is input to at least two processing units arranged in sequence for processing.
The processing unit refers to each unit in the electronic device that processes an audio file. When the electronic device receives a playing instruction of the audio file, the audio file can be input to at least two processing units which are sequentially arranged for processing, and the processed audio data can be played through a loudspeaker. Specifically, the processing unit may include an audio reading unit, a decoding unit, a signal conversion unit, and the like, without being limited thereto. Each processing unit may be implemented by a software program, a hardware module, or the like, and is not limited herein. The processing units corresponding to different application scenarios may be different. For example, when the electronic device needs to perform mixing processing on an audio file, the processing unit of the electronic device may further include a mixing unit. The electronic equipment can input the audio file into at least two processing units which are arranged in sequence for processing.
In operation 206, the target data is matched with the pre-stored data each time the processing unit outputs the target data.
When the electronic equipment inputs the audio file into at least two processing units which are sequentially arranged for processing, each processing unit processes the input data and outputs the processed target data. For example, when at least two processing units arranged in sequence are a file reading unit and a decoding unit, the file reading unit may read an audio file and output the read data as target data corresponding to the file reading unit; the decoding unit may perform decoding processing on the data output by the file reading unit, and output the data after the decoding processing as target data corresponding to the decoding unit.
The pre-stored data is data that the processing unit outputs in case of normal play of the audio file. The electronic device may pre-store pre-stored data corresponding to the audio file. Furthermore, the target data is matched with the pre-stored data each time the processing unit outputs the target data. The electronic device matches the target data with the pre-stored data, specifically, the electronic device may calculate a matching degree between the target data and the pre-stored data, determine that the target data is matched with the pre-stored data when the matching degree exceeds a threshold, and determine that the target data is not matched with the pre-stored data when the matching degree does not exceed the threshold. The calculation mode of the matching degree can adopt different calculation modes according to different target data, and the threshold value can be set according to actual requirements, which are not limited herein.
And in operation 208, when the target data does not match the pre-stored data, outputting exception information corresponding to the target data, wherein the exception information is used for prompting that a processing unit outputting the target data is abnormal.
The exception information corresponding to the target data is information for prompting an exception of the processing unit that outputs the target data. And when the target data is not matched with the pre-stored data, the electronic equipment outputs abnormal information corresponding to the target data. Specifically, when the target data does not match the pre-stored data, the electronic device may acquire a processing unit that outputs the target data, and generate abnormality information of the processing unit. The abnormal information may be displayed on a display screen of the electronic device, and specifically, may be displayed in the form of a pop-up window, a notification bar, or the like, but is not limited thereto.
In the embodiment provided by the application, when a detection instruction is acquired, an audio file is acquired according to the detection instruction, the audio file is input to at least two processing units which are sequentially arranged for processing, when the processing units output target data each time, the target data are matched with prestored data, when the target data are not matched with the prestored data, abnormal information corresponding to the target data is output, and the abnormal information is used for prompting that the processing units which output the target data are abnormal. After the audio file is input into the processing unit for processing, the target data output by the processing unit can be matched with the prestored data, so that whether the processing unit outputting the target data is abnormal or not is determined.
In one embodiment, the provided audio detection method further comprises: and when the target data is not matched with the pre-stored data, finishing the operation of matching the target data with the pre-stored data each time the processing unit outputs the target data.
The electronic device may end the operation of matching the target data with the pre-stored data each time the processing unit outputs the target data when the target data does not match with the pre-stored data. For example, in the above example, the at least two processing units arranged in sequence include a file reading unit and a decoding unit, and when the electronic device detects that the target data output by the file reading unit does not match the pre-stored data, the electronic device outputs the abnormal information corresponding to the target data, that is, the information for prompting the file reading unit to be abnormal, and simultaneously ends the detection, that is, the operation of not matching the target data output by the decoding unit.
Generally, when the electronic device processes an audio file in a case where the electronic device is operating normally, an output of a previous processing unit is used as an input of a next processing unit. When the electronic device detects that the target data is not matched with the pre-stored data, the target data is abnormal data, and at this time, the target data is used as the input of the next processing unit, so that the target data output by the next processing unit is also abnormal inevitably and is not matched with the pre-stored data, therefore, under the condition that the target data is not matched with the pre-stored data, the electronic device finishes the operation of matching the target data with the pre-stored data when the processing unit outputs the target data each time, and the resource consumption of the electronic device can be saved.
In one embodiment, the process of matching the target data with the pre-stored data in the audio detection method further comprises: matching the target data with prestored data corresponding to a target processing unit outputting the target data; the audio detection method further comprises: when the target data is matched with the pre-stored data, the target data is used as the input of the next processing unit of the target processing unit; when the target data does not match the pre-stored data, the pre-stored data is used as an input of a next processing unit of the target processing unit.
The target processing unit refers to a processing unit that outputs target data. The pre-stored data is data output by each processing unit under the condition that the audio file is normally played. The electronic device may pre-store pre-stored data corresponding to each processing unit. The electronic equipment matches the target data with pre-stored data corresponding to a target processing unit which outputs the target data. Specifically, when the processing unit outputs the target data, the electronic device acquires pre-stored data corresponding to the target processing unit which outputs the target data, and matches the target data with the pre-stored data.
Generally, when the electronic device processes an audio file in a case where the electronic device is operating normally, an output of a previous processing unit is used as an input of a next processing unit. The electronic device may take the target data as an input to a next processing unit of the target processing unit when the target data matches the pre-stored data. When the target data is not matched with the pre-stored data, the electronic equipment takes the pre-stored data as the input of the next processing unit of the target processing unit, namely the pre-stored data corresponding to the target processing unit is taken as the input of the next processing unit of the target processing unit, the accuracy of the input data of the next processing unit can be ensured, and then each processing unit in the audio processing process can be subjected to matching detection, the detection accuracy of the audio processing unit can be improved, and the condition that only the abnormal information of one processing unit is output under the condition that two or more processing units are abnormal is avoided.
In one embodiment, an audio detection method is provided, in which target data includes file data output by a file reading unit and audio data output by a data processing unit arranged in sequence; in the audio detection method, when the processing unit outputs the target data each time, the process of matching the target data with the pre-stored data comprises the following steps: outputting file data by the file reading unit each time, and matching the file data with prestored data; and outputting the audio data by the data processing unit every time, and matching the audio data with the pre-stored data.
The at least two processing units included in the electronic device may include a file reading unit and a data processing unit that are arranged in sequence. The number of the data processing units can be one or more. The target data output by the processing unit of the electronic device may include file data output by the file reading unit and audio data output by the data processing unit. The electronic equipment can match the file data with prestored file data when the file reading unit outputs the file data each time, and the prestored file data is prestored data corresponding to the file reading unit; and when the data processing unit outputs the audio data each time, matching the audio data with pre-stored audio data, wherein the pre-stored audio data is pre-stored data corresponding to the audio processing unit which outputs the audio data.
FIG. 3 is a flow diagram of processing an audio file by a processing unit in one embodiment. As shown in fig. 3, in an embodiment, a process of inputting an audio file into at least two processing units arranged in sequence for processing in an audio detection method is provided, which includes:
in operation 302, an audio file is read by a file reading unit.
The file reading unit is a unit for reading an audio file. The file reading unit may be implemented by a software program, or may be implemented by a hardware module, which is not limited herein. The electronic device may read the audio file through the file reading unit. Specifically, the electronic device may read a file name, a file size, a file type, or the like included in the audio file, and parse audio data included in the audio file.
In operation 304, when the reading is successful, the file data obtained by processing the audio file is output by the file reading unit, and the file data is used as the input of the data processing unit.
When the file reading unit successfully reads, the file reading unit can output file data obtained after the audio file is processed. The file data may include at least one of a file name, a file size, a file type, and audio data included in the file to which the audio file corresponds. The electronic device can match the output file data with the pre-stored data, and determine whether the file reading unit is abnormal according to the matching result. The electronic equipment can also acquire the file data output by the file reading unit as the input of the data processing unit when the reading is successful. Specifically, the electronic device may take audio data contained in the file data as input data to the data processing unit, wherein the audio data output by the file reading unit is undecoded data.
In one embodiment, when the reading is successful, the process of matching the file data with the pre-stored data in the audio detection method includes: detecting whether the file data is consistent with the pre-stored data; and when the file data is inconsistent with the pre-stored data, judging that the file data is not matched with the pre-stored data.
The electronic device may obtain pre-stored data corresponding to the file reading unit, and further detect whether the file data is consistent with the pre-stored data, and specifically, the electronic device may detect at least one of a file name, a file size, a file type, and audio data included in the file data. For example, the electronic device may detect whether audio data contained in a file is identical to pre-stored data, and when the audio data is binary data, the electronic device may detect whether the binary data is identical to binary data contained in the pre-stored data. And when the file data is inconsistent with the pre-stored data, the electronic equipment judges that the file data is not matched with the pre-stored data.
In operation 306, when the reading is unsuccessful, the exception information of the file reading unit is output.
And when the file reading unit fails to read the audio file, the electronic equipment outputs the abnormal information of the file reading unit. Specifically, the exception information may contain an exception type of the file reading unit. For example, in this embodiment, the cause of the abnormality of the file reading unit is that reading the audio file is unsuccessful; when the file data is not matched with the pre-stored data, the abnormal reason of the file reading unit is an audio file reading error. Similarly, when the other data processing unit does not output the corresponding audio data, the electronic device may also output abnormality information that the data processing unit has failed to process the audio data.
When the file reading unit successfully reads the audio file, the output file data is matched with the pre-stored data to determine whether the file reading unit is abnormal or not, the file data output by the file reading unit is used as the input of the data processing unit, and when the reading is unsuccessful, the abnormal information of the file reading unit is output, so that the corresponding abnormal information can be output when the file reading unit cannot read the audio file, and the accuracy of the abnormal detection of the audio processing unit can be improved.
FIG. 4 is a flow diagram of processing document data by a data processing unit in one embodiment. In one embodiment, a data processing unit in the provided audio detection method comprises a decoding unit, a mixing unit and a signal conversion unit which are arranged in sequence, wherein the audio data comprises first audio data, second audio data and third audio data; after the file data is used as the input of the data processing unit, the audio detection method further comprises the following steps:
in operation 402, the file data is decoded by the decoding unit, and the first audio data corresponding to the decoding unit is output.
The data processing unit used by the electronic device to process the audio data may include a decoding unit, a mixing unit, and a signal conversion unit arranged in sequence. Each data processing unit may be implemented by a software program, or may be implemented by hardware such as a chip. For example, the electronic device may implement the decoding process of the audio data by a decoding program, and may also implement the decoding process of the audio data by a decoder; the electronic device may implement signal conversion of the audio data through a signal conversion chip such as a codec chip. The audio data output by the file reading unit is undecoded data, and the electronic equipment can decode the audio data contained in the file data through the decoding unit and output the audio data to obtain first audio data. The first audio data is PCM (Pulse Code Modulation) data, which is a Pulse sequence obtained by sampling and quantizing an analog signal. Furthermore, when the first audio data is matched with the pre-stored data corresponding to the decoding unit, the first audio data is used as the input of the sound mixing unit when the first audio data is matched with the pre-stored data; and when the data is not matched, outputting the abnormal information of the decoding unit, and finishing the matching operation or performing the matching operation by taking the pre-stored data corresponding to the decoding unit as the input of the sound mixing unit.
In operation 404, the first audio data is mixed by the mixing unit, and the second audio data corresponding to the mixing unit is output.
The mixing unit may be used for at least one of a multi-channel audio data processing and a resampling process. Specifically, the mixing unit may output a plurality of different second audio data, may combine a plurality of input audio data into one second audio data, and may perform frequency conversion on the input audio data. For example, when the first audio data output by the decoding unit is 44.1kHz, the mixing unit may convert the first audio data into second audio data of 48kHz, and the like. The electronic equipment can perform sound mixing processing on the first audio data through the sound mixing unit and output the first audio data to obtain second audio data. Furthermore, when the second audio data is matched with the pre-stored data corresponding to the audio mixing unit, the second audio data is used as the input of the signal conversion unit when the second audio data is matched with the pre-stored data corresponding to the audio mixing unit; and when the data is not matched, outputting the abnormal information of the sound mixing unit, and finishing the matching operation or performing the matching operation by taking the pre-stored data corresponding to the sound mixing unit as the input of the signal conversion unit.
In operation 406, the second audio data is signal-converted by the signal conversion unit, and third audio data is output.
The signal conversion unit can convert the PCM data into an analog signal, so as to drive a loudspeaker to emit sound to play audio. The electronic device can perform signal conversion processing on the second audio data through the signal conversion unit and output the second audio data to obtain third audio data. Furthermore, when the third audio data is matched with the pre-stored data corresponding to the signal conversion unit, the third audio data is played through a loudspeaker when the third audio data is matched with the pre-stored data; when the data are not matched, the abnormal information of the signal conversion unit is output, and the electronic equipment can play the pre-stored data corresponding to the signal conversion unit through a loudspeaker. Therefore, under the condition that the processing units are normal, the user can also determine whether the loudspeaker is abnormal through the sound played by the loudspeaker, and the accuracy of abnormality detection can be improved.
The electronic equipment inputs the audio file into the file reading unit, the decoding unit, the sound mixing unit and the signal conversion unit which are sequentially arranged for processing, when the processing unit outputs the audio data each time, the audio data is matched with the pre-stored data, whether the processing unit is abnormal or not is determined according to the matching result, and the detection efficiency of the processing unit can be improved. The processing unit included in the electronic device may be one or more of the processing units described above, and may also include other processing units, which are not limited herein.
FIG. 5 is a flow diagram of matching audio data with pre-stored data in one embodiment. In one embodiment, the provided audio detection method matches audio data with pre-stored data, including:
in operation 502, target spectrum information included in audio data is acquired.
The target spectrum information refers to spectrum information contained in the audio data. The information of the tone, timbre, volume, etc. of the audio data can be analyzed based on the target spectrum information. The electronic device may acquire target spectrum information contained in the audio data.
In operation 504, a similarity between the target spectrum information and pre-stored spectrum information included in the pre-stored data is detected.
The electronic device may detect a similarity between the target spectrum information and pre-stored spectrum information contained in the pre-stored data. Specifically, the electronic device performs similarity detection according to the waveform, amplitude, frequency, and the like included in the target spectrum information and the pre-stored spectrum information. The electronic device may further perform sampling detection on the target frequency spectrum information, that is, obtain a part of frequency spectrum information included in the target frequency spectrum information to perform similarity detection, and the specific sampling rule may be set according to an actual requirement, which is not limited herein.
In operation 506, when the similarity is lower than the similarity threshold, it is determined that the audio data does not match the pre-stored data.
The similarity threshold may be set according to actual requirements, and may be, for example, 80%, 88%, 90%, 95%, or the like, but is not limited thereto. When the similarity is greater than or equal to the similarity threshold, the electronic device may determine that the target data matches the pre-stored data; when the similarity is lower than the similarity threshold, the electronic equipment can judge that the audio data is not matched with the pre-stored data, and then output the abnormal information of the audio data, wherein the abnormal information is used for prompting that the processing unit for outputting the audio data is abnormal.
When each data processing unit outputs audio data, the similarity between target spectrum information contained in the audio data and pre-stored spectrum information is detected, when the similarity is lower than a similarity threshold value, the audio data is judged to be not matched with the pre-stored data, and then abnormal information of the audio data is input, so that the accuracy of audio detection can be improved.
In an embodiment, when the detection instruction is obtained, before the audio file is obtained according to the detection instruction, the audio detection method further includes: and generating a detection instruction when the time length from the last generation of the detection instruction exceeds the preset time length.
The preset time can be set according to actual requirements, and is not limited herein. For example, the preset time period may be 1 day, 10 days, 1 month, etc., but is not limited thereto. The electronic equipment can generate a detection instruction at regular time to detect the processing unit of the audio file. Specifically, the electronic device may detect a time length from the last time the detection instruction was generated, and generate the detection instruction when the time length exceeds a preset time length. The last generated detection instruction may be a detection instruction generated by user triggering.
When the time length from the last generation of the detection instruction exceeds the preset time length, the electronic equipment can generate the detection instruction, further obtain an audio file according to the detection instruction, input the audio file to at least two processing units which are sequentially arranged for processing, match target data output by the processing units with prestored data, and when the target data are not matched with the prestored data, output information for prompting the processing units which output the target data to be abnormal, so that the timeliness of the audio processing units can be improved, and the condition that the processing units are abnormally aggravated because a user does not detect the processing units when the processing units are abnormal inconspicuously is avoided.
FIG. 6 is a flow diagram of a method for audio detection in one embodiment. As shown in fig. 6, the specific operation of the audio detection method is as follows:
firstly, the electronic equipment acquires a detection instruction and acquires an audio file according to the detection instruction.
Then, the electronic device reads the audio file through the file reading unit to obtain output file data.
And then, the electronic equipment matches the file data with the pre-stored data, inputs the audio file into the decoding unit for processing when the file data is matched with the pre-stored data, outputs abnormal information of the file reading unit when the file data is not matched with the pre-stored data, and ends the detection.
Optionally, the electronic device processes the file data through a decoding unit to obtain the output first audio data.
And then, the electronic equipment matches the first audio data with the pre-stored audio data, inputs the first audio data into the sound mixing unit for processing when the first audio data is matched with the pre-stored audio data, outputs abnormal information of the decoding unit when the first audio data is not matched with the pre-stored audio data, and ends the detection.
Optionally, the electronic device processes the first audio data through the mixing unit to obtain output second audio data.
And then, the electronic equipment matches the second audio data with the pre-stored audio data, inputs the second audio data into the signal conversion unit for processing when the second audio data is matched with the pre-stored audio data, outputs abnormal information of the sound mixing unit when the second audio data is not matched with the pre-stored audio data, and ends the detection.
Optionally, the electronic device processes the first audio data through the signal conversion unit to obtain output third audio data.
And then, the electronic equipment matches the third audio data with the pre-stored audio data, when the third audio data is matched with the pre-stored audio data, the detection is finished, the third audio data can also be played through a loudspeaker, and when the third audio data is not matched with the pre-stored audio data, the abnormal information of the signal conversion unit is output, and the detection is finished.
FIG. 7 is a block diagram of an audio detection device according to an embodiment. As shown in fig. 7, the audio detection apparatus includes an obtaining module 702, a processing module 704, a matching module 706, and an output module 708, where:
the obtaining module 702 is configured to obtain the audio file according to the detection instruction when the detection instruction is obtained.
And the processing module 704 is used for inputting the audio file to at least two processing units which are arranged in sequence for processing.
And a matching module 706, configured to match the target data with pre-stored data each time the processing unit outputs the target data.
And the output module 708 is configured to output exception information corresponding to the target data when the target data is not matched with the pre-stored data, where the exception information is used to prompt that a processing unit outputting the target data is abnormal.
The audio detection device provided by the embodiment of the application is used for acquiring an audio file according to a detection instruction when the detection instruction is acquired, inputting the audio file into at least two processing units which are sequentially arranged for processing, matching target data with pre-stored data when each processing unit outputs the target data, outputting abnormal information corresponding to the target data when the target data are not matched with the pre-stored data, and prompting that the processing unit outputting the target data is abnormal by the abnormal information, so that the detection efficiency of the audio processing unit can be improved.
In one embodiment, the matching module 706 is further configured to end the operation of matching the target data with the pre-stored data each time the processing unit outputs the target data when the target data does not match with the pre-stored data.
In one embodiment, the target data includes file data output by the file reading unit and audio data output by the data processing unit arranged in sequence; the matching module 706 can also be used for outputting file data in each file reading unit and matching the file data with pre-stored data; and outputting the file data by the file reading unit every time, and matching the file data with the pre-stored data.
In one embodiment, the processing module 704 may also be configured to read an audio file through a file reading unit; when the reading is successful, outputting file data obtained by processing the audio file through a file reading unit, and taking the file data as the input of a data processing unit; and outputting the abnormal information of the file reading unit when the reading is unsuccessful.
In one embodiment, the data processing unit includes a decoding unit, a mixing unit, and a signal conversion unit arranged in sequence, and the audio data includes first audio data, second audio data, and third audio data; the processing module 704 may be further configured to perform decoding processing on the file data through a decoding unit, and output first audio data corresponding to the decoding unit; performing sound mixing processing on the first audio data through a sound mixing unit, and outputting second audio data corresponding to the sound mixing unit; and performing signal conversion processing on the second audio data through a signal conversion unit, and outputting third audio data.
In one embodiment, the matching module 706 may be further configured to detect whether the file data is consistent with the pre-stored data; and when the file data is inconsistent with the pre-stored data, judging that the file data is not matched with the pre-stored data.
In one embodiment, the matching module 706 may be further configured to obtain target spectrum information included in the audio data; detecting the similarity between the target frequency spectrum information and pre-stored frequency spectrum information contained in pre-stored data; and when the similarity is lower than the similarity threshold value, judging that the audio data is not matched with the pre-stored data.
In one embodiment, the provided audio detection method further includes an instruction generating module 710, where the instruction generating module 710 is configured to generate the detection instruction when a time length from the last time of generating the detection instruction exceeds a preset time length.
In one embodiment, the matching module 706 may be further configured to match the target data with pre-stored data corresponding to a target processing unit outputting the target data; when the target data is matched with the pre-stored data, the target data is used as the input of the next processing unit of the target processing unit; when the target data does not match the pre-stored data, the pre-stored data is taken as an input of a next processing unit of the target processing unit.
The division of the modules in the audio detection apparatus is merely used for illustration, and in other embodiments, the audio detection apparatus may be divided into different modules as needed to complete all or part of the functions of the audio detection apparatus.
Fig. 8 is a schematic diagram of an internal structure of an electronic device in one embodiment. As shown in fig. 8, the electronic device includes a processor and a memory connected by a system bus. Wherein, the processor is used for providing calculation and control capability and supporting the operation of the whole electronic equipment. The memory may include non-volatile storage media and internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by a processor for implementing an audio detection method provided in the following embodiments. The internal memory provides a cached execution environment for the operating system computer programs in the non-volatile storage medium. The electronic device can be a mobile phone, a tablet computer or a personal digital assistant or a wearable device and the like.
The embodiment of the application also provides a computer readable storage medium. On which a computer program is stored, characterized in that the computer program realizes the audio detection method as described above when executed by a processor.
The embodiment of the application also provides the electronic equipment. As shown in fig. 9, for convenience of explanation, only the parts related to the embodiments of the present application are shown, and details of the technology are not disclosed, please refer to the method part of the embodiments of the present application. The electronic device may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, and the like, taking the electronic device as a mobile phone as an example:
fig. 9 is a block diagram of a partial structure of a mobile phone related to an electronic device provided in an embodiment of the present application. Referring to fig. 9, the handset includes: a Radio Frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a wireless fidelity (WiFi) module 970, a processor 980, and a power supply 990. Those skilled in the art will appreciate that the handset configuration shown in fig. 9 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The RF circuit 910 may be configured to receive and transmit signals during information transmission or communication, and may receive downlink information of a base station and then process the downlink information to the processor 980; the uplink data may also be transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuit 910 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), general Packet Radio Service (GPRS), code Division Multiple Access (CDMA), wideband Code Division Multiple Access (WCDMA), long Term Evolution (LTE)), e-mail, short Messaging Service (SMS), and the like.
The memory 920 may be used to store software programs and modules, and the processor 980 may execute various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 920. The memory 920 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function (such as an application program for a sound playing function, an application program for an image playing function, and the like), and the like; the data storage area may store data (such as audio data, address book, etc.) created according to the use of the mobile phone, and the like. Further, the memory 920 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 930 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone 900. Specifically, the input unit 930 may include a touch panel 931 and other input devices 932. The touch panel 931, which may also be referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 931 (e.g., a user operating the touch panel 931 or near the touch panel 931 by using a finger, a stylus, or any other suitable object or accessory), and drive the corresponding connection device according to a preset program. In one embodiment, the touch panel 931 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 980, and can receive and execute commands sent by the processor 980. In addition, the touch panel 931 may be implemented by various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 930 may include other input devices 932 in addition to the touch panel 931. In particular, other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), and the like.
The display unit 940 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 940 may include a display panel 941. In one embodiment, the Display panel 941 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. In one embodiment, touch panel 931 can overlay display panel 941, and when touch panel 931 detects a touch operation on or near touch panel 931, the touch operation can be transmitted to processor 980 to determine the type of touch event, and then processor 980 can provide a corresponding visual output on display panel 941 according to the type of touch event. Although in fig. 9, the touch panel 931 and the display panel 941 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 931 and the display panel 941 may be integrated to implement the input and output functions of the mobile phone.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 970, and provides wireless broadband Internet access for the user. Although fig. 9 shows WiFi module 970, it is to be understood that it does not belong to the essential components of cell phone 900 and may be omitted as desired.
The processor 980 is a control center of the mobile phone, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 920 and calling data stored in the memory 920, thereby integrally monitoring the mobile phone. In one embodiment, processor 980 may include one or more processing units. In one embodiment, the processor 980 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user interfaces, applications, and the like; the modem processor handles primarily wireless communications. It will be appreciated that the modem processor may not be integrated into the processor 980.
The handset 900 also includes a power supply 990 (e.g., a battery) for supplying power to various components, which may preferably be logically connected to the processor 980 via a power management system, such that the power management system may be used to manage charging, discharging, and power consumption.
In one embodiment, the cell phone 900 may also include a camera, a bluetooth module, and the like.
In an embodiment of the application, the electronic device includes a processor 980 that implements the audio detection method described above when executing a computer program stored on a memory.
Any reference to memory, storage, database, or other medium used herein may include non-volatile and/or volatile memory. Suitable non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.
Claims (32)
1. An audio detection method, comprising:
when a detection instruction is obtained, obtaining an audio file according to the detection instruction;
inputting the audio file into at least two processing units which are sequentially arranged for processing;
when the processing unit outputs target data every time, matching the target data with pre-stored data corresponding to the target processing unit which outputs the target data, wherein the pre-stored data is data output by the processing unit under the condition that the audio file is normally played; and
when the target data is not matched with prestored data corresponding to a target processing unit of the target data, outputting abnormal information corresponding to the target data, wherein the prestored data is used as the input of a next processing unit of the target processing unit, and the abnormal information is used for prompting that the processing unit outputting the target data is abnormal;
and when the target data is matched with pre-stored data corresponding to a target processing unit of the target data, taking the target data as the input of a next processing unit of the target processing unit.
2. The method of claim 1, further comprising:
and when the target data is not matched with the pre-stored data, finishing the operation of matching the target data with the pre-stored data when the processing unit outputs the target data each time.
3. The method according to claim 1, wherein the target data includes document data output by a document reading unit and audio data output by a data processing unit arranged in sequence;
the matching of the target data with pre-stored data each time the processing unit outputs the target data comprises:
outputting the file data by the file reading unit each time, and matching the file data with the prestored data; and
and outputting the audio data by the data processing unit every time, and matching the audio data with the pre-stored data.
4. The method of claim 3, wherein the inputting the audio file into at least two processing units arranged in sequence for processing comprises:
reading the audio file through the file reading unit;
when the reading is successful, outputting the file data obtained by processing the audio file through the file reading unit, and taking the file data as the input of the data processing unit; and
and outputting the abnormal information of the file reading unit when the reading is unsuccessful.
5. The method according to claim 4, wherein the data processing unit comprises a decoding unit, a mixing unit and a signal conversion unit arranged in sequence, and the audio data comprises first audio data, second audio data and third audio data;
after the file data is used as the input of the data processing unit, the method further comprises the following steps:
decoding the file data through the decoding unit, and outputting first audio data corresponding to the decoding unit;
performing sound mixing processing on the first audio data through the sound mixing unit, and outputting second audio data corresponding to the sound mixing unit; and
and performing signal conversion processing on the second audio data through the signal conversion unit, and outputting the third audio data.
6. The method of claim 3, wherein matching the document data with the pre-stored data comprises:
detecting whether the file data is consistent with the pre-stored data; and
and when the file data is inconsistent with the pre-stored data, judging that the file data is not matched with the pre-stored data.
7. The method of claim 3, wherein matching the audio data with the pre-stored data comprises:
acquiring target frequency spectrum information contained in the audio data;
detecting the similarity between the target frequency spectrum information and pre-stored frequency spectrum information contained in the pre-stored data; and
and when the similarity is lower than a similarity threshold value, judging that the audio data is not matched with the pre-stored data.
8. The method according to claim 1, wherein when the detection instruction is obtained, before the audio file is obtained according to the detection instruction, further comprising:
and when the time length from the last generation of the detection instruction exceeds the preset time length, generating the detection instruction.
9. An audio detection apparatus comprising:
the acquisition module is used for acquiring an audio file according to a detection instruction when the detection instruction is acquired;
the processing module is used for inputting the audio file to at least two processing units which are sequentially arranged for processing;
the matching module is used for matching the target data with pre-stored data corresponding to a target processing unit which outputs the target data when the processing unit outputs the target data each time, wherein the pre-stored data is data output by the processing unit under the condition that the audio file is normally played; and
the output module is used for outputting abnormal information corresponding to the target data when the target data is not matched with prestored data corresponding to a target processing unit of the target data, and the prestored data is used as the input of a next processing unit of the target processing unit, and the abnormal information is used for prompting that the processing unit outputting the target data is abnormal;
and when the target data is matched with pre-stored data corresponding to a target processing unit of the target data, taking the target data as the input of a next processing unit of the target processing unit.
10. The apparatus of claim 9, wherein the matching module is further configured to end the matching of the target data with pre-stored data each time the processing unit outputs the target data when the target data does not match with pre-stored data.
11. The apparatus according to claim 9, wherein the target data includes document data output by the document reading unit and audio data output by the data processing unit, which are arranged in sequence; the matching module is further used for outputting the file data by the file reading unit each time and matching the file data with the pre-stored data; and outputting the audio data by the data processing unit each time, and matching the audio data with the pre-stored data.
12. The apparatus of claim 11, wherein the processing module is further configured to read the audio file through the file reading unit; when the reading is successful, outputting the file data obtained by processing the audio file through the file reading unit, and taking the file data as the input of the data processing unit; and outputting the abnormal information of the file reading unit when the reading is unsuccessful.
13. The apparatus of claim 12, wherein the data processing unit comprises a decoding unit, a mixing unit, and a signal conversion unit arranged in sequence, and the audio data comprises first audio data, second audio data, and third audio data; the processing module is further configured to perform decoding processing on the file data through the decoding unit, and output first audio data corresponding to the decoding unit; performing sound mixing processing on the first audio data through the sound mixing unit, and outputting second audio data corresponding to the sound mixing unit; and performing signal conversion processing on the second audio data through the signal conversion unit, and outputting the third audio data.
14. The apparatus of claim 11, wherein the matching module is further configured to detect whether the document data is consistent with the pre-stored data; and when the file data is inconsistent with the pre-stored data, judging that the file data is not matched with the pre-stored data.
15. The apparatus according to claim 11, wherein the matching module is further configured to obtain target spectrum information included in the audio data; detecting the similarity between the target frequency spectrum information and prestored frequency spectrum information contained in the prestored data; and when the similarity is lower than a similarity threshold value, judging that the audio data is not matched with the pre-stored data.
16. The apparatus of claim 9, further comprising an instruction generation module; the instruction generation module is used for generating the detection instruction when the time length from the last generation of the detection instruction exceeds the preset time length.
17. One or more computer-readable storage media embodying computer-executable instructions that, when executed by one or more processors, cause the processors to:
when a detection instruction is obtained, obtaining an audio file according to the detection instruction;
inputting the audio file into at least two processing units which are sequentially arranged for processing;
when the processing unit outputs target data every time, matching the target data with pre-stored data corresponding to the target processing unit which outputs the target data, wherein the pre-stored data is data output by the processing unit under the condition that the audio file is normally played; and
when the target data is not matched with prestored data corresponding to a target processing unit of the target data, outputting abnormal information corresponding to the target data, and using the prestored data as the input of a next processing unit of the target processing unit, wherein the abnormal information is used for prompting that the processing unit outputting the target data is abnormal;
and when the target data is matched with pre-stored data corresponding to a target processing unit of the target data, taking the target data as the input of a next processing unit of the target processing unit.
18. The computer-readable storage medium recited in claim 17, wherein the computer-executable instructions, when executed by one or more processors, cause the processors to:
and when the target data is not matched with the pre-stored data, ending the operation of matching the target data with the pre-stored data each time the processing unit outputs the target data.
19. The computer-readable storage medium of claim 17, wherein the target data includes document data output by a document reading unit and audio data output by a data processing unit, which are arranged in sequence; the processor executes the following operations when matching the target data with pre-stored data each time the processing unit outputs the target data:
outputting the file data by the file reading unit each time, and matching the file data with the prestored data; and
and outputting the audio data by the data processing unit every time, and matching the audio data with the pre-stored data.
20. The computer-readable storage medium of claim 19, wherein the processor, when executing the process of inputting the audio file to at least two processing units arranged in sequence, further executes the following operations:
reading the audio file through the file reading unit;
when the reading is successful, outputting the file data obtained by processing the audio file through the file reading unit, and taking the file data as the input of the data processing unit; and
and outputting the abnormal information of the file reading unit when the reading is unsuccessful.
21. The computer-readable storage medium of claim 20, wherein the data processing unit includes a decoding unit, a mixing unit, and a signal conversion unit, which are arranged in sequence, and the audio data includes first audio data, second audio data, and third audio data; after the processor executes the file data as the input of the data processing unit, the following operations are also executed:
decoding the file data through the decoding unit, and outputting first audio data corresponding to the decoding unit;
performing sound mixing processing on the first audio data through the sound mixing unit, and outputting second audio data corresponding to the sound mixing unit; and
and performing signal conversion processing on the second audio data through the signal conversion unit, and outputting the third audio data.
22. The computer-readable storage medium of claim 19, wherein said processor, when performing said matching said file data with said pre-stored data, further performs the following:
detecting whether the file data is consistent with the pre-stored data; and
and when the file data is inconsistent with the pre-stored data, judging that the file data is not matched with the pre-stored data.
23. The computer-readable storage medium of claim 19, wherein the processor performs the matching of the audio data with the pre-stored data by further performing the following:
acquiring target frequency spectrum information contained in the audio data;
detecting the similarity between the target frequency spectrum information and pre-stored frequency spectrum information contained in the pre-stored data; and
and when the similarity is lower than a similarity threshold value, judging that the audio data is not matched with the pre-stored data.
24. The computer-readable storage medium of claim 17, wherein the processor executes the following operations before, when the detection instruction is obtained, obtaining the audio file according to the detection instruction:
and when the time length from the last generation of the detection instruction exceeds the preset time length, generating the detection instruction.
25. An electronic device comprising a memory and a processor, the memory having stored therein computer-readable instructions that, when executed by the processor, cause the processor to:
when a detection instruction is obtained, obtaining an audio file according to the detection instruction;
inputting the audio file into at least two processing units which are sequentially arranged for processing;
when the processing unit outputs target data every time, matching the target data with pre-stored data corresponding to the target processing unit which outputs the target data, wherein the pre-stored data is data output by the processing unit under the condition that the audio file is normally played; and
when the target data is not matched with prestored data corresponding to a target processing unit of the target data, outputting abnormal information corresponding to the target data, wherein the prestored data is used as the input of a next processing unit of the target processing unit, and the abnormal information is used for prompting that the processing unit outputting the target data is abnormal;
and when the target data is matched with pre-stored data corresponding to a target processing unit of the target data, taking the target data as the input of a next processing unit of the target processing unit.
26. The electronic device of claim 25, wherein the computer readable instructions, when executed by the processor, cause the processor to:
and when the target data is not matched with the pre-stored data, finishing the operation of matching the target data with the pre-stored data when the processing unit outputs the target data each time.
27. The electronic device according to claim 25, wherein the target data includes document data output by a document reading unit and audio data output by a data processing unit arranged in sequence; the processor executes the following operations when matching the target data with pre-stored data each time the processing unit outputs the target data:
outputting the file data by the file reading unit each time, and matching the file data with the prestored data; and
and outputting the audio data by the data processing unit every time, and matching the audio data with the pre-stored data.
28. The electronic device of claim 27, wherein the processor, when executing the inputting of the audio file to at least two processing units arranged in sequence for processing, further executes the following operations:
reading the audio file through the file reading unit;
when the reading is successful, outputting the file data obtained by processing the audio file through the file reading unit, and taking the file data as the input of the data processing unit; and
and outputting the abnormal information of the file reading unit when the reading is unsuccessful.
29. The electronic device according to claim 28, wherein the data processing unit includes a decoding unit, a mixing unit, and a signal conversion unit arranged in this order, and the audio data includes first audio data, second audio data, and third audio data; after the processor executes the file data as the input of the data processing unit, the following operations are also executed:
decoding the file data through the decoding unit, and outputting first audio data corresponding to the decoding unit;
performing sound mixing processing on the first audio data through the sound mixing unit, and outputting second audio data corresponding to the sound mixing unit; and
and performing signal conversion processing on the second audio data through the signal conversion unit, and outputting the third audio data.
30. The electronic device of claim 27, wherein the processor performs the matching of the document data with the pre-stored data by:
detecting whether the file data is consistent with the pre-stored data; and
and when the file data is inconsistent with the pre-stored data, judging that the file data is not matched with the pre-stored data.
31. The electronic device of claim 27, wherein the processor, when executing the matching of the audio data with the pre-stored data, further performs the following:
acquiring target frequency spectrum information contained in the audio data;
detecting the similarity between the target frequency spectrum information and pre-stored frequency spectrum information contained in the pre-stored data; and
and when the similarity is lower than a similarity threshold value, judging that the audio data is not matched with the pre-stored data.
32. The electronic device of claim 25, wherein when the detection instruction is obtained, before the audio file is obtained according to the detection instruction, the processor further performs the following operations:
and when the time length from the last generation of the detection instruction exceeds the preset time length, generating the detection instruction.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2018/116583 WO2020103008A1 (en) | 2018-11-21 | 2018-11-21 | Audio detection method, computer readable storage medium, and electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112689872A CN112689872A (en) | 2021-04-20 |
CN112689872B true CN112689872B (en) | 2022-11-15 |
Family
ID=70774268
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201880097551.0A Active CN112689872B (en) | 2018-11-21 | 2018-11-21 | Audio detection method, computer-readable storage medium and electronic device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112689872B (en) |
WO (1) | WO2020103008A1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112786070B (en) * | 2020-12-28 | 2024-03-15 | Oppo广东移动通信有限公司 | Audio data processing method and device, storage medium and electronic equipment |
CN116320222B (en) * | 2023-03-24 | 2024-01-30 | 北京生数科技有限公司 | Audio processing method, device and storage medium |
CN117012207B (en) * | 2023-09-20 | 2023-12-29 | 统信软件技术有限公司 | Audio file detection method and device and computing equipment |
Family Cites Families (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7738664B2 (en) * | 2003-10-07 | 2010-06-15 | Kddi Corporation | Apparatus for fault detection for parallelly transmitted audio signals and apparatus for delay difference detection and adjustment for parallelly transmitted audio signals |
CN1758226A (en) * | 2004-10-09 | 2006-04-12 | 鸿富锦精密工业(深圳)有限公司 | The method of the automatic detection computations machine of loop-type audio frequency apparatus playing function |
TWI312501B (en) * | 2006-03-13 | 2009-07-21 | Asustek Comp Inc | Audio processing system capable of comparing audio signals of different sources and method thereof |
CN201417450Y (en) * | 2009-06-18 | 2010-03-03 | 王德琛 | Device for preventing music pirating at business places |
JP2011205566A (en) * | 2010-03-26 | 2011-10-13 | Pioneer Electronic Corp | Audio device, information processing method, program for audio device, and information recording medium |
KR20120005799A (en) * | 2010-07-09 | 2012-01-17 | 삼성전기주식회사 | Hd radio having the detection function of the breakdown and control method thereof |
KR20130073069A (en) * | 2011-12-23 | 2013-07-03 | 현대모비스 주식회사 | Sound source play device capable of self-diagnosis of audio defect check and method thereof |
JP2014039239A (en) * | 2012-07-17 | 2014-02-27 | Yamaha Corp | Acoustic signal processing apparatus, program and processing method of acoustic signal |
US9886947B2 (en) * | 2013-02-25 | 2018-02-06 | Seiko Epson Corporation | Speech recognition device and method, and semiconductor integrated circuit device |
CN104104762B (en) * | 2014-07-22 | 2017-04-19 | 南京声准科技有限公司 | Efficient audio test method of communication terminal |
US9949046B2 (en) * | 2016-07-20 | 2018-04-17 | Harman International Industries, Incorporated | Automating repairs to audio systems |
CN107346665A (en) * | 2017-06-29 | 2017-11-14 | 广州视源电子科技股份有限公司 | Audio detection method, device, equipment and storage medium |
CN107743292B (en) * | 2017-11-17 | 2019-09-10 | 中国航空工业集团公司西安航空计算技术研究所 | A kind of failure automatic detection method of voicefrequency circuit |
CN108430026B (en) * | 2018-03-07 | 2020-08-21 | 广州艾美网络科技有限公司 | Audio equipment fault detection method and karaoke equipment |
-
2018
- 2018-11-21 WO PCT/CN2018/116583 patent/WO2020103008A1/en active Application Filing
- 2018-11-21 CN CN201880097551.0A patent/CN112689872B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN112689872A (en) | 2021-04-20 |
WO2020103008A1 (en) | 2020-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10649720B2 (en) | Sound effect configuration method and system and related device | |
CN107464557B (en) | Call recording method and device, mobile terminal and storage medium | |
CN108320744B (en) | Voice processing method and device, electronic equipment and computer readable storage medium | |
CN108988909B (en) | Audio processing method and device, electronic equipment and computer readable storage medium | |
CN106371964B (en) | Method and device for prompting message | |
CN106331370B (en) | A kind of data transmission method and terminal device | |
CN112689872B (en) | Audio detection method, computer-readable storage medium and electronic device | |
CN108156508B (en) | Barrage information processing method and device, mobile terminal, server and system | |
CN112148579B (en) | User interface testing method and device | |
CN108549698B (en) | File processing method and device, mobile terminal and computer readable storage medium | |
WO2018059131A1 (en) | Method and device for updating sequence of fingerprint templates for matching | |
CN107908407B (en) | Compiling method and device and terminal equipment | |
WO2018161540A1 (en) | Fingerprint registration method and related product | |
WO2018103443A1 (en) | Network positioning method and terminal device | |
CN108834132B (en) | Data transmission method and equipment and related medium product | |
CN110378107B (en) | Method and related device for detecting installation package | |
WO2018049934A1 (en) | Data migration method and terminals | |
CN104809055B (en) | Application program testing method and device based on cloud platform | |
CN111405043B (en) | Information processing method and device and electronic equipment | |
CN106934003B (en) | File processing method and mobile terminal | |
CN108573260A (en) | Information processing method and device, electronic equipment, computer readable storage medium | |
CN109041212B (en) | Positioning method and wearable device | |
CN110876098B (en) | Audio processing method and electronic equipment | |
CN112823519B (en) | Video decoding method, device, electronic equipment and computer readable storage medium | |
CN106933626B (en) | Application association method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |