Methods and apparatus for detecting abnormalities in microphone and speaker equipment

By sampling audio signals and performing analog-to-digital conversion, combined with decimal and decibel value analysis, the problem of abnormal detection in speaker and microphone equipment was solved, achieving a fast and effective detection method.

CN117098054BActive Publication Date: 2026-11-17SHENZHEN 3NOD DIGITAL TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210524675.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-13
Publication Date
2026-11-17
Estimated Expiration
2042-05-13

AI Technical Summary

Technical Problem

Existing technologies cannot quickly and effectively detect abnormalities in loudspeakers and multi-microphone audio devices, and cannot meet the rapid judgment requirements of factory production.

Method used

The system uses preset sampling elements and A/D converters to sample and convert audio signals from analog to digital. It uses decimal conversion and decibel values ​​to determine abnormalities in speakers and microphones, including the detection of circuit connection and data transmission abnormalities.

Benefits of technology

It enables rapid anomaly detection for speakers and microphones, simplifies testing procedures, and meets the rapid testing needs of factory production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117098054B_ABST
    Figure CN117098054B_ABST
Patent Text Reader

Abstract

This application belongs to the field of electronic product testing and relates to a method for detecting anomalies in microphone and speaker devices. The method includes: sampling analog audio signals; converting them into digital signals; performing decimal conversion on all binary encoded values ​​corresponding to the digital signals; determining whether a first anomaly exists in the microphone and speaker of the electronic device under testing based on the converted decimal values; if no first anomaly exists, obtaining a detected decibel value; and determining whether a second anomaly exists in the microphone and speaker of the electronic device under testing based on a preset decibel threshold, a reference decibel value, and the detected decibel value, thus completing the anomaly detection of the microphone and speaker in the electronic device. This application also provides a microphone and speaker device anomaly detection device. This application enables simultaneous detection of speaker and microphone functionality during self-play and self-recording, meeting the requirements for rapid detection of speakers and microphones in electronic devices with sampling capabilities during factory production, and simplifying the testing process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic product testing technology, and in particular to methods, apparatus, electronic devices and storage media for detecting anomalies in microphone and speaker equipment. Background Technology

[0002] In the large-scale industrial production of audio equipment containing speakers and multiple microphones, it is a common method to determine whether the speaker circuits and microphone hardware are functioning properly by listening to the audio signals played or recorded. This can be done manually, by testing with specialized industrial equipment (such as SoundCheck), or by manually playing audio recorded to the microphone and analyzing the microphone recording signal with software to determine whether the microphone hardware is functioning properly. However, none of these methods are efficient enough to meet the rapid judgment requirements of factory production. Summary of the Invention

[0003] The purpose of this application is to provide a method, apparatus, electronic device, and storage medium for detecting abnormalities in microphone and speaker devices, so as to solve the problem that the prior art cannot meet the requirements for rapid detection of speakers and microphones in electronic devices with data acquisition function during factory production.

[0004] To address the aforementioned technical problems, this application provides a method for detecting anomalies in microphone and speaker devices, employing the following technical solution: A method for detecting anomalies in microphone and speaker devices includes the following steps: Data acquisition of analog audio signals is performed based on preset acquisition elements; The acquired analog audio signal is converted into a digital signal by performing analog-to-digital conversion based on a preset A / D converter; The binary encoded values ​​in the binary encoded value set corresponding to the digital signal are converted to decimal. Based on the converted decimal values, it is determined whether there is a first abnormality in the microphone and / or speaker of the electronic device being tested. The first abnormality is a non-performance processing abnormality, including: circuit connection abnormality and data transmission abnormality. If neither the microphone nor the speaker in the electronic device being tested has a first anomaly, the decimal value is converted into a decibel value based on a preset decibel conversion algorithm and used as the detection decibel value. Based on a preset decibel threshold, a reference decibel value, and the detected decibel value, it is determined whether there is a second anomaly in the microphone and / or speaker of the electronic device being tested, thus completing the anomaly detection of the microphone and speaker in the electronic device. The second anomaly is a performance anomaly, that is, the circuit connection and data transmission are normal, but there is distortion between the detected decibel value and the reference decibel value.

[0005] Furthermore, the preset data acquisition element includes: The first acquisition element and the second acquisition element are provided. The first acquisition element is disposed between the D / A converter and the speaker and is used to acquire the audio analog signal after conversion by the D / A converter but before it is played by the speaker. The second acquisition element is disposed between the A / D converter and the microphone and is used to acquire the audio analog signal after it is acquired by the microphone and played by the speaker.

[0006] Furthermore, prior to the step of data acquisition of the audio analog signal based on the preset acquisition element, the method further includes: The first and second mining elements are assigned distinct numbers.

[0007] Furthermore, before the step of performing analog-to-digital conversion on the sampled audio analog signal based on a preset A / D converter to convert it into a digital signal, the method further includes: The difference number is used as a difference identifier to differentiate and buffer the audio analog signals acquired by the first acquisition element and the second acquisition element.

[0008] Furthermore, after performing decimal conversion on all binary encoded values ​​in the binary encoded value set corresponding to the digital signal, the process further includes: The decimal value set corresponding to different sampling elements is cached based on the distinguishing number.

[0009] Furthermore, the method for determining whether a first anomaly exists in the microphone and / or speaker of the electronic device being tested based on the converted decimal value is as follows: The decimal value sets corresponding to the different sampling elements are traversed in a loop. If all the values ​​in the decimal value set corresponding to the first sampling element are 0, and the values ​​in the decimal value set corresponding to the second sampling element are not all 0, then the circuit connection between the speaker and the A / D converter is abnormal and / or the audio stream transmission is abnormal. If all the values ​​in the decimal value set corresponding to the first sampling element are 0, and all the values ​​in the decimal value set corresponding to the second sampling element are also 0, then the electronic device has at least one of the abnormal situations in the preset first abnormality list. If the decimal values ​​corresponding to the first sampling element are not all 0, and the decimal values ​​corresponding to the second sampling element are all 0, then the electronic device has at least one of the abnormal situations in the preset first abnormality list two. If the decimal values ​​corresponding to the first sampling element are not all zero, and the decimal values ​​corresponding to the second sampling element are not all zero, then neither the microphone nor the speaker in the electronic device being tested has the first anomaly.

[0010] Furthermore, the pre-defined first anomaly list includes the following six types of anomalies: Anomaly 1: The circuit connection between the speaker and the A / D converter is abnormal, and the circuit connection between the microphone and the A / D converter is also abnormal. Anomaly 2: The audio stream transmission between the speaker and the A / D converter is abnormal, and the circuit connection between the microphone and the A / D converter is also abnormal. Anomaly 3: The circuit connection between the speaker and the A / D converter is abnormal, and the audio stream transmission between the microphone and the A / D converter is also abnormal; Anomaly 4: The audio stream transmission between the speaker and the A / D converter is abnormal, and the audio stream transmission between the microphone and the A / D converter is also abnormal. Error 5: The circuit connection between the speaker and the A / D converter is abnormal, and the microphone is unable to receive sound. Anomaly 6: The audio stream transmission between the speaker and the A / D converter is abnormal, and the microphone is unable to receive sound.

[0011] Furthermore, the abnormal situations in the preset first abnormality list second include the following three types: Error 1: The circuit connection between the microphone and the A / D converter is faulty; Anomaly 2: The audio stream transmission between the microphone and the A / D converter is abnormal; Error 3: The microphone is unable to receive sound.

[0012] Furthermore, the decimal value is converted into a decibel value based on a preset decibel conversion algorithm, which is then used as the detection decibel value. The specific conversion method is as follows: Based on the hardware specifications of the first and second acquisition elements, the sampling bit width and number of audio channels corresponding to different acquisition elements are determined when acquiring the audio analog signal. Based on the distinguishing number, obtain the set of decimal values ​​corresponding to different sampling elements; Based on a preset decibel conversion algorithm: The decimal values ​​corresponding to the current sampling element at each audio channel number are converted to decibel values, where... The maximum value within the range corresponding to the sampling bit width of the current sampling element. The decimal value corresponding to the different audio channels of the current sampling element. The decibel value obtained after conversion by the aforementioned decibel conversion algorithm. The unit is decibel; The decibel values ​​obtained after conversion by the preset decibel conversion algorithm are used as the detection decibel values ​​of the current sampling element at different audio channel numbers.

[0013] Furthermore, the specific implementation method for determining whether there is a second anomaly in the microphone and / or speaker of the electronic device being tested, based on a preset decibel threshold, a reference decibel value, and the detected decibel value, is as follows: Obtain the detection decibel values ​​corresponding to different sampling elements at different audio channel numbers; Obtain the reference decibel values ​​corresponding to different sampling elements at different audio channel numbers; The difference between the corresponding detection decibel value and the reference decibel value is calculated, and it is determined whether the difference result is greater than the preset decibel threshold. If it is greater, the microphone and / or speaker in the electronic device being tested has a second anomaly; otherwise, the microphone and speaker in the electronic device being tested do not have a second anomaly.

[0014] Furthermore, the step of performing a difference calculation on the corresponding detected decibel value and the reference decibel value, and determining whether the difference result is greater than a preset decibel threshold, if it is greater, indicates that the microphone and / or speaker in the electronic device being tested has a second anomaly, further includes: Based on the distinguishing number, the sampling element corresponding to the detected decibel value is identified. If the corresponding sampling element is the first sampling element, the speaker has a second abnormality. If the corresponding sampling element is the second sampling element, the microphone has a second abnormality.

[0015] Furthermore, the prerequisite for executing the microphone and speaker device anomaly detection method is that the speaker can play audio normally and the A / D converter, the D / A converter, and each of the sampling elements are all working normally.

[0016] To address the aforementioned technical problems, this application also provides a microphone and speaker device anomaly detection device, employing the following technical solution: A microphone and speaker device anomaly detection device, comprising: The data acquisition module is used to acquire audio analog signals based on preset acquisition elements; The A / D conversion module is used to perform analog-to-digital conversion on the acquired audio analog signal based on a preset A / D converter, converting it into a digital signal; The first anomaly detection module is used to convert all binary encoded values ​​in the binary encoded value set corresponding to the digital signal into decimal values, and to determine whether there is a first anomaly in the microphone and / or speaker of the electronic device being tested based on the converted decimal values. The first anomaly is a non-performance processing anomaly, including: circuit connection anomaly and data transmission anomaly. The decibel conversion module is used to convert the decibel value into a decibel value based on a preset decibel conversion algorithm if neither the microphone nor the speaker in the electronic device being tested has a first anomaly, and use it as the detected decibel value. The second anomaly detection module is used to determine whether there is a second anomaly in the microphone and / or speaker of the electronic device being tested, based on a preset decibel threshold, a reference decibel value and the detected decibel value, and to complete the anomaly detection of the microphone and speaker in the electronic device. The second anomaly is a performance anomaly, that is, the circuit connection and data transmission are normal, but there is distortion between the detected decibel value and the reference decibel value.

[0017] Compared with the prior art, the embodiments of this application have the following main advantages: This application provides a method and apparatus for detecting anomalies in microphone and speaker devices. The method involves: sampling analog audio signals; converting them into digital signals; performing decimal conversion on all binary encoded values ​​corresponding to the digital signals; determining whether a first anomaly exists in the microphone and / or speaker of the electronic device under test based on the converted decimal values; if no first anomaly exists, obtaining a detection decibel value; and determining whether a second anomaly exists in the microphone and / or speaker of the electronic device under test based on a preset decibel threshold, a reference decibel value, and the detection decibel value, thus completing the anomaly detection of the microphone and speaker in the electronic device. This application enables simultaneous detection of whether the speaker and microphone are functioning correctly during self-play and self-recording, meeting the requirements for rapid detection of speakers and microphones in electronic devices with sampling functions during factory production, and simplifying the testing process. Attached Figure Description

[0018] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart of one embodiment of the microphone and speaker device anomaly detection method according to this application; Figure 2 This is a schematic diagram of an embodiment of audio analog signal re-sampling in this application; Figure 3 This is an execution logic diagram of an embodiment of the microphone and speaker device anomaly detection method according to this application; Figure 4 This is a schematic diagram of one embodiment of the microphone and speaker device anomaly detection device according to this application; Figure 5 This is a schematic diagram of the structure of an embodiment of the electronic device according to this application. Detailed Implementation

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.

[0021] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0022] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0023] Continue to refer to Figure 1 The diagram illustrates a flowchart of an embodiment of the microphone and speaker device anomaly detection method according to this application. The microphone and speaker device anomaly detection method includes the following steps: Step 10: Data acquisition of the audio analog signal based on the preset acquisition element.

[0024] In this embodiment, the audio analog signal is generated by converting the digital audio data corresponding to the test audio into an analog-to-digital converter (APC).

[0025] In this embodiment, the preset acquisition element includes: a first acquisition element and a second acquisition element, wherein the first acquisition element is disposed between the D / A converter and the speaker, and is used to acquire the audio analog signal after conversion by the D / A converter but before it is played by the speaker; the second acquisition element is disposed between the A / D converter and the microphone, and is used to acquire the audio analog signal acquired by the microphone and played by the speaker.

[0026] In this embodiment, before the step of data acquisition of the audio analog signal based on the preset acquisition element, the method further includes: setting a distinguishing number for the first acquisition element and the second acquisition element.

[0027] Step 20: Based on the preset A / D converter, the acquired audio analog signal is converted from analog to digital to a digital signal.

[0028] In this embodiment, before the step of performing analog-to-digital conversion on the acquired audio analog signal based on a preset A / D converter to convert it into a digital signal, the method further includes: using the distinction number as a distinction identifier to perform distinction buffering on the audio analog signals acquired by the first acquisition element and the second acquisition element.

[0029] In this embodiment, the analog-to-digital conversion of the acquired audio signal based on the preset A / D converter to convert it into a digital signal is specifically implemented as follows: the audio analog signal that has been distinguished and buffered is sampled, quantized, and encoded one by one based on the preset A / D converter to obtain a binary encoded value set; the binary encoded value set corresponding to different acquisition elements is buffered based on the distinguished number.

[0030] Continue to refer to Figure 2 The figure shows a schematic diagram of an embodiment of audio analog signal backtracking in this application. The audio analog signal is input as a stream, undergoes digital-to-analog conversion by a D / A converter, a speaker acquires the converted audio analog signal for playback, a microphone acquires the audio analog signal played by the speaker, and an A / D converter acquires the audio analog signal acquired by a first backtracking element and a second backtracking element, performs analog-to-digital conversion, and outputs the audio analog signal as an output stream. The figure also shows that the first backtracking element is disposed between the D / A converter and the speaker, for backtracking the audio analog signal after conversion by the D / A converter but before playback by the speaker; the second backtracking element is disposed between the A / D converter and the microphone, for backtracking the audio analog signal acquired by the microphone and played by the speaker.

[0031] Step 30: Perform decimal conversion on all binary encoded values ​​in the binary encoded value set corresponding to the digital signal, and determine whether there is a first abnormality in the microphone and / or speaker of the electronic device being tested based on the converted decimal value. The first abnormality is a non-performance processing abnormality, including: circuit connection abnormality and data transmission abnormality.

[0032] In this embodiment, after performing decimal conversion on all binary encoded values ​​in the binary encoded value set corresponding to the digital signal, the method further includes: caching the decimal value set corresponding to different sampling elements based on the distinguishing number.

[0033] Explanation: The binary encoded value corresponding to the digital signal will be displayed as a binary encoded value of different numbers of bits depending on the different sampling bit widths of the microphone. If the sampling bit width is 16 bits, the binary encoded value corresponding to the digital signal is 16 bits; if the sampling bit width is 8 bits, the binary encoded value corresponding to the digital signal is 8 bits. Converting the binary encoded value into a decimal value set avoids padding for binary encoded values ​​of different numbers of bits and also makes it easier to detect anomalies.

[0034] In this embodiment, the first anomaly includes: an abnormal circuit connection between the speaker and the A / D converter and / or an abnormal audio stream transmission, an abnormal circuit connection between the microphone and the A / D converter and / or an abnormal audio stream transmission, and an abnormality in which the microphone cannot receive sound.

[0035] In this embodiment, the determination of whether the microphone and / or speaker in the electronic device being tested has a first anomaly based on the converted decimal value is specifically performed as follows: The decimal value sets corresponding to the different sampling elements are iterated in a loop; if all values ​​in the decimal value set corresponding to the first sampling element are 0, and the values ​​in the decimal value set corresponding to the second sampling element are not all 0, then the circuit connection between the speaker and the A / D converter is abnormal and / or the audio stream transmission is abnormal; if all values ​​in the decimal value set corresponding to the first sampling element are 0, and the values ​​in the decimal value set corresponding to the second sampling element are also all 0, then the electronic device has at least one of the anomalies in a preset first anomaly list one; if the values ​​in the decimal value set corresponding to the first sampling element are not all 0, and the values ​​in the decimal value set corresponding to the second sampling element are all 0, then the electronic device has at least one of the anomalies in a preset first anomaly list two; if the values ​​in the decimal value set corresponding to the first sampling element are not all 0, and the values ​​in the decimal value set corresponding to the second sampling element are also not all 0, then neither the microphone nor the speaker in the electronic device being tested has a first anomaly.

[0036] In this embodiment of the application, the abnormal situations in the preset first abnormality list include the following six types: Abnormality 1: Abnormal circuit connection between the speaker and the A / D converter, and abnormal circuit connection between the microphone and the A / D converter; Abnormality 2: Abnormal audio stream transmission between the speaker and the A / D converter, and abnormal circuit connection between the microphone and the A / D converter; Abnormality 3: Abnormal circuit connection between the speaker and the A / D converter, and abnormal audio stream transmission between the microphone and the A / D converter; Abnormality 4: Abnormal audio stream transmission between the speaker and the A / D converter, and abnormal audio stream transmission between the microphone and the A / D converter; Abnormality 5: Abnormal circuit connection between the speaker and the A / D converter, and abnormal microphone cannot receive sound; Abnormality 6: Abnormal audio stream transmission between the speaker and the A / D converter, and abnormal microphone cannot receive sound.

[0037] In this embodiment of the application, the abnormal situations in the preset first abnormality list second include the following three types: abnormality 1, the circuit connection between the microphone and the A / D converter is abnormal; abnormality 2, the audio stream transmission between the microphone and the A / D converter is abnormal; abnormality 3, the microphone cannot receive sound.

[0038] Step 40: If neither the microphone nor the speaker in the electronic device being tested has a first anomaly, the decimal value is converted into a decibel value based on a preset decibel conversion algorithm and used as the detection decibel value.

[0039] In this embodiment, the decimal value is converted into a decimal value based on a preset decibel conversion algorithm, which is then used as the detected decibel value. Specifically, the conversion method is as follows: based on the hardware specifications of the first and second sampling elements, the sampling bit width and number of audio channels corresponding to different sampling elements are determined when sampling the audio analog signal; the set of decimal values ​​corresponding to different sampling elements is obtained based on the distinguishing number; and the preset decibel conversion algorithm is used. The decimal values ​​corresponding to the current sampling element at each audio channel number are converted to decibel values, where... The maximum value within the range corresponding to the sampling bit width of the current sampling element. The decimal value corresponding to the different audio channels of the current sampling element. The decibel value obtained after conversion by the aforementioned decibel conversion algorithm. The unit is decibel; the decibel value obtained after conversion by the preset decibel conversion algorithm is used as the detection decibel value corresponding to each audio channel of the current sampling element.

[0040] Step 50: Based on the preset decibel threshold, the reference decibel value, and the detected decibel value, determine whether there is a second abnormality in the microphone and / or speaker of the electronic device being tested, and complete the abnormality detection of the microphone and speaker in the electronic device. The second abnormality is a performance abnormality, that is, the circuit connection and data transmission are normal, but there is distortion between the detected decibel value and the reference decibel value.

[0041] In this embodiment, the reference decibel value is obtained based on a preset reference prototype, wherein the reference prototype is the electronic device in which both the microphone and speaker devices are functioning normally.

[0042] In this embodiment, the step of determining whether a second anomaly exists in the microphone and / or speaker of the electronic device being tested, based on a preset decibel threshold, a reference decibel value, and the detected decibel value, is specifically implemented as follows: obtaining the detected decibel values ​​corresponding to different sampling elements at different audio channel numbers; obtaining the reference decibel values ​​corresponding to different sampling elements at different audio channel numbers; performing a difference calculation on the corresponding detected decibel values ​​and reference decibel values, and determining whether the difference result is greater than the preset decibel threshold. If it is greater, then a second anomaly exists in the microphone and / or speaker of the electronic device being tested; otherwise, neither the microphone nor the speaker of the electronic device being tested has a second anomaly.

[0043] In this embodiment, the step of performing a difference calculation on the corresponding detection decibel value and reference decibel value, and determining whether the difference result is greater than a preset decibel threshold, and if it is greater, then the microphone and / or speaker in the electronic device being tested has a second anomaly, further includes: based on the difference number, identifying the acquisition element corresponding to the detection decibel value; if the corresponding acquisition element is a first acquisition element, then the speaker has a second anomaly; if the corresponding acquisition element is a second acquisition element, then the microphone has a second anomaly.

[0044] In this embodiment, the microphone and speaker device anomaly detection method is performed under the premise that the speaker can play audio normally and that the A / D converter, the D / A converter, and each of the sampling elements are all working normally.

[0045] In this embodiment, if it is determined that the microphone and / or speaker in the electronic device being tested have a first or second abnormality, a preset abnormality analysis element is activated to perform abnormality analysis.

[0046] Continue to refer to Figure 3This document illustrates the execution logic diagram of an embodiment of the microphone and speaker device anomaly detection method according to this application. The specific execution steps include: data acquisition of an audio analog signal based on a preset acquisition element; analog-to-digital conversion of the acquired audio analog signal based on a preset A / D converter to convert it into a digital signal; decimal conversion of all binary encoded values ​​in the binary encoded value set corresponding to the digital signal; determining whether a first anomaly exists in the microphone and / or speaker of the electronic device being tested based on the converted decimal value; if the microphone and speaker of the electronic device being tested do not have a first anomaly, converting the decimal value into a decibel value based on a preset decibel value conversion algorithm, using it as a detection decibel value; determining whether a second anomaly exists in the microphone and / or speaker of the electronic device being tested based on a preset decibel threshold, a reference decibel value, and the detection decibel value; if either a first or second anomaly is determined in the microphone and speaker of the electronic device being tested, activating a preset anomaly analysis element for anomaly analysis; otherwise, completing the anomaly detection of the microphone and speaker in the electronic device.

[0047] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0048] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0049] Further reference Figure 4 As a response to the above Figure 1 The implementation of the method shown in this application provides an embodiment of a microphone and speaker device anomaly detection device, which is similar to... Figure 1Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0050] like Figure 4 As shown, the microphone and speaker device anomaly detection device 400 described in this embodiment includes: a data acquisition module 401, an A / D conversion module 402, a first anomaly detection module 403, a decibel value conversion module 404, and a second anomaly detection module 405. Wherein: The data acquisition module 401 is used to acquire data from the audio analog signal based on a preset acquisition element. A / D conversion module 402 is used to perform analog-to-digital conversion on the acquired audio analog signal based on a preset A / D converter, converting it into a digital signal; The first anomaly detection module 403 is used to perform decimal conversion on all binary code values ​​in the binary code value set corresponding to the digital signal, and determine whether there is a first anomaly in the microphone and / or speaker of the electronic device being detected based on the converted decimal value. The first anomaly is a non-performance processing anomaly, including: circuit connection anomaly and data transmission anomaly. The decibel conversion module 404 is used to convert the decibel value into a decibel value based on a preset decibel conversion algorithm if neither the microphone nor the speaker in the electronic device being tested has a first abnormality, and use it as the detection decibel value. The second anomaly detection module 405 is used to determine whether there is a second anomaly in the microphone and / or speaker of the electronic device being tested based on a preset decibel threshold, a reference decibel value and the detected decibel value, and to complete the anomaly detection of the microphone and speaker in the electronic device. The second anomaly is a performance anomaly, that is, the circuit connection and data transmission are normal, but there is distortion between the detected decibel value and the reference decibel value.

[0051] This application provides a microphone and speaker device anomaly detection device. The device acquires analog audio signals via a data acquisition module; obtains digital signals via an A / D conversion module; performs decimal conversion on all binary encoded values ​​corresponding to the digital signals; determines whether a first anomaly exists in the microphone and / or speaker of the electronic device under test based on a first anomaly detection module; if no first anomaly exists, the detected decibel value is obtained; and determines whether a second anomaly exists in the microphone and speaker of the electronic device under test via a second anomaly detection module, thus completing the anomaly detection of the microphone and speaker in the electronic device. The anomaly detection process prioritizes the detection of the first anomaly before detecting the second anomaly, enabling separate detection of non-performance anomalies and performance anomalies. This application achieves simultaneous detection of speaker and microphone functionality during self-play and self-recording, meeting the requirements for rapid detection of speakers and microphones in electronic devices with data acquisition functionality during factory production, and simplifying the testing process.

[0052] In some optional implementations of this embodiment, the first anomaly detection module 403 includes: The loop traversal unit is used to traverse the set of decimal values ​​corresponding to the different sampling elements in a loop manner. The first detection unit is configured to detect if all the values ​​in the decimal value set corresponding to the first sampling element are 0, and the values ​​in the decimal value set corresponding to the second sampling element are not all 0, then the circuit connection between the speaker and the A / D converter is abnormal and / or the audio stream transmission is abnormal. The second detection unit is configured to determine that if all the values ​​in the decimal value set corresponding to the first sampling element are 0, and all the values ​​in the decimal value set corresponding to the second sampling element are also 0, then the electronic device has at least one of the abnormal situations in the preset first abnormal list. The pre-defined first anomaly list includes the following six anomalies: Anomaly 1: An abnormal circuit connection between the speaker and the A / D converter, and simultaneously an abnormal circuit connection between the microphone and the A / D converter; Anomaly 2: An abnormal audio stream transmission between the speaker and the A / D converter, and simultaneously an abnormal circuit connection between the microphone and the A / D converter; Anomaly 3: An abnormal circuit connection between the speaker and the A / D converter, and simultaneously an abnormal audio stream transmission between the microphone and the A / D converter; Anomaly 4: An abnormal audio stream transmission between the speaker and the A / D converter, and simultaneously an abnormal audio stream transmission between the microphone and the A / D converter; Anomaly 5: An abnormal circuit connection between the speaker and the A / D converter, and simultaneously an abnormal microphone that cannot receive sound; Anomaly 6: An abnormal audio stream transmission between the speaker and the A / D converter, and simultaneously an abnormal microphone that cannot receive sound. The third detection unit is used to determine if the decimal value set corresponding to the first sampling element is not all 0 and the decimal value set corresponding to the second sampling element is all 0, then the electronic device has at least one of the abnormal situations in the preset first abnormal list two. The three abnormal situations in the preset first abnormality list second are as follows: Abnormality 1, abnormal circuit connection between the microphone and the A / D converter; Abnormality 2, abnormal audio stream transmission between the microphone and the A / D converter; Abnormality 3, abnormal microphone cannot receive sound. The fourth detection unit is used to determine that if the decimal values ​​corresponding to the first sampling element are not all 0, and the decimal values ​​corresponding to the second sampling element are not all 0, then the microphone and speaker in the electronic device being tested do not have the first abnormality.

[0053] The microphone and speaker device anomaly detection device described in this application embodiment may further include an anomaly analysis module, which is used to perform anomaly analysis after determining that there is a first anomaly or a second anomaly in the microphone and / or speaker of the electronic device being tested.

[0054] To address the aforementioned technical problems, embodiments of this application also provide an electronic device. Please refer to [link / reference needed] for details. Figure 5 , Figure 5 This is a basic structural block diagram of the electronic device in this embodiment.

[0055] The electronic device 5 includes a memory 51, a processor 52, and a network interface 53 that are interconnected via a system bus. It should be noted that only electronic device 5 with components 51-53 is shown in the figure; however, it should be understood that it is not required to implement all shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the electronic device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0056] The electronic device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The electronic device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.

[0057] The memory 51 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 51 may be an internal storage unit of the electronic device 5, such as the hard disk or memory of the electronic device 5. In other embodiments, the memory 51 may also be an external storage device of the electronic device 5, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 5. Of course, the memory 51 may include both the internal storage unit and the external storage device of the electronic device 5. In this embodiment, the memory 51 is typically used to store the operating system and various application software installed on the electronic device 5, such as the program code of a microphone and speaker device anomaly detection method. In addition, the memory 51 can also be used to temporarily store various types of data that have been output or will be output.

[0058] In some embodiments, the processor 52 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 52 is typically used to control the overall operation of the electronic device 5. In this embodiment, the processor 52 is used to run program code stored in the memory 51 or process data, for example, to run program code for the microphone and speaker device anomaly detection method.

[0059] The network interface 53 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the electronic device 5 and other electronic devices.

[0060] This application also provides another embodiment, namely, providing a computer-readable storage medium storing a microphone and speaker device anomaly detection program, which can be executed by at least one processor to cause the at least one processor to perform the steps of the microphone and speaker device anomaly detection method as described above.

[0061] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0062] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.

Claims

1. A method for detecting anomalies in microphone and speaker devices, characterized in that, Includes the following steps: The audio analog signal is sampled back based on a preset sampling element, wherein the preset sampling element includes a first sampling element and a second sampling element. The first sampling element is disposed between the D / A converter and the speaker, and is used to sample the audio analog signal after conversion by the D / A converter but before it is played by the speaker. The second sampling element is disposed between the A / D converter and the microphone, and is used to sample the audio analog signal after it is played by the speaker and collected by the microphone. The A / D converter is used to perform analog-to-digital conversion on the acquired audio analog signal, converting it into a digital signal; The binary encoded values ​​in the binary encoded value set corresponding to the digital signal are converted to decimal. Based on the converted decimal values, it is determined whether there is a first abnormality in the microphone and / or speaker of the electronic device being tested. The first abnormality is a non-performance processing abnormality, including: circuit connection abnormality and data transmission abnormality. If neither the microphone nor the speaker in the electronic device being tested has a first anomaly, the decimal value is converted into a decibel value based on a preset decibel conversion algorithm and used as the detection decibel value. Based on a preset decibel threshold, a reference decibel value, and the detected decibel value, it is determined whether there is a second anomaly in the microphone and / or speaker of the electronic device being tested, thus completing the anomaly detection of the microphone and speaker in the electronic device. The second anomaly is a performance anomaly, including: the circuit connection and data transmission are normal, but there is distortion between the detected decibel value and the reference decibel value.

2. The microphone and speaker device anomaly detection method according to claim 1, characterized in that, Before the step of data acquisition of the audio analog signal based on the preset acquisition element, the method further includes: A distinguishing number is assigned to the first and second mining elements; Before the step of performing analog-to-digital conversion on the acquired audio analog signal based on the A / D converter to convert it into a digital signal, the method further includes: The difference number is used as a difference identifier to differentiate and buffer the audio analog signals acquired by the first acquisition element and the second acquisition element.

3. The microphone and speaker device anomaly detection method according to claim 2, characterized in that, After performing decimal conversion on all binary encoded values ​​in the binary encoded value set corresponding to the digital signal, the method further includes: The decimal value set corresponding to different sampling elements is cached based on the distinguishing number.

4. The microphone and speaker device anomaly detection method according to claim 3, characterized in that, The step of determining whether the microphone and / or speaker in the electronic device being tested have a first anomaly based on the converted decimal value specifically includes: The decimal value sets corresponding to the different sampling elements are traversed in a loop. If all the values ​​in the decimal value set corresponding to the first sampling element are 0, and the values ​​in the decimal value set corresponding to the second sampling element are not all 0, then the circuit connection between the speaker and the A / D converter is abnormal and / or the audio stream transmission is abnormal. If all the values ​​in the decimal value set corresponding to the first sampling element are 0, and all the values ​​in the decimal value set corresponding to the second sampling element are also 0, then the electronic device has at least one of the abnormal situations in the preset first abnormality list. If the decimal values ​​corresponding to the first sampling element are not all 0, and the decimal values ​​corresponding to the second sampling element are all 0, then the electronic device has at least one of the abnormal situations in the preset first abnormality list two. If the decimal values ​​corresponding to the first sampling element are not all zero, and the decimal values ​​corresponding to the second sampling element are not all zero, then neither the microphone nor the speaker in the electronic device being tested has the first anomaly.

5. The method for detecting abnormalities in microphone and speaker devices according to any one of claims 2 to 4, characterized in that, The step of converting the decimal value to a decibel value based on a preset decibel conversion algorithm, as a method for detecting the decibel value, specifically includes: Based on the hardware specifications of the first and second acquisition elements, the sampling bit width and number of audio channels corresponding to different acquisition elements are determined when acquiring the audio analog signal. Based on the distinguishing number, obtain the set of decimal values ​​corresponding to different sampling elements; Based on a preset decibel conversion algorithm: The decimal values ​​corresponding to the current sampling element at each audio channel number are converted to decibel values, where... The maximum value within the range corresponding to the sampling bit width of the current sampling element. The decimal value corresponding to the different audio channels of the current sampling element. The decibel value obtained after conversion by the aforementioned decibel conversion algorithm. The unit is decibel; The decibel values ​​obtained after conversion by the preset decibel conversion algorithm are used as the detection decibel values ​​of the current sampling element at different audio channel numbers.

6. The microphone and speaker device anomaly detection method according to claim 5, characterized in that, The step of determining whether a second anomaly exists in the microphone and / or speaker of the electronic device being tested, based on a preset decibel threshold, a reference decibel value, and the detected decibel value, specifically includes: Obtain the detection decibel values ​​corresponding to different sampling elements at different audio channel numbers; Obtain the reference decibel values ​​corresponding to different sampling elements at different audio channel numbers; The difference between the corresponding detection decibel value and the reference decibel value is calculated, and it is determined whether the difference result is greater than the preset decibel threshold. If the value is greater than 1, it is determined that there is a second anomaly in the microphone and / or speaker of the electronic device being tested. If the value is less than 1, it indicates that the microphone and speaker in the electronic device being tested are functioning correctly.

7. The microphone and speaker device anomaly detection method according to claim 6, characterized in that, Following the step of determining that a second anomaly exists in the microphone and / or speaker of the electronic device being tested, the method further includes: Based on the distinguishing number, the sampling element corresponding to the detected decibel value is identified; If the corresponding sampling element is the first sampling element, then it is determined that the loudspeaker has a second anomaly; If the corresponding acquisition element is the second acquisition element, then it is determined that the microphone has a second anomaly.

8. A device for detecting abnormalities in microphone and speaker equipment, characterized in that, include: A data acquisition module is used to acquire audio analog signals based on preset acquisition elements. The preset acquisition elements include a first acquisition element and a second acquisition element. The first acquisition element is disposed between the D / A converter and the speaker, and is used to acquire the audio analog signal after conversion by the D / A converter but before it is played by the speaker. The second acquisition element is disposed between the A / D converter and the microphone, and is used to acquire the audio analog signal acquired by the microphone and played by the speaker. The A / D conversion module is used to perform analog-to-digital conversion on the acquired audio analog signal based on the A / D converter, converting it into a digital signal; The first anomaly detection module is used to convert all binary encoded values ​​in the binary encoded value set corresponding to the digital signal into decimal values, and to determine whether there is a first anomaly in the microphone and / or speaker of the electronic device being tested based on the converted decimal values. The first anomaly is a non-performance processing anomaly, including: circuit connection anomaly and data transmission anomaly. The decibel conversion module is used to convert the decibel value into a decibel value based on a preset decibel conversion algorithm if neither the microphone nor the speaker in the electronic device being tested has a first anomaly, and use it as the detected decibel value. The second anomaly detection module is used to determine whether there is a second anomaly in the microphone and / or speaker of the electronic device being tested, based on a preset decibel threshold, a reference decibel value and the detected decibel value, and to complete the anomaly detection of the microphone and speaker in the electronic device. The second anomaly is a performance anomaly, including: the circuit connection and data transmission are normal, but there is distortion between the detected decibel value and the reference decibel value.

9. An electronic device comprising a memory and a processor, the memory storing computer-readable instructions, wherein the processor, when executing the computer-readable instructions, implements the steps of the microphone and speaker device anomaly detection method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the microphone and speaker device anomaly detection method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Electronic equipment acoustic assembly performance testing methods and devices, equipment and memory medium

    CN109547910A

  • Method and device for detecting mic sequence

    CN111148005A