Howling detection method and system, audio equipment and medium

By using a dynamic frame length switching feedback detection method, which combines first feedback detection and second feedback detection, the problem of how feedback detection in the prior art is difficult to balance low latency and low power consumption is solved. This achieves feedback detection with high real-time performance and low power consumption, thereby improving the stability of audio devices and the user experience.

CN121334584APending Publication Date: 2026-01-13BESTECHNIC SHANGHAI CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511773938.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

Existing whistling detection methods struggle to simultaneously achieve low detection latency and low power consumption, resulting in a trade-off between real-time performance and low power consumption in traditional solutions.

Method used

The method of howling detection using dynamic frame length switching continuously acquires audio segments of preset duration and saves them sequentially, dynamically adjusts the detection frame length, and combines the flexible switching between the first and second howling detection methods to detect only the last audio segment of the audio segment, reducing the amount of computation and switching to high real-time detection when necessary.

Benefits of technology

It achieves fast response to howling under low power conditions, reduces power consumption, improves the real-time performance and robustness of detection, shortens the howling duration, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121334584A_ABST
    Figure CN121334584A_ABST
Patent Text Reader

Abstract

The invention provides a howling detection method and system, audio equipment and a medium. The method comprises the following steps: continuously obtaining and storing audio clips of a preset duration; when the number of the stored audio clips meets a preset first number, performing first howling detection: arranging the first number of audio clips in sequence to form audio segments, and performing howling detection on the last audio clip of the audio segments; when howling is detected, switching to second howling detection: carrying out howling detection on the newly acquired audio clip until the frequency of continuously not detecting howling reaches a preset frequency threshold value, emptying the stored audio clip, and continuing to carry out first howling detection on the newly acquired audio clip; and when the howling is not detected, emptying the stored audio clip, and continuing to perform first howling detection on the newly acquired audio clip. According to the invention, under the condition of ensuring low power consumption, comprehensive improvement of high real-time performance and high robustness is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of feedback detection technology, and in particular to a feedback detection method, system, audio device, and medium. Background Technology

[0002] In audio devices such as headphones, hearing aids, or conference microphones, the sound signal output from the speaker, after passing through the acoustic path and feeding back to the microphone, forms a positive feedback closed loop. This causes the signal energy to accumulate continuously, eventually producing a piercing self-excited oscillation—a phenomenon known as feedback. Feedback not only generates harsh noise interference, severely impacting the user experience, but can also potentially damage hardware. Therefore, achieving fast and low-power feedback detection and suppression is a crucial requirement for audio devices.

[0003] However, as users' demands for device battery life and real-time response continue to increase, traditional feedback detection methods have gradually revealed many drawbacks: on the one hand, feedback detection methods need to minimize detection latency to reduce the duration of feedback and avoid users hearing obvious feedback noise; on the other hand, audio devices must control power consumption by reducing system clock speed and computational load to reduce power consumption. For traditional solutions, it is difficult to simultaneously reduce latency and power consumption, therefore existing feedback detection methods cannot simultaneously meet the requirements of real-time performance and low power consumption. Therefore, there is a need to provide a feedback detection method, system, audio device, and medium. Summary of the Invention

[0004] This invention provides a feedback detection method, system, audio device, and medium to improve the technical problem that existing feedback detection technologies struggle to simultaneously achieve low detection latency and low power consumption.

[0005] This invention provides a feedback detection method, the method comprising: continuously acquiring and saving audio segments of a preset duration; when the number of saved audio segments meets a preset first quantity, performing a first feedback detection: arranging the first quantity of audio segments sequentially to form an audio segment, and performing feedback detection on the last audio segment of the audio segment; when feedback is detected, switching to a second feedback detection: performing feedback detection on newly acquired audio segments until the number of consecutive times no feedback is detected reaches a preset threshold, then clearing the saved audio segments, and continuing to perform the first feedback detection on newly acquired audio segments; when no feedback is detected, clearing the saved audio segments, and continuing to perform the first feedback detection on newly acquired audio segments.

[0006] In one embodiment of the present invention, the step of detecting feedback in an audio segment includes: filtering the audio segment; performing a Fourier transform on the filtered audio segment to obtain the amplitude of the audio segment at various frequencies; finding the maximum amplitude within a preset first frequency range; calculating the ratio of the maximum amplitude to the average amplitude within a preset second frequency range to which it belongs; wherein the first frequency range is greater than the second frequency range; determining that the ratio is greater than a preset feedback decision threshold: if so, determining that the audio segment has feedback; otherwise, determining that the audio segment does not have feedback.

[0007] In one embodiment of the present invention, the Fourier transform is a fast Fourier transform.

[0008] In one embodiment of the present invention, the step of performing feedback detection on newly acquired audio segments until the number of consecutive feedback failures reaches a preset threshold, then clearing the saved audio segments, and continuing to perform the first feedback detection on newly acquired audio segments includes: performing feedback detection on newly acquired audio segments: if no feedback occurs in the audio segment, the number of consecutive feedback failures is accumulated; wherein, the number of consecutive feedback failures has an initial preset value; if feedback occurs in the audio segment, the number of consecutive feedback failures is reset to zero; determining whether the number of consecutive feedback failures reaches the threshold: if yes, it is determined that no feedback occurs in the saved audio segments, all saved audio segments are cleared, and the first feedback detection is continued on newly acquired audio segments; if no feedback occurs, feedback detection is continued on newly acquired audio segments.

[0009] In one embodiment of the present invention, before performing feedback detection on the newly acquired audio segment, the method further includes: determining whether a newly acquired audio segment exists; if it exists, performing feedback detection on the newly acquired audio segment, and after the detection is completed, continuing to determine whether a newly acquired audio segment exists; if it does not exist, performing feedback detection on the remaining audio segments of the audio segment, and after the detection is completed, continuing to determine whether a newly acquired audio segment exists.

[0010] In one embodiment of the present invention, the process of performing feedback detection on the remaining audio segments of the audio segment includes: determining whether there is an undetected audio segment sequence in the audio segment; if yes, then: taking the audio segment closest to the last audio segment as the target audio segment; performing feedback detection on the target audio segment, and after the detection is completed, deleting the target audio segment from the undetected audio segment sequence and updating the undetected audio segment sequence; if no, then ending the feedback detection of the audio segment.

[0011] In one embodiment of the present invention, the method further includes: when performing feedback detection on a newly acquired audio segment, if the number of consecutive times feedback is not detected does not reach the threshold number, feedback suppression is performed.

[0012] The present invention also provides a feedback detection system, comprising: an audio segment acquisition module for continuously acquiring and saving audio segments of a preset duration; a first feedback detection module for performing a first feedback detection when the number of saved audio segments meets a preset first quantity: arranging the first quantity of audio segments sequentially to form an audio segment, and performing feedback detection on the last audio segment of the audio segment; a second feedback detection module for switching to the second feedback detection when feedback is detected: performing feedback detection on newly acquired audio segments; and a clearing module for clearing the saved audio segments and continuing to perform the first feedback detection on newly acquired audio segments when feedback is not detected by the first feedback detection, or when feedback is not detected consecutively for the second feedback detection and the number of times feedback is not detected reaches a preset threshold.

[0013] The present invention also provides an electronic device, comprising: a speaker; one or more processors for controlling the speaker; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements the whistling detection method described above.

[0014] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer processor, causes the computer to perform any of the above-mentioned howling detection methods.

[0015] The beneficial effects of this invention are as follows: The feedback detection method, system, audio device, and medium proposed in this invention continuously acquire and sequentially save audio segments of a preset duration. When the number of audio segments reaches a first quantity, a first feedback detection is performed, that is, only the last audio segment closest to the current time is detected. If feedback is present, the system switches to a second feedback detection, that is, continuously monitoring new audio segments to track the development of feedback. If feedback is absent for several consecutive segments, the buffer can be cleared and the system can resume the first feedback detection. By flexibly switching between the first and second feedback detection, a rapid response can be achieved when feedback occurs, and high-frequency calculations can be avoided when there is no feedback. Thus, a comprehensive improvement in high real-time performance and high robustness is achieved while ensuring low power consumption. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0017] In the attached diagram: Figure 1 This is a schematic flowchart of a whistling detection method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the operation of the dynamic frame length switching mechanism of the present invention; Figure 3 This is a structural block diagram of a whistling detection system provided in one embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an audio device provided in one embodiment of the present invention. Detailed Implementation

[0018] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0019] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. The drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0020] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.

[0021] Existing feedback detection methods primarily process microphone (MIC) data with fixed frame lengths, typically falling into two categories: long frame length detection schemes and short frame length detection schemes. Long frame length detection schemes utilize a longer microphone frame length (e.g., 8 milliseconds) to analyze the frequency domain energy characteristics (e.g., high-frequency single-tone energy) of the entire frame signal to determine the presence of feedback. Short frame length detection schemes employ a shorter microphone frame length (e.g., 2 milliseconds) to shorten the detection cycle, enabling feedback detection in a shorter time. To minimize detection latency, short frame length detection often requires feature extraction and decision-making operations to be completed within milliseconds to meet real-time requirements for rapid response.

[0022] However, the inventors discovered that both of the above schemes have drawbacks: For the long frame long detection scheme, since its processing time is close to the frame length, its detection latency can reach 8 milliseconds. For example, if a howling occurs 6 milliseconds after the end of the previous frame, and is detected again 2 milliseconds before the end of the next frame, the cumulative response latency is as high as 14 milliseconds, which will cause the howling duration to be too long, seriously affecting the user experience. For the short frame long detection scheme, although it can reduce the detection latency, while the temporal resolution of short frames is improved, the frequency domain resolution is reduced, and the resulting decrease in frequency resolution will reduce the detection accuracy. In addition, in order to compensate for the lack of detection accuracy, it is usually necessary to increase the amount of inter-frame overlap, which leads to a sharp increase in algorithm complexity and an increase in the system's main frequency requirements, resulting in excessive power consumption. It can be seen that the existing howling detection methods have an irreconcilable contradiction in terms of real-time performance, low power consumption, and high robustness.

[0023] To address the aforementioned issues, this invention provides a dynamically adjustable frame length feedback detection method. It continuously acquires and sequentially saves audio segments of a preset duration. When the number of audio segments reaches a first threshold, a first feedback detection is performed, detecting only the last audio segment closest to the current moment. If feedback is detected there, the method switches to a second feedback detection method, continuously monitoring new audio segments to track the feedback's development. If feedback is absent for several consecutive segments, the buffer is cleared, and the method reverts to the first feedback detection method. This flexible switching between the first and second feedback detection methods enables rapid response when feedback occurs and avoids high-frequency calculations when feedback is absent, thus achieving a comprehensive improvement in both real-time performance and robustness while ensuring low power consumption.

[0024] like Figure 1 As shown, the whistling detection method includes the following steps: S100: Continuously acquire and save audio segments of a preset duration.

[0025] The system acquires continuous time-domain audio signals transmitted from a microphone and divides these signals into multiple audio segments according to a preset duration (e.g., 2 milliseconds). Each audio segment is a series of discrete audio sampling points acquired within the preset duration, representing the smallest detection unit for howling detection in this invention. The segmented audio segments are written to memory via Direct Memory Access (DMA). An interrupt is triggered after the DMA data transfer is complete, allowing the processor to acquire the audio segment as soon as it arrives. The audio segments written via DMA are then sequentially written to a buffer according to their arrival order, forming a dynamically updated audio segment sequence for subsequent first and second howling detection.

[0026] S200. When the number of saved audio segments meets the preset first number, a first feedback detection is performed: the first number of audio segments are arranged in sequence to form an audio segment, and feedback detection is performed on the last audio segment of the audio segment.

[0027] The number of audio segments stored in the buffer is continuously counted. When the number of stored audio segments reaches a first number (e.g., 4), a first feedback detection is triggered. This first feedback detection is the aforementioned long frame length detection scheme. Specifically, the first number of audio segments in the buffer are arranged sequentially according to their acquisition order to form an audio segment. To reduce power consumption, the audio segment with the latest time position (i.e., the newest audio segment) is selected from the audio segment, and feedback detection is performed only on it. If feedback is detected, a second feedback detection is performed; otherwise, the audio segment is directly deleted from the buffer, and the first feedback detection is performed again on newly acquired audio segments.

[0028] It is understood that those skilled in the art can set the first number of values ​​based on the performance of the audio device and the adaptability of the detection requirements, and no limitation is made here. In the first feedback detection, this invention only judges the last audio segment of the audio band, taking into account the characteristic that feedback signals gradually increase over time; the closer the audio segment is to the current moment, the more accurately it reflects whether feedback has occurred. By detecting only the last audio segment, the computational load is greatly reduced while ensuring detection accuracy, thereby reducing system power consumption and achieving low-power operation of the audio device.

[0029] In an optional embodiment of the present invention, the step of detecting howling in an audio segment includes: filtering the audio segment; performing a Fourier transform on the filtered audio segment to obtain the amplitude of the audio segment at various frequencies; finding the maximum amplitude within a preset first frequency range; calculating the ratio of the maximum amplitude to the average amplitude within a preset second frequency range to which it belongs; wherein the first frequency range is greater than the second frequency range; determining that the ratio is greater than a preset howling judgment threshold: if so, determining that the audio segment has howling; otherwise, determining that the audio segment has no howling.

[0030] To suppress the interference of environmental noise on howling signals, audio clips can be filtered to highlight the mid-to-high frequency bands where howling is likely to occur. A Fourier transform is then performed on the filtered audio clip to obtain its amplitude at various frequency points. The frequency point with the largest amplitude is found within a preset first frequency range. Using this maximum amplitude frequency point as the center, the amplitudes of all frequency points within a second frequency range are extracted, and their averages are calculated. The second frequency range is a local sub-range within the first frequency range. The ratio of the maximum amplitude to the average value within the second frequency range is calculated; this ratio indicates whether the audio clip contains a sharp single-frequency component. If the ratio is greater than the howling decision threshold, the audio clip is determined to have howling; otherwise, it is determined not to have howling. This invention improves the accuracy and robustness of narrowband howling signal detection by comparing peak energy with the background energy in its neighborhood. Optionally, to reduce the computational complexity of frequency domain analysis and improve real-time monitoring efficiency, the Fourier transform is replaced with a fast Fourier transform. It should be further noted that, in addition to the aforementioned frequency domain analysis-based feedback detection method, other detection methods such as time-domain amplitude feature judgment and single-frequency feature extraction based on autocorrelation can also be used, as long as they can identify whether a feedback exists in an audio segment; no specific limitations are imposed.

[0031] S300. When feedback is detected, switch to the second feedback detection: perform feedback detection on the newly acquired audio segment until the number of consecutive times without feedback is reached a preset threshold, then clear the saved audio segment, and continue to perform the first feedback detection on the newly acquired audio segment.

[0032] When the first feedback detection detects feedback in the last audio segment of an audio segment, it indicates that feedback may have occurred, triggering the second feedback detection. New audio segments are continuously acquired and feedback detected in real-time according to a preset duration. Unlike the first feedback detection, which only checks the last audio segment of an audio segment, the second feedback detection checks each arriving audio segment individually and continuously counts the number of consecutive feedback-free occurrences. When the number of consecutive feedback-free occurrences reaches a preset threshold, the currently buffered audio segments are considered feedback-free, the buffer is cleared, and a new first feedback detection is performed.

[0033] Because the first feedback detection only processes the last audio segment, compared to the traditional method of detecting feedback frame by frame, the overall computational load is reduced to about 1 / 4 of the original. This allows the processor to run stably for extended periods at lower clock speeds, thereby reducing the overall power consumption of the audio device. Furthermore, since the first feedback detection does not require real-time calculation for every audio segment and does not need to trigger a complete feedback detection process every 2 milliseconds, it avoids consuming excessive computing resources, allowing audio tasks with high real-time requirements, such as music playback and voice capture, to proceed normally. Through the above methods, this invention not only reduces power consumption but also effectively improves the overall operational stability of the audio device.

[0034] In an optional embodiment of the present invention, step S300 includes the following process: performing feedback detection on the newly acquired audio segment; if no feedback occurs in the audio segment, the number of consecutive feedback not detected is accumulated; wherein, the number of consecutive feedback not detected has an initial preset value; if feedback occurs in the audio segment, the number of consecutive feedback not detected is cleared to zero; determining whether the number of consecutive feedback not detected reaches the threshold: if yes, it is determined that there is no feedback in each of the saved audio segments, all saved audio segments are cleared, and the first feedback detection is continued on the newly acquired audio segment; if no, feedback detection is continued on the newly acquired audio segment.

[0035] During the second feedback detection process, new audio segments are continuously acquired at preset intervals (e.g., 2 milliseconds). Feedback detection is performed on each newly acquired audio segment based on the aforementioned feedback detection method. The second feedback detection is the aforementioned short frame length detection scheme. If no feedback is detected in the new audio segment, the count of consecutive feedback not detected is incremented by one. This count is initialized to zero when the second feedback detection starts. Conversely, if feedback is detected in the new audio segment, it indicates that feedback is still ongoing. To prevent false positives, the count is reset to zero, and feedback detection continues for subsequent new audio segments. After each detection of a new audio segment, it is determined whether the current consecutive feedback not detected has reached a preset threshold. If the threshold is reached, it means that all audio segments stored in the buffer are free of feedback, or the feedback phenomenon has completely disappeared. At this point, all audio segments stored in the buffer can be cleared, and the process returns to the first feedback detection process, performing low-power detection only on the last audio segment of subsequent audio segments to automatically fall back from high real-time mode to low-power mode. Conversely, if the number of consecutive undetected howls does not reach the threshold, it indicates that there is still a risk of howls. In this case, it is necessary to continue collecting and detecting the next audio segment until the above-mentioned mode switching conditions are met. In this way, the second howl detection can continuously track the howl's changing trend during its duration and quickly switch back to low-power mode after the howl subsides.

[0036] In this invention, when feedback is not present most of the time, the audio device performs a first feedback detection with very low computational load, detecting only the last audio segment, which significantly reduces the clock speed and power consumption. When the first feedback detection detects a suspected feedback, it enters a second feedback detection phase to ensure that feedback can be quickly detected as soon as it occurs, improving detection speed and accuracy. Through this on-demand switching strategy, the audio device can maintain extremely high detection sensitivity without sacrificing low power consumption during normal operation, avoiding the increased energy consumption problem caused by long-term high clock speed operation.

[0037] In an optional embodiment of the present invention, before performing feedback detection on the newly acquired audio segment, the method further includes: determining whether a newly acquired audio segment exists; if it exists, performing feedback detection on the newly acquired audio segment, and after the detection is completed, continuing to determine whether a newly acquired audio segment exists; if it does not exist, performing feedback detection on the remaining audio segments of the audio segment, and after the detection is completed, continuing to determine whether a newly acquired audio segment exists.

[0038] Specifically, before performing feedback detection on newly acquired audio segments, it checks whether a new audio segment exists in the current buffer. If a new audio segment exists, feedback detection is prioritized for that segment, thus more accurately capturing the characteristic of feedback increasing sharply over time. After each audio segment is detected, it checks again whether a new audio segment exists, ensuring continuous detection as new audio segments arrive. If no new audio segments exist, feedback detection can be performed on undetected audio segments in the buffer using the spatial calculation interval, thus avoiding missing historical data that may contain feedback and ensuring the accuracy of the detection results.

[0039] In an optional embodiment of the present invention, the process of performing feedback detection on the remaining audio segments of the audio segment includes: determining whether there is an undetected audio segment sequence in the audio segment; if yes, then: taking the audio segment closest to the last audio segment as the target audio segment; and performing feedback detection on the target audio segment, and after the detection is completed, deleting the target audio segment from the undetected audio segment sequence and updating the undetected audio segment sequence; if no, then ending the feedback detection of the audio segment.

[0040] Specifically, the process determines whether an undetected audio segment sequence exists within the audio segment. This undetected audio segment sequence is formed by sequentially arranging the undetected audio segments within the audio segment. If such a sequence exists, the audio segment whose acquisition time is closest to the end of the audio segment is selected from this sequence and used as the target audio segment. Feedback detection is then performed using the aforementioned method. After detection, the target audio segment is deleted from the undetected audio segment sequence to update the sequence. If no undetected audio segment sequence exists (i.e., the sequence is empty), it indicates that feedback detection has been completed for all audio segments within the audio segment, and the detection process for the remaining segments of the audio segment ends. This method ensures that while prioritizing the processing of the latest audio segments, it also effectively supplements the detection of historical segments, thus ensuring the continuity and completeness of the detection results and avoiding the omission of earlier feedback phenomena due to only detecting the latest audio segments. Furthermore, since only undetected audio segments are detected once, and already detected audio segments are not repeatedly calculated, unnecessary computational overhead is effectively reduced, lowering the overall computational load and enabling low-power operation.

[0041] In an optional embodiment of the present invention, when performing feedback detection on a newly acquired audio segment, if the number of consecutive times feedback is not detected does not reach the threshold, feedback suppression is performed. Specifically, during feedback detection of a newly acquired audio segment, it is determined in real time whether feedback exists in the currently detected audio segment. If no feedback exists, the number of consecutive times feedback is not detected is incremented by one. However, if the number does not reach the threshold, it indicates that feedback still exists, and feedback suppression is immediately performed to prevent it from amplifying further. The feedback suppression methods include, but are not limited to, dynamically reducing gain or adjusting echo path parameters, etc., which will not be detailed here.

[0042] Because the second feedback detection can detect audio segments one by one, it can continuously track the development of feedback within a very short period of time after it occurs, avoiding missed detections or detection delays caused by excessively long detection intervals. Furthermore, the second feedback detection can trigger feedback suppression immediately after feedback is detected, thereby reducing the impact of feedback on users and improving the user experience.

[0043] S400: When no howling is detected, the saved audio segment is cleared, and the first howling detection is performed on the newly acquired audio segment.

[0044] If no feedback is detected in the last audio segment of an audio segment after step S200, it is assumed that there is no feedback in the audio segment stored in the buffer. At this time, all audio segments stored in the buffer will be cleared, the detection state will be reset, and the first feedback detection process will continue. That is, new audio segments will be continuously acquired according to a preset duration, and when the number of audio segments reaches a preset first number, feedback detection will only be performed on the last segment of that batch of audio segments.

[0045] like Figure 2 As shown, this illustrates the operation of the dynamic frame length switching mechanism of the present invention on the time axis. During normal operation, a first feedback detection method is used, processing the microphone signal in 8-millisecond frames as an audio segment. Feedback detection is performed only on the last 2 milliseconds of this audio segment, as indicated by ① in the figure. When a suspected feedback is detected in the last 2 milliseconds of an audio segment, the system immediately switches to a second feedback detection method, performing high-real-time feedback detection on the newly arrived audio segment with a granularity of 2 milliseconds, as shown by ② and ③ in the figure. Furthermore, while waiting for a new 2-millisecond audio segment to arrive, to maintain the continuity and integrity of the detection, unanalyzed historical audio segments within the aforementioned audio segment (as shown by ④ and ⑤ in the figure) are sequentially detected according to their temporal proximity to the current moment.

[0046] Therefore, the present invention can shorten the delay of detecting the suppression action to less than 2ms when the howling is actually triggered. Compared with the traditional long frame long solution, the present invention greatly shortens the response time (e.g., 8–14ms), effectively reduces the duration of howling, and improves the user's experience of using audio devices. In standard feedback scenarios (such as single-tone signals of 2kHz to 5kHz), this invention achieves a response time of less than 3 milliseconds from feedback detection to trigger suppression, comparable to the response speed of traditional fixed-short-frame-length schemes, thus realizing low-latency detection. Furthermore, in the first feedback detection, only the last segment of the audio band is processed, resulting in significantly lower average power consumption compared to fixed-long-frame-length and fixed-short-frame-length detection schemes, effectively reducing the energy consumption of audio equipment. Moreover, because this invention employs dynamic frame-length switching and multi-segment verification mechanisms, its false detection rate remains consistent with traditional fixed-frame-length schemes, ensuring both real-time performance and low power consumption while balancing detection accuracy and system stability.

[0047] like Figure 3 As shown, the feedback detection system includes: an audio segment acquisition module 310, a first feedback detection module 320, a second feedback detection module 330, and a clearing module 340. The audio segment acquisition module continuously acquires and saves audio segments of a preset duration. The first feedback detection module performs a first feedback detection when the number of saved audio segments meets a preset first quantity: arranging the first quantity of audio segments sequentially to form an audio segment, and performing feedback detection on the last audio segment of the audio segment. The second feedback detection module switches to second feedback detection when feedback is detected. The clearing module 340 clears the saved audio segments and continues to perform the first feedback detection on newly acquired audio segments when the first feedback detection does not detect feedback, or when the number of consecutive feedback failures during the second feedback detection reaches a preset threshold.

[0048] For specific limitations regarding the whistling detection system, please refer to the limitations on the whistling detection method above, which will not be repeated here. Each module in the aforementioned whistling detection system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware format or independent of it, or stored in the storage device of the computer device in software format, so that the processor can call the corresponding operations of each module.

[0049] It should be noted that, in order to highlight the innovative aspects of this invention, this embodiment does not include modules that are not closely related to solving the technical problems proposed by this invention, but this does not mean that there are no other modules in this embodiment.

[0050] like Figure 4As shown, the audio device 4 may include a speaker, a processor 42 for controlling the speaker, a storage device 41 and a bus, and may also include a computer program stored in the storage device 41 and executable on the processor 42, such as a howling detection program.

[0051] The storage device 41 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type storage device (e.g., SD or DX storage device), magnetic storage device, disk, optical disk, etc. In some embodiments, the storage device 41 can be an internal storage unit of the audio device 4, such as the portable hard drive of the audio device 4. In other embodiments, the storage device 41 can be an external storage device of the audio device 4, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., equipped on the audio device 4. Furthermore, the storage device 41 can include both internal storage units and external storage devices of the audio device 4. The storage device 41 can be used not only to store application software and various types of data installed on the audio device 4, such as feedback detection code, but also to temporarily store data that has been output or will be output.

[0052] In some embodiments, the processor 42 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 42 is the control unit of the audio device 4, connecting various components of the audio device 4 through various interfaces and lines. It executes programs or modules (such as feedback detection programs) stored in the storage device 41 by running or executing them, and by calling data stored in the storage device 41, to perform various functions of the audio device 4 and process data.

[0053] The processor 42 executes the operating system of the audio device 4 and various installed applications. The processor 42 executes the applications to implement the steps in the above-described howling detection method.

[0054] For example, a computer program may be divided into one or more modules, one or more of which are stored in storage device 41 and executed by processor 42 to complete this application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in audio device 4. For example, the computer program may be divided into an audio segment acquisition module 310, a first feedback detection module 320, a second feedback detection module 330, and a clearing module 340.

[0055] The integrated unit implemented as a software functional module described above can be stored in a computer-readable storage medium, which can be non-volatile or volatile. The software functional module stored in the storage medium includes several instructions to cause a computer device (which may be a personal computer, computer equipment, or network device, etc.) or processor to execute some functions of the howling detection method of the various embodiments of this application.

[0056] In summary, this invention achieves fast and reliable feedback detection under low power consumption conditions through a dynamic frame length adjustment mechanism for audio devices. Specifically, based on the characteristics of feedback signals exhibiting occasional and sudden enhancement, this invention dynamically switches between first feedback detection and second feedback detection. The first feedback detection uses a longer frame length to maintain low computational load; when a suspected feedback is detected, it immediately switches to the second feedback detection to improve the detection response speed. Furthermore, this invention introduces reverse detection logic under the first feedback detection, detecting only the last audio segment in the audio segment and verifying it sequentially according to temporal proximity to eliminate occasional noise and significantly reduce the overall computational load. Further, this invention also designs a main frequency adaptation mechanism, allowing the second feedback detection to meet real-time requirements by appropriately increasing the main frequency, while the first feedback detection reduces power consumption by decreasing the main frequency, thereby achieving on-demand resource allocation.

[0057] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A method for detecting howling, characterized in that, The method includes: Continuously acquire and save audio segments of preset duration; When the number of saved audio segments meets the preset first number, the first feedback detection is performed: the first number of audio segments are arranged in sequence to form an audio segment, and feedback detection is performed on the last audio segment of the audio segment; When feedback is detected, switch to the second feedback detection: perform feedback detection on the newly acquired audio segment until the number of consecutive times without feedback is reached a preset threshold, then clear the saved audio segment, and continue to perform the first feedback detection on the newly acquired audio segment; If no feedback is detected, the saved audio segment is cleared, and the first feedback detection is performed on the newly acquired audio segment.

2. The whistling detection method according to claim 1, characterized in that, The steps for detecting feedback in audio clips include: Filter the audio clip; Perform a Fourier transform on the filtered audio segment to obtain the amplitude of the audio segment at each frequency. Find the maximum amplitude value within the preset first frequency range; Calculate the ratio of the maximum amplitude value to the average amplitude value within a preset second frequency range to which it belongs; wherein, the first frequency range is greater than the second frequency range; Determine that the ratio is greater than the preset howling decision threshold: If so, then the audio segment is determined to have feedback. Otherwise, it is determined that no feedback occurred in the audio segment.

3. The whistling detection method according to claim 2, characterized in that, The Fourier transform is a Fast Fourier Transform.

4. The whistling detection method according to claim 1, characterized in that, The step of performing feedback detection on newly acquired audio segments until the number of consecutive times no feedback is detected reaches a preset threshold, then clearing the saved audio segments, and continuing to perform the first feedback detection on newly acquired audio segments includes: Perform feedback detection on the newly acquired audio clips: If no feedback occurs in the audio segment, the number of consecutive times no feedback is detected will be accumulated; the number of consecutive times no feedback is detected has an initial preset value. If a feedback occurs in an audio clip, the number of consecutive feedbacks not detected will be reset to zero. Determine whether the number of consecutive times no whistling has been detected has reached the threshold: If so, it is determined that there is no feedback in the saved audio segments, all saved audio segments are cleared, and the first feedback detection is continued for the newly acquired audio segments; If not, continue to perform feedback detection on the newly acquired audio segments.

5. The whistling detection method according to claim 4, characterized in that, Before performing feedback detection on the newly acquired audio segment, the method further includes: Determine if a newly acquired audio segment exists: If it exists, then the newly acquired audio segment is subjected to feedback detection, and after the detection is completed, it is continued to determine whether the newly acquired audio segment exists; If it does not exist, then the remaining audio segments of the audio segment are subjected to howling detection, and after the detection is completed, it is further determined whether there is a newly acquired audio segment.

6. The whistling detection method according to claim 5, characterized in that, The process of detecting howling in the remaining audio segments of the audio segment includes: Determine whether there is an undetected audio segment sequence in the audio segment: If so, then: The audio segment closest to the last audio segment is taken as the target audio segment; The target audio segment is subjected to feedback detection, and after the detection is completed, the target audio segment is deleted from the sequence of undetected audio segments, and the sequence of undetected audio segments is updated. If not, then the howling detection of the audio segment ends.

7. The whistling detection method according to claim 1, characterized in that, The method further includes: when performing feedback detection on a newly acquired audio segment, if the number of consecutive times feedback is not detected does not reach the threshold, feedback suppression is performed.

8. A whistling detection system, characterized in that, The system includes: The audio segment acquisition module is used to continuously acquire and save audio segments of a preset duration; The first feedback detection module is used to perform a first feedback detection when the number of saved audio segments meets a preset first number: the first number of audio segments are arranged in sequence to form an audio segment, and feedback detection is performed on the last audio segment of the audio segment; The second feedback detection module is used to switch to the second feedback detection when feedback is detected: to perform feedback detection on the newly acquired audio segment; The clearing module is used to clear the saved audio segment when the first feedback detection fails to detect feedback, or when the second feedback detection is performed and the number of consecutive feedback failures reaches a preset threshold, and then continue to perform the first feedback detection on the newly acquired audio segment.

9. An audio device, characterized in that, The audio device includes: speaker; One or more processors that control the speaker; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the howling detection method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by the computer's processor, causes the computer to perform the howling detection method according to any one of claims 1 to 7.