A method for improving bark sound recognition rate
By optimizing the dog bark recognition process, including data collection and device proximity, elimination of prolonged silence, enhanced generalization, caching strategies, and sliding window mechanisms, the problems of low dog bark recognition rate and high false alarm rate have been solved, achieving higher recognition accuracy and applicability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INGENIC SEMICON CO LTD
- Filing Date
- 2022-05-24
- Publication Date
- 2026-05-08
AI Technical Summary
While existing audio recognition algorithms can increase the number of training samples, they struggle to improve the quality of the training audio and the consistency of device recognition, resulting in low dog bark recognition rates and high false alarm rates, especially in environments with varying background noise levels.
By collecting dog barking audio, increasing the closeness with the recognition device, eliminating long periods of silence, enhancing audio generalization, adding a real-time audio stream caching strategy, filtering near-silent segments based on short-term energy, setting a sliding window mechanism, and optimizing the dog barking recognition process.
It improves the recognition rate of dog barking and reduces the false detection rate, enhancing the model's relevance and applicability, making it suitable for dog barking recognition in different environments.
Smart Images

Figure CN117153167B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent audio processing technology, and in particular to a method for improving the recognition rate of dog barks. Background Technology
[0002] Hearing and vision are two crucial sources of information for humans; the absence of either would prevent accurate judgment of changes in the external environment. This is true for blind people, those with poor or obstructed vision, and those seeking to understand changes in different geographical locations. For these reasons, people have sought to utilize existing computer technology for image and speech recognition to assist in acquiring information that cannot be directly obtained, and to replace some manual labor, thereby improving work efficiency. Currently, visual recognition (image recognition) is increasingly mature, but speech recognition has developed slowly. Image recognition often loses its original function due to the straight-line propagation characteristic of light, while speech, due to its ability to travel around obstacles, plays a vital role, replacing image recognition to achieve certain purposes.
[0003] The ability to identify a specific target audio class from a noisy environment and extract useful information from that class has garnered increasing attention from researchers. This method, which aims to improve dog bark recognition, originates from a pet dog feeder. It identifies the presence or absence of barking sounds and intelligently feeds the dog accordingly. This method can also be extended to the recognition and detection of any audio.
[0004] The existing audio recognition algorithm process generally consists of: audio preprocessing; feature extraction; training to generate an audio template library; recognition; and adding training samples for false or missed detections in the later stage, thereby iterating to develop an audio recognition model that reduces false detections and improves positive detections. Of course, some researchers build complex networks to learn target audio classes, but the detection time corresponding to complex network structures is often lengthened, that is, the sensitivity of audio recognition is lagging.
[0005] When increasing training samples, existing audio recognition methods add audio samples in batches to address missed and false detections. However, the actual recognition results for the same dog bark vary greatly depending on the playback source and recording source of the device. Therefore, how to improve the quality of training audio while increasing the quantity of training audio, aligning it with the device, training the best model, and aligning real-time audio on both the code and device recognition sides are problems that researchers urgently need to solve.
[0006] Researchers have devoted considerable effort to figuring out how to improve the recognition rate of target audio with no background noise and with different types of background noise. Summary of the Invention
[0007] In order to solve the problems in the prior art, the purpose of this application is to provide a method to solve the problem of low dog bark recognition rate and high false alarm rate, namely, a set of methods and strategies to improve the recognition rate in target audio detection.
[0008] The method proposed in this application to improve the low dog barking recognition rate mainly focuses on improving the quality of dog barking audio, making the learned model more targeted and applicable to the target environment. Furthermore, the inclusion of judgment strategies and optimization mechanisms in the early stages of dog barking audio recognition not only improves positive detection but also greatly helps reduce false positives. This method also demonstrates high practicality and versatility in other types of audio recognition.
[0009] Specifically, the present invention provides a method for improving the recognition rate of dog barks, the method comprising the following steps:
[0010] S1. Collect dog barking audio to increase its connection with the recognition device:
[0011] Audio data was collected, with dog barking as positive samples and background noise as negative samples.
[0012] The method of transcribing positive dog bark audio samples on the device side is used to simultaneously use the original dog bark audio and the transcribed dog bark audio as training samples, thereby enhancing the strong correlation between audio and recognition detection equipment;
[0013] S2. Long-term silence cancellation:
[0014] In the barking audio samples, eliminate audio streams where the proportion of silence is greater than the proportion of barking or where the total duration of barking is much less than the duration of silence. That is, in each audio stream entering the model for detection, the ratio of silence duration to barking duration is ≤1:4, thereby preventing audio streams with a large proportion of silence from being used as positive samples for model training.
[0015] S3. Enhance audio generalization:
[0016] Add random scaling of audio stream volume, time shift, pitch and speed to the audio preprocessing end. That is, set random seed variables in advance before the audio enters the network training to perform random preprocessing on some audio, thereby simulating the barking of dogs in real life scenarios to a greater extent, so that it can be unaffected by the distance between the device recognizing the barking of dogs and the dog barking in audio recognition.
[0017] S4. Add a caching strategy for live audio streams:
[0018] A caching strategy for the audio to be detected is added. From an algorithmic perspective, the caching strategy is as follows: allocate a memory space as a cache space for the real-time audio stream to be detected. If the duration of the audio entering the recognition model is X, and the device takes Y to recognize the audio, then when there are no other AI applications, the size of the cache space must be able to store an audio stream of up to n*(X+Y) duration, where n is an integer, taking the values 1, 2, 3, ..., so that the real-time audio stream is cached in this space, which facilitates its later use in conjunction with the sliding window mechanism to ensure the integrity of the real-time audio stream entering the model for detection.
[0019] S5. Approximate silent audio stream based on short-time energy filtering:
[0020] To address false positives in low-energy audio streams other than dog barks, a threshold method is used to filter low-energy audio streams during identification. If the short-time energy of a certain portion of the audio approaches zero (in this paper, the short-time energy is set to be below 10), a threshold is applied. -2 When this part of the audio is approximately silent, it can be considered as an almost silent segment, thereby reducing the misidentification of dog barking triggered by the audio stream of the almost silent segment in real life.
[0021] S6. Configure the sliding window mechanism for the audio stream:
[0022] In step S4, a sliding window mechanism is added to the real-time audio stream to be detected and identified, which saves the integrity of the real-time audio stream. This allows the audio streams of barking dogs in two adjacent audio segments to be completely detected when entering the audio segment detection and identification process. That is, the audio streams that are missed between two adjacent audio segments when no sliding window strategy and the mechanism are added are detected.
[0023] In step S1, in order to learn different dog barks, it is necessary to collect data from all directions. During the collection, attention should be paid to removing sample audio with background noise volume greater than that of the dog bark. Alternatively, for audio with high signal-to-noise ratio, the short-time energy or short-time average amplitude of the input signal can be used to separate the dog bark from the background noise.
[0024] In step S2, the reason for preventing audio with a high proportion of silence from being used as positive samples is that, after analyzing various dog barking audio, it was found that some dog barking sounds have different intervals between two consecutive barking sounds, and there is silence between these intervals. If this interval happens to be used as a positive sample for training, it will result in false recognition of silence. Therefore, long-term silence elimination is necessary.
[0025] In step S3, the differences in dog barking are not only reflected in the differences in species, but also in the differences in environment and volume. Dog barking of different species, ages and environments can be collected manually.
[0026] In step S4, it is also necessary to understand whether there are other AI applications on the recognition device. If there are other AI applications, it is necessary to consider the time consumption of dog barking recognition caused by the opening of other AI applications. Since the time consumed by dog barking audio in the data preprocessing stage and detection and recognition stage will be increased due to the influence of other audio detection when multiple AIs work together, the setting of the caching mechanism is closely related to the AI application. If the time consumption increases to Z, the cache space in the set caching strategy must satisfy n*(X+Y+Z).
[0027] In step S5, the difference between speech and background noise can be reflected in the audio energy. The energy of the speech segment is greater than that of the background noise. The energy of the speech segment is the sum of the energy of the noise segment and the energy of the speech sound wave.
[0028] In step S6, the sliding window mechanism is used to add continuous and complete dog barking sounds to the detection and recognition, thereby increasing the detection and recognition effect of dog barking sounds by increasing the number of detections.
[0029] In step S1, the method of transcribing positive sample audio of dog barking on the device side is to write a device transcription algorithm, control the noise reduction parameters of the real-time audio stream and the volume adjustment parameters in the algorithm script, run the transcription script on the transcription device side, and the audio playback source can be any mobile phone or computer, so that the original sound is converted into transcribed audio by the transcription algorithm. The purpose is to make the dog barking audio stream entering the recognition device relatively clear, which is conducive to the recognition of dog barking.
[0030] Therefore, the advantages of this application are: the solution uses a simple method, and its greatest advantage is to improve the quality of dog bark audio, making the learned model easier and more targeted to recognize, and improving the dog bark recognition rate through pre-audio preprocessing, conditional judgment before recognition, and recognition mechanism during the recognition process. Attached Figure Description
[0031] The accompanying drawings, which are provided to further illustrate the invention and form part of this application, are not intended to limit the scope of the invention.
[0032] Figure 1 This is a block diagram illustrating the principle of dog bark recognition.
[0033] Figure 2 This is an audio diagram illustrating traditional recognition methods.
[0034] Figure 3 This is an audio schematic diagram of the sliding mechanism recognition method in the present invention.
[0035] Figure 4 This is a flowchart illustrating the method of the present invention. Detailed Implementation
[0036] To better understand the technical content and advantages of the present invention, the present invention will now be described in further detail with reference to the accompanying drawings.
[0037] The present invention relates to a method for improving the recognition rate of dog barks, such as... Figure 1 As shown in the block diagram, after the voice signal is input, the main processes involved are audio preprocessing, network training and learning, and preprocessing for dog bark detection and recognition, including the six steps proposed in this paper. Among these, enhancing the close relationship between the dog bark audio and the recognition and detection device, eliminating long silences in the dog bark audio, and enhancing the generalization ability of the audio all belong to the data preprocessing stage in the audio recognition process. On the other hand, adding a real-time audio stream caching strategy, using short-time energy to filter low-energy audio, and setting a sliding window mechanism for the audio stream all belong to the stage before the audio stream enters the device for recognition and detection. Of course, between these two stages, a deep learning network is needed to first learn the audio features of dog barks to generate a dog bark recognition model. Only on this basis can the method proposed in this paper better improve its dog bark recognition rate.
[0038] Specifically, this method further includes the following steps:
[0039] Step S1. Collect dog barking audio to increase the connection with the recognition device.
[0040] Within the canine family, there are many breeds, such as Huskies, Poodles, Golden Retrievers, and Dobermans, each with its own unique barking sounds. Furthermore, the barking sounds produced vary depending on the environment, age, and physical condition (such as hunger or injury). To better learn these different barking sounds, comprehensive data collection is necessary. During collection, it's crucial to remove audio samples where the background noise volume is greater than the barking sound. Alternatively, for audio samples with high signal-to-noise ratios, the barking sound and background noise can be separated using the short-time energy or short-time average amplitude of the input signal. The barking sound is considered a positive sample, and the background noise a negative sample. This not only facilitates identification but also allows for the later fusion of barking sounds and background noise in different proportions, increasing sample diversity.
[0041] Due to differences in parameter settings when acquiring real-time audio streams, there are significant discrepancies between the original dog barking sounds and the barking sounds recorded by the device. Generally, most original dog barking sounds can be recognized, but the barking sounds obtained by the device may be missed. Therefore, this paper proposes a method for transcribing positive sample dog barking audio on the device side. Both the original and transcribed dog barking audio are used as training samples to enhance the strong correlation between the audio and the recognition detection device, learning the close relationship with the audio recognized by the device, which can greatly improve the problem of missed dog barking recognition. The method involves writing a device transcription algorithm, controlling the noise reduction parameters and volume adjustment parameters of the real-time audio stream within the algorithm script, and running the transcription script on the transcription device. The audio source can be any mobile phone or computer, thus generating transcribed audio from the original sound through the transcription algorithm. The aim is to make the dog barking audio stream entering the recognition device relatively clear, thereby facilitating the recognition of dog barking sounds.
[0042] Step S2. Eliminate prolonged silence:
[0043] Silence removal in dog barking audio: Analysis of various dog barking audio samples revealed that the intervals (mostly silence) between consecutive barks in some barks differed in duration. If these intervals were used as positive samples in training, they would lead to false identification of silence. Therefore, this paper proposes to eliminate audio streams where the proportion of silence is greater than the proportion of barking, or audio streams where the total duration of barking is much shorter than the duration of silence. Specifically, the ratio of silence duration to barking duration should be ≤1:4 in each audio stream entering the model for detection. This prevents audio streams with a high proportion of silence from being used as positive samples in model training, thereby reducing false identification of dog barking from the data sample level.
[0044] Step S3. Increase the generalization ability of audio.
[0045] The differences in dog barks are not only reflected in species, but also in environmental and volume variations. While barks from different species, ages, and environments can be collected manually, how can the distance between the device recognizing the bark and the dog's bark be better generalized to ensure it is unaffected by distance in audio recognition? Therefore, random scaling of audio stream volume, time shift, pitch, and velocity is added at the audio preprocessing stage to better simulate dog barks in real-life scenarios. This random scaling of parameters involves pre-setting random seed variables before the audio enters the network for training, allowing for random preprocessing of a portion of the audio.
[0046] Step S4. Add a caching strategy for the real-time audio stream.
[0047] Under normal circumstances, detection takes a certain amount of time. However, audio is real-time. When each frame enters the detection and recognition process normally, some audio streams are lost during the detection and recognition period and cannot be recognized. This reduces the recognition rate of dog barking audio to some extent. Therefore, adding a caching mechanism for the audio to be detected can better ensure the integrity of the audio stream.
[0048] From an algorithmic perspective, the caching mechanism involves allocating a memory space as a cache for the real-time audio stream to be detected. If the duration of the audio stream entering the recognition model is X, and the device's recognition time for that audio stream is Y, then when no other AI applications are used, the cache space size must be large enough to store an audio stream of up to n*(X+Y) durations (where n is an integer, which can be 1, 2, 3, ...). Caching the real-time audio stream in this space facilitates its later integration with the sliding window mechanism to ensure the integrity of the real-time audio stream entering the model for detection.
[0049] In addition, it is also necessary to understand whether there are other AI applications on the recognition device. Since the time spent on dog barking audio in the data preprocessing and detection and recognition stages will be increased when multiple AIs work together, the setting of the caching mechanism is closely related to the AI application.
[0050] Step S5. Approximately silent segment audio stream based on short-time energy filtering
[0051] In the process of dog barking recognition, it was found that subtle, almost silent sounds caused by everyday actions (such as the soft sound of turning pages, the clatter of a pen on the ground, or a child clapping in the distance), which are very faint to human hearing, can still be misidentified as dog barking. Statistical analysis of numerous dog barking audio streams revealed that 80% of dog barks in normal daily life have a certain energy value within a certain duration (the duration of each audio stream detected by the network model). Therefore, to eliminate misidentification due to these subtle sounds, a low-energy (nearly silent) audio filter can be used, where the short-term energy is below a set threshold, thereby reducing the misidentification rate of this audio. If the short-term energy of a certain audio segment is below 10... -2 This part of the audio can be considered a silent segment or a near-silent segment, which can reduce the misidentification of dog barking triggered by audio streams of near-silent segments in real life.
[0052] Step S6. Set up the sliding window mechanism for the audio stream.
[0053] Throughout the entire live-playing audio stream, there are continuous dog barking audio tracks, such as... Figure 2 As shown, this graph is a time-domain plot of dog barking, with the horizontal axis representing time and the vertical axis representing energy. In most cases, due to the initial detection and recognition of the audio (… Figure 2The audio stream within the leftmost frame and the second recognition detection ( Figure 2 The audio stream within the middle frame will be cut and separated (e.g.) Figure 2 The audio stream of barking dogs within the bold black box consists of the audio streams at the leftmost first detection and the middle second detection, respectively. This limits the proportion of barking dogs in the audio streams detected in both detections, resulting in a less effective detection and recognition compared to detecting and recognizing a continuous barking dog sound as a whole. Therefore, this paper proposes adding a sliding window mechanism to the real-time audio stream to be detected and recognized under step S4 (the sliding process is as follows). Figure 3 As shown), then in Figure 3 During the second input audio segment detection and recognition Figure 2 The audio stream within the bold black box can then be completely included in the detection. The sliding window mechanism proposed in this step aims to add as many continuous and complete dog barks as possible to the detection and recognition, thereby improving the detection and recognition effect of dog barks by increasing the detection frequency.
[0054] In summary, the method of this application is summarized as follows: Figure 4 As shown,
[0055] S1. Collect dog barking audio to increase the connection with the recognition device;
[0056] S2. Long-term silence elimination;
[0057] S3. Enhance audio generalization;
[0058] S4. Add a caching strategy for real-time audio streams;
[0059] S5. Approximate silent segment audio stream based on short-time energy filtering;
[0060] S6. Configure the sliding window mechanism for the audio stream.
[0061] The key point and protection of this application is that it combines data preprocessing and strategy mechanism judgment in the recognition of dog barking audio. It cleverly analyzes the uniform characteristics that affect the recognition of dog barking audio, and further improves the recognition rate and false detection rate of dog barking audio without affecting the original detection target recall and precision.
[0062] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for improving the recognition rate of dog barks, characterized in that, The method includes the following steps: S1. Collect dog barking audio to increase its connection with the recognition device: Audio data was collected, with dog barking as positive samples and background noise as negative samples. The method of transcribing positive dog bark audio samples on the device side is used to simultaneously use the original dog bark audio and the transcribed dog bark audio as training samples, thereby enhancing the strong correlation between audio and recognition detection equipment; S2. Long-term silence cancellation: In the barking audio samples, eliminate audio streams where the proportion of silence is greater than the proportion of barking or where the total duration of barking is much less than the duration of silence. That is, in each audio stream entering the model for detection, the ratio of silence duration to barking duration is ≤1:4, thereby preventing audio streams with a large proportion of silence from being used as positive samples for model training. S3. Enhance audio generalization: Add random scaling of audio stream volume, time shift, pitch and speed to the audio preprocessing end. That is, set random seed variables in advance before the audio enters the network training to perform random preprocessing on some audio, thereby simulating the barking of dogs in real life scenarios to a greater extent, so that it can be unaffected by the distance between the device recognizing the barking of dogs and the dog barking in audio recognition. S4. Add a caching strategy for live audio streams: A caching strategy for the audio to be detected is added. From an algorithmic perspective, the caching strategy is as follows: allocate a memory space as a cache space for the real-time audio stream to be detected. If the duration of the audio entering the recognition model is X, and the device takes Y to recognize the audio, then when there are no other AI applications, the size of the cache space must be able to store an audio stream of up to n*(X+Y) duration, where n is an integer, taking the values 1, 2, 3, ... This allows the real-time audio stream to be cached in this space, which facilitates its later use in conjunction with the sliding window mechanism to ensure the integrity of the real-time audio stream entering the model for detection. S5. Approximate silent audio stream based on short-time energy filtering: To address false detections of low-energy audio streams that are not barking, a method is used to set a threshold for short-time energy to filter low-energy audio streams during identification. If the short-time energy of a certain part of the audio is close to zero, this part of the audio can be considered as an approximately silent segment, thereby reducing the false detection of barking triggered by such approximately silent audio streams in real life. S6. Configure the sliding window mechanism for the audio stream: In step S4, a sliding window mechanism is added to the real-time audio stream to be detected and identified, which saves the integrity of the real-time audio stream. This allows the audio streams of barking dogs in two adjacent audio segments to be completely detected when entering the audio segment detection and identification process. That is, the audio streams that are missed between two adjacent audio segments when no sliding window strategy and the mechanism are added are detected.
2. The method for improving the recognition rate of dog barks according to claim 1, characterized in that, In step S1, in order to learn different dog barks, it is necessary to collect data from all directions. During the collection, attention should be paid to removing sample audio with background noise volume greater than that of the dog bark. Alternatively, for audio with high signal-to-noise ratio, the short-time energy or short-time average amplitude of the input signal can be used to separate the dog bark from the background noise.
3. The method for improving the recognition rate of dog barks according to claim 1, characterized in that, In step S2, the reason for preventing audio with a high proportion of silence from being used as positive samples is that, after analyzing various dog barking audio, it was found that some dog barking sounds have different intervals between two consecutive barking sounds, and there is silence between these intervals. If this interval happens to be used as a positive sample for training, it will result in false recognition of silence. Therefore, long-term silence elimination is necessary.
4. The method for improving the recognition rate of dog barks according to claim 1, characterized in that, In step S3, the differences in dog barking are not only reflected in the differences in species, but also in the differences in environment and volume. Dog barking of different species, ages and environments can be collected manually.
5. The method for improving the recognition rate of dog barks according to claim 1, characterized in that, In step S4, it is also necessary to understand whether there are other AI applications on the recognition device. If there are other AI applications, it is necessary to consider the time consumption of dog barking recognition caused by the opening of other AI applications. Since the time consumed by dog barking audio in the data preprocessing stage and detection and recognition stage will be increased due to the influence of other audio detection when multiple AIs work together, the setting of the caching mechanism is closely related to the AI application. If the time consumption increases to Z, the cache space in the set caching strategy must satisfy n*(X+Y+Z).
6. The method for improving the recognition rate of dog barks according to claim 1, characterized in that, In step S5, the threshold is set to a short-term energy level below 10. -2 .
7. The method for improving the recognition rate of dog barks according to claim 1, characterized in that, In step S5, the difference between speech and background noise can be reflected in the audio energy. The energy of the speech segment is greater than that of the background noise. The energy of the speech segment is the sum of the energy of the noise segment and the energy of the speech sound wave.
8. The method for improving the recognition rate of dog barks according to claim 1, characterized in that, In step S6, the sliding window mechanism is used to add continuous and complete dog barking sounds to the detection and recognition, thereby increasing the detection and recognition effect of dog barking sounds by increasing the number of detections.
9. The method for improving the recognition rate of dog barks according to claim 1, characterized in that, In step S1, the method of transcribing positive sample audio of dog barking on the device side is to write a device transcription algorithm, control the noise reduction parameters of the real-time audio stream and the volume adjustment parameters in the algorithm script, run the transcription script on the transcription device side, and the audio playback source can be any mobile phone or computer, so that the original sound is converted into transcribed audio by the transcription algorithm. The purpose is to make the dog barking audio stream entering the recognition device relatively clear, which is conducive to the recognition of dog barking.
Citation Information
Patent Citations
Supervised machine learning-based voice end point detection method and device
CN107799126A
Method and apparatus for voice recognition, electronic device, and computer readable storage medium
CN109065036A