Automatic gain training data set forming method based on gain adjustment and related equipment
By performing multiple processing and random gain adjustment on the original audio signal, the generated training data set can cover a variety of environments and equipment conditions, solving the problem of insufficient diversity of training data in the prior art and improving the adaptability of the model.
Patent Information
- Application Number
- CN202510301635.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-04-11
AI Technical Summary
The prior art is difficult to obtain high-quality automatic gain control training data, resulting in insufficient data diversity and difficulty in covering different environmental conditions and equipment types.
By obtaining the original audio signal, performing mean normalization, smoothing processing, active segment extraction, peak normalization and dynamic range compression, random slice processing and using randomly generated slices for gain adjustment, simulate changing environmental conditions.
The generated training data set can cover different noise backgrounds, sound source distances and device types, improve the model's adaptability to unknown or complex scenarios, and make the model perform well in a variety of practical application environments.
Smart Images

Figure CN119811416A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio processing technology, and in particular to a method for synthesizing an automatic gain training data set based on gain adjustment and related equipment. Background Art
[0002] With the development of artificial intelligence technology, the demand for training data sets in the field of audio processing is increasing. In machine learning, the quality and quantity of training data sets directly affect the performance of the model, especially in the application of automatic gain control. Acquiring high-quality labeled data is often costly and time-consuming, and it is difficult to obtain enough high-quality audio samples with high and low sound fluctuations through normal recording collection methods. This makes data acquisition a great challenge in the training process of the automatic gain control model.
[0003] At present, in order to obtain high-quality labeled automatic gain control training data, professional equipment and specific environmental conditions are often required. Professionals are also required to act out the changes in speaking voices and conduct long-term recording and collection. This directly leads to insufficient data diversity and makes it difficult to cover the switching between sounds of various sizes, the changes in sound size between multiple speeds, different background noises, sound source distances, and various scene changes. Summary of the invention
[0004] The purpose of the embodiments of the present application is to propose a method for synthesizing an automatic gain training data set based on gain adjustment and related equipment to solve the technical problems of insufficient richness and representativeness of training data.
[0005] In order to solve the above technical problems, the embodiment of the present application provides a method for synthesizing an automatic gain training data set based on gain adjustment, which adopts the following technical solution: A method for synthesizing an automatic gain training data set based on gain adjustment comprises the following steps: Obtain the original audio signal and record relevant device characteristics and environmental information; Performing mean normalization, smoothing, active segment extraction, peak normalization and dynamic range compression on the audio signal; Randomly slicing the audio signal to generate a slice segment signal, and using the randomly generated slice segment signal to perform gain adjustment, the gain adjustment controls the gain change of the slice segment signal through a preset plurality of gradient curve functions, and the start and end values and the change speed of the gain change are generated in a random manner to simulate variable environmental conditions; Output the adjusted audio signal to form a training data set.
[0006] In a possible implementation manner, the step of performing mean normalization, smoothing, active segment extraction, peak normalization and dynamic range compression on the audio signal specifically includes: adjusting the loudness of the audio signal to a target loudness; reducing short-term fluctuations of the audio signal; Extract active segments from audio signals and remove useless or noisy segments; Adjust each active segment to the target loudness; Compress the dynamic range of the audio signal to make the loudness of the audio signal more balanced.
[0007] In a possible implementation manner, the step of adjusting the loudness of the audio signal to a target level includes: Calculating the root mean square value of the audio signal to measure the energy of the signal; According to the target loudness, a normalization factor is calculated; The audio signal is normalized according to a normalization factor.
[0008] In a possible implementation manner, the step of normalizing the audio signal according to the normalization factor further includes: Check whether the maximum peak value of the audio signal exceeds a set safety threshold, and if so, adjust the normalization factor.
[0009] In a possible implementation manner, the step of reducing the short-term fluctuation of the audio signal specifically includes: Select a uniformly distributed window function and define the window size; Through the convolution operation, the audio signal and the window function are convolved; Calculate the moving average for each point.
[0010] In a possible implementation manner, the step of compressing the dynamic range of the audio signal to make the loudness of the audio signal more balanced specifically includes: Randomly generate a target RMS value according to the set range; By calling a normalization function, the root mean square value of the audio signal is adjusted to a target root mean square value; Randomly add background noise or reverberation effects to simulate audio signals in real environments.
[0011] In a possible implementation, the plurality of gradient curve functions include but are not limited to a linear gain gradient function, a quarter sine gain gradient function, a half cosine gain gradient function, a logarithmic gain gradient function, and a square gain gradient function.
[0012] In order to solve the above technical problems, the embodiment of the present application further provides an automatic gain training data set synthesis system based on gain adjustment, which adopts the following technical solution: An automatic gain training data set synthesis system based on gain adjustment, comprising: An acquisition module is used to acquire the original audio signal and record relevant device characteristics and environmental information; A processing module, used for performing mean normalization, smoothing, active segment extraction, peak normalization and dynamic range compression on the audio signal; An adjustment module, configured to randomly slice the audio signal to generate a slice segment signal, and use the randomly generated slice segment signal to perform gain adjustment, wherein the gain adjustment controls the gain change of the slice segment signal through a plurality of preset gradient curve functions, and the start and end values and the change speed of the gain change are randomly generated to simulate variable environmental conditions; The output module is used to output the adjusted audio signal to form a training data set.
[0013] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution: A computer device comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the automatic gain training data set synthesis method based on gain adjustment as described above are implemented.
[0014] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution: A computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the automatic gain training data set synthesis method based on gain adjustment are implemented as described above.
[0015] Compared with the prior art, the embodiments of the present application have the following beneficial effects: The method for synthesizing an automatic gain training data set based on gain adjustment disclosed in the present application obtains the original audio signal and records the relevant equipment characteristics and environmental information; performs mean normalization, smoothing, active segment extraction, peak normalization and dynamic range compression on the audio signal; randomly slices the audio signal and uses randomly generated slices for gain adjustment to simulate variable environmental conditions; outputs the adjusted audio signal to form a training data set. The present application uses random slicing, gain adjustment and other processing methods, and the training data can simulate different environmental conditions (such as indoor and outdoor, noise background, equipment differences, etc.). Therefore, the generated training data set can cover different noise backgrounds, sound source distances and equipment types, and can quickly synthesize a large number of data sets that can be used for training. In addition, the generated training data covers various changing audio signals, including gain changes, noise changes, environmental changes, etc., which can effectively improve the model's adaptability to unknown or complex scenarios, so that the model can perform well in a variety of practical application environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 is an exemplary system architecture diagram to which the present application may be applied; Figure 2 is a flow chart of an embodiment of a method for synthesizing an automatic gain training data set based on gain adjustment according to the present application; Figure 3 is a structural schematic diagram of an embodiment of an automatic gain training data set synthesis system based on gain adjustment according to the present application; Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0019] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0020] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0021] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0022] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0023] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.
[0024] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0025] It should be noted that the automatic gain training data set synthesis method based on gain adjustment provided in the embodiment of the present application is generally executed by a server, and accordingly, the audio training data set synthesis system based on gain adjustment is generally set in the server.
[0026] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0027] Continue to refer Figure 2 , shows a flow chart of an embodiment of a method for synthesizing an automatic gain training data set based on gain adjustment according to the present application. The method for synthesizing an automatic gain training data set based on gain adjustment comprises the following steps: Step S201, obtaining an original audio signal, and recording relevant device characteristics and environment information.
[0028] In this embodiment, the automatic gain training data set synthesis method based on gain adjustment is run on an electronic device (eg Figure 1 The server shown in the figure) can send or receive data through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0029] In this embodiment, these signals can be audio data in PCM (Pulse Code Modulation) format. In addition to the audio signal itself, related device characteristics and environmental information are also recorded, such as: device characteristics: microphone, speaker type, model, etc.; environmental information: environmental conditions during recording, such as indoor, outdoor, type of background noise, distance between microphone and sound source, etc.
[0030] Step S202, performing mean normalization, smoothing, active segment extraction, peak normalization and dynamic range compression on the audio signal.
[0031] In this embodiment, this process includes multiple steps, each of which helps to improve the quality and consistency of the audio signal. Specifically, mean normalization: adjust the loudness of the audio signal to a target level (such as -25 dB) to ensure that the audio signal is not distorted due to too low or too high volume. Smoothing: reduce short-term fluctuations in the audio signal through a moving average algorithm to make the signal more stable and avoid noise or distortion caused by rapid changes. Active segment extraction: extract active segments above the set threshold by analyzing the signal level, ignoring background noise and silent segments. This helps to focus on the meaningful parts of the audio signal and improve the efficiency of subsequent processing. Peak normalization: set the maximum volume of each active segment in the audio signal to the target peak (such as -15 dB) to ensure that the audio output is within the dynamic range and will not be distorted due to excessive peaks. Dynamic range compression: improve the consistency and audibility of the audio signal by reducing the dynamic range of the signal to prevent the volume from being too high or too low.
[0032] Step S203, randomly slice the audio signal to generate a slice segment signal, and use the randomly generated slice segment signal to perform gain adjustment, the gain adjustment controls the gain change of the slice segment signal through a preset plurality of gradient curve functions, and the start and end values and the change speed of the gain change are generated in a random manner to simulate variable environmental conditions.
[0033] In this embodiment, the audio signal will be randomly sliced, that is, the audio signal is divided into multiple smaller paragraphs or segments. Each slice represents a small part of the audio signal. By randomly selecting segments in the audio, different environmental changes are simulated. For example, some slices may contain short voice segments, and some may contain longer noise backgrounds. The length of the slice can be controlled as needed to adapt to different training needs. Each segment (slice segment signal) cut out from the original audio signal will be gain adjusted. The purpose of gain adjustment is to change the loudness of the audio to make it meet the diversity characteristics required by the training set. Gain adjustment is not just a simple increase or decrease in loudness, it also includes smooth gain changes, simulating the natural fluctuations of the audio signal in a gradual manner. In order to make the gain change more natural and in line with real environmental conditions, the gain adjustment process uses a variety of preset gradient curves, and these gradient curve functions can include: linear gradient, sine wave gradient, logarithmic gradient, square gradient, cosine gradient, etc. The role of these gradient curve functions is to smooth the gain change process, avoid abrupt volume changes, and make the gain adjustment more natural and undistorted. During the gain gradient process, the gain start and end values (i.e., the starting and ending points of the gain change) and the change speed (i.e., the rate of gain change) are generated randomly. This randomness ensures that the gain change of each audio slice is different and can cover a variety of change scenarios. For example, some slices may have very fast gain changes, while other slices may have very smooth gain changes. This change simulates many factors in the real environment, such as the distance between the human voice and the background noise. By randomly selecting the gain start and end values, the change speed, and the type of gradient curve, different environmental conditions can be effectively simulated. For example, the loudness of the speaker's voice may fluctuate dramatically when the distance from the microphone changes; or there may be sudden background noise in the environment, causing the loudness of the audio signal to fluctuate.
[0034] Step S204: output the adjusted audio signal to form a training data set.
[0035] In this embodiment, after the audio signal is processed, the final adjusted audio signal will be output. At this point, the audio signal has gone through multiple steps such as mean normalization, smoothing, active segment extraction, peak normalization, dynamic range compression, and increased diversity through random slicing and gain adjustment. Ultimately, these processed audio signals will be organized into a training data set for training the AI model.
[0036] This application uses random slicing, gain adjustment and other processing methods to simulate different environmental conditions (such as indoor and outdoor, noise background, equipment differences, etc.) in the training data. Therefore, the generated training data set can cover different noise backgrounds, sound source distances and equipment types, providing rich training materials for AI models. In addition, the generated training data covers various audio signals with changes, including gain changes, noise changes, environmental changes, etc., which can effectively improve the model's adaptability to unknown or complex scenarios, allowing the model to perform well in a variety of practical application environments.
[0037] In some optional implementations of this embodiment, the steps of performing mean normalization, smoothing, active segment extraction, peak normalization and dynamic range compression on the audio signal specifically include: adjusting the loudness of the audio signal to a target loudness; reducing short-term fluctuations of the audio signal; Extract active segments from audio signals and remove useless or noisy segments; Adjust each active segment to the target loudness; Compress the dynamic range of the audio signal to make the loudness of the audio signal more balanced.
[0038] In this embodiment, the overall loudness of the audio signal is adjusted by a mean normalization algorithm to ensure that it reaches the target loudness (e.g., -25 dB). This step can effectively avoid overload or distortion of the audio signal, ensure the audibility and clarity of the signal, and adapt the signal to various playback devices and environmental conditions. Smoothing processing (such as moving average) is used to reduce short-term fluctuations in the audio signal and smooth out prominent instantaneous changes. This helps to reduce signal fluctuations caused by noise or other sudden factors, making the signal more stable without causing abrupt volume changes, and enhancing audio quality. By analyzing the energy level of the audio signal, the effective part (i.e., the active segment) in the audio is identified. This step removes silent segments, background noise and other useless parts, thereby improving the effectiveness and quality of the audio data. After extracting the active segment, it can ensure that the training data set is more refined and avoid unnecessary noise interference. Each active segment is adjusted to the target loudness. This step adjusts the loudness of each active segment separately to ensure that the loudness of each segment reaches the preset target (e.g., -15 dB). Through peak normalization and loudness control, this step makes each segment of the audio signal maintain a consistent loudness level, improves the audibility and balance of the audio, and avoids audio distortion caused by too high or too low volume. In the step of compressing the dynamic range of the audio signal to make the loudness of the audio signal more balanced, the dynamic range compression technology is used to reduce the loudness range in the audio signal, so that the loudness difference between the audio signal in different time periods is more balanced. This helps to avoid excessive volume differences, making the audio more comfortable and smooth during playback, and avoiding sudden volume changes, especially in complex audio environments.
[0039] This application uses dynamic range compression and gain adjustment to generate audio signals that adapt to different environmental conditions and device playback requirements, helping the AI model to better learn automatic gain control (AGC) and maintain excellent performance in complex environments.
[0040] In some optional implementations of this embodiment, the step of adjusting the loudness of the audio signal to a target level includes: Calculating the root mean square value of the audio signal to measure the energy of the signal; According to the target loudness, a normalization factor is calculated; The audio signal is normalized according to a normalization factor.
[0041] In this embodiment, the root mean square (RMS) value of the audio signal is first calculated to measure the energy of the signal. The calculation formula of the root mean square value is: ,in, is the value of each sample in the audio signal, and N is the total number of samples. Then, the normalization factor is calculated according to the target loudness by the formula: , Among them, EPS is a small floating-point constant used to avoid division by zero, scalar is a normalized scalar, and target is the set target loudness.
[0042] Finally, the audio signal is normalized according to the calculated scalar to ensure that its overall loudness is within the target range.
[0043] This application ensures the loudness consistency of the audio signal by calculating the root mean square value of the audio signal and adjusting the energy of the signal according to the target loudness. This avoids the problem of uneven volume, distortion or poor listening experience caused by excessive differences in audio signal strength.
[0044] In some optional implementations of this embodiment, the step of normalizing the audio signal according to the normalization factor further includes: Check whether the maximum peak value of the audio signal exceeds a set safety threshold, and if so, adjust the normalization factor.
[0045] In this embodiment, during the processing of the audio signal, it is usually necessary to avoid the signal peak being too high to avoid distortion or broken sound. The purpose of this step is to check whether the maximum peak of the audio signal exceeds the set safety threshold. The threshold is to prevent the signal from being over-gained or overloaded, and is usually set to 1 or a relatively small value, such as 0.9. If the maximum peak exceeds the set threshold, it means that the signal is too strong, which may cause distortion or quality problems. If the maximum peak of the audio signal exceeds the set safety threshold, the normalization factor will be adjusted to avoid signal distortion. The normalization factor can be adjusted by reducing it so that the peak of the audio signal falls within a safe range.
[0046] This application checks and adjusts the maximum peak value of the audio signal to ensure that the signal does not exceed the safety threshold, avoiding distortion or sound quality degradation caused by excessive gain. This is a key step in audio processing, especially in the gain adjustment process, to avoid audio signal overload.
[0047] In some optional implementations of this embodiment, the step of reducing the short-term fluctuation of the audio signal specifically includes: Select a uniformly distributed window function and define the window size; Through the convolution operation, the audio signal and the window function are convolved; Calculate the moving average for each point.
[0048] In this embodiment, the window function is used to perform weighted processing on the audio signal so that different parts of the signal are smoothed or filtered according to predetermined rules. In this step, a uniformly distributed window function is selected, that is, the weight of each signal sample is equal. This window function is suitable for simple smoothing processing and will not bias a certain part of the signal. The window size refers to the number of samples used for convolution operation. The larger the window, the wider the processing range and the stronger the smoothing effect; the smaller the window, the weaker the smoothing effect. Generally, the choice of window size will affect the fineness of the final smoothing effect, and the typical value may be between tens and hundreds of samples. Convolution operation is a common tool in signal processing for filtering or smoothing. In this step, the selected uniform window function is convolved with the audio signal. The role of convolution is to perform weighted averaging of the audio signal through the window function to obtain a smoothed signal. After the convolution operation is completed, the result obtained is the moving average of each audio point. The moving average reflects the average energy or amplitude of the audio signal over a period of time around the point. Through smoothing, short-term fluctuations are reduced, making the overall change trend of the signal smoother.
[0049] Specifically, the moving average calculation can be expressed as: , in, It's time point The moving average of is the window size, and the window function is a distribution function; is the sample value before time point t.
[0050] The formula for calculating the moving average through convolution is: , in, are the coefficients of the window function.
[0051] This application reduces short-term volume fluctuations by performing convolution smoothing on the audio signal. The moving average effectively weakens the instantaneous changes in the signal, making the signal more stable. This is important for subsequent gain adjustment and audio analysis, avoiding unnecessary noise interference.
[0052] In some optional implementations of this embodiment, the step of compressing the dynamic range of the audio signal to make the loudness of the audio signal more balanced specifically includes: Randomly generate a target RMS value according to the set range; By calling a normalization function, the root mean square value of the audio signal is adjusted to a target root mean square value; Randomly add background noise or reverberation effects to simulate audio signals in real environments.
[0053] In this embodiment, the root mean square value is a standard indicator for measuring signal strength and reflects the energy of the audio signal. The root mean square value of the signal is obtained by calculating the square average of each sample value of the audio signal and then taking the square root. In this step, a range of target root mean square values is first set (for example: -45 dB to -15 dB). Then, a target root mean square value is randomly selected from the range through a random number generation algorithm. This step helps to simulate variable environmental conditions, so that the loudness characteristics of different training data are different, and the diversity of the training data set is improved. After obtaining the target root mean square value, the next step is to normalize the audio signal so that its root mean square value is adjusted to the target value. The purpose of normalization is to ensure that the loudness of the audio signal meets the target requirements. In order to further improve the authenticity and diversity of the training data, background noise or reverberation effects can be randomly added to the audio signal. These noise or reverberation effects simulate common audio interference in actual environments, making the training data richer and helping the AI model better adapt to audio processing in complex environments. Background noise can be white noise, environmental noise, or electrical noise. By controlling the intensity, type, and distribution of noise, different environmental conditions can be simulated. Reverb adds complexity to an audio signal by simulating the phenomenon of sound waves reflecting in space. Reverb simulation can be achieved through convolution operations using a suitable reverb impulse response.
[0054] This application can effectively simulate environmental conditions with different volumes by randomly selecting a target RMS value within a given range and adjusting the loudness of the signal. This provides the AI model with more diverse training data, enabling it to adapt to audio signals of different loudness levels. In addition, by simulating variable environments and audio conditions (such as different loudness, noise, reverberation, etc.), the training data set is closer to real application scenarios. In this way, the trained model can better adapt to different audio environments and improves its robustness and adaptability to unknown environments.
[0055] In some optional implementations of this embodiment, the above-mentioned multiple gradient curve functions include but are not limited to a linear gain gradient function, a quarter sine gain gradient function, a half cosine gain gradient function, a logarithmic gain gradient function and a square gain gradient function.
[0056] In this embodiment, the natural gradual change of the dynamic curve gain is to simulate the complex changes of volume gradual change in the real environment during the synthesis of audio training data, so that the gain adjustment of the audio signal is smoother and more natural. This function is intended to avoid the abruptness of the audio caused by the gain adjustment, thereby enhancing the quality and authenticity of the synthesized data.
[0057] The calculation process of gain gradient is: Receive new gain value: The gain gradient module receives the gain value of the audio signal segment target and the current gain value.
[0058] Calculate the start and end indexes: Based on the new gain value and maximum gain value , calculate the start and end indexes of the gain adjustment, which are used to control the gradient range to make the adjustment more targeted.
[0059] Normalize the gain value: First, normalize the gain value to the range of [0, 1]. The purpose of this step is to facilitate the subsequent use of multiple curve functions for unified processing and ensure the consistency and flexibility of the algorithm. The specific formula is as follows: , in, It is the gain value, which indicates the degree of amplification or attenuation of the loudness of the audio signal.
[0060] Linear index gradient formula: ; Quarter index gradient formula: ; Half cosine index gradient formula: ; Logarithmic index gradient formula: ; Square index gradient formula: ; Finally, make sure the index is in the range [0, range], .
[0061] in, Represents the normalized index value; Indicates the final index value after calculation; Indicates the maximum value of the index range (usually the length of the signal segment or the sampling point range); through this formula, the index value of the gain gradient is limited to the legal range to avoid exceeding the sampling point range of the audio signal or having a negative value.
[0062] Then, according to the input sampling point position and gain range, different gain gradient curve types (such as linear, logarithmic, cosine, etc.) are randomly selected to calculate the gain value.
[0063] Specifically, the linear gain gradient formula is: ; Quarter sine gain ramp formula: ; Half cosine gain gradient formula: ; Logarithmic gain gradient formula: ; Square gain gradient formula: ; in, Current gain The index of The length of the audio sampling point; is the minimum gain value, is the maximum gain value.
[0064] This application controls the gain change through a dynamic curve to make the loudness of the audio signal more natural during the transition, avoid sudden jumps in volume, and improve audio quality. The use of multiple gradient curves (linear, logarithmic, cosine, etc.) can effectively simulate the dynamic change characteristics of audio signals in complex environments, such as the distance of human voices, and the highs and lows of voices. The randomly generated start and end gains and change speeds give the synthetic data more diversity, making the training data more in line with real usage scenarios, which helps to improve the generalization ability of the model. The smooth gradient process avoids the auditory discomfort that may be caused by abrupt loudness changes, which is especially important when training speech recognition or noise reduction models.
[0065] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0066] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0067] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0068] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0069] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of an audio training data set synthesis system based on gain adjustment, and the system embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the system can be specifically applied to various electronic devices.
[0070] like Figure 3 As shown, the audio training data set synthesis system based on gain adjustment described in this embodiment includes: an acquisition module 301, a processing module 302, an adjustment module 303 and an output module 304. Among them: The acquisition module 301 is used to acquire the original audio signal and record the relevant device characteristics and environment information; A processing module 302, configured to perform mean normalization, smoothing, active segment extraction, peak normalization and dynamic range compression on the audio signal; An adjustment module 303 is used for randomly slicing the audio signal to generate a slice segment signal, and using the randomly generated slice segment signal to perform gain adjustment, wherein the gain adjustment controls the gain change of the slice segment signal through a plurality of preset gradient curve functions, and the start and end values and the change speed of the gain change are generated in a random manner to simulate variable environmental conditions; The output module 304 is used to output the adjusted audio signal to form a training data set.
[0071] The audio training data set synthesis system based on gain adjustment provided in this application can simulate different environmental conditions (such as indoor and outdoor, noise background, equipment differences, etc.) through random slicing, gain adjustment and other processing methods. Therefore, the generated training data set can cover different noise backgrounds, sound source distances and equipment types, providing rich training materials for AI models. In addition, the generated training data covers various audio signals with changes, including gain changes, noise changes, environmental changes, etc., which can effectively improve the model's adaptability to unknown or complex scenarios, so that the model can perform well in a variety of practical application environments.
[0072] In some optional implementations of this embodiment, the processing module 302 is further configured to: adjusting the loudness of the audio signal to a target loudness; reducing short-term fluctuations of the audio signal; Extract active segments from audio signals and remove useless or noisy segments; Adjust each active segment to the target loudness; Compress the dynamic range of the audio signal to make the loudness of the audio signal more balanced.
[0073] The audio training data set synthesis system based on gain adjustment provided in this application generates audio signals that adapt to the playback requirements of different environmental conditions and devices through dynamic range compression and gain adjustment, which helps the AI model to better learn automatic gain control (AGC) and maintain excellent performance in complex environments.
[0074] In some optional implementations of this embodiment, the processing module 302 is further configured to: Calculating the root mean square value of the audio signal to measure the energy of the signal; According to the target loudness, a normalization factor is calculated; The audio signal is normalized according to a normalization factor.
[0075] The audio training data set synthesis system based on gain adjustment provided by the present application ensures the loudness consistency of the audio signal by calculating the root mean square value of the audio signal and adjusting the energy of the signal according to the target loudness. This avoids the problem of uneven volume, distortion or poor listening experience caused by excessive differences in audio signal strength.
[0076] In some optional implementations of this embodiment, the processing module 302 is further configured to: Check whether the maximum peak value of the audio signal exceeds a set safety threshold, and if so, adjust the normalization factor.
[0077] The audio training data set synthesis system based on gain adjustment provided by the present application checks and adjusts the maximum peak value of the audio signal to ensure that the signal does not exceed the safety threshold, thereby avoiding distortion or sound quality degradation caused by excessive gain. This is a key step in audio processing, especially in the gain adjustment process, to avoid audio signal overload.
[0078] In some optional implementations of this embodiment, the processing module 302 is further configured to: Select a uniformly distributed window function and define the window size; Through the convolution operation, the audio signal and the window function are convolved; Calculate the moving average for each point.
[0079] The audio training data set synthesis system based on gain adjustment provided by the present application reduces short-term volume fluctuations by convolution smoothing the audio signal. The moving average effectively weakens the instantaneous changes in the signal, making the signal more stable. This plays an important role in subsequent gain adjustment and audio analysis, avoiding unnecessary noise interference.
[0080] In some optional implementations of this embodiment, the processing module 302 is further configured to: Randomly generate a target RMS value according to the set range; By calling a normalization function, the root mean square value of the audio signal is adjusted to a target root mean square value; Randomly add background noise or reverberation effects to simulate audio signals in real environments.
[0081] The audio training data set synthesis system based on gain adjustment provided in this application can effectively simulate environmental conditions of different volumes by randomly selecting the target RMS value within a given range and adjusting the loudness of the signal. This provides more diverse training data for the AI model, enabling it to adapt to audio signals of different loudness levels. In addition, by simulating variable environments and audio conditions (such as different loudness, noise, reverberation, etc.), the training data set is closer to real application scenarios. In this way, the trained model can better adapt to different audio environments and improve the robustness and adaptability to unknown environments.
[0082] In some optional implementations of this embodiment, in the adjustment module 303, the multiple gradient curve functions include but are not limited to a linear gain gradient function, a quarter sine gain gradient function, a half cosine gain gradient function, a logarithmic gain gradient function and a square gain gradient function.
[0083] The audio training data set synthesis system based on gain adjustment provided by the present application can ensure that the diversity of devices and environments can be taken into account during the audio signal processing by recording this information. This information is of great significance for subsequent gain adjustment and audio signal simulation, helping to ensure that the generated training data is closer to the real application scenario, thereby improving the generalization ability and adaptability of the training model.
[0084] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0085] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0086] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0087] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the automatic gain training data set synthesis method based on gain adjustment, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0088] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the computer-readable instructions stored in the memory 41 or process data, such as running the computer-readable instructions of the automatic gain training data set synthesis method based on gain adjustment.
[0089] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0090] The computer equipment provided in this application can simulate different environmental conditions (such as indoor and outdoor, noise background, equipment differences, etc.) through random slicing, gain adjustment and other processing methods. Therefore, the generated training data set can cover different noise backgrounds, sound source distances and equipment types, providing rich training materials for AI models. In addition, the generated training data covers various audio signals with changes, including gain changes, noise changes, environmental changes, etc., which can effectively improve the model's adaptability to unknown or complex scenarios, so that the model can perform well in a variety of practical application environments.
[0091] The present application also provides another embodiment, namely, providing a computer-readable storage medium, which stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the automatic gain training data set synthesis method based on gain adjustment as described above.
[0092] The computer-readable storage medium provided in this application can simulate different environmental conditions (such as indoor and outdoor, noise background, equipment differences, etc.) through random slicing, gain adjustment and other processing methods. Therefore, the generated training data set can cover different noise backgrounds, sound source distances and equipment types, providing rich training materials for AI models. In addition, the generated training data covers various audio signals with changes, including gain changes, noise changes, environmental changes, etc., which can effectively improve the model's adaptability to unknown or complex scenes, so that the model can perform well in a variety of practical application environments.
[0093] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0094] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A method for synthesizing automatic gain training data sets based on gain adjustment, characterized in that: The steps include: Obtain the original audio signal and record relevant device characteristics and environmental information; Performing mean normalization, smoothing, active segment extraction, segment peak normalization and dynamic range compression on the audio signal; Randomly slicing the audio signal to generate a slice segment signal, and using the randomly generated slice segment signal to perform gain adjustment, the gain adjustment controls the gain change of the slice segment signal through a preset plurality of gradient curve functions, and the start and end values and the change speed of the gain change are generated in a random manner to simulate variable environmental conditions; Output the adjusted audio signal to form a training data set.
2. The method for synthesizing automatic gain training data set based on gain adjustment according to claim 1, characterized in that: The steps of performing mean normalization, smoothing, active segment extraction, peak normalization and dynamic range compression on the audio signal specifically include: adjusting the loudness of the audio signal to a target loudness; reducing short-term fluctuations of the audio signal; Extract active segments from audio signals and remove useless or noisy segments; Adjust each active segment to the target loudness; Compress the dynamic range of the audio signal to make the loudness of the audio signal more balanced.
3. The method for synthesizing automatic gain training data set based on gain adjustment according to claim 2, characterized in that: The step of adjusting the loudness of the audio signal to a target level comprises: Calculating the root mean square value of the audio signal to measure the energy of the signal; According to the target loudness, a normalization factor is calculated; The audio signal is normalized according to a normalization factor.
4. The method for synthesizing automatic gain training data set based on gain adjustment according to claim 3, characterized in that: The step of normalizing the audio signal according to the normalization factor further includes: Check whether the maximum peak value of the audio signal exceeds a set safety threshold, and if so, adjust the normalization factor.
5. The method for synthesizing automatic gain training data set based on gain adjustment according to claim 2, characterized in that: The step of reducing the short-term fluctuation of the audio signal specifically comprises: Select a uniformly distributed window function and define the window size; Through the convolution operation, the audio signal and the window function are convolved; Calculate the moving average for each point.
6. The method for synthesizing automatic gain training data set based on gain adjustment according to claim 2, characterized in that: The step of compressing the dynamic range of the audio signal to make the loudness of the audio signal more balanced specifically includes: Randomly generate a target RMS value according to the set range; By calling a normalization function, the root mean square value of the audio signal is adjusted to a target root mean square value; Randomly add background noise or reverberation effects to simulate audio signals in real environments.
7. The method for synthesizing automatic gain training data set based on gain adjustment according to claim 1, characterized in that: The multiple gradient curve functions include but are not limited to a linear gain gradient function, a quarter sine gain gradient function, a half cosine gain gradient function, a logarithmic gain gradient function and a square gain gradient function.
8. An automatic gain training data set synthesis system based on gain adjustment, characterized in that: include: An acquisition module is used to acquire the original audio signal and record relevant device characteristics and environmental information; A processing module, used for performing mean normalization, smoothing, active segment extraction, segment peak normalization and dynamic range compression on the audio signal; An adjustment module, configured to randomly slice the audio signal to generate a slice segment signal, and use the randomly generated slice segment signal to perform gain adjustment, wherein the gain adjustment controls the gain change of the slice segment signal through a plurality of preset gradient curve functions, and the start and end values and the change speed of the gain change are randomly generated to simulate variable environmental conditions; The output module is used to output the adjusted audio signal to form a training data set.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the method for synthesizing an automatic gain training data set based on gain adjustment as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the method for synthesizing an automatic gain training data set based on gain adjustment according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Voice recognition model optimization method and system
CN111145730A
Scene switching method, device and equipment
CN112365567A
Bird sound recognition model training method, classification method, device and medium
CN114372513A
Signal processing method and device for converting monaural sound into stereo sound, equipment and medium
CN115460516A
Data enhancement method and system for audio signal
CN118782069A
Cited By
Multi-level sound effect switching method and system
CN121151761A