Method, device, electronic device and storage medium for generating sample audio data
By considering the hardware equipment and environmental errors of the actual scene in the generation of sample audio data, sample audio data that is highly consistent with the actual scene is generated, which solves the problem of low data fit in the existing technology and improves the accuracy of the speech enhancement model. performance.
Patent Information
- Application Number
- CN202210930408.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-03
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-08-03
AI Technical Summary
The existing technology fails to fully consider the impact of hardware equipment and environment in the actual scene when generating sample audio data, resulting in a low degree of fit between the generated sample audio data and the data collected in the actual scene.
By obtaining clean speech data whose noise energy value is less than the preset energy value, and adding microphone array error and channel amplitude error to the multi-channel room impulse response, the reverberation effect is simulated, and multi-channel fully reverberated clean speech data and pre-mixing are generated. The clean voice data is combined with the single-channel noise data, mixed and frequency response processed according to the preset signal-to-noise ratio, to obtain sample audio data that is highly consistent with the actual scene.
It improves the fit between sample audio data and actual scene collection data, enhances the performance of the speech enhancement model, and adapts to the characteristics of speech data in actual scenes.
Smart Images

Figure CN115331687B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a method, device, electronic device and storage medium for generating sample audio data. Background Art
[0002] In recent years, neural networks have been widely used in the field of speech, especially in speech enhancement such as noise reduction and dereverberation. The high-precision speech enhancement model trained by the neural network can fully learn the complex nonlinear mapping relationship between noisy speech data and clean speech data driven by massive sample audio data, thereby achieving better speech enhancement effect. However, the fit between the sample audio data and the actual scene directly affects the performance of the speech enhancement model. Therefore, how to generate more reasonable and effective sample audio data has become a very important part of the model training process.
[0003] In the related art, when generating sample audio data, the following method is mainly used: a pure speech signal is convolved with a simulated room impulse response to obtain a mixed reverberation audio signal; if the reverberation time of the simulated room impulse response is less than or equal to a set threshold, the mixed reverberation audio signal is used as the sample audio data; if the reverberation time of the simulated room impulse response is greater than the set threshold, the early reflection signal of the first n milliseconds of the mixed reverberation audio signal is superimposed with the pure speech signal to obtain the sample audio data.
[0004] However, the sample audio data generation method of the related art does not take into account the impact of hardware equipment, environment, etc. in actual use, resulting in a low degree of fit between the generated sample audio data and the sample audio data collected in the actual scenario. Summary of the invention
[0005] The embodiments of the present disclosure provide a method, device, electronic device and storage medium for generating sample audio data, which can generate sample audio data that is highly consistent with the sample audio data collected in actual scenarios. The technical solution is as follows:
[0006] In a first aspect, a method for generating sample audio data is provided, the method comprising:
[0007] Acquire clean speech data and a multi-channel room impulse response, wherein the clean speech data is speech data with a noise energy value less than a preset energy value, and the multi-channel room impulse response is simulated reverberation effect data with at least one of a microphone array error and a channel amplitude error in an actual scene added;
[0008] Generate multi-channel full-reverberation clean voice data and pre-reverberation clean voice data based on the clean voice data and the multi-channel room impulse response;
[0009] generating multi-channel noise data based on the multi-channel room impulse response and the single-channel noise data;
[0010] Sample audio data is generated based on the multi-channel full-reverberation clean voice data, the pre-reverberation clean voice data and the multi-channel noise data.
[0011] In another embodiment of the present disclosure, the step of obtaining clean speech data includes:
[0012] Acquire a voice database, wherein the voice database stores voice data recorded in an actual voice scenario;
[0013] Using VAD (Voice Activity Detection) to identify the noise part of any voice data in the voice database;
[0014] When the average energy value of the noise part of the speech data is less than the preset energy value, the speech data is used as the clean speech data.
[0015] In another embodiment of the present disclosure, the obtaining of a multi-channel room impulse response includes:
[0016] According to the preset reverberation effect, determine the theoretical position coordinates of each microphone in the microphone array;
[0017] adding random disturbance to the theoretical position coordinates of at least one microphone in the microphone array;
[0018] A collection process of simulating an audio signal based on each microphone in the microphone array after position coordinate adjustment is obtained to obtain a multi-channel audio signal;
[0019] The amplitude of each channel audio signal in the multi-channel audio signal is randomly adjusted to obtain the multi-channel room impulse response.
[0020] In another embodiment of the present disclosure, the generating of multi-channel full-reverberation clean voice data and pre-reverberation clean voice data based on the clean voice data and the multi-channel room impulse response includes:
[0021] Convolution operation is performed on the clean speech data and the multi-channel room impulse response to obtain the multi-channel full-reverberation clean speech data;
[0022] The pre-reverberation clean speech data is obtained by performing a convolution operation on the speech data of a preset time length before the clean speech data and the multi-channel room impulse response.
[0023] In another embodiment of the present disclosure, the generating multi-channel noise data based on the multi-channel room impulse response and the single-channel noise data includes:
[0024] A convolution operation is performed on the multi-channel room impulse response and the single-channel noise data to obtain the multi-channel noise data.
[0025] In another embodiment of the present disclosure, generating sample audio data based on the multi-channel fully reverberated clean voice data, the pre-reverberated clean voice data and the multi-channel noise data includes:
[0026] According to a preset signal-to-noise ratio, the multi-channel fully reverberated clean speech data and the multi-channel noise data are mixed to obtain noisy reverberated speech data;
[0027] The frequency responses of the noisy reverberation speech data and the pre-reverberation clean speech data are processed to obtain sample audio data.
[0028] In a second aspect, a device for acquiring sample audio data is provided, the device comprising:
[0029] An acquisition module, used to acquire clean speech data and a multi-channel room impulse response, wherein the clean speech data is speech data with a noise energy value less than a preset energy value, and the multi-channel room impulse response is simulated reverberation effect data with at least one of a microphone array error and a channel amplitude error in an actual scene added;
[0030] A first generating module, configured to generate multi-channel full-reverberation clean voice data and pre-reverberation clean voice data based on the clean voice data and the multi-channel room impulse response;
[0031] A second generating module, configured to generate multi-channel noise data based on the multi-channel room impulse response and the single-channel noise data;
[0032] The third generating module is used to generate sample audio data based on the multi-channel full-reverberation clean speech data, the early-reverberation clean speech data and the multi-channel noise data.
[0033] In another embodiment of the present disclosure, the acquisition module is used to acquire a speech database, which stores speech data recorded in an actual speech scenario; VAD is used to identify the noise part of any speech data in the speech database; when the average energy value of the noise part of the speech data is less than the preset energy value, the speech data is used as the clean speech data.
[0034] In another embodiment of the present disclosure, the acquisition module is used to determine the theoretical position coordinates of each microphone in the microphone array according to a preset reverberation effect; add random disturbances to the theoretical position coordinates of at least one microphone in the microphone array; obtain a multi-channel audio signal based on the acquisition process of the simulated audio signal of each microphone in the microphone array after the position coordinates are adjusted; and randomly adjust the amplitude of each channel audio signal in the multi-channel audio signal to obtain the multi-channel room impulse response.
[0035] In another embodiment of the present disclosure, the first generating module is used to perform a convolution operation on the clean speech data and the multi-channel room impulse response to obtain the multi-channel fully reverberated clean speech data; and to perform a convolution operation on the speech data of a pre-preset time length in the clean speech data with the multi-channel room impulse response to obtain the pre-reverberated clean speech data.
[0036] In another embodiment of the present disclosure, the second generating module is used to perform a convolution operation on the multi-channel room impulse response and the single-channel noise data to obtain the multi-channel noise data.
[0037] In another embodiment of the present disclosure, the third generating module is used to mix the multi-channel fully reverberated clean speech data and the multi-channel noise data according to a preset signal-to-noise ratio to obtain noisy reverberated speech data; and process the frequency response of the noisy reverberated speech data and the early reverberated clean speech data to obtain sample audio data.
[0038] According to a third aspect, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the method for generating sample audio data as described in the first aspect.
[0039] According to a fourth aspect, a computer-readable storage medium is provided, wherein at least one program code is stored in the storage medium, and the at least one program code is loaded and executed by a processor to implement the method for generating sample audio data as described in the first aspect.
[0040] In a fifth aspect, a computer program product is provided, the computer program product comprising a computer program code, the computer program code being stored in a computer-readable storage medium, a processor of an electronic device reading the computer program code from the computer-readable storage medium, the processor executing the computer program code, so that the electronic device performs the method for generating sample audio data as described in the first aspect.
[0041] The technical solution provided by the embodiments of the present disclosure has the following beneficial effects:
[0042] Considering that the voice data collected in the actual scene will have some background noise to a greater or lesser extent, and the discharge position of the microphone array in the actual scene may not be accurately set at the theoretical position, and the performance of each microphone in the microphone array is difficult to be completely consistent, the embodiment of the present disclosure uses the voice data with a noise energy value less than the preset energy value as the clean voice data, and at the same time adds at least one of the microphone array error and the channel amplitude error in the actual scene to the multi-channel room impulse response, so that the obtained clean voice data and the multi-channel room impulse response are more in line with the actual collection scene. Then, the clean voice data and the multi-channel room impulse response are processed to obtain multi-channel full reverberation clean voice data and pre-reverberation clean voice data. And considering that the noise will also have the reverberation effect in the actual scene when it propagates in the actual scene, by processing the single-channel noise data, the multi-channel noise data with the same reverberation effect as the multi-channel full reverberation clean voice data is obtained, and then based on the multi-channel full reverberation clean voice data, the pre-reverberation clean voice data and the multi-channel noise data, the sample audio data with a high degree of fit with the actual scene is generated. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0044] Figure 1 is a flow chart of a method for generating sample audio data provided by an embodiment of the present disclosure;
[0045] Figure 2 is a flow chart of another method for generating sample audio data provided by an embodiment of the present disclosure;
[0046] Figure 3 is a flow chart of another method for generating sample audio data provided by an embodiment of the present disclosure;
[0047] Figure 4 is a flow chart of another method for generating sample audio data provided by an embodiment of the present disclosure;
[0048] Figure 5 is a schematic diagram of the structure of a device for generating sample audio data provided by an embodiment of the present disclosure;
[0049] Figure 6 A structural block diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0050] In order to make the objectives, technical solutions and advantages of the present disclosure more clear, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.
[0051] It can be understood that the terms "each", "multiple", and "any" used in the embodiments of the present disclosure include two or more, each refers to each of the corresponding multiple, and any refers to any one of the corresponding multiple. For example, the multiple words include 10 words, and each word refers to each word of the 10 words, and any word refers to any one of the 10 words.
[0052] The information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this disclosure are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the clean voice data and noise data involved in this disclosure are all obtained with full authorization.
[0053] The present disclosure provides a method for generating sample speech data. Figure 1 , the method flow provided by the embodiment of the present disclosure includes:
[0054] 101. Obtain clean speech data and multi-channel room impulse responses.
[0055] The clean speech data is speech data with a noise energy value less than a preset energy value. The multi-channel room impulse response is simulated reverberation effect data with at least one of a microphone array error and a channel amplitude error in an actual scene added.
[0056] 102. Based on the clean speech data and the multi-channel room impulse response, multi-channel full-reverberation clean speech data and pre-reverberation clean speech data are generated.
[0057] 103. Generate multi-channel noise data based on the multi-channel room impulse response and the single-channel noise data.
[0058] 104. Generate sample audio data based on multi-channel fully reverberated clean speech data, pre-reverberated clean speech data and multi-channel noise data.
[0059] The method provided by the embodiment of the present disclosure takes into account that the voice data collected in the actual scene may have some background noise to a greater or lesser extent, and the discharge position of the microphone array in the actual scene may not be accurately set at the theoretical position, and the performance of each microphone in the microphone array is difficult to be completely consistent. The embodiment of the present disclosure takes the voice data with a noise energy value less than the preset energy value as the clean voice data, and at the same time adds at least one of the microphone array error and the channel amplitude error in the actual scene to the multi-channel room impulse response, so that the obtained clean voice data and the multi-channel room impulse response are more in line with the actual collection scene. Then, the clean voice data and the multi-channel room impulse response are processed to obtain the multi-channel full reverberation clean voice data and the early reverberation clean voice data. And considering that the noise will also have the reverberation effect in the actual scene when it propagates in the actual scene, by processing the single-channel noise data, the multi-channel noise data with the same reverberation effect as the multi-channel full reverberation clean voice data is obtained, and then based on the multi-channel full reverberation clean voice data, the early reverberation clean voice data and the multi-channel noise data, the sample audio data with a high degree of fit with the actual scene is generated.
[0060] In another embodiment of the present disclosure, obtaining clean voice data includes:
[0061] Acquire a voice database, where the voice database stores voice data recorded in an actual voice scenario;
[0062] Use voice activity detection (VAD) to identify the noise part of any speech data in the speech database;
[0063] When the average energy value of the noise part of the speech data is less than the preset energy value, the speech data is regarded as clean speech data.
[0064] In another embodiment of the present disclosure, obtaining a multi-channel room impulse response includes:
[0065] According to the preset reverberation effect, determine the theoretical position coordinates of each microphone in the microphone array;
[0066] adding random disturbances to the theoretical position coordinates of at least one microphone in the microphone array;
[0067] A collection process of simulating an audio signal based on each microphone in the microphone array after position coordinate adjustment is obtained to obtain a multi-channel audio signal;
[0068] The amplitude of each channel audio signal in the multi-channel audio signal is randomly adjusted to obtain a multi-channel room impulse response.
[0069] In another embodiment of the present disclosure, based on the clean voice data and the multi-channel room impulse response, generating multi-channel full reverberation clean voice data and pre-reverberation clean voice data includes:
[0070] Convolution operation is performed on the clean speech data and the multi-channel room impulse response to obtain the multi-channel fully reverberated clean speech data;
[0071] The pre-preset duration speech data in the clean speech data is convolved with the multi-channel room impulse response to obtain the pre-reverberation clean speech data.
[0072] In another embodiment of the present disclosure, generating multi-channel noise data based on a multi-channel room impulse response and single-channel noise data includes:
[0073] The multi-channel room impulse response is convolved with the single-channel noise data to obtain the multi-channel noise data.
[0074] In another embodiment of the present disclosure, sample audio data is generated based on multi-channel full reverberation clean voice data, pre-reverberation clean voice data and multi-channel noise data, including:
[0075] According to a preset signal-to-noise ratio, the multi-channel fully reverberated clean speech data and the multi-channel noise data are mixed to obtain the noisy reverberated speech data;
[0076] The frequency responses of the noisy reverberation speech data and the pre-reverberation clean speech data are processed to obtain sample audio data.
[0077] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.
[0078] The embodiment of the present disclosure provides a method for generating sample speech data. Taking an electronic device executing the embodiment of the present disclosure as an example, the electronic device may be a terminal with strong computing power, such as a smart phone, a tablet computer, a laptop computer, etc. The electronic device may also be a server, such as a single physical server, a cluster or a distributed system composed of multiple physical servers, etc. Figure 2 , the method flow provided by the embodiment of the present disclosure includes:
[0079] 201. Electronic devices for acquiring clean speech data and multi-channel room impulse responses.
[0080] The disclosed embodiment maintains a voice database, which stores voice data recorded in actual voice scenarios. Although the voice data in the voice database are all recorded in a quiet environment, there will be more or less background noise during the recording process. The model to be trained in the disclosed embodiment is a voice noise reduction model. If the background noise in the original voice data is too large, it will affect the performance of the final trained voice noise reduction model. In order to obtain clean voice data that is highly consistent with the actual scene and does not affect the performance of the voice noise reduction model, the disclosed embodiment will adopt the following method:
[0081] In the first step, the electronic device obtains a voice database.
[0082] In the second step, the electronic device uses voice activity detection (VAD) to identify the noise part of any speech data in the speech database.
[0083] Among them, VAD is also called voice endpoint detection or voice boundary detection. Its purpose is to identify and eliminate long silence periods from the sound signal stream to save voice channel resources without reducing service quality. VAD is an important part of IP phone applications. Silence suppression can save valuable bandwidth resources and can help reduce the end-to-end delay felt by users. For any voice data in the voice database, the electronic device uses VAD to identify the timestamp information of the voice part in the voice data (including the start timestamp information and the end timestamp information, etc.), and identifies the timestamp information of the noise part (including the start timestamp information and the end timestamp information), and then identifies the noise part of the voice data based on the timestamp information of the voice part and the timestamp information of the noise part, and the noise part includes at least one noise segment.
[0084] In the third step, when the average energy value of the noise part of the speech data is less than the preset energy value, the electronic device regards the speech data as clean speech data.
[0085] Among them, the preset energy value can be set according to the processing accuracy of the speech noise reduction model to be trained. Based on the identified noise part of the speech data, the electronic device calculates the average energy value of each noise segment, and then calculates the average energy value of all noise segments as the average energy value of the noise part of the speech data. If the average energy value of the noise part of the speech data is less than the preset energy value, the speech data is retained and the speech data is used as clean speech data; if the average energy value of the noise part of the speech data is greater than or equal to the preset energy value, the speech data is discarded. The electronic device repeats the first and second steps above until the number of clean speech data obtained reaches the number of samples required for training the speech noise reduction model.
[0086] Among them, the multi-channel room impulse response is a kind of simulated reverberation effect data. By using the multi-channel room impulse response to process the audio data, audio data with the same reverberation effect as the multi-channel room impulse response can be obtained. In the embodiment of the present disclosure, the electronic device uses the ISM (Image Source Method, Image Source Method) method to simulate the multi-channel room impulse response data. During the simulation process, considering that the placement position of each microphone in the microphone array may be different from the theoretical placement position, and the performance of each microphone is not exactly the same, resulting in a certain difference in the amplitude of the audio data collected by different microphones, in order to obtain room impulse response data that is more in line with the actual scene, the electronic device will add at least one of the microphone array error and the channel amplitude error to the theoretical multi-channel room impulse response.
[0087] The specific process of increasing the microphone array error is as follows: the electronic device determines the parameters needed to achieve the preset reverberation effect according to the preset reverberation effect, including the theoretical position coordinates of each microphone in the microphone array, the reverberation time, the room size, the number of sound sources (which can be voice sound sources or noise sound sources, etc.), the position coordinates of each sound source, the distance between each sound source and the microphone array (the distance is the distance from the sound source to the center point of the microphone array), etc. Based on the determined theoretical position coordinates of each microphone in the microphone array, the electronic device adds random disturbances to the theoretical position coordinates of at least one microphone in the microphone array, and then simulates the audio signal acquisition process of each microphone in the microphone array after the position coordinates are adjusted to obtain a multi-channel audio signal.
[0088] Two points need to be explained here: First, the number of microphones to which random perturbations need to be added is random, that is, the electronic device can add random perturbations to each microphone in the microphone array, or randomly select one or more microphones from the microphone array to add random perturbations.
[0089] Second, the random disturbances added by different microphones can be the same or different. The range of the random disturbance can be randomly generated according to the process level of the actual hardware equipment or the relative size of the microphone array. The range of the random disturbance can be the product of the preset error range and the spacing between each microphone in the microphone array. For example, the preset error range is [-1%, 1%], and the spacing between each microphone in the microphone array is 1 meter. Then the range of the random disturbance is -1%*10 meters to 1%*1 meter, that is, [-0.01 meter, 0.01 meter].
[0090] The specific process of increasing the amplitude error is: the electronic device randomly adjusts the amplitude of at least one channel audio signal in the multi-channel audio signal to obtain a multi-channel room impulse response.
[0091] Several points need to be explained here. First, the above-mentioned addition of amplitude error to the multi-channel audio signal with added array error is for illustration. At this time, the obtained multi-channel room impulse response adds both microphone array error and channel amplitude error. Of course, the electronic device may not add random disturbance to the theoretical position coordinates of at least one microphone in the microphone array, but only add amplitude error to the theoretical multi-channel room impulse response. In this case, the electronic device randomly adjusts the amplitude of the signal of at least one channel in the theoretical multi-channel room impulse response.
[0092] Second, the number of channels that need to adjust the amplitude is random, that is, the electronic device can adjust the amplitude of the audio signal of each channel in the multi-channel audio signal, and the electronic device can also adjust the amplitude of the audio signal of one or more channels in the multi-channel audio signal.
[0093] Third, the adjustment range of the amplitude of different channels is random, and the adjustment range can be set according to actual needs, and the adjustment range can be [0.9, 1.1]. When adjusting the amplitude, a value is randomly selected from the adjustment range, and the amplitude of the audio signal to be adjusted is multiplied by the value as a whole.
[0094] 202. The electronic device generates multi-channel full-reverberation clean voice data and pre-reverberation clean voice data based on the clean voice data and the multi-channel room impulse response.
[0095] Considering that different reverberation times can produce different reverberation data, in order to enrich the amount of sample audio data, the electronic device can adopt different processing methods based on clean voice data and multi-channel room impulse response to obtain reverberation data with different reverberation times.
[0096] In the first method, the electronic device performs a convolution operation on the clean voice data and the multi-channel room impulse response to obtain the multi-channel fully reverberated clean voice data, in which the reverberation time is relatively long.
[0097] The second method is to convolve the pre-preset duration voice data in the clean voice data with the multi-channel room impulse response to obtain the pre-reverberation clean voice data. The preset duration can be set according to the needs, generally 20 milliseconds to 50 milliseconds. The reverberation duration in the pre-reverberation clean voice data is shorter than the reverberation duration in the multi-channel full reverberation clean voice data.
[0098] 203. The electronic device generates multi-channel noise data based on the multi-channel room impulse response and the single-channel noise data.
[0099] Considering that noise will also have the reverberation effect of the actual scene when it propagates in the actual scene, in order to obtain noise data that is more in line with the actual scene, the electronic device needs to perform reverberation processing on the single-channel noise data to obtain multi-channel noise data with the same reverberation effect as the multi-channel fully reverberated clean voice data. Among them, the single-channel noise data can be a point sound source, and the channel noise data can be obtained from a noise database, which is used to store noise data of different sound sources and different channel data. Based on the obtained single-channel noise data, the electronic device can obtain multi-channel noise data by convolving the multi-channel room impulse response with the single-channel noise data.
[0100] 204. The electronic device mixes the multi-channel fully reverberated clean voice data and the multi-channel noise data according to a preset signal-to-noise ratio to obtain the noisy reverberated voice data.
[0101] Among them, the signal-to-noise ratio refers to the ratio of the signal to the noise in an electronic device or electronic system. The signal here refers to the electronic signal from outside the device that needs to be processed by this device, and the noise refers to the irregular additional signal (or information) that does not exist in the original signal after passing through the device, and this signal does not change with the change of the original signal. The preset signal-to-noise ratio is set according to actual needs and can be [-5dB, 25dB].
[0102] The electronic device mixes the multi-channel fully reverberated clean speech data and the multi-channel noise data. When the ratio of the energy value of the multi-channel fully reverberated clean speech data to the energy value of the multi-channel noise data is a preset signal-to-noise ratio, it is determined that the mixing method meets the preset signal-to-noise ratio requirement, and then the mixed data that meets the preset signal-to-noise ratio is used as the noisy reverberated speech data that the electronic device needs to obtain.
[0103] 205. The electronic device processes the frequency response of the noisy reverberation speech data and the pre-reverberation clean speech data to obtain sample audio data.
[0104] Among them, frequency response, also known as response curve, refers to the curve of gain changing with frequency. Any audio equipment or carrier (object that records sound signals) has its frequency response curve. In electronics, frequency response is used to describe the difference in the processing ability of an instrument for signals of different frequencies. Like distortion, frequency response is also a very important parameter indicator.
[0105] Considering that the frequency responses of different microphone arrays or different microphones in the same microphone array are not completely consistent, especially the frequency responses of microphones of different processes or different models are even more different, and the frequency spectrum distribution of the audio signals received by microphones with different frequency responses will be significantly different, when the speech noise reduction model is trained based on noisy reverberated speech data and pre-reverberated clean speech data with different frequency responses, the trained speech noise reduction model will have a poor match with the speech data collected by the hardware device, affecting the performance. In order to improve the performance of the trained speech noise reduction model, the electronic device needs to process the frequency response of the noisy reverberated speech data and pre-reverberated clean speech data.
[0106] When the electronic device processes the frequency response of noisy reverberation speech data and pre-reverberation clean speech data, it first determines the frequency where reception differences are likely to exist, and then combines multiple filters into an equalizer that can compensate for the reception effect of the frequency. Then, based on the equalizer, the frequency response of the noisy reverberation speech data is processed to obtain processed noisy reverberation speech data, and based on the equalizer, the frequency response of the pre-reverberation clean speech data is processed to obtain processed pre-reverberation clean speech data. Then, the processed noisy reverberation speech data and the processed pre-reverberation clean speech data are combined into a data pair, which is the sample audio data of the speech denoising model used for training.
[0107] Figure 3 and Figure 4 A flowchart showing a method for generating sample audio data provided by an embodiment of the present disclosure is shown. Figure 3 and Figure 4 , the electronic device selects speech data with an average energy value less than a preset energy value from the speech database as clean speech data according to the average energy value of the background noise in the speech data, and then generates a multi-channel audio signal by adding random disturbance to the position coordinates of at least one microphone in the microphone array, and then adds random disturbance to the amplitude of at least one channel audio signal in the multi-channel audio signal to obtain a multi-channel room impulse response. Then, the electronic device performs a convolution operation on the clean speech data and the multi-channel impulse room impulse response to obtain multi-channel full reverberation clean speech data and pre-reverberation clean speech data. Then, the electronic device performs a convolution operation on the single-channel noise data and the multi-channel room impulse response to obtain multi-channel noise data. Then, the electronic device mixes the multi-channel full reverberation clean speech data and the multi-channel noise data according to the preset signal-to-noise ratio to obtain noisy reverberation speech data, and then uses an equalizer to process the frequency response of the noisy reverberation speech data and the pre-reverberation clean speech data, and the processed noisy reverberation speech data and the processed pre-reverberation clean speech data form a data pair, and the data pair is used as sample audio data.
[0108] The method provided by the embodiment of the present disclosure takes into account that the voice data collected in the actual scene may have some background noise to a greater or lesser extent, and the discharge position of the microphone array in the actual scene may not be accurately set at the theoretical position, and the performance of each microphone in the microphone array is difficult to be completely consistent. The embodiment of the present disclosure takes the voice data with a noise energy value less than the preset energy value as the clean voice data, and at the same time adds at least one of the microphone array error and the channel amplitude error in the actual scene to the multi-channel room impulse response, so that the obtained clean voice data and the multi-channel room impulse response are more in line with the actual collection scene. Then, the clean voice data and the multi-channel room impulse response are processed to obtain the multi-channel full reverberation clean voice data and the early reverberation clean voice data. And considering that the noise will also have the reverberation effect in the actual scene when it propagates in the actual scene, by processing the single-channel noise data, the multi-channel noise data with the same reverberation effect as the multi-channel full reverberation clean voice data is obtained, and then based on the multi-channel full reverberation clean voice data, the early reverberation clean voice data and the multi-channel noise data, the sample audio data with a high degree of fit with the actual scene is generated.
[0109] See also Figure 5 The present disclosure provides a device for generating sample audio data, the device comprising:
[0110] An acquisition module 501 is used to acquire clean speech data and a multi-channel room impulse response, wherein the clean speech data is speech data with a noise energy value less than a preset energy value, and the multi-channel room impulse response is simulated reverberation effect data with at least one of a microphone array error and a channel amplitude error in an actual scene added;
[0111] A first generating module 502 is used to generate multi-channel full reverberation clean voice data and pre-reverberation clean voice data based on the clean voice data and the multi-channel room impulse response;
[0112] A second generating module 503, configured to generate multi-channel noise data based on the multi-channel room impulse response and the single-channel noise data;
[0113] The third generating module 504 is used to generate sample audio data based on the multi-channel full reverberation clean speech data, the pre-reverberation clean speech data and the multi-channel noise data.
[0114] In another embodiment of the present disclosure, an acquisition module 501 is used to acquire a speech database, which stores speech data recorded in actual speech scenarios; VAD (Voice Activity Detection) is used to identify the noise part of any speech data in the speech database; when the average energy value of the noise part of the speech data is less than a preset energy value, the speech data is used as clean speech data.
[0115] In another embodiment of the present disclosure, an acquisition module 501 is used to determine the theoretical position coordinates of each microphone in the microphone array according to a preset reverberation effect; add random disturbances to the theoretical position coordinates of at least one microphone in the microphone array; obtain a multi-channel audio signal based on the acquisition process of the simulated audio signal of each microphone in the microphone array after the position coordinates are adjusted; and randomly adjust the amplitude of each channel audio signal in the multi-channel audio signal to obtain a multi-channel room impulse response.
[0116] In another embodiment of the present disclosure, the first generation module 502 is used to convolve the clean speech data with the multi-channel room impulse response to obtain the multi-channel full-reverberation clean speech data; and convolve the speech data of the pre-preset time length in the clean speech data with the multi-channel room impulse response to obtain the pre-reverberation clean speech data.
[0117] In another embodiment of the present disclosure, the second generating module 503 is configured to perform a convolution operation on the multi-channel room impulse response and the single-channel noise data to obtain the multi-channel noise data.
[0118] In another embodiment of the present disclosure, the third generation module 504 is used to mix the multi-channel full-reverberation clean speech data and the multi-channel noise data according to a preset signal-to-noise ratio to obtain noisy reverberation speech data; and process the frequency response of the noisy reverberation speech data and the early reverberation clean speech data to obtain sample audio data.
[0119] In summary, the device provided by the embodiment of the present disclosure considers that the voice data collected in the actual scene will have some background noise more or less, and the discharge position of the microphone array in the actual scene may not be accurately set at the theoretical position, and the performance of each microphone in the microphone array is difficult to be completely consistent. The embodiment of the present disclosure takes the voice data with a noise energy value less than the preset energy value as the clean voice data, and at the same time adds at least one of the microphone array error and the channel amplitude error in the actual scene to the multi-channel room impulse response, so that the obtained clean voice data and the multi-channel room impulse response are more in line with the actual collection scene. Then the clean voice data and the multi-channel room impulse response are processed to obtain the multi-channel full reverberation clean voice data and the early reverberation clean voice data. And considering that the noise will also have the reverberation effect in the actual scene when it propagates in the actual scene, by processing the single-channel noise data, the multi-channel noise data with the same reverberation effect as the multi-channel full reverberation clean voice data is obtained, and then based on the multi-channel full reverberation clean voice data, the early reverberation clean voice data and the multi-channel noise data, the sample audio data with a high degree of fit with the actual scene is generated.
[0120] Figure 6The structure block diagram of an electronic device 600 provided by an exemplary embodiment of the present disclosure is shown. Generally, the electronic device 600 includes: a processor 601 and a memory 602 .
[0121] The processor 601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 601 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 601 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 601 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 601 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0122] The memory 602 may include one or more computer-readable storage media, which may be non-transitory. The memory 602 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 602 is used to store at least one instruction, which is used to be executed by the processor 601 to implement the method for generating sample audio data provided by the method embodiment of the present disclosure.
[0123] In some embodiments, the electronic device 600 may further include: a peripheral device interface 603 and at least one peripheral device. The processor 601, the memory 602 and the peripheral device interface 603 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 603 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: a power supply 604.
[0124] The peripheral device interface 603 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 601 and the memory 602. In some embodiments, the processor 601, the memory 602, and the peripheral device interface 603 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 601, the memory 602, and the peripheral device interface 603 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0125] The power supply 604 is used to power various components in the electronic device 600. The power supply 604 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 604 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0126] Those skilled in the art will understand that Figure 6 The structure shown in the figure does not constitute a limitation on the electronic device 600, and may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0127] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions, and the instructions can be executed by a processor of the electronic device 600 to complete the above-mentioned method for generating sample audio data. Optionally, the storage medium can be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium can be a CD-ROM (Compact Disc Read-Only Memory), ROM, RAM (Random Access Memory), magnetic tape, floppy disk, optical data storage device, etc.
[0128] An embodiment of the present disclosure provides a computer-readable storage medium, wherein at least one program code is stored in the storage medium, and the at least one program code is loaded and executed by a processor to implement a method for generating sample audio data.
[0129] An embodiment of the present disclosure provides a computer program product, which includes a computer program code. The computer program code is stored in a computer-readable storage medium. A processor of an electronic device reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, so that the electronic device executes a method for generating sample audio data.
[0130] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0131] The above description is only an optional embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for generating sample audio data, characterized in that: The method comprises: Acquire clean speech data and a multi-channel room impulse response, wherein the clean speech data is speech data with a noise energy value less than a preset energy value, and the multi-channel room impulse response is simulated reverberation effect data with at least one of a microphone array error and a channel amplitude error in an actual scene added; Convolution operation is performed on the clean speech data and the multi-channel room impulse response to obtain multi-channel full-reverberation clean speech data; Performing a convolution operation on the pre-preset duration speech data in the clean speech data and the multi-channel room impulse response to obtain pre-reverberation clean speech data; Performing a convolution operation on the multi-channel room impulse response and the single-channel noise data to obtain multi-channel noise data; According to a preset signal-to-noise ratio, the multi-channel fully reverberated clean speech data and the multi-channel noise data are mixed to obtain noisy reverberated speech data; The frequency responses of the noisy reverberation speech data and the pre-reverberation clean speech data are processed to obtain sample audio data.
2. The method according to claim 1, characterized in that: The obtaining of clean voice data comprises: Acquire a voice database, wherein the voice database stores voice data recorded in an actual voice scenario; Using voice activity detection (VAD) to identify the noise part of any speech data in the speech database; When the average energy value of the noise part of the speech data is less than the preset energy value, the speech data is used as the clean speech data.
3. The method according to claim 1, characterized in that The obtaining of the multi-channel room impulse response comprises: According to the preset reverberation effect, determine the theoretical position coordinates of each microphone in the microphone array; adding random disturbance to the theoretical position coordinates of at least one microphone in the microphone array; A collection process of simulating an audio signal based on each microphone in the microphone array after position coordinate adjustment is obtained to obtain a multi-channel audio signal; The amplitude of at least one channel audio signal in the multi-channel audio signal is randomly adjusted to obtain the multi-channel room impulse response.
4. A device for generating sample audio data, characterized in that: The device comprises: An acquisition module, used to acquire clean speech data and a multi-channel room impulse response, wherein the clean speech data is speech data with a noise energy value less than a preset energy value, and the multi-channel room impulse response is simulated reverberation effect data with at least one of a microphone array error and a channel amplitude error in an actual scene added; The first generation module is used to perform a convolution operation on the clean voice data and the multi-channel room impulse response to obtain multi-channel full-reverberation clean voice data; and perform a convolution operation on the voice data of a pre-preset time length in the clean voice data and the multi-channel room impulse response to obtain pre-reverberation clean voice data; A second generating module is used to perform a convolution operation on the multi-channel room impulse response and the single-channel noise data to obtain multi-channel noise data; The third generation module is used to mix the multi-channel full-reverberation clean speech data and the multi-channel noise data according to a preset signal-to-noise ratio to obtain noisy reverberation speech data; and process the frequency response of the noisy reverberation speech data and the early reverberation clean speech data to obtain sample audio data.
5. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the method for generating sample audio data according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that: The storage medium stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the method for generating sample audio data according to any one of claims 1 to 3.
7. A computer program product, characterized in that The computer program product includes a computer program code, which is stored in a computer-readable storage medium. A processor of an electronic device reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, so that the electronic device performs the method for generating sample audio data as described in any one of claims 1 to 3.
