Audio signal processing method for generating a simulated impulse response for multiple audio sources and apparatus, and computer device thereof
View Patent ↗This application relates to an audio signal processing method performed by a computer device. The method includes: obtaining a set of scenario layout parameters corresponding to a current simulated scenario; sampling, at a preset sampling rate, an audio signal emitted by at least one audio source to obtain at least one sample; determining, based on a linear distance, a simulated traveling distance corresponding to each sample; determining a number of simulated reflections based on the simulated traveling distance; determining a reflection coefficient based on an environmental-spatial parameter, and respectively determining, based on the reflection coefficient, the simulated traveling distance, and the number of simulated reflections, a simulated reflection loss corresponding to each audio source; and generating a simulated impulse response under the current simulated scenario based on the simulated reflection loss corresponding to each audio source.
1 . An audio signal processing method, performed by a computer device, the method comprising:
obtaining a set of scenario layout parameters corresponding to a current simulated scenario, the set of scenario layout parameters comprising a linear distance between a receiver and at least one audio source and a reflection coefficient;
sampling, at a preset sampling rate, an audio signal emitted by the at least one audio source to obtain at least one sample;
determining, based on the linear distance between the receiver and the at least one audio source, a simulated traveling distance corresponding to each sample;
determining a number of simulated reflections based on the simulated traveling distance;
determining, based on the reflection coefficient, the simulated traveling distance, and the number of simulated reflections, a simulated reflection loss corresponding to each audio source; and
generating a simulated impulse response under the current simulated scenario based on the simulated reflection loss corresponding to each audio source, further including:
updating an initial filter parameter based on the simulated reflection loss corresponding to each audio source to obtain an initial simulated impulse response under the current simulated scenario; and
filtering the initial simulated impulse response to obtain a final simulated impulse response as the simulated impulse response under the current simulated scenario.
2 . The method according to claim 1 , wherein the determining, based on the linear distance between the receiver and the at least one audio source, a simulated traveling distance corresponding to each sample comprises:
obtaining a plurality of preset variable values;
transforming the plurality of preset variable values into a plurality of corresponding distance transform coefficients; and
determining, based on each distance transform coefficient and the linear distance, the simulated traveling distance corresponding to each sample at the preset sampling rate.
3 . The method according to claim 1 , wherein the determining a number of simulated reflections based on the simulated traveling distance comprises:
determining a maximum simulated traveling distance among the simulated traveling distances corresponding to the samples;
determining a maximum number of simulated reflections based on a positive correlation between a traveling distance and a number of reflections of the audio signal as well as the maximum simulated traveling distance; and
determining, based on the distance proportional relationship and the maximum number of simulated reflections, the number of simulated reflections corresponding to each simulated traveling distance.
4 . The method according to claim 1 , wherein after the determining a number of simulated reflections based on the simulated traveling distance, the method further comprises:
updating the number of determined simulated reflections based on random reflection fluctuations, the random reflection fluctuations being obtained based on random sampling in preset uniform distribution.
5 . The method according to claim 1 , wherein the method further comprises:
obtaining a target audio signal; and
performing convolution processing on the target audio signal based on the simulated impulse response, to generate a target audio signal with reverberation.
6 . The method according to claim 5 , wherein the method further comprises:
adding noise to the target audio signal with reverberation to obtain training data;
determining a reference audio signal corresponding to the training data, the reference audio signal comprising at least one of a denoised audio signal with reverberation and an audio signal without reverberation and noise; and
training a target audio processing model based on the training data and the reference audio signal corresponding to the training data to obtain a trained audio processing model.
7 . The method according to claim 6 , wherein the method further comprises:
obtaining an additional target audio signal, the additional target audio signal comprising a voice audio signal and an accompaniment audio signal; and
separating the voice audio signal from the accompaniment audio signal in the additional target audio signal via the trained audio processing model to obtain a pure voice audio signal and a pure accompaniment audio signal.
8 . A computer device, comprising a memory and a processor, the memory storing computer-readable instructions, the computer-readable instructions, when executed by the processor, causing the computer device to implement an audio signal processing method including:
obtaining a set of scenario layout parameters corresponding to a current simulated scenario, the set of scenario layout parameters comprising a linear distance between a receiver and at least one audio source and a reflection coefficient;
sampling, at a preset sampling rate, an audio signal emitted by the at least one audio source to obtain at least one sample;
determining, based on the linear distance between the receiver and the at least one audio source, a simulated traveling distance corresponding to each sample;
determining a number of simulated reflections based on the simulated traveling distance;
determining, based on the reflection coefficient, the simulated traveling distance, and the number of simulated reflections, a simulated reflection loss corresponding to each audio source; and
generating a simulated impulse response under the current simulated scenario based on the simulated reflection loss corresponding to each audio source, further including:
updating an initial filter parameter based on the simulated reflection loss corresponding to each audio source to obtain an initial simulated impulse response under the current simulated scenario; and
filtering the initial simulated impulse response to obtain a final simulated impulse response as the simulated impulse response under the current simulated scenario.
9 . The computer device according to claim 8 , wherein the determining, based on the linear distance between the receiver and the at least one audio source, a simulated traveling distance corresponding to each sample comprises:
obtaining a plurality of preset variable values;
transforming the plurality of preset variable values into a plurality of corresponding distance transform coefficients; and
determining, based on each distance transform coefficient and the linear distance, the simulated traveling distance corresponding to each sample at the preset sampling rate.
10 . The computer device according to claim 8 , wherein the determining a number of simulated reflections based on the simulated traveling distance comprises:
determining a maximum simulated traveling distance among the simulated traveling distances corresponding to the samples;
determining a maximum number of simulated reflections based on a positive correlation between a traveling distance and a number of reflections of the audio signal as well as the maximum simulated traveling distance; and
determining, based on the distance proportional relationship and the maximum number of simulated reflections, the number of simulated reflections corresponding to each simulated traveling distance.
11 . The computer device according to claim 8 , wherein after the determining a number of simulated reflections based on the simulated traveling distance, the method further comprises:
updating the number of determined simulated reflections based on random reflection fluctuations, the random reflection fluctuations being obtained based on random sampling in preset uniform distribution.
12 . The computer device according to claim 8 , wherein the method further comprises:
obtaining a target audio signal; and
performing convolution processing on the target audio signal based on the simulated impulse response, to generate a target audio signal with reverberation.
13 . The computer device according to claim 12 , wherein the method further comprises:
adding noise to the target audio signal with reverberation to obtain training data;
determining a reference audio signal corresponding to the training data, the reference audio signal comprising at least one of a denoised audio signal with reverberation and an audio signal without reverberation and noise; and
training a target audio processing model based on the training data and the reference audio signal corresponding to the training data to obtain a trained audio processing model.
14 . The computer device according to claim 13 , wherein the method further comprises:
obtaining an additional target audio signal, the additional target audio signal comprising a voice audio signal and an accompaniment audio signal; and
separating the voice audio signal from the accompaniment audio signal in the additional target audio signal via the trained audio processing model to obtain a pure voice audio signal and a pure accompaniment audio signal.
15 . A non-transitory computer-readable storage medium, having computer-readable instructions stored thereon, the computer-readable instructions, when executed by a processor of a computer device, causing the computer device to implement an audio signal processing method including:
obtaining a set of scenario layout parameters corresponding to a current simulated scenario, the set of scenario layout parameters comprising a linear distance between a receiver and at least one audio source and a reflection coefficient;
sampling, at a preset sampling rate, an audio signal emitted by the at least one audio source to obtain at least one sample;
determining, based on the linear distance between the receiver and the at least one audio source, a simulated traveling distance corresponding to each sample;
determining a number of simulated reflections based on the simulated traveling distance;
determining, based on the reflection coefficient, the simulated traveling distance, and the number of simulated reflections, a simulated reflection loss corresponding to each audio source; and
generating a simulated impulse response under the current simulated scenario based on the simulated reflection loss corresponding to each audio source, further including:
updating an initial filter parameter based on the simulated reflection loss corresponding to each audio source to obtain an initial simulated impulse response under the current simulated scenario; and
filtering the initial simulated impulse response to obtain a final simulated impulse response as the simulated impulse response under the current simulated scenario.
16 . The non-transitory computer-readable storage medium according to claim 15 , wherein after the determining a number of simulated reflections based on the simulated traveling distance, the method further comprises:
updating the number of determined simulated reflections based on random reflection fluctuations, the random reflection fluctuations being obtained based on random sampling in preset uniform distribution.
17 . The non-transitory computer-readable storage medium according to claim 15 , wherein the method further comprises:
obtaining a target audio signal; and
performing convolution processing on the target audio signal based on the simulated impulse response, to generate a target audio signal with reverberation.
18 . The non-transitory computer-readable storage medium according to claim 17 , wherein the method further comprises:
adding noise to the target audio signal with reverberation to obtain training data;
determining a reference audio signal corresponding to the training data, the reference audio signal comprising at least one of a denoised audio signal with reverberation and an audio signal without reverberation and noise; and
training a target audio processing model based on the training data and the reference audio signal corresponding to the training data to obtain a trained audio processing model.