Loudspeaker detection method and system, chip and electronic equipment

By acquiring audio data and test data to analyze the speaker status, the problem of low speaker problem detection efficiency is solved, and users can independently detect and solve speaker anomalies.

CN120692516APending Publication Date: 2025-09-23CHENGDU AWINIC MICROELECTRONICS TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510822334.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

In the existing technology, the detection efficiency of speaker problems is low, and users cannot quickly locate the problem. The speaker needs to be sent back to the terminal manufacturer for software or hardware testing, which consumes a lot of manpower and resources.

Method used

By acquiring audio data and test data, the status information of the speaker, including the coil status and protection algorithm status, is analyzed and sent to the second electronic device for abnormality analysis, without the user having to send it back to the manufacturer.

Benefits of technology

The efficiency of speaker problem detection is improved, and users can determine the cause of the abnormality and solve it by themselves, reducing the waste of manpower and material resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120692516A_ABST
    Figure CN120692516A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of audio processing, and discloses a loudspeaker detection method and system, a chip and electronic equipment. The loudspeaker detection method comprises the steps that first electronic equipment acquires first audio data and first test data, wherein the frequency of the first test data is smaller than a preset threshold value; obtaining to-be-played audio data based on the first audio data and the first test data; acquiring second audio data output by playing the audio data to be played by the loudspeaker; acquiring third audio data corresponding to the first test data in the second audio data; and determining state information of the loudspeaker based on the third audio data, and sending the state information to the second electronic equipment. Therefore, when the loudspeaker of the first electronic equipment is abnormal, a user can determine the problem of the loudspeaker without sending the first electronic equipment back to a terminal manufacturer again, so that the efficiency of detecting the problem of the loudspeaker is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of audio processing technology, and in particular to a speaker detection method, system, chip and electronic device. Background Art

[0002] During the process of audio data being played by the speakers of electronic devices, for example, when electronic devices such as mobile phones, watches, and tablet computers are playing audio data, the sound of the audio data played by the electronic device may suddenly become louder or quieter, or there may be abnormal sounds caused by a break in the voice coil of the speaker. Currently, users cannot quickly locate speaker problems through abnormal phenomena of electronic devices. Users generally need to send the electronic device back to the terminal manufacturer, and the terminal manufacturer will perform software testing on the electronic device to determine the software problem of the speaker; or the terminal manufacturer will disassemble the electronic device for testing to determine the hardware problem of the speaker. In this way, a lot of manpower and material resources are required to be consumed in the process of determining the speaker problem, and the efficiency of detecting speaker problems is low. Summary of the Invention

[0003] In order to solve the above-mentioned problem of low efficiency in detecting loudspeakers, embodiments of the present application provide a loudspeaker detection method, system, chip, and electronic device.

[0004] In a first aspect, an embodiment of the present application provides a speaker detection method, which is applied to a first electronic device, the first electronic device including a speaker, and the speaker detection method includes: obtaining first audio data and first test data, the frequency of the first test data being less than a preset threshold; obtaining audio data to be played based on the first audio data and the first test data; obtaining second audio data output by the speaker for playing the audio data to be played; obtaining third audio data corresponding to the first test data in the second audio data; determining status information of the speaker based on the third audio data, and sending the status information to the second electronic device.

[0005] In an embodiment of the present application, the first electronic device can determine the status information of the speaker based on the third audio data after the speaker has played the audio data to be played, and send the status information of the speaker to the second electronic device, so that the terminal manufacturer can view the status information of the speaker stored in the memory of the second electronic device, and determine the abnormal information of the speaker based on the status information of the speaker, such as the cause of the abnormality and provide a corresponding solution. In this way, when the speaker of the first electronic device has an abnormality, the user does not need to send the first electronic device back to the terminal manufacturer, and can also determine the speaker problem, thereby improving the efficiency of detecting speaker problems.

[0006] In one possible implementation, the status information includes at least one of speaker coil status information and speaker protection algorithm status information.

[0007] In one possible implementation, the status information includes speaker coil status information, and the status information of the speaker is determined based on the third audio data, including: obtaining voltage parameters and current parameters of the third audio data; corresponding to the voltage parameter being greater than the first voltage value and the current parameter being less than the first current value, determining that the speaker coil is open-circuited; corresponding to the voltage parameter being greater than the second voltage value and the current parameter being less than the second current value, determining that the speaker coil is short-circuited, wherein the first voltage value is greater than the second voltage value and the first current value is less than the second current value.

[0008] In one possible implementation, the status information includes speaker coil status information, and the status information of the speaker is determined based on the third audio data, including: obtaining fourth audio data of a preset duration in the second audio data; obtaining a first duration of audio data with an amplitude greater than a first amplitude threshold in the fourth audio data and a second duration of audio data with an amplitude less than a second amplitude threshold in the fourth audio data, the first amplitude threshold being greater than the second amplitude threshold; obtaining voltage parameters and current parameters of the third audio data; determining that the speaker coil is open-circuited corresponding to the voltage parameter being greater than the first voltage value, the current parameter being less than the first current value, and the second duration being greater than the first preset time; determining that the speaker coil is short-circuited corresponding to the voltage parameter being greater than the second voltage value, the current parameter being less than the second current value, and the first duration being greater than the second preset time.

[0009] In the embodiment of the present application, the first duration represents the duration of a loud sound, and the second duration represents the duration of a soft sound.

[0010] In one possible implementation, obtaining a first duration of audio data in the fourth audio data having an amplitude greater than a first amplitude threshold and a second duration of audio data in the fourth audio data having an amplitude less than a second amplitude threshold includes: determining a sampling rate and a plurality of sampling points of the fourth audio data; determining a first group of sampling points in the plurality of sampling points having an amplitude continuously greater than the first amplitude threshold and a second group of sampling points in the plurality of sampling points having an amplitude continuously less than the second amplitude threshold; determining a first number of sampling points based on a first starting sampling point and a first ending sampling point of the first group of sampling points, and determining a second number of sampling points based on a second starting sampling point and a second ending sampling point of the second group of sampling points; determining the first duration based on the first number of sampling points and the sampling rate, and determining the second duration based on the second number of sampling points and the sampling rate.

[0011] In one possible implementation, the status information includes status information of a speaker protection algorithm, and the status information of the speaker is determined based on the third audio data, including: obtaining voltage parameters and current parameters of the third audio data; determining the resistance of the speaker coil based on the voltage parameters and current parameters; obtaining the conductor temperature coefficient of the speaker coil, and determining the temperature of the speaker coil based on the conductor temperature coefficient and the resistance of the speaker coil; corresponding to the temperature of the speaker coil being greater than a temperature threshold, determining that the status of the speaker protection algorithm is a failure state, wherein the speaker protection algorithm is used to: monitor the coil temperature of the speaker and the vibration amplitude of the audio data to be played; determine the temperature difference based on the coil temperature and the temperature threshold; determine the gain of the audio data to be played based on the temperature difference; adjust the amplification factor corresponding to the audio data to be played based on the gain and a preset gain adjustment strategy; and when it is determined that the vibration amplitude of the audio data to be played is greater than the third amplitude threshold, reduce the vibration amplitude of the audio data to be played.

[0012] It's understandable that the core function of the speaker protection algorithm is to monitor key parameters in real time and proactively intervene when anomalies occur to prevent hardware damage. Excessive speaker coil temperature directly indicates that the speaker protection algorithm is failing to effectively control the coil temperature, indicating that the speaker protection algorithm is in a failed state.

[0013] In the second aspect, an embodiment of the present application provides a speaker detection system, which includes a first electronic device and a second electronic device, wherein the first electronic device is used to execute any one of the speaker detection methods provided by the first aspect and various possible implementations of the first aspect; and the second electronic device is used to receive status information sent by the first electronic device.

[0014] In a possible implementation, the first electronic device is a terminal device, and the second electronic device is a cloud device.

[0015] In a third aspect, an embodiment of the present application provides a chip, which includes a processor and a data interface. The processor reads instructions stored in a memory through the data interface to execute any speaker detection method provided in the first aspect and various possible implementations of the first aspect.

[0016] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising any chip provided by the third aspect and various possible implementations of the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 According to an embodiment of the present application, a flow chart of a speaker detection method is shown;

[0018] Figure 2 According to an embodiment of the present application, a schematic diagram of a speaker detection system is shown;

[0019] Figure 3 According to an embodiment of the present application, a schematic diagram of an audio data transmission process is shown;

[0020] Figure 4 According to an embodiment of the present application, a structural diagram of an electronic device 1300 is shown. DETAILED DESCRIPTION

[0021] Illustrative embodiments of the present application include, but are not limited to, a speaker detection method, system, chip, and electronic device.

[0022] As mentioned above, when the speaker of an electronic device malfunctions, the user cannot quickly locate the speaker problem through the abnormal phenomenon of the electronic device. Therefore, the electronic device needs to be sent back to the terminal manufacturer, and the terminal manufacturer will determine the speaker problem. That is, the process of determining the speaker problem currently requires a lot of manpower and material resources, and the efficiency of detecting speaker problems is low.

[0023] In order to solve the problem of low efficiency in detecting the speaker mentioned above, an embodiment of the present application provides a speaker detection method, which includes: a first electronic device obtains first audio data and first test data, and the frequency of the first test data is less than a preset threshold; based on the first audio data and the first test data, audio data to be played is obtained; second audio data output by the speaker for playing the audio data to be played is obtained; third audio data corresponding to the first test data in the second audio data is obtained; based on the third audio data, the status information of the speaker is determined, and the status information is sent to the second electronic device.

[0024] In an embodiment of the present application, after the speaker of the first electronic device has finished playing the audio data to be played, the speaker status information can be determined based on the third audio data, and the speaker status information can be sent to the second electronic device, so that the terminal manufacturer can view the speaker status information stored in the memory of the second electronic device, and determine the abnormality information of the speaker based on the speaker status information, such as the cause of the abnormality and provide a corresponding solution. In this way, when the speaker of the first electronic device has an abnormality, the user does not need to return the first electronic device to the terminal manufacturer to determine the speaker problem, thereby improving the efficiency of detecting speaker problems.

[0025] In other embodiments, the second electronic device may determine abnormal information of the speaker based on the status information, such as the cause of the abnormality, and provide a corresponding solution.

[0026] In the embodiment of the present application, the first electronic device may be a terminal device, including but not limited to a mobile station (MS), a mobile terminal (MT), etc. For example, the electronic device may be a mobile phone, a smart TV, a wearable device, a tablet computer (Pad), a desktop computer, a laptop computer, a virtual reality (VR) device, an augmented reality (AR) device, a terminal in industrial control, a terminal in self-driving, a terminal in remote medical surgery, a terminal in a smart grid, a terminal in transportation safety, a terminal in a smart city, a terminal in a smart home, etc., and the second electronic device may be a cloud device.

[0027] Figure 1 According to an embodiment of the present application, a schematic diagram of a speaker detection method is shown. Figure 1 The speaker detection method shown can be applied to the first electronic device. Figure 1 As shown, the speaker detection method includes:

[0028] 101: Acquire first audio data and first test data, where the frequency of the first test data is less than a preset threshold.

[0029] In an embodiment of the present application, the first electronic device can obtain first audio data and first test data (or called pilot signal, low-frequency signal), wherein the first audio data is original audio data, such as music, voice, sound effects, etc., and the frequency of the first test data is less than a preset threshold.

[0030] In the embodiment of the present application, the preset threshold is less than or equal to the lower limit of the human hearing range. For example, the preset threshold is equal to 50 Hz. It can also be set to other values ​​according to actual needs, such as a value within the range of 45-55 Hz, etc., and is not limited in the embodiment of the present application. It is understood that the frequency of the first test data is less than or equal to the lower limit of the human hearing range to avoid affecting the user's hearing perception.

[0031] 102: Acquire audio data to be played based on the first audio data and the first test data.

[0032] In an embodiment of the present application, the first electronic device may superimpose the first test data on the first audio data to obtain fifth audio data; and amplify the fifth audio data to obtain audio data to be played.

[0033] 103: Obtain second audio data output by the speaker after playing the audio data to be played.

[0034] In an embodiment of the present application, the first electronic device can play the audio data to be played through a speaker, and obtain the second audio data output by the speaker after playing the audio data to be played.

[0035] 104: Obtain third audio data corresponding to the first test data in the second audio data.

[0036] In an embodiment of the present application, the frequency of the first test data is less than a preset threshold, so the first electronic device can perform low-pass filtering on the second audio data to obtain third audio data corresponding to the first test data in the second audio data.

[0037] It can be understood that when the speaker plays the audio data to be played, it also plays the first test data. Therefore, when the speaker plays the third audio data corresponding to the first test data in the second audio data obtained by the speaker, the status information of the speaker is also processed.

[0038] 105: Determine status information of the speaker based on the third audio data, and send the status information to the second electronic device.

[0039] In the embodiment of the present application, the status information includes at least one of speaker coil status information and speaker protection algorithm status information. The following describes how to obtain the speaker coil status information and the speaker protection algorithm status information, respectively.

[0040] In an embodiment of the present application, a method for obtaining the status information of the speaker coil may include: obtaining voltage parameters and current parameters of the third audio data; determining that the speaker coil is open when it is determined that the voltage parameter is greater than a first voltage value VTH_MAX and the current parameter is less than a first current value VIH_MIN; determining that the speaker coil is short-circuited when it is determined that the voltage parameter is greater than a second voltage value VTH_MIN and the current parameter is less than a second current value VIH_MAX, wherein the first voltage value VTH_MAX is greater than the second voltage value VTH_MIN, and the first current value VIH_MIN is less than the second current value VIH_MAX.

[0041] The voltage parameter and current parameter of the third audio data are also referred to as feedback current intensity voltage (IV).

[0042] In an embodiment of the present application, the method for obtaining the status information of the speaker coil may also include: obtaining fourth audio data of a preset duration in the second audio data; obtaining the first duration of the audio data in the fourth audio data whose amplitude is greater than the first amplitude threshold DTH_MAX and the second duration of the audio data in the fourth audio data whose amplitude is less than the second amplitude threshold DTH_MIN, wherein the first amplitude threshold DTH_MAX is greater than the second amplitude threshold DTH_MIN; obtaining the voltage parameter and current parameter of the third audio data; corresponding to the voltage parameter being greater than the first voltage value, the current parameter being less than the first current value, and the second duration being greater than the first preset time, determining that the speaker coil is open-circuited; corresponding to the voltage parameter being greater than the second voltage value, the current parameter being less than the second current value, and the first duration being greater than the second preset time, determining that the speaker coil is short-circuited.

[0043] Among them, obtaining the first duration of the audio data in the fourth audio data whose amplitude is greater than the first amplitude threshold DTH_MAX and the second duration of the audio data in the fourth audio data whose amplitude is less than the second amplitude threshold DTH_MIN includes: determining the sampling rate and multiple sampling points of the fourth audio data; and determining, based on the sampling points and the sampling rate, the first duration of the audio data in the fourth audio data whose amplitude is greater than the first amplitude threshold DTH_MAX and the second duration of the audio data in the fourth audio data whose amplitude is less than the second amplitude threshold DTH_MIN.

[0044] It is understood that the sampling rate refers to the number of times the audio signal is sampled per second. For example, a sampling rate of 44100 Hz means that the audio signal is sampled 44100 times per second.

[0045] In an embodiment of the present application, determining, based on multiple sampling points and a sampling rate, a first duration of audio data in fourth audio data having an amplitude greater than a first amplitude threshold DTH_MAX and a second duration of audio data in the fourth audio data having an amplitude less than a second amplitude threshold DTH_MIN includes: traversing the fourth audio data point by point, determining the magnitude between the amplitude of each sampling point in the fourth audio data and the first amplitude threshold DTH_MAX and the second amplitude threshold DTH_MIN, determining a first group of sampling points in the multiple sampling points of the fourth audio data having amplitudes continuously greater than the first amplitude threshold DTH_MAX, recording a first starting sampling point and a first ending sampling point of the first group of sampling points, determining a first number of sampling points based on a difference between the first starting sampling point and the first ending sampling point, i.e., first number of sampling points = first ending sampling point - first starting sampling point, and determining the first duration based on the first number of sampling points and the sampling rate. A second group of sampling points in the fourth audio data having amplitudes continuously less than a second amplitude threshold DTH_MIN is determined, a second starting sampling point and a second ending sampling point of the second group of sampling points are recorded, a second number of sampling points is determined based on a difference between the second starting sampling point and the second ending sampling point, that is, the second number of sampling points = the second ending sampling point - the second starting sampling point, and a second duration is determined based on the second number of sampling points and the sampling rate.

[0046] For example, the number of first sampling points is 1000 and the sampling rate is 44100 Hz, then the first duration = 1000 / 44100 ≈ 0.023 s.

[0047] In an embodiment of the present application, the preset duration can be the time difference between the start time and the end time of the speaker playing the audio data to be played, and can also be any one of 0.125ms, 0.0625ms, 0.0453ms, 0.0104ms, etc.

[0048] It can be understood that the first duration represents the duration of a loud sound, and the second duration represents the duration of a soft sound.

[0049] In the embodiment of the present application, the method of obtaining the state information of the speaker protection algorithm may include: obtaining the voltage parameter and current parameter of the third audio data; determining the resistance R of the speaker coil according to the voltage parameter and the current parameter; e (or real-time coil impedance R e ); obtain the conductor temperature coefficient of the speaker coil, and determine the temperature T of the speaker coil based on the conductor temperature coefficient and the resistance of the speaker coil e ; In determining the temperature T of the speaker coil e When the temperature is greater than the temperature threshold, the state of the speaker protection algorithm is determined to be a failure state.

[0050] The temperature T of the speaker coil is determined based on the conductor temperature coefficient and the resistance of the speaker coil. e The formula is as follows:

[0051]

[0052] Where R0 is the resistance of the speaker coil at room temperature; R e is the resistance of the speaker coil determined by the voltage and current parameters; T0 is the room temperature, T e is the real-time temperature of the speaker coil. In the embodiment of the present application, T0=25°C.

[0053] It can be understood that the speaker protection algorithm is used to monitor the coil temperature of the speaker and the vibration amplitude of the audio data to be played; determine the temperature difference based on the coil temperature and the temperature threshold (that is, determine the difference between the coil temperature and the temperature threshold); determine the gain of the audio data to be played according to the temperature difference; adjust the amplification factor corresponding to the audio data to be played according to the gain and the preset gain adjustment strategy; when it is determined that the vibration amplitude of the audio data to be played is greater than the third amplitude threshold, reduce the vibration amplitude of the audio data to be played.

[0054] Determining the gain of the audio data to be played based on the temperature difference may include: calculating the gain of the audio data to be played based on the temperature difference and a preset proportional differential coefficient formula. The preset proportional differential coefficient formula is as follows:

[0055]

[0056] Among them, G represents the gain of the audio data to be played, k p is the preset proportional coefficient, ΔT is the temperature difference, k d is the preset differential coefficient, is the rate of change of temperature difference over time. It can be understood that k p and k d The gain of the audio data to be played is positively correlated (or proportional) to the temperature difference and the rate of change of the temperature difference over time. The greater the temperature difference, the greater the gain of the audio data to be played; the smaller the temperature difference, the smaller the gain of the audio data to be played; the greater the rate of change of the temperature difference over time, the greater the gain of the audio data to be played; and the smaller the rate of change of the temperature difference over time, the smaller the gain of the audio data to be played.

[0057] In an embodiment of the present application, the amplification factor corresponding to the audio data to be played is adjusted according to the gain and the preset gain adjustment strategy, including: adjusting the amplification factor corresponding to the audio data to be played based on proportional-integral-derivative (PID), gain and the preset gain adjustment strategy.

[0058] It can be understood that PID is a means of implementing a speaker protection algorithm, which is used to dynamically adjust the amplification factor corresponding to the audio data to be played to maintain a safe temperature.

[0059] Among them, adjusting the amplification factor corresponding to the audio data to be played based on the gain and the preset gain adjustment strategy may include: reducing the amplification factor of the audio data to be played when detecting an increase in the gain; and increasing the amplification factor of the audio data to be played when detecting a decrease in the gain.

[0060] It can be understood that a greater amplification factor increases the voltage amplitude of the audio data to be played, resulting in a greater electrical power for the audio data to be played; a smaller amplification factor decreases the voltage amplitude of the audio data to be played, resulting in a smaller electrical power for the audio data to be played. Thus, when an increase in gain is detected, the amplification factor of the audio data to be played can be reduced to reduce the electrical power of the audio data to be played, thereby preventing damage to the speaker due to excessive temperature.

[0061] In addition, based on the protection algorithm, when it is determined that the vibration amplitude of the audio data to be played is greater than the third amplitude threshold, the vibration amplitude of the audio data to be played is reduced, for example, "peak clipping" processing is performed on the audio data to be played, filtering processing is performed on the audio data to be played, etc., to avoid instantaneous overload of the speaker.

[0062] It can be understood that if the speaker protection algorithm is enabled, the speaker input signal (i.e., the audio data to be played) can be dynamically adjusted based on the speaker's temperature and vibration amplitude, and the speaker coil temperature will not exceed the temperature threshold. Therefore, when the speaker coil temperature exceeds the temperature threshold, or is considered too high, the speaker protection algorithm is disabled.

[0063] In an embodiment of the present application, the terminal manufacturer can view the status information of the speaker stored in the memory of the second electronic device, determine abnormal information of the speaker based on the status information, such as the cause of the abnormality and provide a corresponding solution, and upload the abnormal cause of the speaker and the corresponding solution to the second electronic device. In other embodiments, the second electronic device can determine abnormal information of the speaker based on the status information, such as the cause of the abnormality and provide a corresponding solution.

[0064] In an embodiment of the present application, the first electronic device can determine the status information of the speaker based on the third audio data after the speaker has played the audio data to be played, and send the status information of the speaker to the second electronic device. In this way, when an abnormality occurs in the speaker of the first electronic device, the user does not need to return the first electronic device to the terminal manufacturer to determine the speaker problem, thereby improving the efficiency of detecting speaker problems.

[0065] In the following, the first electronic device is a terminal device and the second electronic device is a cloud device. Figure 2 The speaker detection system provided in the embodiment of the present application is introduced. Figure 2 As shown, the terminal device includes a digital signal processor (DSP) and an application processor (AP), and the cloud device includes a memory.

[0066] The DSP is used to calculate and monitor the status information of the speaker in real time and send the status information to the AP; wherein the status information includes at least one of the speaker coil status information and the speaker protection algorithm status information.

[0067] The following combination Figure 3 This section introduces how DSP obtains speaker status information. Figure 3 As shown, the DSP can obtain the first audio data, superimpose the first test data on the first audio data to obtain the fifth audio data; and send the fifth audio data to the audio amplifier so that the fifth audio data is amplified by the audio amplifier to obtain the audio data to be played; the audio amplifier sends the audio data to be played to the speaker, the speaker plays the audio data to be played to obtain the second audio data, and the second audio data is sent to the DSP via the audio amplifier.

[0068] The DSP can obtain the third audio data corresponding to the first test data in the second audio data, and determine the status information of the speaker based on the third audio data, and send the status information to the AP, so that the status information is sent to the second electronic device through the AP. The method of obtaining the third audio data corresponding to the first test data in the second audio data and determining the status information of the speaker based on the third audio data can be found in Figure 1 Steps 104 and 105 of the illustrated embodiment will not be described in detail here.

[0069] It is understandable that the DSP is generally unable to perform network communication, while the AP is generally able to perform network communication. Therefore, after the DSP obtains the status information of the speaker, it can send the status information of the speaker to the AP through the local communication interface.

[0070] The AP is used to send the status information of the speaker to the cloud device through network communication, and the cloud device stores the status information in the memory.

[0071] The memory is used to store the status information of the speaker. The terminal manufacturer can view the status information stored in the memory of the cloud device, determine the cause of the speaker abnormality based on the status information, and provide a corresponding solution. In other embodiments, the cloud device can determine the cause of the speaker abnormality based on the status information and provide a corresponding solution.

[0072] The embodiment of the present application provides a speaker detection system, which includes a first electronic device and a second electronic device. The first electronic device is configured to perform Figure 1 The speaker detection method shown; the second electronic device is used to receive status information sent by the first electronic device.

[0073] An embodiment of the present application provides a chip, which includes a processor and a data interface. The processor reads instructions stored in a memory through the data interface to execute the above-mentioned speaker detection method.

[0074] An embodiment of the present application provides an electronic device including the above chip.

[0075] According to the embodiments of the present application, Figure 4 FIG shows a block diagram of a first electronic device 1300 based on a system on chip (SOC). Figure 4 In FIG, similar components have the same reference numerals. In addition, the dashed boxes are optional features of more advanced SOCs. Figure 4 In the embodiment, the first electronic device 1300 includes: an interconnect unit 1350 coupled to a processor 1315; a system agent unit 1370; a bus controller unit 1380; an integrated memory controller unit 1340; a set of one or more coprocessors 1320, which may include integrated graphics logic, an image processor, an audio processor, and a video processor; a static random-access memory (SRAM) unit 1330; and a direct memory access (DMA) unit 1360. In one embodiment, the coprocessor 1320 includes a special-purpose processor, such as a network or communication processor, a compression engine, or an embedded processor.

[0076] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, a machine-readable medium may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including but not limited to floppy disks, optical disks, optical discs, read-only memories (compact disc-read only memories, CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Accordingly, machine-readable media includes any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (eg, a computer).

[0077] In the accompanying drawings, some structural or method features may be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or order may not be required. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of a structural or method feature in a particular figure does not imply that such feature is required in all embodiments, and in some embodiments, such features may not be included or may be combined with other features.

[0078] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems raised by this application. In addition, in order to highlight the innovative part of this application, the above-mentioned device embodiments of this application do not introduce units / modules that are not closely related to solving the technical problems raised by this application. This does not mean that other units / modules do not exist in the above-mentioned device embodiments.

[0079] It should be noted that in the examples and description of this patent, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a" does not exclude the presence of other identical elements in the process, method, article or apparatus comprising the element.

[0080] Although the present application has been shown and described with reference to certain alternative embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.

Claims

1. A speaker detection method, characterized in that: Applied to a first electronic device, the first electronic device includes a speaker, and the speaker detection method includes: Acquire first audio data and first test data, where the frequency of the first test data is less than a preset threshold; Acquire audio data to be played based on the first audio data and the first test data; Acquire second audio data output by the speaker after playing the audio data to be played; Acquire third audio data corresponding to the first test data in the second audio data; Based on the third audio data, status information of the speaker is determined, and the status information is sent to the second electronic device.

2. The speaker detection method according to claim 1, wherein: The status information includes at least one of speaker coil status information and speaker protection algorithm status information.

3. The speaker detection method according to claim 2, wherein: The state information includes state information of the speaker coil, and determining the state information of the speaker based on the third audio data includes: Acquiring voltage parameters and current parameters of the third audio data; Corresponding to the voltage parameter being greater than a first voltage value and the current parameter being less than a first current value, determining that the speaker coil is open; Corresponding to the voltage parameter being greater than a second voltage value and the current parameter being less than a second current value, it is determined that the speaker coil is short-circuited, wherein the first voltage value is greater than the second voltage value and the first current value is less than the second current value.

4. The speaker detection method according to claim 2, wherein: The state information includes state information of the speaker coil, and determining the state information of the speaker based on the third audio data includes: Acquire fourth audio data of a preset duration from the second audio data; Obtaining a first duration of audio data in the fourth audio data having an amplitude greater than a first amplitude threshold and a second duration of audio data in the fourth audio data having an amplitude less than a second amplitude threshold, wherein the first amplitude threshold is greater than the second amplitude threshold; Acquiring voltage parameters and current parameters of the third audio data; Corresponding to the voltage parameter being greater than a first voltage value, the current parameter being less than a first current value, and the second duration being greater than a first preset time, determining that the speaker coil is broken; Corresponding to the voltage parameter being greater than a second voltage value, the current parameter being less than a second current value, and the first duration being greater than a second preset time, it is determined that the speaker coil is short-circuited.

5. The speaker detection method according to claim 4, characterized in that: The obtaining of a first duration of audio data having an amplitude greater than a first amplitude threshold value in the fourth audio data and a second duration of audio data having an amplitude less than a second amplitude threshold value in the fourth audio data includes: determining a sampling rate and a plurality of sampling points of the fourth audio data; Determine a first group of sampling points among the plurality of sampling points whose amplitudes are continuously greater than the first amplitude threshold and a second group of sampling points among the plurality of sampling points whose amplitudes are continuously less than the second amplitude threshold; Determine a first number of sampling points according to a first starting sampling point and a first ending sampling point in the first group of sampling points, and determine a second number of sampling points according to a second starting sampling point and a second ending sampling point in the second group of sampling points; The first duration is determined according to the first number of sampling points and the sampling rate, and the second duration is determined according to the second number of sampling points and the sampling rate.

6. The speaker detection method according to claim 2, wherein: The status information includes speaker protection algorithm status information, and determining the speaker status information based on the third audio data includes: Acquiring voltage parameters and current parameters of the third audio data; determining the resistance of the speaker coil according to the voltage parameter and the current parameter; obtaining a conductor temperature coefficient of the speaker coil, and determining a temperature of the speaker coil based on the conductor temperature coefficient and a resistance of the speaker coil; corresponding to the temperature of the speaker coil being greater than a temperature threshold, determining that the state of the speaker protection algorithm is a failure state; The speaker protection algorithm is used to: monitoring the coil temperature of the speaker and the vibration amplitude of the audio data to be played; determining a temperature difference based on the coil temperature and a temperature threshold; determining a gain of the audio data to be played according to the temperature difference; adjusting the amplification factor corresponding to the audio data to be played according to the gain and a preset gain adjustment strategy; When it is determined that the vibration amplitude of the audio data to be played is greater than a third amplitude threshold, the vibration amplitude of the audio data to be played is reduced.

7. A speaker detection system, characterized in that: The speaker detection system comprises a first electronic device and a second electronic device, wherein the first electronic device is configured to execute the speaker detection method according to any one of claims 1 to 6; The second electronic device is used to receive status information sent by the first electronic device.

8. The speaker detection system according to claim 7, wherein: The first electronic device is a terminal device, and the second electronic device is a cloud device.

9. A chip, characterized in that: The chip includes a processor and a data interface, and the processor reads instructions stored in a memory through the data interface to execute the speaker detection method according to any one of claims 1 to 6.

10. An electronic device, characterized in that: Comprising the chip described in claim 9.