WO2020103008A1 - 音频检测方法、计算机可读存储介质和电子设备 - Google Patents

音频检测方法、计算机可读存储介质和电子设备

Info

Publication number
WO2020103008A1
WO2020103008A1 PCT/CN2018/116583 CN2018116583W WO2020103008A1 WO 2020103008 A1 WO2020103008 A1 WO 2020103008A1 CN 2018116583 W CN2018116583 W CN 2018116583W WO 2020103008 A1 WO2020103008 A1 WO 2020103008A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
file
audio
target
processing unit
Prior art date
Application number
PCT/CN2018/116583
Other languages
English (en)
French (fr)
Inventor
马玉刚
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to PCT/CN2018/116583 priority Critical patent/WO2020103008A1/zh
Priority to CN201880097551.0A priority patent/CN112689872B/zh
Publication of WO2020103008A1 publication Critical patent/WO2020103008A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/48Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/48Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
    • G10L25/51Speech 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

Definitions

  • the present application relates to the field of computer technology, and in particular, to an audio detection method, a computer-readable storage medium, and an electronic device.
  • the audio file When the electronic device plays the audio file, the audio file needs to be read, decoded, etc., and then the sound corresponding to the audio file is played through the speaker.
  • the sound played by the speaker is abnormal, for example, there is no sound during playback, or there is noise during playback, the developer can reproduce the abnormal phenomenon and obtain the corresponding log for analysis to determine the abnormal processing unit.
  • the conventional technology has a problem of low processing efficiency.
  • Various embodiments according to the present application provide an audio detection method, a computer-readable storage medium, and an electronic device.
  • An audio detection method including:
  • abnormal information corresponding to the target data is output, and the abnormal information is used to prompt the processing unit outputting the target data to be abnormal.
  • One or more computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, causing the processors to perform the following operations:
  • abnormal information corresponding to the target data is output, and the abnormal information is used to prompt the processing unit outputting the target data to be abnormal.
  • An electronic device includes a memory and a processor.
  • the memory stores computer-readable instructions.
  • the processor causes the processor to perform the following operations:
  • abnormal information corresponding to the target data is output, and the abnormal information is used to prompt the processing unit outputting the target data to be abnormal.
  • the audio detection method, the computer-readable storage medium and the electronic device provided by the embodiments of the present application by acquiring the audio file according to the detection instruction when the detection instruction is obtained, input the audio file to at least two processing units arranged in sequence for processing When each processing unit outputs target data, the target data is matched with the pre-stored data. When the target data does not match the pre-stored data, the abnormal information corresponding to the target data is output. The abnormal information is used to prompt the processing unit to output the target data Abnormal, can improve the detection efficiency of the audio processing unit.
  • FIG. 1 is an application environment diagram of an audio detection method in an embodiment.
  • FIG. 2 is a flowchart of an audio detection method in an embodiment.
  • FIG. 3 is a flowchart of processing an audio file by a processing unit in an embodiment.
  • FIG. 4 is a flowchart of processing file data by a data processing unit in an embodiment.
  • FIG. 5 is a flowchart of matching audio data with pre-stored data in an embodiment.
  • FIG. 6 is a flowchart of an audio detection method in an embodiment.
  • FIG. 7 is a structural block diagram of an audio detection device in an embodiment.
  • FIG. 8 is a schematic diagram of an internal structure of an electronic device in an embodiment.
  • FIG. 9 is a block diagram of a partial structure of a mobile phone related to an electronic device provided by an embodiment of the present application.
  • first”, “second”, etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.
  • first audio data may be referred to as second audio data
  • second audio data may be referred to as first audio data. Both the first audio data and the second audio data are audio data, but they are not the same audio data.
  • FIG. 1 is an application environment diagram of an audio detection method in an embodiment.
  • the application environment includes an electronic device 110.
  • the electronic device 110 can process the audio file and play the processed audio data through the 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, and each time the processing unit outputs the target data, the target data and The pre-stored data is matched. When the target data does not match the pre-stored data, abnormal information corresponding to the target data is output. The abnormal information is used to prompt the processing unit outputting the target data to be abnormal.
  • the above-mentioned electronic device 110 may be a mobile phone, a computer, a wearable device, etc., which is not limited herein.
  • FIG. 2 is a flowchart of an audio detection method in an embodiment.
  • the audio detection method in this embodiment is described by taking the electronic device 110 shown in FIG. 1 as an example.
  • the audio detection method includes operations 202 to 208. among them:
  • the detection instruction may be generated by the user by clicking a button on the display screen, or by the user by pressing a control on the touch screen, or may be automatically generated by an electronic device, and the electronic device may obtain the detection instruction for the audio processing unit.
  • the user can trigger the detection instruction when the sound played by the speaker of the electronic device is abnormal, for example, when there is no sound when the audio file is played, noise occurs, or the playback sound does not correspond to the audio file, the electronic device can 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 device, and then processed and played through the speaker of the electronic device.
  • 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 an audio file downloaded by the electronic device from the network, etc., which is not limited thereto.
  • Audio file formats can be in multiple formats, such as mp3 (Moving Pictures Experts Group Audio Layer 3, motion picture expert compression standard audio level 3), wav (wave, wave), mpeg (Moving Pictures Experts Group) format Wait.
  • the detection instruction may include an audio format, and the electronic device may pre-store audio files in different formats, so as to obtain the corresponding audio file according to the audio format included in the detection instruction.
  • 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 the audio file.
  • the audio file can be input to at least two processing units arranged in sequence for processing, and the processed audio data can be played through the speaker.
  • the processing unit may include an audio reading unit, a decoding unit, a signal conversion unit, etc. are not limited thereto.
  • Each processing unit may be implemented by a software program, or may be implemented by a hardware module, etc., which is not limited herein.
  • the processing units corresponding to different application scenarios may be different.
  • the processing unit of the electronic device may further include a mixing unit.
  • the electronic device may input the audio file to at least two processing units arranged in sequence for processing.
  • each time the processing unit outputs the target data the target data is matched with the pre-stored data.
  • each processing unit processes the input data and outputs the processed target data.
  • the file reading unit can read the audio file and output the read data as the target data corresponding to the file reading unit; the decoding unit can Decode the data output by the file reading unit, and output the decoded data as the target data corresponding to the decoding unit.
  • the pre-stored data is the data output by the processing unit when the audio file is played normally.
  • the electronic device may pre-store the pre-stored data corresponding to the audio file. Furthermore, each time the processing unit outputs the target data, the target data is matched with the pre-stored data.
  • the electronic device matches the target data with the pre-stored data. Specifically, the electronic device can calculate the matching degree between the target data and the pre-stored data. When the match degree exceeds the threshold, it is determined that the target data matches the pre-stored data. When the match degree does not exceed At the threshold, it is determined that the target data does not match the pre-stored data.
  • the calculation method of the matching degree can be different calculation methods according to different target data, and the threshold can be set according to actual needs, which are not limited here.
  • Operation 208 when the target data does not match the pre-stored data, output abnormal information corresponding to the target data, and the abnormal information is used to prompt the processing unit outputting the target data to be abnormal.
  • the abnormal information corresponding to the target data is information for prompting that the processing unit outputting the target data is abnormal.
  • the electronic device outputs abnormal information corresponding to the target data.
  • the electronic device may acquire the processing unit that outputs the target data, and generate abnormal information of the processing unit.
  • the abnormal information can be displayed on the display screen of the electronic device. Specifically, it can be displayed in the form of a pop-up window, a notification bar, etc., which is not limited thereto.
  • an audio file is obtained according to the detection instruction, the audio file is input to at least two processing units arranged in sequence for processing, and each time the processing unit outputs target data, the target The data is matched with the pre-stored data.
  • abnormal information corresponding to the target data is output. The abnormal information is used to prompt the processing unit outputting the target data to be abnormal.
  • the target data output by the processing unit can be matched with the pre-stored data to determine whether the processing unit outputting the target data is abnormal, the operation is simple, and there is no need to manually log the abnormal audio playback Analysis to determine the abnormal processing unit can effectively improve the detection efficiency of the audio processing unit.
  • the provided audio detection method further includes: when the target data does not match 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.
  • 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 the pre-stored data.
  • 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, an abnormality corresponding to the target data is output Information, that is, information used to prompt the abnormality of the file reading unit, and the detection is ended at the same time, that is, the target data output by the decoding unit is not matched.
  • the electronic device when the electronic device is operating normally, when the electronic device processes the audio file, the output of the previous processing unit is used as the input of the next processing unit.
  • the electronic device detects that the target data does not match the pre-stored data, it indicates that the target data is abnormal data. At this time, if the target data is used as the input of the next processing unit, the target data output by the next processing unit must also be abnormal. If the target data does not match the pre-stored data, the electronic device ends 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 the pre-stored data, which can save the resources of the electronic device Consume.
  • the process of matching the target data with the pre-stored data in the provided audio detection method further includes: matching the target data with the pre-stored data corresponding to the target processing unit outputting the target data; the audio detection method further includes: When the target data matches 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 the input of the 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 the data output by each processing unit when the audio file is played normally.
  • the electronic device may pre-store the pre-stored data corresponding to each processing unit.
  • the electronic device matches the target data with the pre-stored data corresponding to the target processing unit that outputs the target data. Specifically, when the processing unit outputs the target data, the electronic device acquires the pre-stored data corresponding to the target processing unit that outputs the target data, and matches the target data with the pre-stored data.
  • the electronic device when the electronic device is operating normally, when the electronic device processes the audio file, the output of the previous processing unit is used as the input of the next processing unit.
  • the electronic device may use the target data as input to the next processing unit of the target processing unit when the target data matches the pre-stored data.
  • the electronic device uses the pre-stored data as the input of the next processing unit of the target processing unit, that is, the pre-stored data corresponding to the target processing unit as the input of the next processing unit of the target processing unit.
  • the accuracy of the input data of a processing unit can be matched to each processing unit in the audio processing process, which can improve the detection accuracy of the audio processing unit and avoid the abnormality of two or more processing units. The case of outputting abnormal information of a processing unit.
  • the target data includes file data output by the file reading unit and audio data output by the data processing unit in this order; in the audio detection method, each time the processing unit outputs the target data ,
  • the process of matching the target data with the pre-stored data includes: outputting the file data in each file reading unit, matching the file data with the pre-stored data; outputting the audio data in each data processing unit, and matching the audio data with the pre-stored data match.
  • the at least two processing units included in the electronic device may include a file reading unit and a data processing unit arranged in sequence. There may be one or more data processing units.
  • 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 device can match the file data with the pre-stored file data each time the file reading unit outputs the file data, and the pre-stored file data is the pre-stored data corresponding to the file reading unit; the audio data is output in each data processing unit At this time, the audio data is matched with the pre-stored audio data, and the pre-stored audio data is the pre-stored data corresponding to the audio processing unit that outputs the audio data.
  • FIG. 3 is a flowchart of processing an audio file by a processing unit in an embodiment.
  • the process of inputting an audio file to at least two processing units arranged in sequence for processing includes:
  • Operation 302 reading the audio file through the file reading unit.
  • the file reading unit is a unit for reading audio files.
  • the file reading unit may be implemented by a software program or a hardware module, which is not limited herein.
  • the electronic device can read the audio file through the file reading unit. Specifically, the electronic device can read the file name, file size, or file type contained in the audio file, and parse the audio data contained in the audio file.
  • 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.
  • the file reading unit can output the file data obtained by processing the audio file.
  • the file data may include at least one of the file name, file size, file type, and audio data contained in the file corresponding to the audio file.
  • 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 device can also obtain 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 use the audio data contained in the file data as input data of the data processing unit, where the audio data output by the file reading unit is undecoded data.
  • 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; when the file data is not consistent with the pre-stored data, the file The data does not match the pre-stored data.
  • the electronic device can obtain the pre-stored data corresponding to the file reading unit, and then detect whether the file data is consistent with the pre-stored data. Specifically, the electronic device can check the file name, file size, file type, and audio data contained in the file At least one of them. For example, the electronic device can detect whether the audio data contained in the file is consistent with the pre-stored data. When the audio data is binary data, the electronic device can detect whether the binary data is consistent with the binary data contained in the pre-stored data. When the file data does not match the pre-stored data, the electronic device determines that the file data does not match the pre-stored data.
  • Operation 306 when the reading is unsuccessful, output the abnormal information of the file reading unit.
  • the electronic device When the file reading unit fails to read the audio file, the electronic device outputs abnormal information of the file reading unit.
  • the abnormality information may include the abnormality type of the file reading unit.
  • the abnormal cause of the file reading unit is unsuccessful reading of the audio file; when the file data does not match the pre-stored data, the abnormal cause of the file reading unit is the audio file reading error.
  • the electronic device may also output abnormal information that the data processing unit fails to process audio data.
  • the output file data is matched with the pre-stored data to determine whether the file reading unit is abnormal, and the file data output by the file reading unit is used as the input of the data processing unit.
  • the reading is unsuccessful, the abnormal information of the file reading unit is output, and the corresponding abnormal information can be output when the file reading unit cannot read the audio file, which can improve the accuracy of abnormal detection of the audio processing unit.
  • the data processing unit in the provided audio detection method 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 audio After using the file data as the input of the data processing unit in the detection method, it also includes:
  • 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 audio data may include a decoding unit, a mixing unit, and a signal conversion unit arranged in sequence.
  • Each data processing unit can be implemented by a software program, or by hardware such as a chip.
  • the electronic device can realize the decoding process of the audio data through the decoding program, and can also realize the decoding process of the audio data through the decoder; the electronic device can realize the 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 device may perform decoding processing on the audio data contained in the file data through the decoding unit to output the first audio data.
  • the first audio data is PCM (Pulse Code Modulation, pulse code modulation) data
  • PCM data is a pulse sequence of the analog signal after sampling and quantization.
  • Operation 404 performing mixing processing on the first audio data through the mixing unit, and outputting second audio data corresponding to the mixing unit.
  • the mixing unit may be used for at least one of multi-channel audio data processing and resampling processing. Specifically, the mixing unit may output a plurality of different second audio data, or may combine the input multiple audio data into one second audio data, and may also perform frequency conversion on the input audio data. For example, when the first audio data output by the decoding unit is 44.1 kHz, the mixing unit may convert the first audio data into second audio data of 48 kHz, and so on.
  • the electronic device may perform mixing processing on the first audio data through the audio mixing unit, and output the second audio data.
  • the second audio data when matching, is used as the input of the signal conversion unit; when there is no match, the abnormal information of the mixing unit is output, and ends Matching operation or using the pre-stored data corresponding to the mixing unit as the input of the signal conversion unit for matching operation.
  • the signal conversion unit performs signal conversion processing on the second audio data to output third audio data.
  • the signal conversion unit can convert the PCM data into an analog signal, thereby driving the speaker to play sound and play audio.
  • the electronic device may perform signal conversion processing on the second audio data through the signal conversion unit and output the third audio data. Furthermore, when matching the third audio data with the pre-stored data corresponding to the signal conversion unit, when matching, the third audio data is played through the speaker; when it does not match, the abnormal information of the signal conversion unit is output, and the electronic device can also Play the pre-stored data corresponding to the signal conversion unit as the speaker. Therefore, when the processing units are normal, the user can also determine whether the speaker is abnormal through the sound played by the speaker, which can improve the accuracy of abnormality detection.
  • the electronic device inputs the audio file into the file reading unit, decoding unit, mixing unit and signal conversion unit arranged in sequence for processing. Each time the processing unit outputs audio data, the audio data is matched with the pre-stored data, and the processing is determined according to the matching result Whether the unit is abnormal can improve the detection efficiency of the processing unit.
  • the processing unit included in the electronic device may be one or more of the above processing units, or may include other processing units, and the processing unit included in the electronic device is not limited herein.
  • FIG. 5 is a flowchart of matching audio data with pre-stored data in an embodiment.
  • the process of matching audio data with pre-stored data in the provided audio detection method includes:
  • Operation 502 acquiring target spectrum information contained in the audio data.
  • the target spectrum information refers to the spectrum information contained in the audio data.
  • the pitch, timbre, volume and other information of the audio data can be analyzed based on the target spectrum information.
  • the electronic device can obtain the target spectrum information contained in the audio data.
  • Operation 504 detecting the similarity between the target spectrum information and the pre-stored spectrum information contained in the pre-stored data.
  • the electronic device can detect the similarity between the target spectrum information and the pre-stored spectrum information contained in the pre-stored data. Specifically, the electronic device performs similarity detection according to the waveform, amplitude, frequency, etc. contained in the target spectrum information and the pre-stored spectrum information. The electronic device can also perform sampling detection on the target spectrum information, that is, acquiring part of the spectrum information contained in the target spectrum information for similarity detection. Specific sampling rules can be set according to actual needs, and are not limited herein.
  • the similarity threshold may be set according to actual requirements, for example, it may be 80%, 88%, 90%, 95%, etc., but not limited thereto.
  • the electronic device can determine that the target data matches the pre-stored data; when the similarity is lower than the similarity threshold, the electronic device can determine that the audio data does not match the pre-stored data, and then output the audio data.
  • Abnormal information the abnormal information is used to prompt that the processing unit outputting the audio data is abnormal.
  • the similarity between the target spectrum information contained in the audio data and the pre-stored spectrum information is detected.
  • the similarity is lower than the similarity threshold, it is determined that the audio data does not match the pre-stored data, and then input Abnormal information of audio data can improve the accuracy of audio detection.
  • the method when the detection instruction is obtained, before acquiring the audio file according to the detection instruction, the method further includes: generating the detection instruction when the duration from the last time the detection instruction is generated exceeds a preset duration.
  • the preset duration can be set according to actual needs, which is not limited here.
  • the preset duration may be 1 day, 10 days, 1 month, etc., but is not limited thereto.
  • the electronic device can periodically generate a detection instruction to detect the audio file processing unit. Specifically, the electronic device may detect the length of time since the detection instruction was last generated, and when the time exceeds the preset time, generate the detection instruction.
  • the detection instruction generated last time may be a detection instruction generated by a user trigger.
  • the electronic device may generate a detection instruction, and then obtain an audio file according to the detection instruction, input the audio file to at least two processing units arranged in sequence for processing, and process the processing unit
  • the output target data is matched with the pre-stored data.
  • the information indicating the abnormality of the processing unit that outputs the target data is output. The case where the processing unit detects and causes the processing unit to become abnormally aggravated.
  • FIG. 6 is a flowchart of an audio detection method in an embodiment. As shown in FIG. 6, the specific operation of the audio detection method is as follows:
  • the electronic device obtains the detection instruction, and obtains the audio file according to the detection instruction.
  • the electronic device reads the audio file through the file reading unit to obtain the output file data.
  • the electronic device matches the file data with the pre-stored data.
  • the audio file is input to the decoding unit for processing.
  • the file reading unit abnormal information is output, and the detection ends.
  • the electronic device processes the file data through the decoding unit to obtain the output first audio data.
  • the electronic device matches the first audio data with the pre-stored audio data.
  • the first audio data is input to the mixing unit for processing, and when there is no match, the abnormal information of the decoding unit is output, and the detection ends.
  • the electronic device processes the first audio data through the sound mixing unit to obtain the output second audio data.
  • the electronic device matches the second audio data with the pre-stored audio data.
  • the second audio data is input to the signal conversion unit for processing.
  • it does not match, it outputs the abnormal information of the mixing unit and ends the detection.
  • the electronic device processes the first audio data through the signal conversion unit to obtain the output third audio data.
  • the electronic device matches the third audio data with the pre-stored audio data.
  • the detection is ended, and the third audio data may also be played through the speaker.
  • the abnormal information of the signal conversion unit is output, and End the test.
  • the audio detection device includes an acquisition module 702, a processing module 704, a matching module 706, and an output module 708, where:
  • the obtaining module 702 is configured to obtain an audio file according to the detecting instruction when the detecting instruction is obtained.
  • the processing module 704 is configured to input the audio file to at least two processing units arranged in sequence for processing.
  • the matching module 706 is configured to match the target data with the pre-stored data each time the processing unit outputs the target data.
  • the output module 708 is configured to output abnormal information corresponding to the target data when the target data does not match the pre-stored data, and the abnormal information is used to prompt the processing unit outputting the target data to be abnormal.
  • An audio detection device provided by an embodiment of the present application is used to acquire an audio file according to the detection instruction when the detection instruction is obtained, input the audio file to at least two processing units arranged in sequence for processing, and output target data in each processing unit When the target data is matched with the pre-stored data, when the target data does not match the pre-stored data, the abnormal information corresponding to the target data is output.
  • the abnormal information is used to indicate that the processing unit outputting the target data is abnormal, which can improve the detection of the audio processing unit. effectiveness.
  • the matching module 706 can also be used 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 the pre-stored data.
  • the target data includes the file data output by the file reading unit and the audio data output by the data processing unit in sequence; the matching module 706 can also be used to output the file data every time the file reading unit Match with the pre-stored data; output file data in each file reading unit, and match the file data with the pre-stored data.
  • the processing module 704 can also be used to read the audio file through the file reading unit; when the reading is successful, the file data obtained by processing the audio file is output through the file reading unit, and the file data is used as The input of the data processing unit; when the reading is unsuccessful, the abnormal information of the file reading unit is output.
  • 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 also be used to pass The decoding unit decodes the file data and outputs the first audio data corresponding to the decoding unit; mixes the first audio data through the mixing unit to output the second audio data corresponding to the mixing unit; and uses the signal conversion unit to The second audio data is subjected to signal conversion processing to output third audio data.
  • the matching module 706 can also be used to detect whether the file data is consistent with the pre-stored data; when the file data is inconsistent with the pre-stored data, it is determined that the file data does not match the pre-stored data.
  • the matching module 706 can also be used to obtain the target spectrum information contained in the audio data; detect the similarity between the target spectrum information and the pre-stored spectrum information contained in the pre-stored data; when the similarity is lower than the similarity threshold, then It is determined that the audio data does not match the pre-stored data.
  • the provided audio detection method further includes an instruction generation module 710, and the instruction generation module 710 is configured to generate the detection instruction when the time period from the last time the detection instruction is generated exceeds a preset time length.
  • the matching module 706 can also be used to match the target data with the pre-stored data corresponding to the target processing unit that outputs the target data; when the target data matches the pre-stored data, the target data is used as the next target processing unit The input of the processing unit; when the target data does not match the pre-stored data, the pre-stored data is used as the input of the next processing unit of the target processing unit.
  • each module in the audio detection device is for illustration only. In other embodiments, the audio detection device may be divided into different modules as needed to complete all or part of the functions of the audio detection device.
  • the electronic device includes a processor and a memory connected by a system bus.
  • the processor is used to provide computing and control capabilities to support the operation of the entire electronic device.
  • the memory may include a non-volatile storage medium and internal memory.
  • the non-volatile storage medium stores an operating system and computer programs.
  • the computer program can be executed by the processor to implement an audio detection method provided by the following embodiments.
  • the internal memory provides a cached operating environment for the operating system computer programs in the non-volatile storage medium.
  • the electronic device may be a mobile phone, a tablet computer, a personal digital assistant or a wearable device.
  • the embodiments of the present application also provide a computer-readable storage medium.
  • a computer program is stored thereon, which is characterized in that when the computer program is executed by the processor, the audio detection method as described above is realized.
  • An embodiment of the present application also provides an electronic device. As shown in FIG. 9, for ease of description, only parts related to the embodiments of the present application are shown, and specific technical details 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, tablet computer, PDA (Personal Digital Assistant), POS (Point of Sales), in-vehicle computer, wearable device, etc. Taking the electronic device as a mobile phone for example :
  • the mobile phone includes: a radio frequency (Radio Frequency) 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 power supply 990 and other components.
  • a radio frequency (Radio Frequency) circuit 910 the mobile phone includes: a radio frequency (Radio Frequency) 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 power supply 990 and other components.
  • WiFi wireless fidelity
  • FIG. 9 does not constitute a limitation on the mobile phone, and may include more or less components than those shown in the figure, or a combination of certain components, or a different component arrangement.
  • the RF circuit 910 can be used to receive and send signals during the sending and receiving of information or during a call. It can receive the downlink information of the base station and process it to the processor 980; it can also send the uplink data to the base station.
  • RF circuits include but are not limited to antennas, at least one amplifier, transceiver, coupler, low noise amplifier (Low Noise Amplifier, LNA), duplexer, and so on.
  • the RF circuit 910 can also communicate with other devices through a wireless communication network.
  • the wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile (GSM), General Packet Radio Service (GPRS), and Code Division Multiple Access (Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), e-mail, short message service (Short Messaging Service, SMS), etc.
  • GSM Global System of Mobile
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • SMS short message service
  • the memory 920 may be used to store software programs and modules.
  • the processor 980 executes various functional applications and data processing of the mobile phone by running 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, where the program storage area may store an operating system and at least one function-required application program (such as an application program for a sound playback function, an application program for an image playback function, etc.);
  • the data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone.
  • the memory 920 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the input unit 930 may be used to receive input numeric or character information, and generate key signal input related to user settings and function control of the mobile phone 900.
  • the input unit 930 may include a touch panel 931 and other input devices 932.
  • the touch panel 931 also known as a touch screen, can collect user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc. on or near the touch panel 931 Operation), and drive the corresponding connection device according to the preset program.
  • the touch panel 931 may include a touch detection device and a touch controller.
  • the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into contact coordinates, and then sends It is given to the processor 980 and can receive the command sent by the processor 980 and execute it.
  • the touch panel 931 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 930 may also include other input devices 932.
  • other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (such as 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.
  • the display panel 941 may be configured in the form of a liquid crystal display (Liquid Crystal) (LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like.
  • the touch panel 931 may cover the display panel 941, and when the touch panel 931 detects a touch operation on or near it, it is transmitted to the processor 980 to determine the type of touch event, and then the processor 980 according to The type of touch event provides a corresponding visual output on the display panel 941.
  • the touch panel 931 and the display panel 941 are used as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 931 and the display panel 941 may be integrated and Realize the input and output functions of the mobile phone.
  • the mobile phone 900 may further include at least one sensor 950, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 941 according to the brightness of the ambient light, and the proximity sensor may close the display panel 941 and / or when the mobile phone moves to the ear Or backlight.
  • the motion sensor may include an acceleration sensor, which can detect the magnitude of acceleration in various directions through the acceleration sensor, and can detect the magnitude and direction of gravity when at rest, and can be used for applications that recognize mobile phone gestures (such as horizontal and vertical screen switching), and vibration recognition-related functions (such as Pedometer, percussion), etc.
  • the mobile phone can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor and so on.
  • the audio circuit 960, the speaker 961, and the microphone 962 may provide an audio interface between the user and the mobile phone.
  • the audio circuit 960 can transmit the converted electrical signal of the received audio data to the speaker 961, which converts the speaker 961 into a sound signal output; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal, which After receiving, it is converted into audio data, and then processed by the audio data output processor 980, and then sent to another mobile phone through the RF circuit 910, or the audio data is output to the memory 920 for subsequent processing.
  • WiFi is a short-range wireless transmission technology.
  • the mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 970. It provides users with wireless broadband Internet access.
  • FIG. 9 shows the WiFi module 970, it can be understood that it is not a necessary component of the mobile phone 900, and may be omitted as needed.
  • the processor 980 is the control center of the mobile phone, connects various parts of the entire mobile phone with various interfaces and lines, executes or executes the software programs and / or modules stored in the memory 920, and calls the data stored in the memory 920 to execute Various functions and processing data of the mobile phone, so as to monitor the mobile phone as a whole.
  • the processor 980 may include one or more processing units.
  • the processor 980 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, and the like; the modem processor mainly processes wireless communication. It can be understood that the modem processor may not be integrated into the processor 980.
  • the mobile phone 900 further includes a power supply 990 (such as a battery) that supplies power to various components.
  • a power supply 990 (such as a battery) that supplies power to various components.
  • the power supply can be logically connected to the processor 980 through a power management system, so as to realize functions such as charging, discharging, and power management through the power management system.
  • the mobile phone 900 may further include a camera, a Bluetooth module, and the like.
  • the processor 980 included in the electronic device implements the audio detection method as described above when executing the computer program stored on the memory.
  • Non-volatile memory may 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.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR) SDRAM, enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous Link (Synchlink) DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

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

一种音频检测法,包括:当获取到检测指令时,根据检测指令获取音频文件;将音频文件输入至依次排列的至少两个处理单元进行处理;在每一次处理单元输出目标数据时,将目标数据与预存数据进行匹配;及当目标数据与预存数据不匹配时,输出目标数据对应的异常信息,异常信息用于提示输出目标数据的处理单元异常。

Description

音频检测方法、计算机可读存储介质和电子设备 技术领域
本申请涉及计算机技术领域,特别是涉及一种音频检测方法、计算机可读存储介质和电子设备。
背景技术
电子设备在对音频文件进行播放时,需要先对音频文件进行读取、解码等处理,处理后通过扬声器将音频文件对应的声音播放处理出来。当扬声器播放的声音异常,例如播放时无声、播放时出现杂音等现象时,开发人员可以通过重现异常现象,并获取对应的日志进行分析,从而确定异常的处理单元。然而,传统技术中存在处理效率低的问题。
发明内容
根据本申请的各种实施例提供一种音频检测方法、计算机可读存储介质和电子设备。
一种音频检测方法,包括:
当获取到检测指令时,根据所述检测指令获取音频文件;
将所述音频文件输入至依次排列的至少两个处理单元进行处理;
在每一次所述处理单元输出目标数据时,将所述目标数据与预存数据进行匹配;及
当所述目标数据与预存数据不匹配时,输出所述目标数据对应的异常信息,所述异常信息用于提示输出所述目标数据的处理单元异常。
一个或多个包含计算机可执行指令的计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行以下操作:
当获取到检测指令时,根据所述检测指令获取音频文件;
将所述音频文件输入至依次排列的至少两个处理单元进行处理;
在每一次所述处理单元输出目标数据时,将所述目标数据与预存数据进行匹配;及
当所述目标数据与预存数据不匹配时,输出所述目标数据对应的异常信息,所述异常信息用于提示输出所述目标数据的处理单元异常。
一种电子设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下操作:
当获取到检测指令时,根据所述检测指令获取音频文件;
将所述音频文件输入至依次排列的至少两个处理单元进行处理;
在每一次所述处理单元输出目标数据时,将所述目标数据与预存数据进行匹配;及
当所述目标数据与预存数据不匹配时,输出所述目标数据对应的异常信息,所述异常信息用于提示输出所述目标数据的处理单元异常。
本申请实施例提供的音频检测方法、计算机可读存储介质和电子设备,通过在当获取到检测指令时,根据检测指令获取音频文件,将音频文件输入至依次排列的至少两个处理单元进行处理,在每一个处理单元输出目标数据时,将目标数据与预存数据进行匹配,当目标数据与预存数据不匹配时,输出目标数据对应的异常信息,该异常信息用于提示输出目标数据的处理单元异常,可以提高音频处理单元的检测效率。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技 术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为一个实施例中音频检测方法的应用环境图。
图2为一个实施例中音频检测方法的流程图。
图3为一个实施例中通过处理单元处理音频文件的流程图。
图4为一个实施例中通过数据处理单元处理文件数据的流程图。
图5为一个实施例中将音频数据与预存数据进行匹配的流程图。
图6为一个实施例中音频检测方法的流程图。
图7为一个实施例中音频检测装置的结构框图。
图8为一个实施例中电子设备的内部结构示意图。
图9为与本申请实施例提供的电子设备相关的手机的部分结构的框图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一音频数据称为第二音频数据,且类似地,可将第二音频数据称为第一音频数据。第一音频数据和第二音频数据两者都是音频数据,但其不是同一音频数据。
图1为一个实施例中音频检测方法的应用环境图。如图1所示,该应用环境包括电子设备110。电子设备110可以对音频文件进行处理,并将处理后的音频数据通过扬声器播放。具体地,当电子设备110获取到检测指令时,根据检测指令获取音频文件,将音频文件输入至依次排列的至少两个处理单元进行处理,在每一次处理单元输出目标数据时,将目标数据与预存数据进行匹配,当目标数据与预存数据不匹配时,输出目标数据对应的异常信息,该异常信息用于提示输出目标数据的处理单元异常。可以理解的是,上述电子设备110可以是手机、电脑、可穿戴设备等,在此不做限定。
图2为一个实施例中音频检测方法的流程图。本实施例中的音频检测方法,以运行于图1中的电子设备110上为例进行描述。如图2所示,音频检测方法包括操作202至操作208。其中:
操作202,当获取到检测指令时,根据检测指令获取音频文件。
检测指令可以是用户通过点击显示屏上的按钮生成的,也可以是用户通过按压触摸屏上的控件生成的,还可以是电子设备自动生成的,电子设备可以获取对音频处理单元的检测指令。用户可以在电子设备扬声器播放的声音异常的情况下,触发检测指令,例如当音频文件播放时没有声音、出现杂音、或播放声音与音频文件不对应时,电子设备可以获取用户触发的检测指令。音频文件是指包含了真实音频的二进制数据的文件。音频文件可以通过电子设备进行处理,处理后通过电子设备的扬声器进行播放。在本申请实施例中,电子设备根据检测指令获取的音频文件可以是电子设备预存的音频文件,也可以是电子设备从网络下载的音频文件等,不限于此。音频文件的格式可以有多种,比如mp3(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、wav(wave,波)、mpeg(Moving Picture Experts Group,动态图像专家组)格式等。在一个实施例中,检测指令可以包含音频格式,电子设备可以预存不同格式的音频文件,从而根据检测指令中包含的音频格式获取对应的音频文件。
操作204,将音频文件输入至依次排列的至少两个处理单元进行处理。
处理单元是指电子设备中处理音频文件的各个单元。当电子设备接收对音频文件的播放指令时,可以将音频文件输入至依次排列的至少两个处理单元进行处理,处理后的音频数据可以通过扬声器进行播放。具体地,处理单元可以包括音频读取单元、解码单元、信号转化单元等不限于此。各个处理单元可以通过软件程序来实现,也可以通过硬件模块来实现等,在此不做限定。不同的应用场景对应的处理单元可以不同。例如,当电子设备需要对音频文件进行混音处理时,则电子设备的处理单元还可以包括混音单元。电子设备可以将音频文件输入至依次排列的至少两个处理单元进行处理。
操作206,在每一次处理单元输出目标数据时,将目标数据与预存数据进行匹配。
电子设备将音频文件输入至依次排列的至少两个处理单元进行处理时,每一个处理单元对输入的数据进行处理,并输出处理后的目标数据。例如,当依次排列的至少两个处理单元为文件读取单元和解码单元时,文件读取单元可以读取音频文件,并输出读取的数据作为文件读取单元对应的目标数据;解码单元可以对文件读取单元输出的数据进行解码处理,并输出解码处理后的数据作为解码单元对应的目标数据。
预存数据是在音频文件正常播放的情况下处理单元输出的数据。电子设备可以预先保存音频文件对应的预存数据。进而,在每一次处理单元输出目标数据时,将目标数据与预存数据进行匹配。电子设备将目标数据与预存数据进行匹配,具体地,电子设备可以计算目标数据与预存数据之间的匹配度,当匹配度超过阈值时,则判定目标数据与预存数据匹配,当匹配度不超过阈值时,则判定目标数据与预存数据不匹配。其中,匹配度的计算方式可以根据目标数据的不同采用不同的计算方式,阈值可以根据实际需求进行设定,在此均不做限定。
操作208,当目标数据与预存数据不匹配时,输出目标数据对应的异常信息,异常信息用于提示输出目标数据的处理单元异常。
目标数据对应的异常信息是用于提示输出该目标数据的处理单元异常的信息。当目标数据与预存数据不匹配时,电子设备输出目标数据对应的异常信息。具体地,当目标数据与预存数据不匹配时,电子设备可以获取输出该目标数据的处理单元,并生成该处理单元的异常信息。异常信息可以展示在电子设备的显示屏上,具体地,可以通过弹窗、通知栏等形式进行展示等不限于此。
本申请提供的实施例中,当获取到检测指令时,根据检测指令获取音频文件,将音频文件输入至依次排列的至少两个处理单元进行处理,在每一次处理单元输出目标数据时,将目标数据与预存数据进行匹配,当目标数据与预存数据不匹配时,输出目标数据对应的异常信息,异常信息用于提示输出目标数据的处理单元异常。由于在将音频文件输入处理单元进行处理后,可以将处理单元输出的目标数据与预存数据进行匹配,从而确定输出目标数据的处理单元是否异常,操作简单,不需要人为地对音频播放异常的日志进行分析来确定异常的处理单元,可以有效提高音频处理单元的检测效率。
在一个实施例中,提供的音频检测方法还包括:当目标数据与预存数据不匹配时,结束在每一次处理单元输出目标数据时,将目标数据与预存数据进行匹配的操作。
电子设备可以在当目标数据与预存数据不匹配时,结束在每一次处理单元输出目标数据时,将目标数据与预存数据进行匹配的操作。例如,在上述例子中,依次排列的至少两个处理单元包括文件读取单元和解码单元,当电子设备检测到文件读取单元输出的目标数据与预存数据不匹配时,输出目标数据对应的异常信息,即用于提示文件读取单元异常的信息,同时结束检测,即不对解码单元输出的目标数据进行匹配的操作。
通常,在电子设备正常运行的情况下,电子设备对音频文件进行处理时,会将上一处理单元的输出作为下一处理单元的输入。当电子设备检测到目标数据与预存数据不匹配时,则说明目标数据为异常的数据,此时将目标数据作为下一处理单元的输入,则下一处 理单元输出的目标数据必然也是异常的,与预存数据不匹配的,因此电子设备在目标数据与预存数据不匹配的情况下,结束在每一次处理单元输出目标数据时,将目标数据与预存数据进行匹配的操作,可以节省电子设备的资源消耗。
在一个实施例中,提供的音频检测方法中将目标数据与预存数据进行匹配的过程还包括:将目标数据与输出目标数据的目标处理单元对应的预存数据进行匹配;该音频检测方法还包括:当目标数据与预存数据匹配时,将目标数据作为目标处理单元的下一处理单元的输入;当目标数据与预存数据不匹配时,将预存数据作为目标处理单元的下一处理单元的输入。
目标处理单元是指输出目标数据的处理单元。预存数据是在音频文件正常播放的情况下,每一个处理单元输出的数据。电子设备可以预存每一个处理单元对应的预存数据。电子设备将目标数据与输出目标数据的目标处理单元对应的预存数据进行匹配。具体地,电子设备在处理单元输出目标数据时,获取输出该目标数据的目标处理单元对应的预存数据,将目标数据与预存数据进行匹配。
通常,在电子设备正常运行的情况下,电子设备对音频文件进行处理时,会将上一处理单元的输出作为下一处理单元的输入。电子设备可以在当目标数据与预存数据匹配时,将目标数据作为目标处理单元的下一处理单元的输入。当目标数据与预存数据不匹配时,电子设备将预存数据作为目标处理单元的下一处理单元的输入,即将目标处理单元对应的预存数据作为目标处理单元的下一处理单元的输入,可以保证下一处理单元的输入数据的准确性,进而可以对音频处理过程中的每一个处理单元进行匹配检测,可以提高音频处理单元的检测准确性,避免存在两个或两个以上处理单元异常的情况只输出一个处理单元的异常信息的情况。
在一个实施例中,提供的音频检测方法中,目标数据包括依次排列的文件读取单元输出的文件数据和数据处理单元输出的音频数据;该音频检测方法中在每一次处理单元输出目标数据时,将目标数据与预存数据进行匹配的过程包括:在每一次文件读取单元输出文件数据,将文件数据与预存数据进行匹配;在每一次数据处理单元输出音频数据,将音频数据与预存数据进行匹配。
电子设备中包含的至少两个处理单元可以包括依次排列的文件读取单元和数据处理单元。其中,数据处理单元可以是一个或多个。电子设备的处理单元输出的目标数据可以包括文件读取单元输出文件数据以及数据处理单元输出的音频数据。电子设备可以在每一次文件读取单元输出文件数据时,将文件数据与预存的文件数据进行匹配,预存的文件数据即为文件读取单元对应的预存数据;在每一次数据处理单元输出音频数据时,将音频数据与预存的音频数据进行匹配,预存的音频数据即为输出音频数据的音频处理单元对应的预存数据。
图3为一个实施例中通过处理单元处理音频文件的流程图。如图3所示,在一个实施例中,提供的音频检测方法中将音频文件输入至依次排列的至少两个处理单元进行处理的过程,包括:
操作302,通过文件读取单元读取音频文件。
文件读取单元是用于读取音频文件的单元。文件读取单元可以是通过软件程序来实现的,也可以是通过硬件模块来实现的,在此不做限定。电子设备可以通过文件读取单元读取音频文件。具体地,电子设备可以读取音频文件包含的文件名称、文件大小或文件类型等,并解析音频文件中包含的音频数据。
操作304,当读取成功时,通过文件读取单元输出对音频文件进行处理得到的文件数据,并将文件数据作为数据处理单元的输入。
当文件读取单元读取成功时,则说明文件读取单元可以输出对音频文件进行处理后得到的文件数据。文件数据可以包括音频文件对应的文件名称、文件大小、文件类型、文件 中包含的音频数据中的至少一种。电子设备可以将输出的文件数据与预存数据进行匹配,根据匹配结果确定文件读取单元是否异常。电子设备还可以在读取成功时,获取文件读取单元输出的文件数据作为数据处理单元的输入。具体地,电子设备可以将文件数据中包含的音频数据作为数据处理单元的输入数据,其中,文件读取单元输出的音频数据为未解码的数据。
在一个实施例中,当读取成功时,该音频检测方法中将文件数据与预存数据进行匹配的过程包括:检测文件数据与预存数据是否一致;当文件数据与预存数据不一致时,则判定文件数据与预存数据不匹配。
电子设备可以获取文件读取单元对应的预存数据,进而检测文件数据与预存数据是否一致,具体地,电子设备可以对文件数据中包含的文件名称、文件大小、文件类型、文件中包含的音频数据中的至少一种进行检测。例如,电子设备可以检测文件中包含的音频数据与预存数据是否一致,当音频数据为二进制数据时,电子设备可以检测该二进制数据与预存数据中包含的二进制数据是否一致。当文件数据与预存数据不一致时,电子设备则判定文件数据与预存数据不匹配。
操作306,当读取不成功时,输出文件读取单元的异常信息。
当文件读取单元读取音频文件不成功时,电子设备输出文件读取单元的异常信息。具体地,该异常信息可以包含文件读取单元的异常类型。例如,在该实施例中,文件读取单元的异常原因为读取音频文件不成功;当文件数据与预存数据不匹配时,则文件读取单元的异常原因为音频文件读取错误。类似地,当其他数据处理单元没有输出对应的音频数据时,电子设备也可以输出该数据处理单元处理音频数据不成功的异常信息。
通过在文件读取单元读取音频文件成功时,将输出的文件数据与预存数据进行匹配从而确定文件读取单元是否异常,并将文件读取单元输出的文件数据作为数据处理单元的输入,当读取不成功时,输出文件读取单元的异常信息,可以在文件读取单元无法读取音频文件时输出对应的异常信息,可以提高音频处理单元异常检测的准确性。
图4为一个实施例中通过数据处理单元处理文件数据的流程图。在一个实施例中,提供的音频检测方法中数据处理单元包括依次排列的解码单元、混音单元和信号转化单元,音频数据包括第一音频数据、第二音频数据和第三音频数据;该音频检测方法中将文件数据作为数据处理单元的输入之后,还包括:
操作402,通过解码单元对文件数据进行解码处理,输出解码单元对应的第一音频数据。
电子设备用于对音频数据进行处理的数据处理单元可以包括依次排列的解码单元、混音单元、信号转化单元。每一个数据处理单元可以通过软件程序来实现,也可以通过硬件如芯片等来实现。例如,电子设备可以通过解码程序来实现音频数据的解码处理,也可以通过解码器来实现音频数据的解码处理;电子设备可以通过信号转化芯片如codec芯片来实现音频数据的信号转化。文件读取单元输出的音频数据为未解码的数据,电子设备可以通过解码单元对文件数据包含的音频数据进行解码处理,输出得到第一音频数据。第一音频数据为PCM(Pulse Code Modulation,脉冲编码调)数据,PCM数据是模拟信号经过采样量化后的脉冲序列。进而,将第一音频数据与解码单元对应的预存数据进行匹配时,当匹配时,将第一音频数据作为混音单元的输入;当不匹配时,输出解码单元的异常信息,并结束匹配操作或将解码单元对应的预存数据作为混音单元的输入进行匹配操作。
操作404,通过混音单元对第一音频数据进行混音处理,输出混音单元对应的第二音频数据。
混音单元可以用于多路音频数据处理和重采样处理中的至少一种。具体地,混音单元可以输出多个不同的第二音频数据,也可以将输入的多个音频数据组成一个第二音频数据,还可以对输入的音频数据进行频率转化。例如,当解码单元输出的第一音频数据为 44.1kHz时,混音单元可以将第一音频数据转化为48kHz的第二音频数据等。电子设备可以通过混音单元对第一音频数据进行混音处理,输出得到第二音频数据。进而,将第二音频数据与混音单元对应的预存数据进行匹配时,当匹配时,将第二音频数据作为信号转化单元的输入;当不匹配时,输出混音单元的异常信息,并结束匹配操作或将混音单元对应的预存数据作为信号转化单元的输入进行匹配操作。
操作406,通过信号转化单元对第二音频数据进行信号转化处理,输出第三音频数据。
信号转化单元可以将PCM数据转化为模拟信号,从而驱动扬声器发出声音播放音频。电子设备可以通过信号转化单元对第二音频数据进行信号转化处理,输出得到第三音频数据。进而,将第三音频数据与信号转化单元对应的预存数据进行匹配时,当匹配时,将第三音频数据通过扬声器进行播放;当不匹配时,输出信号转化单元的异常信息,电子设备还可以将信号转化单元对应的预存数据作为通过扬声器进行播放。从而,在处理单元均正常的情况下,用户还可以通过扬声器播放的声音确定扬声器是否异常,可以提高异常检测的准确性。
电子设备将音频文件输入依次排列的文件读取单元、解码单元、混音单元和信号转化单元进行处理,每一次处理单元输出音频数据时,将音频数据与预存数据进行匹配,根据匹配结果确定处理单元是否异常,可以提高处理单元的检测效率。电子设备包含的处理单元可以是上述处理单元中的一个或多个,也可以包含其他的处理单元,在此不对电子设备包含的处理单元做限定。
图5为一个实施例中将音频数据与预存数据进行匹配的流程图。在一个实施例中,提供的音频检测方法中将音频数据与预存数据进行匹配的过程包括:
操作502,获取音频数据中包含的目标频谱信息。
目标频谱信息是指音频数据包含的频谱信息。根据目标频谱信息可以分析音频数据的音调、音色、音量等信息。电子设备可以获取音频数据中包含的目标频谱信息。
操作504,检测目标频谱信息与预存数据包含的预存频谱信息的相似度。
电子设备可以检测目标频谱信息与预存数据包含的预存频谱信息之间的相似度。具体地,电子设备根据目标频谱信息与预存频谱信息中包含的波形、振幅、频率等进行相似度检测。电子设备还可以对目标频谱信息进行抽样检测,即获取目标频谱信息中包含的部分频谱信息进行相似度检测,具体抽样规则可以根据实际需求进行设定,在此不做限定。
操作506,当相似度低于相似度阈值时,则判定音频数据与预存数据不匹配。
相似度阈值可以根据实际需求进行设定,例如可以是80%、88%、90%、95%等不限于此。当相似度大于或等于相似度阈值时,电子设备可以判定目标数据与预存数据匹配;当相似度低于相似度阈值时,电子设备可以判定音频数据与预存数据不匹配,进而输出该音频数据的异常信息,该异常信息用于提示输出该音频数据的处理单元异常。
通过在每一个数据处理单元输出音频数据时,检测音频数据中包含的目标频谱信息与预存频谱信息的相似度,当相似度低于相似度阈值时,判定音频数据与预存数据不匹配,进而输入音频数据的异常信息,可以提高音频检测的准确性。
在一个实施例中,提供的音频检测方法中当获取到检测指令时,根据检测指令获取音频文件之前,还包括:当距离上一次生成检测指令的时长超过预设时长时,生成检测指令。
预设时长可以根据实际需求进行设定,在此不做限定。例如,预设时长可以是1天、10天、1个月等不限于此。电子设备可以定时生成检测指令,对音频文件的处理单元进行检测。具体地,电子设备可以检测距离上一次生成检测指令的时长,当该时长超过预设时长时,生成检测指令。上一次生成的检测指令可以是由用户触发生成的检测指令。
当距离上一次生成检测指令的时长超过预设时长时,电子设备可以生成检测指令,进而根据该检测指令获取音频文件,将音频文件输入至依次排列的至少两个处理单元进行处理,将处理单元输出的目标数据与预存数据进行匹配,当不匹配时,则输出用于提示输出 该目标数据的处理单元异常的信息,可以提高音频处理单元的时效性,避免处理单元出现异常不明显时用户不对处理单元进行检测而导致处理单元异常加重的情况。
图6为一个实施例中音频检测方法的流程图。如图6所示,该音频检测方法的具体操作如下所述:
首先,电子设备获取检测指令,根据检测指令获取音频文件。
接着,电子设备通过文件读取单元读取音频文件,获得输出的文件数据。
接着,电子设备将文件数据与预存数据进行匹配,当匹配时,将音频文件输入解码单元进行处理,当不匹配时,则输出文件读取单元异常的信息,并结束检测。
可选地,电子设备通过解码单元处理文件数据,获得输出的第一音频数据。
接着,电子设备将第一音频数据与预存音频数据进行匹配,当匹配时,将第一音频数据输入混音单元进行处理,当不匹配时,则输出解码单元异常的信息,并结束检测。
可选地,电子设备通过混音单元处理第一音频数据,获得输出的第二音频数据。
接着,电子设备将第二音频数据与预存音频数据进行匹配,当匹配时,将第二音频数据输入信号转化单元进行处理,当不匹配时,则输出混音单元异常的信息,并结束检测。
可选地,电子设备通过信号转化单元处理第一音频数据,获得输出的第三音频数据。
接着,电子设备将第三音频数据与预存音频数据进行匹配,当匹配时,结束检测,也可以将第三音频数据通过扬声器进行播放,当不匹配时,则输出信号转化单元异常的信息,并结束检测。
图7为一个实施例中音频检测装置的结构框图。如图7所示,该音频检测装置包括获取模块702、处理模块704、匹配模块706和输出模块708,其中:
获取模块702,用于当获取到检测指令时,根据检测指令获取音频文件。
处理模块704,用于将音频文件输入至依次排列的至少两个处理单元进行处理。
匹配模块706,用于在每一次处理单元输出目标数据时,将目标数据与预存数据进行匹配。
输出模块708,用于当目标数据与预存数据不匹配时,输出目标数据对应的异常信息,异常信息用于提示输出目标数据的处理单元异常。
本申请实施例提供的音频检测装置,用于当获取到检测指令时,根据检测指令获取音频文件,将音频文件输入至依次排列的至少两个处理单元进行处理,在每一个处理单元输出目标数据时,将目标数据与预存数据进行匹配,当目标数据与预存数据不匹配时,输出目标数据对应的异常信息,该异常信息用于提示输出目标数据的处理单元异常,可以提高音频处理单元的检测效率。
在一个实施例中,匹配模块706还可以用于当目标数据与预存数据不匹配时,结束在每一次处理单元输出目标数据时,将目标数据与预存数据进行匹配的操作。
在一个实施例中,目标数据包括依次排列的文件读取单元输出的文件数据和数据处理单元输出的音频数据;匹配模块706还可以用于在每一次文件读取单元输出文件数据,将文件数据与预存数据进行匹配;在每一次文件读取单元输出文件数据,将文件数据与预存数据进行匹配。
在一个实施例中,处理模块704还可以用于通过文件读取单元读取音频文件;当读取成功时,通过文件读取单元输出对音频文件进行处理得到的文件数据,并将文件数据作为数据处理单元的输入;当读取不成功时,输出文件读取单元的异常信息。
在一个实施例中,数据处理单元包括依次排列的解码单元、混音单元和信号转化单元,音频数据包括第一音频数据、第二音频数据和第三音频数据;处理模块704还可以用于通过解码单元对文件数据进行解码处理,输出解码单元对应的第一音频数据;通过混音单元对第一音频数据进行混音处理,输出混音单元对应的第二音频数据;通过信号转化单元对第二音频数据进行信号转化处理,输出第三音频数据。
在一个实施例中,匹配模块706还可以用于检测文件数据与预存数据是否一致;当文件数据与预存数据不一致时,则判定文件数据与预存数据不匹配。
在一个实施例中,匹配模块706还可以用于获取音频数据中包含的目标频谱信息;检测目标频谱信息与预存数据包含的预存频谱信息的相似度;当相似度低于相似度阈值时,则判定音频数据与预存数据不匹配。
在一个实施例中,提供的音频检测方法还包括指令生成模块710,指令生成模块710用于当距离上一次生成检测指令的时长超过预设时长时,生成检测指令。
在一个实施例中,匹配模块706还可以用于将目标数据与输出目标数据的目标处理单元对应的预存数据进行匹配;当目标数据与预存数据匹配时,将目标数据作为目标处理单元的下一处理单元的输入;当目标数据与预存数据不匹配时,将预存数据作为目标处理单元的下一处理单元的输入。
所述音频检测装置中各个模块的划分仅用于举例说明,在其他实施例中,可将音频检测装置按照需要划分为不同的模块,以完成所述音频检测装置的全部或部分功能。
图8为一个实施例中电子设备的内部结构示意图。如图8所示,该电子设备包括通过系统总线连接的处理器和存储器。其中,该处理器用于提供计算和控制能力,支撑整个电子设备的运行。存储器可包括非易失性存储介质及内存储器。非易失性存储介质存储有操作系统和计算机程序。该计算机程序可被处理器所执行,以用于实现以下各个实施例所提供的一种音频检测方法。内存储器为非易失性存储介质中的操作系统计算机程序提供高速缓存的运行环境。该电子设备可以是手机、平板电脑或者个人数字助理或穿戴式设备等。
本申请实施例还提供了一种计算机可读存储介质。其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如上所述的音频检测方法。
本申请实施例还提供了一种电子设备。如图9所示,为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该电子设备可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备等任意终端设备,以电子设备为手机为例:
图9为与本申请实施例提供的电子设备相关的手机的部分结构的框图。参考图9,手机包括:射频(Radio Frequency,RF)电路910、存储器920、输入单元930、显示单元940、传感器950、音频电路960、无线保真(wireless fidelity,WiFi)模块970、处理器980、以及电源990等部件。本领域技术人员可以理解,图9所示的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
其中,RF电路910可用于收发信息或通话过程中,信号的接收和发送,可将基站的下行信息接收后,给处理器980处理;也可以将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路910还可以通过无线通信与网络和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Divi sion Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。
存储器920可用于存储软件程序以及模块,处理器980通过运行存储在存储器920的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器920可主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能 所需的应用程序(比如声音播放功能的应用程序、图像播放功能的应用程序等)等;数据存储区可存储根据手机的使用所创建的数据(比如音频数据、通讯录等)等。此外,存储器920可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
输入单元930可用于接收输入的数字或字符信息,以及产生与手机900的用户设置以及功能控制有关的键信号输入。具体地,输入单元930可包括触控面板931以及其他输入设备932。触控面板931,也可称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板931上或在触控面板931附近的操作),并根据预先设定的程式驱动相应的连接装置。在一个实施例中,触控面板931可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器980,并能接收处理器980发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板931。除了触控面板931,输入单元930还可以包括其他输入设备932。具体地,其他输入设备932可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)等中的一种或多种。
显示单元940可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元940可包括显示面板941。在一个实施例中,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板941。在一个实施例中,触控面板931可覆盖显示面板941,当触控面板931检测到在其上或附近的触摸操作后,传送给处理器980以确定触摸事件的类型,随后处理器980根据触摸事件的类型在显示面板941上提供相应的视觉输出。虽然在图9中,触控面板931与显示面板941是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板931与显示面板941集成而实现手机的输入和输出功能。
手机900还可包括至少一种传感器950,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板941的亮度,接近传感器可在手机移动到耳边时,关闭显示面板941和/或背光。运动传感器可包括加速度传感器,通过加速度传感器可检测各个方向上加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换)、振动识别相关功能(比如计步器、敲击)等;此外,手机还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器等。
音频电路960、扬声器961和传声器962可提供用户与手机之间的音频接口。音频电路960可将接收到的音频数据转换后的电信号,传输到扬声器961,由扬声器961转换为声音信号输出;另一方面,传声器962将收集的声音信号转换为电信号,由音频电路960接收后转换为音频数据,再将音频数据输出处理器980处理后,经RF电路910可以发送给另一手机,或者将音频数据输出至存储器920以便后续处理。
WiFi属于短距离无线传输技术,手机通过WiFi模块970可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图9示出了WiFi模块970,但是可以理解的是,其并不属于手机900的必须构成,可以根据需要而省略。
处理器980是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器920内的软件程序和/或模块,以及调用存储在存储器920内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。在一个实施例中,处理器980可包括一个或多个处理单元。在一个实施例中,处理器980可 集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调处理器主要处理无线通信。可以理解的是,所述调制解调处理器也可以不集成到处理器980中。
手机900还包括给各个部件供电的电源990(比如电池),优选的,电源可以通过电源管理系统与处理器980逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
在一个实施例中,手机900还可以包括摄像头、蓝牙模块等。
在本申请实施例中,该电子设备所包括的处理器980执行存储在存储器上的计算机程序时实现如上所述的音频检测方法。
本申请所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。合适的非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDR SDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (27)

  1. 一种音频检测方法,包括:
    当获取到检测指令时,根据所述检测指令获取音频文件;
    将所述音频文件输入至依次排列的至少两个处理单元进行处理;
    在每一次所述处理单元输出目标数据时,将所述目标数据与预存数据进行匹配;及
    当所述目标数据与预存数据不匹配时,输出所述目标数据对应的异常信息,所述异常信息用于提示输出所述目标数据的处理单元异常。
  2. 根据权利要求1所述的方法,其特征在于,还包括:
    当所述目标数据与预存数据不匹配时,结束所述在每一次所述处理单元输出所述目标数据时,将所述目标数据与预存数据进行匹配的操作。
  3. 根据权利要求1所述的方法,其特征在于,所述目标数据包括依次排列的文件读取单元输出的文件数据和数据处理单元输出的音频数据;
    所述在每一次所述处理单元输出目标数据时,将所述目标数据与预存数据进行匹配,包括:
    在每一次所述文件读取单元输出所述文件数据,将所述文件数据与所述预存数据进行匹配;及
    在每一次所述数据处理单元输出所述音频数据,将所述音频数据与所述预存数据进行匹配。
  4. 根据权利要求3所述的方法,其特征在于,所述将所述音频文件输入至依次排列的至少两个处理单元进行处理,包括:
    通过所述文件读取单元读取所述音频文件;
    当读取成功时,通过所述文件读取单元输出对所述音频文件进行处理得到的所述文件数据,并将所述文件数据作为所述数据处理单元的输入;及
    当读取不成功时,输出所述文件读取单元的异常信息。
  5. 根据权利要求4所述的方法,其特征在于,所述数据处理单元包括依次排列的解码单元、混音单元和信号转化单元,所述音频数据包括第一音频数据、第二音频数据和第三音频数据;
    所述将所述文件数据作为所述数据处理单元的输入之后,还包括:
    通过所述解码单元对所述文件数据进行解码处理,输出所述解码单元对应的第一音频数据;
    通过所述混音单元对所述第一音频数据进行混音处理,输出所述混音单元对应的第二音频数据;及
    通过所述信号转化单元对所述第二音频数据进行信号转化处理,输出所述第三音频数据。
  6. 根据权利要求3所述的方法,其特征在于,所述将所述文件数据与所述预存数据进行匹配,包括:
    检测所述文件数据与所述预存数据是否一致;及
    当所述文件数据与所述预存数据不一致时,则判定所述文件数据与预存数据不匹配。
  7. 根据权利要求3所述的方法,其特征在于,所述将所述音频数据与所述预存数据进行匹配,包括:
    获取所述音频数据中包含的目标频谱信息;
    检测所述目标频谱信息与所述预存数据包含的预存频谱信息的相似度;及
    当所述相似度低于相似度阈值时,则判定所述音频数据与所述预存数据不匹配。
  8. 根据权利要求1所述的方法,其特征在于,所述当获取到检测指令时,根据所述检测指令获取音频文件之前,还包括:
    当距离上一次生成检测指令的时长超过预设时长时,生成所述检测指令。
  9. 根据权利要求1至8中任一项所述的方法,其特征在于,所述将所述目标数据与预存数据进行匹配,包括:
    将所述目标数据与输出所述目标数据的目标处理单元对应的预存数据进行匹配;
    所述方法还包括:
    当所述目标数据与所述预存数据匹配时,将所述目标数据作为所述目标处理单元的下一处理单元的输入;及
    当所述目标数据与所述预存数据不匹配时,将所述预存数据作为所述目标处理单元的下一处理单元的输入。
  10. 一个或多个包含计算机可执行指令的计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行如下操作:
    当获取到检测指令时,根据所述检测指令获取音频文件;
    将所述音频文件输入至依次排列的至少两个处理单元进行处理;
    在每一次所述处理单元输出目标数据时,将所述目标数据与预存数据进行匹配;及
    当所述目标数据与预存数据不匹配时,输出所述目标数据对应的异常信息,所述异常信息用于提示输出所述目标数据的处理单元异常。
  11. 根据权利要求10所述的计算机可读存储介质,其特征在于,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行如下操作:
    当所述目标数据与预存数据不匹配时,结束所述在每一次所述处理单元输出所述目标数据时,将所述目标数据与预存数据进行匹配的操作。
  12. 根据权利要求10所述的计算机可读存储介质,其特征在于,所述目标数据包括依次排列的文件读取单元输出的文件数据和数据处理单元输出的音频数据;所述处理器执行所述在每一次所述处理单元输出目标数据时,将所述目标数据与预存数据进行匹配时,还执行如下操作:
    在每一次所述文件读取单元输出所述文件数据,将所述文件数据与所述预存数据进行匹配;及
    在每一次所述数据处理单元输出所述音频数据,将所述音频数据与所述预存数据进行匹配。
  13. 根据权利要求12所述的计算机可读存储介质,其特征在于,所述处理器执行所述将所述音频文件输入至依次排列的至少两个处理单元进行处理时,还执行如下操作:
    通过所述文件读取单元读取所述音频文件;
    当读取成功时,通过所述文件读取单元输出对所述音频文件进行处理得到的所述文件数据,并将所述文件数据作为所述数据理单元的输入;及
    当读取不成功时,输出所述文件读取单元的异常信息。
  14. 根据权利要求13所述的计算机可读存储介质,其特征在于,所述数据处理单元包括依次排列的解码单元、混音单元和信号转化单元,所述音频数据包括第一音频数据、第二音频数据和第三音频数据;所述处理器执行所述将所述文件数据作为所述数据处理单元的输入之后,还执行如下操作:
    通过所述解码单元对所述文件数据进行解码处理,输出所述解码单元对应的第一音频数据;
    通过所述混音单元对所述第一音频数据进行混音处理,输出所述混音单元对应的第二音频数据;及
    通过所述信号转化单元对所述第二音频数据进行信号转化处理,输出所述第三音频数据。
  15. 根据权利要求12所述的计算机可读存储介质,其特征在于,所述处理器执行所 述将所述文件数据与所述预存数据进行匹配时,还执行如下操作:
    检测所述文件数据与所述预存数据是否一致;及
    当所述文件数据与所述预存数据不一致时,则判定所述文件数据与预存数据不匹配。
  16. 根据权利要求12所述的计算机可读存储介质,其特征在于,所述处理器执行所述将所述音频数据与所述预存数据进行匹配时,还执行如下操作:
    获取所述音频数据中包含的目标频谱信息;
    检测所述目标频谱信息与所述预存数据包含的预存频谱信息的相似度;及
    当所述相似度低于相似度阈值时,则判定所述音频数据与所述预存数据不匹配。
  17. 根据权利要求10所述的计算机可读存储介质,其特征在于,所述处理器执行所述当获取到检测指令时,根据所述检测指令获取音频文件之前,还执行如下操作:
    当距离上一次生成检测指令的时长超过预设时长时,生成所述检测指令。
  18. 根据权利要求10至17中任一项所述的计算机可读存储介质,其特征在于,所述处理器执行所述将所述目标数据与预存数据进行匹配时,还执行如下操作:
    将所述目标数据与输出所述目标数据的目标处理单元对应的预存数据进行匹配;
    当所述目标数据与所述预存数据匹配时,将所述目标数据作为所述目标处理单元的下一处理单元的输入;及
    当所述目标数据与所述预存数据不匹配时,将所述预存数据作为所述目标处理单元的下一处理单元的输入。
  19. 一种电子设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行如下操作:
    当获取到检测指令时,根据所述检测指令获取音频文件;
    将所述音频文件输入至依次排列的至少两个处理单元进行处理;
    在每一次所述处理单元输出目标数据时,将所述目标数据与预存数据进行匹配;及
    当所述目标数据与预存数据不匹配时,输出所述目标数据对应的异常信息,所述异常信息用于提示输出所述目标数据的处理单元异常。
  20. 根据权利要求19所述的电子设备,其特征在于,当所述计算机可读指令被所述处理器执行时,使得所述处理器执行如下操作:
    当所述目标数据与预存数据不匹配时,结束所述在每一次所述处理单元输出所述目标数据时,将所述目标数据与预存数据进行匹配的操作。
  21. 根据权利要求19所述的电子设备,其特征在于,所述目标数据包括依次排列的文件读取单元输出的文件数据和数据处理单元输出的音频数据;所述处理器执行所述在每一次所述处理单元输出目标数据时,将所述目标数据与预存数据进行匹配时,还执行如下操作:
    在每一次所述文件读取单元输出所述文件数据,将所述文件数据与所述预存数据进行匹配;及
    在每一次所述数据处理单元输出所述音频数据,将所述音频数据与所述预存数据进行匹配。
  22. 根据权利要求21所述的电子设备,其特征在于,所述处理器执行所述将所述音频文件输入至依次排列的至少两个处理单元进行处理时,还执行如下操作:
    通过所述文件读取单元读取所述音频文件;
    当读取成功时,通过所述文件读取单元输出对所述音频文件进行处理得到的所述文件数据,并将所述文件数据作为所述数据理单元的输入;及
    当读取不成功时,输出所述文件读取单元的异常信息。
  23. 根据权利要求22所述的电子设备,其特征在于,所述数据处理单元包括依次排列的解码单元、混音单元和信号转化单元,所述音频数据包括第一音频数据、第二音频数 据和第三音频数据;所述处理器执行所述将所述文件数据作为所述数据处理单元的输入之后,还执行如下操作:
    通过所述解码单元对所述文件数据进行解码处理,输出所述解码单元对应的第一音频数据;
    通过所述混音单元对所述第一音频数据进行混音处理,输出所述混音单元对应的第二音频数据;及
    通过所述信号转化单元对所述第二音频数据进行信号转化处理,输出所述第三音频数据。
  24. 根据权利要求21所述的电子设备,其特征在于,所述处理器执行所述将所述文件数据与所述预存数据进行匹配时,还执行如下操作:
    检测所述文件数据与所述预存数据是否一致;及
    当所述文件数据与所述预存数据不一致时,则判定所述文件数据与预存数据不匹配。
  25. 根据权利要求21所述的电子设备,其特征在于,所述处理器执行所述将所述音频数据与所述预存数据进行匹配时,还执行如下操作:
    获取所述音频数据中包含的目标频谱信息;
    检测所述目标频谱信息与所述预存数据包含的预存频谱信息的相似度;及
    当所述相似度低于相似度阈值时,则判定所述音频数据与所述预存数据不匹配。
  26. 根据权利要求19所述的电子设备,其特征在于,所述处理器执行所述当获取到检测指令时,根据所述检测指令获取音频文件之前,还执行如下操作:
    当距离上一次生成检测指令的时长超过预设时长时,生成所述检测指令。
  27. 根据权利要求19至26中任一项所述的电子设备,其特征在于,所述处理器执行所述将所述目标数据与预存数据进行匹配时,还执行如下操作:
    将所述目标数据与输出所述目标数据的目标处理单元对应的预存数据进行匹配;
    当所述目标数据与所述预存数据匹配时,将所述目标数据作为所述目标处理单元的下一处理单元的输入;及
    当所述目标数据与所述预存数据不匹配时,将所述预存数据作为所述目标处理单元的下一处理单元的输入。
PCT/CN2018/116583 2018-11-21 2018-11-21 音频检测方法、计算机可读存储介质和电子设备 WO2020103008A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/116583 WO2020103008A1 (zh) 2018-11-21 2018-11-21 音频检测方法、计算机可读存储介质和电子设备
CN201880097551.0A CN112689872B (zh) 2018-11-21 2018-11-21 音频检测方法、计算机可读存储介质和电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/116583 WO2020103008A1 (zh) 2018-11-21 2018-11-21 音频检测方法、计算机可读存储介质和电子设备

Publications (1)

Publication Number Publication Date
WO2020103008A1 true WO2020103008A1 (zh) 2020-05-28

Family

ID=70774268

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/116583 WO2020103008A1 (zh) 2018-11-21 2018-11-21 音频检测方法、计算机可读存储介质和电子设备

Country Status (2)

Country Link
CN (1) CN112689872B (zh)
WO (1) WO2020103008A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112786070A (zh) * 2020-12-28 2021-05-11 Oppo广东移动通信有限公司 音频数据处理方法、装置、存储介质与电子设备
CN116320222A (zh) * 2023-03-24 2023-06-23 北京生数科技有限公司 音频处理方法、装置及存储介质
CN117012207A (zh) * 2023-09-20 2023-11-07 统信软件技术有限公司 一种音频文件检测方法、装置与计算设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070221048A1 (en) * 2006-03-13 2007-09-27 Asustek Computer Inc. Audio processing system capable of comparing audio signals of different sources and method thereof
CN201417450Y (zh) * 2009-06-18 2010-03-03 王德琛 防止营业场所盗版使用音乐作品的装置
CN107346665A (zh) * 2017-06-29 2017-11-14 广州视源电子科技股份有限公司 音频检测的方法、装置、设备以及存储介质
CN107743292A (zh) * 2017-11-17 2018-02-27 中国航空工业集团公司西安航空计算技术研究所 一种音频电路的故障自动检测方法

Family Cites Families (10)

* Cited by examiner, † Cited by third party
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 (zh) * 2004-10-09 2006-04-12 鸿富锦精密工业(深圳)有限公司 回路式自动检测计算机音频设备播放功能的方法
JP2011205566A (ja) * 2010-03-26 2011-10-13 Pioneer Electronic Corp オーディオ装置、情報処理方法並びにオーディオ装置用プログラム及び情報記録媒体
KR20120005799A (ko) * 2010-07-09 2012-01-17 삼성전기주식회사 고장 검출 기능이 구비된 에이치디 라디오 모듈 및 그 제어 방법
KR20130073069A (ko) * 2011-12-23 2013-07-03 현대모비스 주식회사 오디오 이상 유무 자가 진단 가능한 음원 재생 장치 및 그 방법
JP2014039239A (ja) * 2012-07-17 2014-02-27 Yamaha Corp 音響信号処理装置、プログラム及び音響信号の処理方法
US9886947B2 (en) * 2013-02-25 2018-02-06 Seiko Epson Corporation Speech recognition device and method, and semiconductor integrated circuit device
CN104104762B (zh) * 2014-07-22 2017-04-19 南京声准科技有限公司 一种高效通信终端音频测试方法
US9949046B2 (en) * 2016-07-20 2018-04-17 Harman International Industries, Incorporated Automating repairs to audio systems
CN108430026B (zh) * 2018-03-07 2020-08-21 广州艾美网络科技有限公司 音频设备故障检测方法和点唱设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070221048A1 (en) * 2006-03-13 2007-09-27 Asustek Computer Inc. Audio processing system capable of comparing audio signals of different sources and method thereof
CN201417450Y (zh) * 2009-06-18 2010-03-03 王德琛 防止营业场所盗版使用音乐作品的装置
CN107346665A (zh) * 2017-06-29 2017-11-14 广州视源电子科技股份有限公司 音频检测的方法、装置、设备以及存储介质
CN107743292A (zh) * 2017-11-17 2018-02-27 中国航空工业集团公司西安航空计算技术研究所 一种音频电路的故障自动检测方法

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112786070A (zh) * 2020-12-28 2021-05-11 Oppo广东移动通信有限公司 音频数据处理方法、装置、存储介质与电子设备
CN112786070B (zh) * 2020-12-28 2024-03-15 Oppo广东移动通信有限公司 音频数据处理方法、装置、存储介质与电子设备
CN116320222A (zh) * 2023-03-24 2023-06-23 北京生数科技有限公司 音频处理方法、装置及存储介质
CN116320222B (zh) * 2023-03-24 2024-01-30 北京生数科技有限公司 音频处理方法、装置及存储介质
CN117012207A (zh) * 2023-09-20 2023-11-07 统信软件技术有限公司 一种音频文件检测方法、装置与计算设备
CN117012207B (zh) * 2023-09-20 2023-12-29 统信软件技术有限公司 一种音频文件检测方法、装置与计算设备

Also Published As

Publication number Publication date
CN112689872B (zh) 2022-11-15
CN112689872A (zh) 2021-04-20

Similar Documents

Publication Publication Date Title
US10649720B2 (en) Sound effect configuration method and system and related device
CN106371964B (zh) 一种进行消息提示的方法和装置
WO2018049887A1 (zh) 数据传输处理方法及终端设备
CN104852885B (zh) 一种进行验证码验证的方法、装置和系统
WO2018049893A1 (zh) 数据传输方法及终端设备
TWI522917B (zh) 應用程式的啓動控制方法與裝置及電腦可讀取儲存介質
WO2020103008A1 (zh) 音频检测方法、计算机可读存储介质和电子设备
WO2018103443A1 (zh) 一种网络定位方法及终端设备
WO2018006841A1 (zh) 二维码信息传输方法、装置以及设备
JP6910300B2 (ja) チャット履歴記録を表示するための方法およびチャット履歴記録を表示するための装置
CN112148579B (zh) 一种用户界面的测试方法和装置
WO2018049934A1 (zh) 一种数据迁移的方法及终端
WO2018161540A1 (zh) 指纹注册方法及相关产品
WO2017215661A1 (zh) 一种场景音效的控制方法、及电子设备
US10269347B2 (en) Method for detecting voice and electronic device using the same
CN104809055B (zh) 一种基于云平台的应用程序测试方法和装置
WO2019076250A1 (zh) 推送消息的管理方法及相关产品
WO2018049901A1 (zh) 数据迁移方法及相关设备
CN111405043A (zh) 信息处理方法、装置及电子设备
CN108615158B (zh) 风险检测方法、装置、移动终端和存储介质
KR101876394B1 (ko) 단말기에 미디어 데이터를 재생하는 방법 및 장치
CN105095161B (zh) 一种显示富文本信息的方法及装置
CN106230919B (zh) 一种文件上传的方法和装置
WO2017215664A1 (zh) 一种音效处理的方法及终端
WO2017008613A1 (zh) 一种推荐内容推送方法、装置及其终端、服务器和系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18940926

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18940926

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 29.09.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18940926

Country of ref document: EP

Kind code of ref document: A1