Audio data enhancement method and device based on pickup environment factor acquisition and medium
In the audio data enhancement method, pickups and speakers are used to mix sound pickup environmental factors in the real environment to form an enhanced sample training set, which solves the problem of insufficient attention to environmental factors in the existing technology and improves the accuracy of the sound event detection model. and adaptability.
Patent Information
- Application Number
- CN202411005494.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-25
AI Technical Summary
Existing audio data enhancement methods suffer performance degradation in real environments and lack sufficient attention to pickup environment factors, resulting in poor adaptability and insufficient improvement in model performance.
By obtaining the original audio data sample training set, batch verification and label extraction, scheduling pickups and speakers to mix pickup environmental factors in the real environment, obtaining the entire recording data, segmenting and labeling, forming an enhanced sample training set, retaining Original label, accounting for ambient background noise and pickup interference.
It effectively improves the accuracy of the sound event detection model in real environments, reduces performance degradation, and enhances the introduction of environmental information.
Smart Images

Figure CN118737172A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an audio data enhancement method, device and medium based on sound pickup environment factors, belonging to the technical field of digital media. Background Art
[0002] Sound event detection is the task of identifying sound events that occur in given audio data and enabling various AI-based systems to distinguish sounds and understand the acoustic environment. Sound event detection is widely used in real-world scenarios such as smart terminals, smart security, and smart homes, and has become an active research topic in the field of acoustic signal processing.
[0003] State-of-the-art audio classification algorithms use several data augmentation methods. These data augmentation methods do not generate additional training data, but directly change the input features. Sample mixing (Mixup) superimposes two audio samples in a certain ratio to produce a mixed sample. Spectrogram masking refers to masking a continuous range of frames or frequency bands with a specified value. Band enhancement refers to selecting some frequency bands according to a certain strategy and gaining or reducing the signals in these frequency bands.
[0004] However, in real environments, the differences in various sound pickup environmental factors may lead to a decline in the performance of the classification model. Traditional audio data enhancement technology focuses on the transformation of audio signals or features, and lacks attention to target environmental factors. In addition, data enhancement methods that focus on target environmental factors often do not add sufficient environmental factors due to efficiency or cost issues, and the effect is not obvious. Therefore, existing methods are not well adapted to real application environments.
[0005] The original method combines clean audio samples with background noise samples of the real environment into mixed samples in a certain ratio, and then makes the mixed samples the same as the original labels. However, the simple background noise mixing method only focuses on the impact of background noise. In fact, in the real environment, due to the variability of the sound source distance and the interference inside the pickup device, the sound collected by the pickup device is not always clear, and there is a difference with the distribution of the clean training set. Secondly, this simple method does not mix the background noise sufficiently, which makes these noise signals approximate random disturbances, and the improvement of the final model performance is not significant enough. Summary of the invention
[0006] The technical problem to be solved by the present invention is to overcome the defects of the prior art and provide an audio data enhancement method, device and medium based on the collection of sound pickup environment factors.
[0007] In order to solve the above technical problems, the present invention is implemented by adopting the following technical solutions.
[0008] On the one hand, the present invention discloses a method for enhancing audio data based on sound pickup environment factors, comprising: Obtain a sample training set of original audio data to be enhanced; The sample training set is sequentially batched, verified, label extracted, and merged to obtain several batches of whole audio data; The microphone and the speaker are scheduled to mix the sound pickup environment factors of the entire audio data of each sample batch in the real environment to obtain the entire recording data of the current sample batch; The entire recording data is sequentially segmented and labeled according to the batches and the corresponding data extracted by the labels to obtain an enhanced sample training set of the current sample batch; Obtain the enhanced sample training set of each sample batch, and concatenate them to obtain the final enhanced sample training set of the original audio data.
[0009] Furthermore, the batching includes: Preset the number of samples batchsize for each batch of samples to be processed, read the data index idx, and divide the samples with data index [idx, idx + batchsize - 1] into one batch; if the current batch is the first batch, the data index idx is the initial index of the sample in the sample training set; if the current batch is not the first batch, the data index idx is the next data index after the last data index of the previous batch.
[0010] Furthermore, the verification includes: Check whether each sample in the current batch is of the preset time length. If not, discard the samples that are not of the preset time length and record them in the log, and recursively select the next sample that meets the requirements to add to the batch.
[0011] Furthermore, the tag extraction includes: The labels of the current batch of samples are obtained from the label file of the sample training set of the original audio data.
[0012] Furthermore, the merging includes: Concatenate all samples of the current batch into a complete audio data in the order of data index.
[0013] Furthermore, the scheduling of the microphone and the speaker to mix the sound pickup environment factors for the entire audio data of each sample batch in the real environment to obtain the entire recording data of the current sample batch, including: The speaker is called to play the entire audio data of the current sample batch, and the pickup is called to record the audio data played by the speaker; Get the recording time of the pickup when the speaker starts playing the entire audio data of the current sample batch - t1mic , and the recording time t2 of the microphone when the speaker finishes playing the entire audio data of the current sample batch mic ; Get the pickup record [t1 mic , t2 mic ] The audio playback data within the range is the entire recording data of the current sample batch.
[0014] Furthermore, the segmentation includes: Determine the start time of the first sample of the entire recording data of the current sample batch, and split it according to the preset time length to split it into batchsize new samples.
[0015] Furthermore, the marking includes: Using the labels of the current batch of samples extracted during the label extraction process, each sample in this batch is sequentially labeled to form a final enhanced sample-label pair, and the enhanced sample training set of the current sample batch is obtained based on the final enhanced sample-label pair.
[0016] In a second aspect, the present invention discloses an audio data enhancement device based on sound pickup environment factors, comprising: An acquisition module, used for acquiring a sample training set of original audio data to be enhanced; A preprocessing module is used to sequentially perform batching, verification, label extraction, and merging operations on the sample training set to obtain several batches of whole audio data; The acquisition module is used to schedule the microphone and the speaker to mix the sound pickup environment factors of the entire audio data of each sample batch in the real environment to obtain the entire recording data of the current sample batch; The data post-processing module is used to segment and label the entire recording data in turn according to the corresponding data extracted by the batches and the labels to obtain an enhanced sample training set for the current sample batch; obtain the enhanced sample training set for each sample batch, and splice them to obtain the final enhanced sample training set of the original audio data.
[0017] The third invention, the present invention discloses a computer-readable storage medium storing one or more programs, characterized in that the one or more programs include instructions, and when the instructions are executed by a computing device, the computing device executes the method.
[0018] The beneficial effects achieved by the present invention are: The method proposed in the present invention uses a collection method to add the real environment sound pickup environmental factors to the original training data and retains the original labels. This method also takes into account environmental factors such as environmental background noise, the distance between the microphone and the sound source, and the interference generated inside the microphone. It can more effectively introduce environmental information, thereby improving the accuracy of the sound event detection model in the real environment and reducing performance degradation. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a schematic diagram of an audio data enhancement method based on the collection of sound pickup environment factors; Figure 2 It is a data preprocessing flow chart; Figure 3 It is a flow chart of collecting environmental factors of sound pickup; Figure 4 It is a schematic diagram of time synchronization; Figure 5 It is a data post-processing flow chart. DETAILED DESCRIPTION
[0020] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0021] Embodiment 1: This embodiment introduces a method for enhancing audio data based on sound pickup environment factors, including: Obtain a sample training set of original audio data to be enhanced; The sample training set is sequentially batched, verified, label extracted, and merged to obtain several batches of whole audio data; The microphone and the speaker are scheduled to mix the sound pickup environment factors of the entire audio data of each sample batch in the real environment to obtain the entire recording data of the current sample batch; The entire recording data is sequentially segmented and labeled according to the batches and the corresponding data extracted by the labels to obtain an enhanced sample training set of the current sample batch; Obtain the enhanced sample training set of each sample batch, and concatenate them to obtain the final enhanced sample training set of the original audio data.
[0022] The batches include: Preset the number of samples batchsize for each batch of samples to be processed, read the data index idx, and divide the samples with data index [idx, idx + batchsize - 1] into one batch; if the current batch is the first batch, the data index idx is the initial index of the sample in the sample training set; if the current batch is not the first batch, the data index idx is the next data index after the last data index of the previous batch.
[0023] The verification includes: Check whether each sample in the current batch is of the preset time length. If not, discard the samples that are not of the preset time length and record them in the log, and recursively select the next sample that meets the requirements to add to the batch.
[0024] The tag extraction comprises: The labels of the current batch of samples are obtained from the label file of the sample training set of the original audio data.
[0025] The merger includes: Concatenate all samples of the current batch into a complete audio data in the order of data index.
[0026] The scheduling of the microphone and the speaker to mix the sound pickup environment factors for the entire audio data of each sample batch in a real environment to obtain the entire recording data of the current sample batch, including: The speaker is called to play the entire audio data of the current sample batch, and the pickup is called to record the audio data played by the speaker; Get the recording time of the pickup when the speaker starts playing the entire audio data of the current sample batch - t1 mic , and the recording time t2 of the microphone when the speaker finishes playing the entire audio data of the current sample batch mic ; Get the pickup record [t1 mic , t2 mic ] The audio playback data within the range is the entire recording data of the current sample batch.
[0027] The segmentation includes: Determine the start time of the first sample of the entire recording data of the current sample batch, and split it according to the preset time length to split it into batchsize new samples.
[0028] The markings include: Using the labels of the current batch of samples extracted during the label extraction process, each sample in this batch is sequentially labeled to form a final enhanced sample-label pair, and the enhanced sample training set of the current sample batch is obtained based on the final enhanced sample-label pair.
[0029] Embodiment 2 is based on the same inventive concept as Embodiment 1. This embodiment introduces a method for enhancing audio data based on sound pickup environment factors, including: Unlike traditional methods, the method proposed in the present invention uses a collection method to add the real-world sound pickup environmental factors to the original training data, and retains the original labels. This method also takes into account environmental factors such as environmental background noise, the distance between the microphone and the sound source, and the interference generated inside the microphone. It can more effectively introduce environmental information than traditional methods such as background noise mixing, thereby improving the accuracy of the sound event detection model in the real environment and reducing performance degradation. In order to efficiently realize the collection of environmental factors, an automated enhanced audio annotation data collection system based on sound pickup environmental factors (hereinafter referred to as the system) is proposed. The schematic diagram of this method is shown in the figure. Figure 1 Using the original training set as input, enhanced samples containing target environmental factors can be obtained efficiently.
[0030] The four operating steps of the system proposed by this method are introduced below.
[0031] (1) Data preprocessing: In the data preprocessing step, samples must be batched, verified, label extracted, merged, etc. The specific steps are as follows: Figure 2 As shown, specifically: Batch: Preset the number of samples batchsize for each batch to be processed. Read the last processed data index idx and divide the samples with data index [idx, idx + batchsize - 1] into one batch.
[0032] Verification: Check whether each sample in the batch is of the standard length of 10 seconds. If not, discard it directly and record it in the log. Recursively select the next sample that meets the requirements and add it to the batch.
[0033] Label extraction: Obtain the labels of this batch of samples from the label file of the dataset and temporarily record them in memory.
[0034] Merge: All samples in this batch are spliced into a whole audio data. This is to prevent the slight delay between the system playing each data from causing time offset errors in the enhanced samples.
[0035] (2) Collection of sound pickup environmental factors: When performing data enhancement on each sample batch, the system needs to schedule the pickup and speaker to implement mixed environmental factors for the raw data in the real environment, such as Figure 3 As shown, the working steps are as follows: 1. First time synchronization: Request time synchronization information from the time synchronization module to obtain the system machine time and the pickup machine time pair (t1 sys , t1 mic ).
[0036] 2. Play samples: At the same time as the first time synchronization, use the wired speakers to play a batch of samples.
[0037] 3. Second time synchronization: When a batch of samples is played, the second time synchronization information is requested from the time synchronization module (t2 sys , t2 mic ).
[0038] 4. Download enhanced samples: To ensure that the data is processed inside the surveillance camera, 10 seconds after a batch of data is played, the system is wirelessly connected to the microphone to obtain [t1 mic , t2 mic ] range of audio playback data, if there are two inconsistent time synchronization information, the previous batch of data will be discarded and resent (the inconsistent time synchronization information here refers to [t1 sys , t2 sys ] and [t1 mic , t2 mic ] There is a time error of more than 0.2s between these two time ranges in the real time scale. This may lead to a fine-grained mismatch between the frame-level labels of the data samples to be processed and the processed data samples). Then the downloaded data is sent to the data post-processing submodule.
[0039] The purpose of time synchronization is to ensure the validity of the enhanced samples and prevent the enhanced samples from having label differences on a fine-grained time scale between the enhanced samples and the original samples due to the hardware time asynchrony between the system host and the pickup. Time synchronization is mainly achieved through the Network Time Protocol. The Network Time Protocol (NTP) is a protocol used for time synchronization between computers. It can reduce the time error between two computers to less than 1ms, providing accurate and robust time services. In order to achieve time synchronization between the system host computer and the pickup host, an NTP server is set up as a recognized time provider, and the NTP client is started on both the system host computer and the pickup host, and a socket connection is established with the NTP server. In this way, in the same local area network, the two clients will simultaneously receive data packets with the same time information and maintain millisecond-level time synchronization with each other. The system's time synchronization module is responsible for processing timestamp information and verifying the time information of the pickup host during downloading. The working mode of the time synchronization module is as follows: Figure 4 shown.
[0040] (3) Data post-processing: Data post-processing involves operations such as sample segmentation and label binding. Figure 5 As shown, the specific steps are as follows: 1. Segmentation: After playing a batch of samples, obtain the entire recording of a batch of samples from the device control module (the length of this recording may be greater than 10×batchsize), determine the start time of the first sample of the batch, and segment it according to the fixed length of the sample (10s) into batchsize new samples.
[0041] 2. Automatic labeling: Using the label information stored in the memory of the preprocessing submodule, each sample in this batch is labeled sequentially to achieve automatic labeling and form the final enhanced sample-label pair.
[0042] (4) Evaluation: In the evaluation step, the system automatically determines whether there is a time offset in sample generation. The judgment method is based on calculating the similarity between the original sample x1 and the collected sample x2. Due to the large amount of interference in the experimental environment, even if the original sample and the collected sample are completely aligned, their frequency domain features may be very different, while the time domain features are not much different. Therefore, the evaluation module uses the waveform comparison of the sound to determine the similarity between the original sample and the new sample. Since the lengths of the two samples are the same, the Euclidean distance d between samples x1 and x2 is directly calculated: ; In the experiment, the empirical value T is taken as the threshold. When d<= T, it is considered that there is no time domain offset between samples. Otherwise, an error prompt is given in the system.
[0043] This method works in the sample enhancement stage of the sound event classification process. When training two mainstream sound event classification models, three data enhancement methods are used: audio transformation (audio pitch and time shift transformation) and background noise mixing, and the average classification accuracy of the trained models is compared.
[0044] Table 1 ; Table 1 shows the average accuracy results of two types of mainstream models in the real environment test set when trained with three different data augmentation methods. This method has brought significant performance improvements on audio classification models of various structures. In Table 1, PANN: Large-scale pretrained audio neural networks for audio pattern recognition, large-scale pretrained audio neural networks for audio pattern recognition; PSLA: Improving audiotagging with pretraining, sampling, labeling, and aggregation, improving audio tagging (audio neural network) through pretraining, sampling, labeling and aggregation.
[0045] Embodiment 3, based on the same inventive concept as other embodiments, this embodiment introduces an audio data enhancement device based on sound pickup environment factors, including: An acquisition module, used for acquiring a sample training set of original audio data to be enhanced; A preprocessing module is used to sequentially perform batching, verification, label extraction, and merging operations on the sample training set to obtain several batches of whole audio data; The acquisition module is used to schedule the microphone and the speaker to mix the sound pickup environment factors of the entire audio data of each sample batch in the real environment to obtain the entire recording data of the current sample batch; The data post-processing module is used to segment and label the entire recording data in turn according to the corresponding data extracted by the batches and the labels to obtain an enhanced sample training set for the current sample batch; obtain the enhanced sample training set for each sample batch, and splice them to obtain the final enhanced sample training set of the original audio data.
[0046] Embodiment 4 is based on the same inventive concept as other embodiments. This embodiment introduces a computer-readable storage medium storing one or more programs, characterized in that the one or more programs include instructions, which, when executed by a computing device, enable the computing device to execute the method in Embodiment 1.
[0047] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0048] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0049] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0050] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0051] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for enhancing audio data based on sound pickup environment factors, characterized in that: include: Obtain a sample training set of original audio data to be enhanced; The sample training set is sequentially batched, verified, label extracted, and merged to obtain several batches of whole audio data; The microphone and the speaker are scheduled to mix the sound pickup environment factors of the entire audio data of each sample batch in the real environment to obtain the entire recording data of the current sample batch; The entire recording data is sequentially segmented and labeled according to the batches and the corresponding data extracted by the labels to obtain an enhanced sample training set of the current sample batch; Obtain the enhanced sample training set of each sample batch, and concatenate them to obtain the final enhanced sample training set of the original audio data.
2. The audio data enhancement method based on sound pickup environment factor collection according to claim 1 is characterized in that: The batches include: Preset the number of samples batchsize for each batch of samples to be processed, read the data index idx, and divide the samples with data index [idx, idx + batchsize - 1] into one batch; if the current batch is the first batch, the data index idx is the initial index of the sample in the sample training set; if the current batch is not the first batch, the data index idx is the next data index after the last data index of the previous batch.
3. The audio data enhancement method based on sound pickup environment factor collection according to claim 2 is characterized in that: The verification includes: Check whether each sample in the current batch is of the preset time length. If not, discard the samples that are not of the preset time length and record them in the log, and recursively select the next sample that meets the requirements to add to the batch.
4. The method for enhancing audio data based on sound pickup environment factors according to claim 3, characterized in that: The tag extraction comprises: The labels of the current batch of samples are obtained from the label file of the sample training set of the original audio data.
5. The method for enhancing audio data based on sound pickup environment factors according to claim 4, characterized in that: The merger includes: Concatenate all samples of the current batch into a complete audio data in the order of data index.
6. The method for enhancing audio data based on sound pickup environment factors according to claim 1, characterized in that: The scheduling of the microphone and the speaker to mix the sound pickup environment factors for the entire audio data of each sample batch in the real environment to obtain the entire recording data of the current sample batch, including: The speaker is called to play the entire audio data of the current sample batch, and the pickup is called to record the audio data played by the speaker; Get the recording time of the pickup when the speaker starts playing the entire audio data of the current sample batch - t1 mic , and the recording time t2 of the microphone when the speaker finishes playing the entire audio data of the current sample batch mic ; Get the pickup record [t1 mic , t2 mic ] The audio playback data within the range is the entire recording data of the current sample batch.
7. The method for enhancing audio data based on sound pickup environment factors according to claim 2, characterized in that: The segmentation includes: Determine the start time of the first sample of the entire recording data of the current sample batch, and split it according to the preset time length to split it into batchsize new samples.
8. The method for enhancing audio data based on sound pickup environment factors according to claim 7, characterized in that: The markings include: Using the labels of the current batch of samples extracted during the label extraction process, each sample in this batch is sequentially labeled to form a final enhanced sample-label pair, and the enhanced sample training set of the current sample batch is obtained based on the final enhanced sample-label pair.
9. An audio data enhancement device based on sound pickup environment factors, characterized in that: include: An acquisition module, used for acquiring a sample training set of original audio data to be enhanced; A preprocessing module is used to sequentially perform batching, verification, label extraction, and merging operations on the sample training set to obtain several batches of whole audio data; The acquisition module is used to schedule the microphone and the speaker to mix the sound pickup environment factors of the entire audio data of each sample batch in the real environment to obtain the entire recording data of the current sample batch; A data post-processing module, used to sequentially segment and label the entire recording data according to the batches and the corresponding data extracted by the labels, to obtain an enhanced sample training set of the current sample batch; Obtain the enhanced sample training set of each sample batch, and concatenate them to obtain the final enhanced sample training set of the original audio data.
10. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions which, when executed by a computing device, cause the computing device to perform the method of any one of claims 1 to 8.
Citation Information
Patent Citations
Data enhancement method and system for improving effect of infant cry detection model
CN113450776A
Audio data processing method and device for identifying field environment sound and medium
CN114387991A
High-quality data enhancement sample acquisition method for speech emotion recognition
CN116705075A
Audio signal processing method, device and equipment, vehicle and storage medium
CN117612528A
System and methods for automatically mixing audio for acoustic scenes
US20210201931A1
