Audio processing method, model training method, device, equipment, medium and product

By using the left-sided convolution method in audio processing, the problems of delay and audio quality in the streaming timbre conversion solution are solved, achieving both low delay and high audio quality, and is suitable for application scenarios with high timeliness.

CN115346543BActive Publication Date: 2024-09-24GUANGZHOU BAIGUOYUAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210986541.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-17
Publication Date
2024-09-24
Estimated Expiration
2042-08-17

AI Technical Summary

Technical Problem

Existing streaming timbre conversion solutions have difficulty balancing low latency and high audio quality. Especially in application scenarios with high timeliness requirements such as voice calls and live broadcasts, the size of the receptive field of the traditional convolution model leads to increased latency and affected audio quality.

Method used

Using a left-sided convolution method, the amount of padding data on the right side of the input data of the convolution layer is smaller than the amount of padding on the left side, ensuring that subsequent information can be referenced while controlling the delay. In this way, the convolution method is changed to take into account both low latency and processing effect.

Benefits of technology

It achieves both low latency and audio processing effects in application scenarios such as voice calls and live broadcasts, improves audio quality, reduces latency, meets the needs of real-time voice changing, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115346543B
    Figure CN115346543B
Patent Text Reader

Abstract

The embodiments of the present application disclose an audio processing method, a model training method, an apparatus, a device, a medium and a product. The method includes: determining a target right-side filling amount and a target left-side filling amount corresponding to a preset audio processing model, wherein the target right-side filling amount is used to indicate the amount of data filled on the right side of the input data of the convolution layer, and the target left-side filling amount is used to indicate the amount of data filled on the left side of the input data of the convolution layer, and the target right-side filling amount is greater than 0 and less than the target left-side filling amount, and based on the target right-side filling amount, the target left-side filling amount and the preset audio processing model, the audio stream to be processed is processed to obtain the corresponding processed target audio stream. The above technical solution fills the data on the right side to ensure reference to the subsequent information, improve the audio quality after audio processing, and the amount of right-side filling data is less than the amount of left-side filling data, which can effectively control the delay, thereby taking into account both low latency and processing effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of audio processing technology, and in particular to audio processing methods, model training methods, devices, equipment, storage media and products. Background Art

[0002] With the rapid development of audio processing technology, neural network models have been widely used in audio processing. For example, as an important audio processing technology, timbre conversion solutions based on neural network models have been widely used in various fields such as audio content generation and entertainment audio production.

[0003] Voice conversion is a technology that converts the voice of the original audio to the target voice while keeping the content information of the original audio unchanged. At present, voice conversion and other audio processing technologies mostly use offline inference solutions. However, for application scenarios with high timeliness requirements such as voice calls or live broadcasts, streaming inference solutions are required. However, existing streaming inference solutions cannot achieve both low latency and conversion effects. Summary of the invention

[0004] The embodiments of the present application provide an audio processing method, a model training method, an apparatus, a device, a storage medium and a product, which can be better applied to the processing of audio streams.

[0005] According to one aspect of the present application, there is provided an audio processing method, the method comprising:

[0006] Determine a target right-side padding amount and a target left-side padding amount corresponding to a preset audio processing model, wherein the preset audio processing model includes a convolutional layer, the target right-side padding amount is used to indicate the amount of data padded on the right side of the input data of the convolutional layer, and the target left-side padding amount is used to indicate the amount of data padded on the left side of the input data of the convolutional layer, the target right-side padding amount is greater than 0, and the target right-side padding amount corresponding to the same convolutional layer is less than the corresponding target left-side padding amount;

[0007] Based on the target right-side filling amount, the target left-side filling amount and the preset audio processing model, the audio stream to be processed is processed to obtain a corresponding processed target audio stream.

[0008] According to another aspect of the present application, a model training method is provided, the method comprising:

[0009] Determine the right-side padding amount and the left-side padding amount corresponding to the audio processing model, wherein the audio processing model includes a convolutional layer, the right-side padding amount is used to indicate the amount of data padded on the right side of the input data of the convolutional layer, the left-side padding amount is used to indicate the amount of data padded on the left side of the input data of the convolutional layer, the left-side padding amount is used to indicate the amount of data padded on the left side of the input data of the convolutional layer, the right-side padding amount is greater than 0, and the right-side padding amount corresponding to the same convolutional layer is less than the corresponding left-side padding amount;

[0010] Based on the right padding amount, the left padding amount and the audio processing model, the sample audio stream is processed to obtain a corresponding processed target sample audio stream, wherein the sample audio stream corresponds to a standard audio stream;

[0011] A target loss relationship is determined according to the target sample audio stream and the standard audio stream, and the audio processing model is trained based on the target loss relationship.

[0012] According to another aspect of the present application, there is provided an audio processing device, the device comprising:

[0013] A padding quantity determination module, used to determine a target right-side padding quantity and a target left-side padding quantity corresponding to a preset audio processing model, wherein the preset audio processing model includes a convolutional layer, the target right-side padding quantity is used to indicate the amount of data padded on the right side of the input data of the convolutional layer, the target left-side padding quantity is used to indicate the amount of data padded on the left side of the input data of the convolutional layer, the target right-side padding quantity is greater than 0, and the target right-side padding quantity corresponding to the same convolutional layer is less than the corresponding target left-side padding quantity;

[0014] The audio stream processing module is used to process the audio stream to be processed based on the target right-side filling amount, the target left-side filling amount and the preset audio processing model to obtain the corresponding processed target audio stream.

[0015] According to another aspect of the present application, a model training device is provided, the device comprising:

[0016] A quantity determination module, used to determine the right-side padding quantity and the left-side padding quantity corresponding to the audio processing model, wherein the audio processing model includes a convolutional layer, the right-side padding quantity is used to indicate the amount of data padded on the right side of the input data of the convolutional layer, and the left-side padding quantity is used to indicate the amount of data padded on the left side of the input data of the convolutional layer, the right-side padding quantity is greater than 0, and the right-side padding quantity corresponding to the same convolutional layer is less than the corresponding left-side padding quantity;

[0017] An audio processing module, used for processing the sample audio stream based on the right padding amount, the left padding amount and the audio processing model to obtain a corresponding processed target sample audio stream, wherein the sample audio stream corresponds to a standard audio stream;

[0018] A model training module is used to determine a target loss relationship according to the target sample audio stream and the standard audio stream, and train the audio processing model based on the target loss relationship.

[0019] According to another aspect of the present application, an electronic device is provided, the electronic device comprising:

[0020] at least one processor; and

[0021] a memory communicatively connected to the at least one processor; wherein,

[0022] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the audio processing method and / or model training method described in any embodiment of the present application.

[0023] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and the computer program is used to enable a processor to implement the audio processing method and / or model training method described in any embodiment of the present application when executed.

[0024] According to another aspect of the present application, a computer program product is provided, which includes a computer program, and when the computer program is executed by a processor, it implements the audio processing method and / or model training method described in any embodiment of the present application.

[0025] The audio processing scheme provided in the embodiment of the present application, when it is necessary to process the audio stream to be processed, first determine the target right-side filling number and the target left-side filling number corresponding to the preset audio processing model, wherein the preset audio processing model includes a convolution layer, the target right-side filling number is used to indicate the number of data filled on the right side of the input data of the convolution layer, the target left-side filling number is used to indicate the number of data filled on the left side of the input data of the convolution layer, the target right-side filling number is greater than 0 and less than the target left-side filling number, and then, based on the target right-side filling number, the target left-side filling number and the preset audio processing model, the audio stream to be processed is processed to obtain the corresponding processed target audio stream. By adopting the above technical scheme, when filling data for the input data of the convolution layer, filling data on the right side can ensure reference to the subsequent information, improve the audio quality after audio processing, and the number of right-side filling data is less than the number of left-side filling data, which can effectively control the delay, thereby achieving the technical effect of taking into account both low latency and processing effect.

[0026] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0028] Figure 1 A flowchart of an audio processing method provided in an embodiment of the present application;

[0029] Figure 2 A schematic diagram of a convolution method in related technology;

[0030] Figure 3 A schematic diagram of a convolution method provided in an embodiment of the present application;

[0031] Figure 4 A schematic diagram of the structure of a preset audio processing model provided in an embodiment of the present application;

[0032] Figure 5 A flowchart of another audio processing method provided in an embodiment of the present application;

[0033] Figure 6 A schematic diagram of the principle of an audio processing method provided in an embodiment of the present application;

[0034] Figure 7 A flowchart of a model training method provided in an embodiment of the present application;

[0035] Figure 8 A structural block diagram of an audio processing device provided in an embodiment of the present application;

[0036] Fig. 9 A structural block diagram of a model training device provided in an embodiment of the present application;

[0037] Fig.10 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] 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 drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0039] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0040] In order to facilitate understanding of the embodiments of the present application, taking the audio processing method of timbre conversion processing as an example, the relevant technology is first introduced.

[0041] Currently, there are two main streaming timbre conversion solutions:

[0042] The first type is the autoregressive model solution. This type of solution uses an autoregressive framework. When predicting the information of the current step, it only uses the previous information and does not look back (that is, it does not use the later information). During training, the size of the speech block needs to be set to limit the amount of information that looks forward. Although the autoregressive architecture is suitable for streaming reasoning, it does not use the later information and cannot use the later information to assist in predicting the output of the current step, making it difficult to ensure the quality of the audio after the conversion.

[0043] The second type is the convolution model solution, which combines convolutions of different layers into one model. In this solution, conventional convolutions are generally used, such as causal convolutions, traditional convolutions, or dilated convolutions. When using a convolution combination architecture, it is necessary to calculate the receptive field size of the convolution under the entire framework so that when doing streaming inference, the left and right (also understood as the front and back) padding is the same as the receptive field size, that is, the amount of data padded on the left is the same as the amount of data padded on the right. Since a vocoder is generally required when doing speech conversion, and convolution is often used inside the vocoder, if both the acoustic model and the vocoder use convolution, the superposition of the two models will increase the size of the receptive field, and a large receptive field will cause a larger delay. At present, the common practice is to reduce the convolution kernel of the convolution to achieve the effect of reducing the receptive field size and reducing delay, but reducing the receptive field will lead to a worse effect.

[0044] In an embodiment of the present application, a new convolution method is provided, in which data is filled on the right side, and the amount of filled data on the right side is less than the amount of filled data on the left side, that is, the left side is filled more than the right side. This convolution method is referred to as left-biased convolution in this article. By changing the conventional convolution in the model used for audio stream processing to a left-biased convolution, it is possible to achieve a method that does not require reducing the size of the receptive field by reducing the convolution kernel, to ensure that both the subsequent information can be referenced and the delay can be effectively controlled, thereby achieving a technical effect that takes into account both low latency and processing effect.

[0045] Figure 1 A flowchart of an audio processing method provided in an embodiment of the present application, this embodiment can be applied to the situation of processing audio streams, specifically, it can be applied to various application scenarios with high real-time requirements such as voice calls, live audio and video broadcasts, and multi-person online conferences. The method can be executed by an audio processing device, and the audio processing device can be implemented in the form of hardware and / or software, and the audio processing device can be configured in electronic devices such as audio processing devices. The electronic device can be a mobile device such as a mobile phone, a smart watch, a tablet computer, and a personal digital assistant; it can also be other devices such as a desktop computer. Figure 1 As shown, the method includes:

[0046] Step 101, determine a target right-side padding amount and a target left-side padding amount corresponding to a preset audio processing model, wherein the preset audio processing model includes a convolutional layer, the target right-side padding amount is used to indicate the amount of data padded on the right side of the input data of the convolutional layer, and the target left-side padding amount is used to indicate the amount of data padded on the left side of the input data of the convolutional layer, the target right-side padding amount is greater than 0, and the target right-side padding amount corresponding to the same convolutional layer is less than the corresponding target left-side padding amount.

[0047] In the embodiment of the present application, the preset audio processing model can be understood as a neural network model obtained by pre-training for processing an audio stream to obtain a processed audio stream, wherein the audio processing method corresponding to the preset audio processing model may include, for example, timbre conversion, language conversion (such as automatically converting Chinese speech to English speech), speech noise reduction, speech content replacement, and spoken language recognition, etc. The model includes one or more convolutional layers, and the specific model structure is not limited, and can be trained using the model training method provided in the embodiment of the present application.

[0048] Exemplarily, before the audio stream to be processed is processed by the preset audio processing model, the target right filling number and the target left filling number are first determined. The audio stream to be processed can be understood as the audio stream that needs to be processed currently, which can be a real-time call voice stream, a video live voice stream or an online conference voice stream, etc. Among them, the determination method of the target right filling number and the target left filling number can be to read the preset target right filling number and the target left filling number, or it can be dynamically determined according to the actual situation of the audio stream to be processed, the actual needs of audio processing or network quality and other related factors. Different values ​​of the target right filling number and the target left filling number can correspond to different preset audio processing models, that is, the corresponding preset audio processing model can be selected according to the determined target right filling number and the target left filling number; different values ​​of the target right filling number and the target left filling number can also correspond to the same universal preset audio processing model, and the universal preset audio processing model can be trained by randomly determining the right filling number and the left filling number to adapt to different value conditions.

[0049] Exemplarily, when processing an audio stream, it is generally necessary to divide the audio stream into blocks to obtain multiple speech blocks, the specific size of which is not limited, for example, the size of 10 or 20 speech frames, and reasoning is performed in units of speech blocks. After the data passes through the convolution operation of the convolution layer, the amount of output data will be reduced. In order to ensure that the amount of data input each time is consistent and reduce calculation errors, it is necessary to pad a certain amount of data on the left side (also understood as the front) and the right side (also understood as the back) of the input data before inputting the convolution layer, such as a certain amount of data with a step value of 0.

[0050] In an embodiment of the present application, the target right padding amount (also referred to as the target rear padding amount) is used to indicate the amount of data filled on the right side of the input data of the convolution layer. When the preset audio processing model includes multiple convolution layers, the target right padding amounts corresponding to different convolution layers may be the same or different, that is, multiple target right padding amounts may be determined, and the number may be consistent with the number of convolution layers; the target left padding amount (also referred to as the target front padding amount) is used to indicate the amount of data filled on the left side of the input data of the convolution layer. When the preset audio processing model includes multiple convolution layers, the target left padding amounts corresponding to different convolution layers may be the same or different, that is, multiple target left padding amounts may be determined, and the number may be consistent with the number of convolution layers; all target right padding amounts may be greater than 0, and, for the same convolution layer, its corresponding target right padding amount is less than the target left padding amount, that is, each convolution layer in the preset audio processing model is a left-biased convolution mode.

[0051] Figure 2 It is a schematic diagram of a convolution method in related technology. Figure 2 The traditional convolution method is shown in the figure. For example, when the kernel size (kernel_size) is 5 and the input time step (time_step) is 3, the data with the left and right pad step values ​​of 0, that is, the left padding amount is equal to the right padding amount, and then convolution is used for calculation. At this time, the receptive field size is 5. When processing the audio stream, the right padding data should be the upcoming two speech blocks. It is necessary to wait for the next two speech blocks to be obtained before the input data of the convolution layer can be obtained. Therefore, the delay is the time of two speech blocks (other factors are ignored here).

[0052] Figure 3 A schematic diagram of a convolution method provided in an embodiment of the present application, Figure 3As shown in , a new unbalanced convolution method provided by the present application is left-biased convolution. When processing streaming voice, it is the receptive field on the right side of the convolution that affects the delay. Therefore, in order to take into account both delay and audio quality, the embodiment of the present application adopts left-biased convolution, that is, the receptive field of the convolution is biased to the left, and the number of pads on the left is required to be more than that on the right. For example, the convolution kernel size is also 5. When the input time step (time_step) is 3, three data with a step value of 0 are padded on the left, and one data with a step value of 0 is padded on the right, that is, the number of paddings on the left is greater than the number of paddings on the right, and then convolution is used for calculation. At this time, the receptive field size is 5. When processing the audio stream, the data padded on the right should be an upcoming voice block. It is necessary to wait for the next voice block to be obtained before the input data of the convolution layer can be obtained. Therefore, the delay is the time of a voice block (other factors are ignored here). Compared Figure 2 Compared with the traditional convolution method shown in , the delay of one speech block can be reduced.

[0053] Step 102: Based on the target right-side padding amount, the target left-side padding amount and the preset audio processing model, the audio stream to be processed is processed to obtain a corresponding processed target audio stream.

[0054] Exemplarily, after determining the target right padding amount and the target left padding amount, the audio stream to be processed can be input into the preset audio processing model; or after preprocessing the audio stream to be processed, the preprocessing result data can be input into the preset audio processing model. In the process of processing the data of the input model, the preset audio processing model pads the input data to be input into the corresponding convolution layer based on the target right padding amount and the target left padding amount corresponding to each convolution layer, and then inputs it into the corresponding convolution layer to complete the convolution calculation. Finally, the preset audio processing model outputs the processed audio stream, and the target audio stream is determined according to the output of the preset audio processing model. For example, the audio data corresponding to the padding data is removed based on the output of the model to obtain the target audio stream.

[0055] The audio processing method provided in the embodiment of the present application, when it is necessary to process the audio stream to be processed, first determines the target right-side filling number and the target left-side filling number corresponding to the preset audio processing model, wherein the preset audio processing model includes a convolution layer, the target right-side filling number is used to indicate the number of data filled on the right side of the input data of the convolution layer, the target left-side filling number is used to indicate the number of data filled on the left side of the input data of the convolution layer, the target right-side filling number is greater than 0 and less than the target left-side filling number, and then, based on the target right-side filling number, the target left-side filling number and the preset audio processing model, the audio stream to be processed is processed to obtain the corresponding processed target audio stream. By adopting the above technical solution, when filling data for the input data of the convolution layer, filling data on the right side can ensure reference to the subsequent information, improve the audio quality after audio processing, and the number of right-side filling data is less than the number of left-side filling data, which can effectively control the delay, thereby achieving the technical effect of taking into account both low latency and processing effect.

[0056] In some embodiments, the preset audio processing model includes a preset timbre adding model (which can be understood as an acoustic model) and a preset vocoder model, and both the preset timbre adding model and the preset vocoder model include convolutional layers, and the preset timbre adding model is used to add timbre information to content information to obtain timbre content information, and the preset vocoder model is used to convert the timbre content information into audio data. At this time, the preset audio processing model can be considered as a preset timbre conversion model, which is used to perform timbre conversion on the audio stream. Among them, the content information can be understood as voice content information, and the automatic speech recognition technology (Automatic Speech Recognition, ASR) can be used to pre-process the audio frames in the audio stream to convert the human voice information contained in the audio frame into text information, and the text information is used as the above-mentioned content information. The preset timbre adding model and the preset vocoder model both include one or more convolutional layers, and the specific structure is not limited.

[0057] Figure 4 A schematic diagram of a structure of a preset audio processing model provided in an embodiment of the present application, such as Figure 4 As shown, after the content information passes through the preset timbre adding model, the timbre information is added, and then the content information passes through the preset vocoder model and is converted into audio data through upsampling. Exemplarily, the preset timbre adding model can be an acoustic model (AM), specifically an acoustic model of a one-dimensional convolutional residual network (conv1d resnet); the preset vocoder model (vocoder), specifically a HiFi-GAN vocoder, which uses a generative adversarial network (GAN) as the basic generation model to ensure the sound quality of the generated audio.

[0058] In some embodiments, the processing of the audio stream to be processed based on the target right-side filling amount, the target left-side filling amount and the preset audio processing model to obtain the corresponding processed target audio stream includes: extracting the content information to be processed in the audio stream to be processed; inputting the content information to be processed into the preset audio processing model, so that the preset audio processing model processes the content information to be processed based on the target right-side filling amount and the target left-side filling amount to obtain the corresponding target audio stream with changed timbre. The advantage of such a setting is that the consistency of the content information of the target audio stream after timbre conversion and the audio stream to be processed can be accurately guaranteed.

[0059] Exemplarily, ASR technology is used to extract content information to be processed from an audio stream to be processed, and the content information to be processed is input into a preset audio processing model for processing. Through a preset timbre adding model in the preset audio processing model, target timbre information is added to the content information to be processed to obtain target timbre content information. The target timbre content information is upsampled by a preset vocoder model and converted into a target audio stream with a timbre changed to a target timbre. In the above processing, before the data is input into each convolution layer, it is padded based on the target right padding amount and the target left padding amount corresponding to the corresponding convolution layer, and then input into the corresponding convolution layer for convolution calculation.

[0060] In some embodiments, the determining of the target right-side padding amount and the target left-side padding amount corresponding to the preset audio processing model includes: determining the target right-side padding amount corresponding to the preset audio processing model; determining the convolution kernel size corresponding to the convolution layer; and determining the target left-side padding amount according to the convolution kernel size and the target right-side padding amount. The advantage of such a setting is that the target right-side padding amount and the target left-side padding amount can be determined quickly and accurately when the convolution kernel size is fixed.

[0061] Exemplarily, for the same convolutional layer, the corresponding total number of padding can be determined according to the receptive field of the model, and the receptive field can be determined by the convolution kernel size of the convolutional layer. The total number of padding is generally the convolution kernel size minus 1 (that is, kernel_size-1). The target right padding number (right_pad_num) can be determined first, and then the target left padding number (left_pad_num) can be determined based on the difference between the total padding number and the target right padding number, that is, left_pad_num=kernel_size-1-right_pad_num.

[0062] In some embodiments, the target right side padding amount is determined according to the expected delay corresponding to the audio stream to be processed, wherein the target right side padding amount and the expected delay are positively correlated. The advantage of such a setting is that the target right side padding amount can be quickly and reasonably determined according to the actual delay requirement.

[0063] Among them, the expected delay can be understood as the desired delay length, and the expected delay can be determined based on the current tolerance for the delay. For example, the higher the tolerance, the longer the expected delay, and accordingly, the target right-side filling quantity can be larger; the lower the tolerance, the shorter the expected delay, and accordingly, the target right-side filling quantity can be smaller. Optionally, a corresponding relationship between the right-side filling quantity set and the delay can be established in advance to obtain a quantity-delay mapping relationship, and the quantity-delay mapping relationship is queried according to the expected delay to obtain the target right-side filling quantity. The quantity-delay mapping relationship can be established through experiments and the like, and the right-side filling quantity set contains the right-side filling quantity corresponding to each convolutional layer.

[0064] Figure 5 A flowchart of another audio processing method provided in an embodiment of the present application is shown below, taking audio processing as timbre conversion as an example. Figure 6 A schematic diagram of the principle of an audio processing method provided in an embodiment of the present application can be combined with Figure 5 and Figure 6 To understand the embodiments of the present application, based on the above optional embodiments, the method may include:

[0065] Step 501: Determine a target right-side padding amount corresponding to a preset audio processing model according to an expected delay corresponding to an audio stream to be processed.

[0066] Among them, the preset audio processing model includes a preset timbre adding model and a preset vocoder model. The preset timbre adding model contains a first preset number (denoted as M, greater than or equal to 1) of convolutional layers, and the preset vocoder model contains a second preset number (denoted as N, greater than or equal to 1) of convolutional layers.

[0067] Optionally, it is possible to determine in advance by experiments or other means that when each convolution layer in the preset audio processing model corresponds to a different right-side padding amount, the preset audio processing model corresponds to a different delay, establish a corresponding relationship between the right-side padding amount set and the delay, and obtain a quantity-delay mapping relationship. For example, the right-side padding amounts corresponding to the M convolutional layers are Mr1, Mr2, ..., Mrm, and the right-side padding amounts corresponding to the N convolutional layers are Nr1, Nr2, ..., Nrm, respectively. The value range of the right-side padding amount is greater than 0 and less than the difference between the corresponding convolution kernel size minus 1 and then divided by 2, that is, (kernel_size-1) / 2. Different values ​​of Mr1, Mr2, ..., Mrm, Nr1, Nr2, ..., Nrm are combined to obtain multiple right-side padding amount sets, each right-side padding amount set contains a value of Mr1, Mr2, ..., Mrm, Nr1, Nr2, ..., Nrm (that is, M+N values), and corresponds to a delay, and obtains a quantity-delay mapping relationship.

[0068] In this step, the quantity-delay mapping relationship can be queried according to the expected delay to obtain a corresponding target right-side filling quantity set.

[0069] Step 502: determine the convolution kernel size corresponding to the convolution layer, and determine the target left padding amount according to the convolution kernel size and the target right padding amount.

[0070] Exemplarily, for each convolution layer, the corresponding target left padding amount is determined according to the convolution kernel size corresponding to the convolution layer and the corresponding target right padding amount.

[0071] Step 503: extract the content information to be processed from the audio stream to be processed.

[0072] This step may also be performed before step 501, and is not specifically limited.

[0073] Step 504: input the content information to be processed into a preset audio processing model, so that the preset audio processing model processes the content information to be processed based on the target right filling amount and the target left filling amount to obtain a corresponding target audio stream with a changed timbre.

[0074] For the sake of convenience, it is assumed that the target right padding amount is the same for each convolution layer in the preset audio processing model. Figure 6As shown, reasoning is performed in units of speech blocks (chunks), assuming that 10 pieces of assumed content information (ppg) are 1 speech block, where the unit of ppg can be a frame, the target right-side filling quantity is 1 speech block (10 ppg), and the convolution kernel size is 5 speech blocks, then the target left-side filling quantity is 3 speech blocks (30 ppg). 50 ppgs are obtained for the first time, of which the first 40 ppgs are used as inputs of the preset audio processing model (for the convenience of description, the preset audio processing model is not expanded internally), the last 10 ppgs are equivalent to the right-side filling data, and the left side is filled with 30 ppgs with a value of 0. The preset audio processing model outputs audio data (wav) corresponding to 80 ppgs, whose length is 80*expected size (hope_size), and the middle (31st to 70th) 40*hope_size wavs are the target audio data that needs to be provided to the user. The second time, 40 ppgs are obtained, of which the last 10 ppgs obtained last time and the first 30 ppgs obtained this time are used as the input of the preset audio processing model. The last 10 ppgs obtained this time are equivalent to the right padding data, and the middle 30 ppgs obtained last time are used as the left padding data. After the preset audio processing model outputs the WAV corresponding to 80 ppgs, the WAV corresponding to the pad is removed to obtain the target audio data. After the third time, the same process is repeated and will not be repeated here.

[0075] The audio processing method provided in the embodiment of the present application can flexibly and accurately determine the amount of left and right padding data of the input data of the convolutional layer according to the current expected delay, thereby realizing a streaming voice changing solution with adjustable delay, and can ensure a relatively low delay while taking into account a timbre conversion effect that is close to or even exceeds that of an offline inference solution, thereby ensuring audio quality. For application scenarios such as live broadcast, real-time voice changing can be achieved during the live broadcast process, thereby meeting the user's real-time voice changing needs and improving the user experience.

[0076] Figure 7 A flow chart of a model training method provided in an embodiment of the present application, this embodiment can be applicable to the situation of training a model for audio stream processing, and the model can be specifically applicable to various application scenarios with high real-time requirements such as voice calls, live audio and video broadcasts, and multi-person online conferences. The method can be executed by a model training device, which can be implemented in the form of hardware and / or software, and the device can be configured in electronic devices such as model training equipment. The electronic device can be a mobile device such as a mobile phone, a smart watch, a tablet computer, and a personal digital assistant; it can also be other devices such as a desktop computer. The audio processing model trained using the embodiment of the present application can be applied to the audio processing method provided in any embodiment of the present application.

[0077] like Figure 7 As shown, the method includes:

[0078] Step 701, determine the right-side padding amount and the left-side padding amount corresponding to the audio processing model, wherein the audio processing model includes a convolutional layer, the right-side padding amount is used to indicate the amount of data padded on the right side of the input data of the convolutional layer, and the left-side padding amount is used to indicate the amount of data padded on the left side of the input data of the convolutional layer, the right-side padding amount is greater than 0, and the right-side padding amount corresponding to the same convolutional layer is less than the corresponding left-side padding amount.

[0079] Exemplarily, the right-side padding amount and the left-side padding amount can be pre-set, so that the trained audio processing model can be applicable to speech processing situations corresponding to the set right-side padding amount and the left-side padding amount; the right-side padding amount and the left-side padding amount can also be randomly determined within a specified range of values, so that the trained audio processing model can be applicable to speech processing situations corresponding to different right-side padding amounts and left-side padding amounts, that is, it can be a universal audio processing model.

[0080] Step 702: Based on the right-side padding amount, the left-side padding amount and the audio processing model, the sample audio stream is processed to obtain a corresponding processed target sample audio stream, wherein the sample audio stream corresponds to a standard audio stream.

[0081] Exemplarily, for the sample audio stream, a method with less demanding timeliness and more ideal processing effect can be used to process it, so as to obtain a corresponding standard audio stream. Taking timbre conversion as an example, an offline timbre conversion model can be used to perform timbre conversion processing on the sample audio stream to obtain a standard audio stream.

[0082] Exemplarily, the standard audio stream may be processed to obtain a corresponding sample audio stream. Taking timbre conversion as an example, an offline timbre conversion model may be used to perform timbre conversion processing on the standard audio stream to obtain a sample audio stream.

[0083] Step 703: determine a target loss relationship according to the target sample audio stream and the standard audio stream, and train the audio processing model based on the target loss relationship.

[0084] Exemplarily, the standard audio stream can be understood as an audio stream with an ideal processing effect that the model output wants to achieve. The loss relationship can be used to characterize the difference between the two data, can be expressed as a loss value, and can be specifically calculated using a loss function. The target loss relationship is used to characterize the difference between the target sample audio stream and the standard audio stream. When calculating the target loss relationship, the specific loss function used is not limited. The audio processing model is trained according to the target loss relationship. During the training process, the weight parameter values ​​in the audio processing model can be continuously optimized using training methods such as back propagation with the goal of minimizing the target loss relationship until the preset training cutoff condition is met. The specific training cutoff condition can be set according to actual needs, and the embodiment of the present application is not limited. For example, it can be set based on the number of iterations, the degree of convergence of the loss value, or the model accuracy. The audio processing model obtained after the training is completed can become the preset audio processing model in the audio processing method in the above embodiment.

[0085] The model training method provided in the embodiment of the present application is a preset audio processing model that includes a convolution layer. During the training process, when filling data for the input data of the convolution layer, filling data on the right side can ensure reference to the subsequent information, thereby improving the audio quality after audio processing. The amount of filled data on the right side is less than the amount of filled data on the left side, which can effectively control the delay, so that the model obtained after training can achieve both low latency and processing effect.

[0086] In some embodiments, the audio processing model includes a timbre adding model and a vocoder model, both of which include convolutional layers, the timbre adding model is used to add timbre information to the content information to obtain timbre content information, and the vocoder model is used to convert the timbre content information into audio data. Wherein, based on the right-side filling amount, the left-side filling amount and the audio processing model, the sample audio stream is processed to obtain the corresponding processed target sample audio stream, including: extracting the sample content information in the sample audio stream; inputting the sample content information into the audio processing model, so that the audio processing model processes the sample content information based on the right-side filling amount and the left-side filling amount to obtain the corresponding target sample audio stream with changed timbre. The advantage of this setting is that an audio processing model for timbre conversion that takes into account both low latency and conversion effects can be trained.

[0087] In some embodiments, the determination of the right-side padding amount and the left-side padding amount corresponding to the audio processing model includes: determining the right-side padding amount and the left-side padding amount corresponding to the audio processing model in a random manner. Optionally, it may specifically include: determining the right-side padding amount corresponding to the audio processing model in a random manner; determining the convolution kernel size corresponding to the convolution layer; and determining the left-side padding amount based on the convolution kernel size and the right-side padding amount. The advantage of such a setting is that it can be applied to speech processing situations corresponding to different right-side padding amounts and left-side padding amounts, that is, a general audio processing model can be trained, which facilitates the dynamic determination of the right-side padding amount according to actual application requirements, and can achieve the effect of flexibly adjusting the delay.

[0088] Figure 8 This is a structural block diagram of an audio processing device provided in an embodiment of the present application. The device can be implemented by software and / or hardware, and can generally be integrated in an electronic device such as an audio processing device, and can process an audio stream by executing an audio processing method. Figure 8 As shown, the device includes: a filling quantity determination module 801 and an audio stream processing module 802.

[0089] A padding quantity determination module 801 is used to determine a target right-side padding quantity and a target left-side padding quantity corresponding to a preset audio processing model, wherein the preset audio processing model includes a convolution layer, the target right-side padding quantity is used to indicate the amount of data to be padded on the right side of the input data of the convolution layer, and the target left-side padding quantity is used to indicate the amount of data to be padded on the left side of the input data of the convolution layer, the target right-side padding quantity is greater than 0, and the target right-side padding quantity corresponding to the same convolution layer is less than the corresponding target left-side padding quantity;

[0090] The audio stream processing module 802 is used to process the audio stream to be processed based on the target right-side padding amount, the target left-side padding amount and the preset audio processing model to obtain a corresponding processed target audio stream.

[0091] The audio processing device provided in the embodiment of the present application, when it is necessary to process the audio stream to be processed, first determines the target right-side filling number and the target left-side filling number corresponding to the preset audio processing model, wherein the preset audio processing model includes a convolution layer, the target right-side filling number is used to indicate the number of data filled on the right side of the input data of the convolution layer, the target left-side filling number is used to indicate the number of data filled on the left side of the input data of the convolution layer, the target right-side filling number is greater than 0 and less than the target left-side filling number, and then, based on the target right-side filling number, the target left-side filling number and the preset audio processing model, the audio stream to be processed is processed to obtain the corresponding processed target audio stream. By adopting the above technical solution, when filling data for the input data of the convolution layer, filling data on the right side can ensure reference to the subsequent information, thereby improving the audio quality after audio processing, and the number of right-side filling data is less than the number of left-side filling data, which can effectively control the delay, thereby achieving the technical effect of taking into account both low latency and processing effect.

[0092] Optionally, the preset audio processing model includes a preset timbre adding model and a preset vocoder model, both of which include a convolutional layer, the preset timbre adding model is used to add timbre information to the content information to obtain timbre content information, and the preset vocoder model is used to convert the timbre content information into audio data;

[0093] Wherein, the audio stream processing module includes:

[0094] A content information extraction unit, used for extracting content information to be processed from the audio stream to be processed;

[0095] The timbre conversion unit is used to input the content information to be processed into the preset audio processing model, so that the preset audio processing model processes the content information to be processed based on the target right filling amount and the target left filling amount to obtain a corresponding target audio stream with changed timbre.

[0096] Optionally, the filling quantity determination module includes:

[0097] A right side filling quantity determining unit, used to determine a target right side filling quantity corresponding to a preset audio processing model;

[0098] A convolution kernel size determining unit, which determines the convolution kernel size corresponding to the convolution layer;

[0099] The left padding amount determining unit is used to determine the target left padding amount according to the convolution kernel size and the target right padding amount.

[0100] Optionally, the target right-side filling amount is determined according to an expected delay corresponding to the audio stream to be processed, wherein the target right-side filling amount and the expected delay are positively correlated.

[0101] Fig. 9 This is a structural block diagram of a model training device provided in an embodiment of the present application. The device can be implemented by software and / or hardware, and can generally be integrated in electronic devices such as model training devices, and can perform model training by executing a model training method. Fig. 9 As shown, the device includes: a quantity determination module 901, an audio processing module 902 and a model training module 903.

[0102] A quantity determination module 901 is used to determine the right-side padding quantity and the left-side padding quantity corresponding to the audio processing model, wherein the audio processing model includes a convolutional layer, the right-side padding quantity is used to indicate the amount of data padded on the right side of the input data of the convolutional layer, and the left-side padding quantity is used to indicate the amount of data padded on the left side of the input data of the convolutional layer, the right-side padding quantity is greater than 0, and the right-side padding quantity corresponding to the same convolutional layer is less than the corresponding left-side padding quantity;

[0103] An audio processing module 902, configured to process the sample audio stream based on the right padding amount, the left padding amount and the audio processing model to obtain a corresponding processed target sample audio stream, wherein the sample audio stream corresponds to a standard audio stream;

[0104] The model training module 903 is used to determine a target loss relationship according to the target sample audio stream and the standard audio stream, and train the audio processing model based on the target loss relationship.

[0105] The model training device provided in the embodiment of the present application has a preset audio processing model that includes a convolution layer. During the training process, when filling data for the input data of the convolution layer, filling data on the right side can ensure reference to the subsequent information, thereby improving the audio quality after audio processing. The amount of filled data on the right side is less than the amount of filled data on the left side, which can effectively control the delay, so that the model obtained after training can achieve both low latency and processing effect.

[0106] Optionally, the audio processing model includes a timbre adding model and a vocoder model, both of which include a convolutional layer, the timbre adding model is used to add timbre information to the content information to obtain timbre content information, and the vocoder model is used to convert the timbre content information into audio data;

[0107] Wherein, the audio processing module includes:

[0108] An information extraction unit, used for extracting sample content information from a sample audio stream;

[0109] The timbre changing unit is used to input the sample content information into the audio processing model so that the audio processing model processes the sample content information based on the right filling amount and the left filling amount to obtain a corresponding target sample audio stream with changed timbre.

[0110] Optionally, the quantity determination module includes:

[0111] A random determination unit, used to determine the right-side padding quantity corresponding to the audio processing model in a random manner;

[0112] A convolution kernel determining unit, used to determine the convolution kernel size corresponding to the convolution layer;

[0113] The left-side quantity determination unit is used to determine the left-side padding quantity according to the convolution kernel size and the right-side padding quantity.

[0114] An embodiment of the present application provides an electronic device, in which the audio processing device and / or model training device provided by the embodiment of the present application can be integrated. Fig.10 The electronic device 1000 includes a processor 1001 and a memory 1002 connected to the processor 1001, wherein the memory 1002 stores a computer program executable by the processor 1001, and the computer program is executed by the processor 1001 so that the processor 1001 can execute the audio processing method and / or model training method described in any embodiment of the present application. The number of processors can be one or more. Fig.10 A processor is taken as an example.

[0115] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is used to enable a processor to implement the audio processing method described in any embodiment of the present application when executed.

[0116] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the audio processing method provided in the embodiment of the present application.

[0117] The audio processing device, model training device, equipment, storage medium and product provided in the above embodiments can execute the audio processing method or model training method provided in any embodiment of the present application, and have the corresponding functional modules and beneficial effects of executing the method. For technical details not described in detail in the above embodiments, please refer to the audio processing method or model training method provided in any embodiment of the present application.

Claims

1. An audio processing method, characterized in that: include: Determine a target right-side padding amount and a target left-side padding amount corresponding to a preset audio processing model, wherein the preset audio processing model includes a convolutional layer, the target right-side padding amount is used to indicate the amount of data padded on the right side of the input data of the convolutional layer, and the target left-side padding amount is used to indicate the amount of data padded on the left side of the input data of the convolutional layer, the target right-side padding amount is greater than 0, and the target right-side padding amount corresponding to the same convolutional layer is less than the corresponding target left-side padding amount; Based on the target right-side filling amount, the target left-side filling amount and the preset audio processing model, the audio stream to be processed is processed to obtain a corresponding processed target audio stream.

2. The method according to claim 1, characterized in that The preset audio processing model includes a preset timbre adding model and a preset vocoder model, both of which include a convolution layer, the preset timbre adding model is used to add timbre information to content information to obtain timbre content information, and the preset vocoder model is used to convert the timbre content information into audio data; The processing of the audio stream to be processed based on the target right padding amount, the target left padding amount and the preset audio processing model to obtain the corresponding processed target audio stream includes: Extracting content information to be processed from the audio stream to be processed; The content information to be processed is input into the preset audio processing model, so that the preset audio processing model processes the content information to be processed based on the target right filling amount and the target left filling amount to obtain a corresponding target audio stream with a changed timbre.

3. The method according to claim 1, characterized in that The step of determining a target right-side filling amount and a target left-side filling amount corresponding to a preset audio processing model includes: Determine a target right-side padding amount corresponding to a preset audio processing model; Determine the convolution kernel size corresponding to the convolution layer; The target left side padding amount is determined according to the convolution kernel size and the target right side padding amount.

4. The method according to any one of claims 1 to 3, characterized in that: The target right-side filling amount is determined according to the expected delay corresponding to the audio stream to be processed, wherein the target right-side filling amount and the expected delay are positively correlated.

5. A model training method, characterized in that: include: Determine a right-side padding amount and a left-side padding amount corresponding to an audio processing model, wherein the audio processing model includes a convolutional layer, the right-side padding amount is used to indicate the amount of data padded on the right side of input data of the convolutional layer, and the left-side padding amount is used to indicate the amount of data padded on the left side of input data of the convolutional layer, the right-side padding amount is greater than 0, and the right-side padding amount corresponding to the same convolutional layer is less than the corresponding left-side padding amount; Based on the right padding amount, the left padding amount and the audio processing model, the sample audio stream is processed to obtain a corresponding processed target sample audio stream, wherein the sample audio stream corresponds to a standard audio stream; A target loss relationship is determined according to the target sample audio stream and the standard audio stream, and the audio processing model is trained based on the target loss relationship.

6. The method according to claim 5, characterized in that The audio processing model includes a timbre adding model and a vocoder model, both of which include a convolution layer, the timbre adding model is used to add timbre information to the content information to obtain timbre content information, and the vocoder model is used to convert the timbre content information into audio data; The processing of the sample audio stream based on the right padding amount, the left padding amount and the audio processing model to obtain a corresponding processed target sample audio stream includes: Extracting sample content information from a sample audio stream; The sample content information is input into the audio processing model, so that the audio processing model processes the sample content information based on the right filling amount and the left filling amount to obtain a corresponding target sample audio stream with a changed timbre.

7. The method according to claim 5, characterized in that The determining of the right-side filling quantity and the left-side filling quantity corresponding to the audio processing model includes: The right-side padding amount corresponding to the audio processing model is determined in a random manner; Determine the convolution kernel size corresponding to the convolution layer; The left padding amount is determined according to the convolution kernel size and the right padding amount.

8. An audio processing device, characterized in that: include: A padding quantity determination module, used to determine a target right-side padding quantity and a target left-side padding quantity corresponding to a preset audio processing model, wherein the preset audio processing model includes a convolutional layer, the target right-side padding quantity is used to indicate the amount of data padded on the right side of the input data of the convolutional layer, the target left-side padding quantity is used to indicate the amount of data padded on the left side of the input data of the convolutional layer, the target right-side padding quantity is greater than 0, and the target right-side padding quantity corresponding to the same convolutional layer is less than the corresponding target left-side padding quantity; The audio stream processing module is used to process the audio stream to be processed based on the target right-side filling amount, the target left-side filling amount and the preset audio processing model to obtain the corresponding processed target audio stream.

9. A model training device, characterized in that: include: A quantity determination module, used to determine the right-side padding quantity and the left-side padding quantity corresponding to the audio processing model, wherein the audio processing model includes a convolutional layer, the right-side padding quantity is used to indicate the amount of data padded on the right side of the input data of the convolutional layer, and the left-side padding quantity is used to indicate the amount of data padded on the left side of the input data of the convolutional layer, the right-side padding quantity is greater than 0, and the right-side padding quantity corresponding to the same convolutional layer is less than the corresponding left-side padding quantity; An audio processing module, used for processing the sample audio stream based on the right padding amount, the left padding amount and the audio processing model to obtain a corresponding processed target sample audio stream, wherein the sample audio stream corresponds to a standard audio stream; A model training module is used to determine a target loss relationship according to the target sample audio stream and the standard audio stream, and train the audio processing model based on the target loss relationship.

10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the audio processing method described in any one of claims 1-4 and / or the model training method described in any one of claims 5-7.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is used to enable a processor to implement the audio processing method described in any one of claims 1-4 and / or the model training method described in any one of claims 5-7 when executed.

12. A computer program product, characterized in that The computer program product comprises a computer program which, when executed by a processor, implements the audio processing method according to any one of claims 1 to 4 and / or the model training method according to any one of claims 5 to 7.