Audio processing method, device, computer equipment and storage medium

Through combined downsampling processing and multi-head self-attention processing, the problems of limited features and large amount of calculation in traditional audio processing are solved, the efficiency and accuracy of audio processing are improved, global and local features are extracted, and the accuracy of audio processing is enhanced. Spend.

CN115116470BActive Publication Date: 2024-09-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202210654014.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-10
Publication Date
2024-09-27
Estimated Expiration
2042-06-10

AI Technical Summary

Technical Problem

In existing audio processing technology, traditional convolution extraction has limited features and a large amount of calculation, resulting in low processing efficiency and accuracy.

Method used

Adopting a combined downsampling processing method, including deep convolution processing, convolution processing to expand the number of channels, and convolution processing to shrink the number of channels, combined with multi-head self-attention processing and feed-forward processing, the audio feature matrix is ​​extracted to improve processing efficiency and accuracy.

Benefits of technology

It reduces computational costs, improves processing efficiency and accuracy, avoids information loss, and can extract global and local features, enhancing the accuracy of audio processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115116470B
    Figure CN115116470B
Patent Text Reader

Abstract

The present application relates to an audio processing method, device, computer equipment and storage medium. The method includes: obtaining a frequency spectrum feature map of the target audio; performing at least one downsampling combination process based on the frequency spectrum feature map to obtain a downsampled intermediate feature matrix; performing at least one feature extraction combination process based on the intermediate feature matrix to obtain a target feature matrix; performing audio processing according to the target feature matrix to obtain an audio processing result for the target audio. Since only the same number of convolution kernels as the number of channels of the input data need to be used, and the number of convolution processes is the same as the number of channels of the input data, the amount of calculation can be reduced. In addition, due to the convolution process of the expanded number of channels in the middle, the number of channels of the output data is more than the number of channels of the output data of the deep convolution process and the convolution process of the contracted number of channels, thereby avoiding information loss caused by compressing the data dimension first, and thus improving the processing accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of audio processing technology, and in particular to an audio processing method, apparatus, computer equipment, storage medium and computer program product. Background Art

[0002] With the development of network technology, the input methods of mobile terminals and other devices can be realized through voice input in addition to handwriting input and keyboard input. Combined with actual application needs, after obtaining audio data, the audio data can be processed, such as recognizing the audio data.

[0003] In the related art, the audio data is mainly processed by traditional convolution to extract convolution features, and then feature recognition is performed based on the extracted convolution features to obtain recognition results. Since the features extracted by traditional convolution are limited and the amount of calculation is large, the processing efficiency and accuracy are low. Summary of the invention

[0004] Based on this, it is necessary to provide an audio processing method, apparatus, computer device, storage medium and computer program product that improve processing efficiency and accuracy in response to the above technical problems.

[0005] On the one hand, the present application provides an audio processing method, the method comprising:

[0006] Get the frequency spectrum feature map of the target audio;

[0007] Performing at least one downsampling combination process based on the frequency spectrum feature map to obtain a downsampled intermediate feature matrix; the downsampling combination process includes at least one downsampling convolution combination process, and the downsampling convolution combination process includes sequentially performing a depth convolution process, a convolution process for expanding the number of channels, and a convolution process for shrinking the number of channels;

[0008] Performing at least one feature extraction and combination processing based on the intermediate feature matrix to obtain a target feature matrix; the feature extraction and combination processing includes a first feedforward processing, a multi-head self-attention processing, a convolution processing, and a second feedforward processing performed in sequence;

[0009] Audio processing is performed according to the target feature matrix to obtain an audio processing result for the target audio.

[0010] In one embodiment, obtaining a frequency spectrum feature graph of a target audio includes:

[0011] A window having a window length equal to a preset audio frame length and moving according to a preset step length is used to obtain multiple audio frames from the target audio collection; the preset step length is less than the preset audio frame length;

[0012] The frequency characteristics of each audio frame in different frequency intervals among multiple audio frames are obtained and represented as a pixel value sequence, and the pixel value sequence of each audio frame is spliced ​​according to the audio frame time sequence to obtain a frequency spectrum feature map of the target audio.

[0013] In one of the embodiments, the target downsampling combination processing in at least one downsampling combination processing also includes a downsampling preprocessing performed before the first downsampling convolution combination processing in the target downsampling combination processing; the downsampling preprocessing is used to downsample the data passed through the target downsampling combination processing and output intermediate data adapted to the first downsampling convolution combination processing, so that the intermediate data undergoes the downsampling convolution combination processing in the target downsampling combination processing for downsampling again.

[0014] In one of the embodiments, the downsampling preprocessing includes normalization processing and at least one downsampling convolution processing; the downsampling convolution processing is used to convolve the data that has passed the downsampling convolution processing for downsampling; the normalization processing is used to normalize the eigenvalues ​​of the data that has passed the normalization processing.

[0015] In one of the embodiments, for the target downsampling preprocessing included in the target downsampling combination processing in at least one downsampling combination processing, the target downsampling convolution processing in the target downsampling preprocessing is for the frequency domain dimension; in addition to the target downsampling preprocessing, the remaining downsampling convolution processing involved in at least one downsampling combination processing targets at least the frequency domain dimension in the time domain dimension and the frequency domain dimension; the frequency features of multiple audio frames of the target audio in the frequency spectrum feature graph are arranged according to the time sequence of the multiple audio frames.

[0016] In one embodiment, at least one downsampling combination process is performed based on the frequency spectrum feature map to obtain a downsampled intermediate feature matrix, including:

[0017] Based on the frequency spectrum feature graph, multiple downsampling combination processes are performed in series to obtain a downsampled intermediate feature matrix; wherein each downsampling combination process includes multiple downsampling convolution combination processes performed in series.

[0018] In one of the embodiments, each downsampling combination processing includes a downsampling preprocessing and multiple downsampling convolution combination processing after the downsampling preprocessing; the output data of the downsampling convolution combination processing in each downsampling combination processing has the same number of channels as the input data of the downsampling convolution combination processing in the current downsampling combination processing, and has a smaller number of channels than the input data of the downsampling convolution combination processing in the next downsampling combination processing.

[0019] In one of the embodiments, the target feature extraction combination process in at least one feature extraction combination process is preceded by an intermediate downsampling process; the intermediate downsampling process includes a normalization process, a nonlinear mapping process, and at least one downsampling convolution process.

[0020] In one embodiment, at least one feature extraction and combination process is performed based on the intermediate feature matrix to obtain a target feature matrix, including:

[0021] Based on the intermediate feature matrix, multiple batches of feature extraction and combination processing are performed serially to obtain a target feature matrix; wherein the feature extraction and combination processing of each batch includes feature extraction and combination processing performed serially, and there is at least one batch of intermediate downsampling processing before the first feature extraction and combination processing.

[0022] In one embodiment, audio processing is performed according to the target feature matrix to obtain an audio processing result for the target audio, including:

[0023] According to the target feature matrix, multiple character recognition prediction sequences and their respective occurrence probabilities are obtained;

[0024] Merge the prediction results of the same characters that appear continuously in the target character recognition prediction sequence corresponding to the maximum occurrence probability;

[0025] The text prediction results that are blank markers in the merged target text recognition prediction sequence are deleted to obtain the audio processing result.

[0026] In one embodiment, the audio processing result is a text recognition prediction sequence, which is obtained based on the text prediction results output in time sequence; audio processing is performed according to the target feature matrix to obtain an audio processing result for the target audio, including:

[0027] When the current output moment is not the first output moment, a reference feature matrix obtained based on the text prediction results output at each output moment before the current output moment is obtained; when the current output moment is the first output moment, a reference feature matrix converted from the start output identifier is obtained;

[0028] Obtaining a similarity matrix for representing the similarity between a reference feature matrix and a target feature matrix, and based on the similarity matrix, fusing the target feature matrix with the reference feature matrix to obtain a global target feature matrix for representing the global features of the target audio;

[0029] According to the global target feature matrix, multiple text prediction results and their respective occurrence probabilities output at the current output moment are obtained, and the text prediction result corresponding to the maximum occurrence probability is output. The above-mentioned process of outputting in time sequence is repeated until the output ends, and the text prediction results output at each output moment are integrated in the output order to obtain the audio processing result.

[0030] In one embodiment, the method is implemented based on an audio processing model, and the audio processing result includes at least one text prediction result; after performing audio processing according to a target feature matrix to obtain an audio processing result for a target audio, the method further includes:

[0031] The audio processing model is trained by a target loss function; the target loss function is determined based on at least one of the first loss function and the second loss function;

[0032] Among them, the first loss function is constructed based on the audio processing result and the training label corresponding to the audio processing result; the second loss function is constructed based on each text prediction result in the audio processing result and the training label corresponding to each text prediction result.

[0033] On the other hand, the present application also provides an audio processing device, the device comprising:

[0034] An acquisition module is used to obtain a frequency spectrum feature map of the target audio;

[0035] At least one downsampling combination processing module; the downsampling combination processing module includes at least one downsampling convolution combination processing module; the downsampling combination processing module is used to perform at least one downsampling combination processing based on the spectrum feature map to obtain a downsampled intermediate feature matrix; the downsampling convolution combination processing module includes a depth convolution processing layer, a convolution processing layer for expanding the number of channels, and a convolution processing layer for shrinking the number of channels connected in sequence;

[0036] At least one feature extraction and combination processing module; the feature extraction and combination processing module is used to perform at least one feature extraction and combination processing based on the intermediate feature matrix to obtain a target feature matrix; the feature extraction and combination processing module includes a first feedforward processing layer, a multi-head self-attention processing layer, a convolution processing layer and a second feedforward processing layer connected in sequence;

[0037] The audio processing module is used to perform audio processing according to the target feature matrix to obtain an audio processing result for the target audio.

[0038] In one embodiment, the acquisition module 1502 is used to obtain multiple audio frames from the target audio collection using a window whose window length is a preset audio frame length and moves according to a preset step length; the preset step length is smaller than the preset audio frame length; the frequency characteristics of each audio frame in the multiple audio frames distributed in different frequency intervals are obtained and expressed as a pixel value sequence, and the pixel value sequence of each audio frame is spliced ​​according to the audio frame time sequence to obtain a frequency spectrum feature diagram of the target audio.

[0039] In one of the embodiments, the target downsampling combination processing module in at least one downsampling combination processing module also includes a downsampling preprocessing module connected before the first downsampling convolution combination processing module in the target downsampling combination processing module; the downsampling preprocessing module is used to downsample the data passing through the target downsampling combination processing module and output intermediate data adapted to the first downsampling convolution combination processing module, so that the intermediate data passes through the downsampling convolution combination processing module in the target downsampling combination processing module for downsampling again.

[0040] In one of the embodiments, the downsampling preprocessing module includes a normalization processing layer and at least one downsampling convolution processing layer; the downsampling convolution processing layer is used to perform convolution processing on the data passing through the downsampling convolution processing layer for downsampling; the normalization processing layer is used to normalize the eigenvalues ​​of the data passing through the normalization processing layer.

[0041] In one of the embodiments, for a target downsampling preprocessing module included in a target downsampling combination processing module in at least one downsampling combination processing module; a target downsampling convolution processing layer in the target downsampling preprocessing module is for a frequency domain dimension; except for the target downsampling preprocessing module, the remaining downsampling convolution processing layers involved in at least one downsampling combination processing module target dimensions including at least a frequency domain dimension in a time domain dimension and a frequency domain dimension; the frequency features of multiple audio frames of the target audio in the frequency spectrum feature graph are arranged in a time sequence of multiple audio frames.

[0042] In one of the embodiments, at least one downsampling combination processing module is used to perform multiple downsampling combination processing in series based on the spectrum feature map to obtain a downsampled intermediate feature matrix; wherein each downsampling combination processing includes multiple downsampling convolution combination processing performed in series.

[0043] In one of the embodiments, each downsampling combination processing module includes a downsampling preprocessing module and a plurality of downsampling convolution combination processing modules connected after the downsampling preprocessing module; the output data of the downsampling convolution combination processing module in each downsampling combination processing module has the same number of input data channels as the downsampling convolution combination processing module in the current downsampling combination processing module, and has a smaller number of input data channels as the downsampling convolution combination processing module in the next downsampling combination processing module.

[0044] In one of the embodiments, a target feature extraction combination processing module in at least one feature extraction combination processing is connected to an intermediate downsampling processing module; the intermediate downsampling processing module includes a normalization processing layer, a nonlinear mapping processing layer and at least one downsampling convolution processing layer.

[0045] In one of the embodiments, at least one feature extraction combination process is used to perform multiple batches of feature extraction combination processes in series based on an intermediate feature matrix to obtain a target feature matrix; wherein each batch of feature extraction combination processes includes feature extraction combination processes performed in series, and there is at least one batch of feature extraction combination processes before the first feature extraction combination process is performed with an intermediate downsampling process.

[0046] In one of the embodiments, the audio processing module is used to obtain multiple text recognition prediction sequences and their respective occurrence probabilities based on the target feature matrix; merge the same text prediction results that appear continuously in the target text recognition prediction sequence corresponding to the maximum occurrence probability; delete the text prediction results that serve as blank marks in the merged target text recognition prediction sequence to obtain the audio processing result.

[0047] In one embodiment, the audio processing module is used to obtain a reference feature matrix based on the text prediction results output at each output moment before the current output moment when the current output moment is not the first output moment, and to obtain a reference feature matrix converted from a starting output identifier when the current output moment is the first output moment; obtain a similarity matrix for characterizing the similarity between the reference feature matrix and the target feature matrix, and based on the similarity matrix, fuse the target feature matrix with the reference feature matrix to obtain a global target feature matrix for characterizing the global features of the target audio; obtain multiple text prediction results and their respective occurrence probabilities output at the current output moment according to the global target feature matrix, output the text prediction result corresponding to the maximum occurrence probability, repeat the above-mentioned process of outputting in time sequence until the output ends, and integrate the text prediction results output at each output moment in the output order to obtain the audio processing result.

[0048] In one embodiment, the device is implemented based on an audio processing model, and the audio processing result includes at least one text prediction result; the device also includes:

[0049] A model training module is used to train the audio processing model through a target loss function; the target loss function is determined based on at least one of the first loss function and the second loss function; wherein the first loss function is constructed based on the audio processing result and the training label corresponding to the audio processing result; the second loss function is constructed based on each text prediction result in the audio processing result and the training label corresponding to each text prediction result.

[0050] On the other hand, the present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above-mentioned audio processing method when executing the computer program.

[0051] On the other hand, the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned audio processing method are implemented.

[0052] On the other hand, the present application also provides a computer program product, including a computer program, which implements the steps of the above audio processing method when executed by a processor.

[0053] The above-mentioned audio processing method, apparatus, computer equipment, storage medium and computer program product can perform deep convolution processing and convolution processing on the number of channels in the downsampling combination processing, and the deep convolution processing only needs to use the same convolution kernel as the number of channels of the input data, and the number of convolution processing is the same as the number of channels of the input data, instead of using the product of the number of channels of the input data and the number of channels of the output data as in the traditional convolution, and the number of convolution processing is the same as the product, thereby reducing the number of convolution processing based on the convolution kernel, reducing the amount of calculation to reduce the operation cost and improve the processing efficiency. At the same time, the convolution kernel used for the convolution processing on the number of channels is actually a vector of the same length as the number of channels of the input data, so compared with the traditional convolution using a matrix as the convolution kernel, the internal calculation amount when performing convolution processing based on the convolution kernel can be reduced to reduce the operation cost and improve the processing efficiency.

[0054] In addition, since the output data of the deep convolution processing can have the same number of channels as the output data of the convolution processing with the number of channels contracted, and the convolution processing with the number of channels expanded in the middle can have more channels than the first two, the internal processing process in the downsampling combination processing can be presented as a data processing structure of small dimensions, large dimensions and small dimensions as a whole. Based on the above data processing structure, since the input data is not directly dimensionally compressed, but after deep convolution processing, the data dimension is first expanded, and then the previous data dimension is restored, the loss of information caused by compressing the data dimension first can be avoided, thereby improving the processing accuracy. Finally, in the feature extraction combination processing, convolution processing can be performed to extract local features, and multi-head self-attention processing can be performed to extract global features, so that features that simultaneously represent the global and local can be extracted. Audio processing based on features that simultaneously represent the global and local can also improve processing accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 A diagram showing an application environment of an audio processing method in an embodiment;

[0056] Figure 2 is a flowchart of an audio processing method in one embodiment;

[0057] Figure 3 is a schematic diagram of deep convolution processing in one embodiment;

[0058] Figure 4 A schematic diagram of a convolution process for expanding the number of channels in one embodiment;

[0059] Figure 5 A schematic diagram of a processing architecture including downsampling preprocessing and downsampling combined processing in one embodiment;

[0060] Figure 6 A schematic diagram of a processing architecture including downsampling pre-processing and downsampling combined processing in another embodiment;

[0061] Figure 7 is a flowchart of an audio processing method in one embodiment;

[0062] Figure 8 A schematic diagram of a processing architecture for downsampling combined processing with increasing number of channels in one embodiment;

[0063] Fig. 9 A schematic diagram of a processing architecture including a feature extraction combined processing and a downsampling combined processing in one embodiment;

[0064] Fig.10A schematic diagram of a processing architecture including intermediate downsampling processing in one embodiment;

[0065] Fig.11 A schematic diagram of a processing architecture for batch feature extraction and combined processing in one embodiment;

[0066] Fig.12 A schematic diagram of the overall processing architecture of an audio processing process in one embodiment;

[0067] Fig.13 A schematic diagram of the internal processing architecture of downsampling combined processing in one embodiment;

[0068] Fig.14 A schematic diagram of a processing architecture for intermediate downsampling processing in one embodiment;

[0069] Fig.15 is a structural block diagram of an audio processing device in one embodiment;

[0070] Fig.16 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0071] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0072] First, the terms involved in the embodiments of the present application are briefly explained:

[0073] Attention: It is a resource allocation scheme that allocates computing resources to more important tasks and solves the problem of information overload when computing power is limited. In neural network learning, generally speaking, the more parameters a model has, the stronger its expressive power is, and the more information the model stores. However, this will bring about the problem of information overload. By introducing the attention mechanism, we can focus on the information that is more critical to the current task among a large amount of input information, reduce the attention to other information, and even filter out irrelevant information, so as to solve the problem of information overload and improve the efficiency and accuracy of task processing.

[0074] This is similar to the human visual attention mechanism, which scans the global image to obtain the target area that needs to be focused on, and then invests more attention resources in this area to obtain more detailed information related to the target, while ignoring other irrelevant information. Through this mechanism, limited attention resources can be used to quickly filter out high-value information from a large amount of information.

[0075] MFCCs (Mel-Frequency Cepstral Coefficients): refers to the coefficients that make up the Mel-Frequency Cepstrum. The Mel-Frequency Cepstrum is a linear transformation of the logarithmic energy spectrum based on the nonlinear Mel scale of the sound frequency.

[0076] LN (Layer Normalization): refers to the normalization of all neuron nodes of a single sample in each layer.

[0077] In addition, in the embodiment of the present application, the audio processing method is implemented based on artificial intelligence. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that the machines have the functions of perception, reasoning and decision-making.

[0078] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0079] Artificial intelligence usually involves the process of machine learning. Machine Learning (ML) is a multi-disciplinary interdisciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.

[0080] Furthermore, since the embodiments of the present application process audio, they may also involve speech technology. After the audio is processed, such as after speech recognition obtains text, natural language processing technology may also be involved. Among them, the key technologies of speech technology are ASR (Automatic Speech Recognition, automatic speech recognition technology) and TTS (Text To Speech, speech synthesis technology) and voiceprint recognition technology. Allowing computers to listen, see, speak, and feel is the future development direction of human-computer interaction, among which speech has become one of the most promising human-computer interaction methods in the future.

[0081] Natural language processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field will involve natural language, that is, the language people use in daily life, so it is closely related to the study of linguistics. Natural language processing technology usually includes text processing, semantic understanding, machine translation, robot question answering, knowledge graph and other technologies.

[0082] In some embodiments, the audio processing method provided in the embodiments of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 can communicate with the server 104 directly or indirectly through a wired or wireless network, and this embodiment of the application does not specifically limit this. The terminal 102 and the server 104 can each execute the audio processing method in the embodiment of the application separately, or can jointly execute the audio processing method in the embodiment of the application. Now take one of the implementation processes when the terminal 102 and the server 104 jointly execute the audio processing method as an example.

[0083] Specifically, the terminal 102 obtains the target audio to be processed, and the terminal 102 sends the target audio to the server 104. The server 104 obtains the frequency spectrum feature map of the target audio, and performs at least one downsampling combination process based on the frequency spectrum feature map to obtain a downsampled intermediate feature matrix. The server 104 performs at least one feature extraction combination process based on the intermediate feature matrix to obtain a target feature matrix, and performs audio processing according to the target feature matrix to obtain an audio processing result. It is understandable that the server 104 can be integrated in the cloud.

[0084] Among them, the terminal 102 can be, but is not limited to, various desktop computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Applications can be run on the terminal, such as social applications, or audio applications, etc., for obtaining target audio. The server 104 can be a background server corresponding to software or web pages, applets, etc., or a server specifically used for audio processing, which is not specifically limited in the embodiments of the present application. The server 104 can be an independent physical server, or it can be a server cluster or distributed system composed of multiple physical servers.

[0085] It should be noted that the method provided in the embodiment of the present application can be applied to audio recognition scenarios. In the audio recognition scenario, more specific application scenarios can be extended. For example, it can be applied to speech recognition. Specifically, the user can input the target speech, and through the method provided in the embodiment of the present application, the target speech can be recognized to obtain a text recognition result. For another example, it can be applied to the automatic generation of video subtitles. Specifically, the target audio in the video is obtained, and through the method provided in the embodiment of the present application, the target audio can be recognized to obtain a subtitle text recognition result. By embedding the subtitle text recognition result into a video file or making it into a subtitle file separately, the automatic generation of video subtitles can be completed.

[0086] In addition, it can also be applied to realize the real-time screen display of voice content in the meeting. Specifically, the voice audio generated in the meeting is obtained in real time, and the subtitle text recognition result can be obtained by identifying the voice audio through the method provided in the embodiment of the present application, and the subtitle text recognition result is displayed on the live screen of the meeting, so that the real-time screen display of the voice content can be realized. Of course, it can also be applied to the device to execute voice instructions. Specifically, the voice instruction issued by the user is obtained, and the execution operation identifier can be obtained by identifying the voice instruction through the method provided in the embodiment of the present application. The device (such as a mobile phone or home appliance) can perform the corresponding operation (such as making a call, turning on a certain function, etc.) according to the execution operation identifier. In addition, it can also be applied to audio noise reduction. Specifically, the audio to be denoised can be obtained, and the audio after noise reduction can be decoded through the method provided in the embodiment of the present application. Of course, the actual implementation process is not limited to the above-mentioned application scenarios, and the application scenarios involving audio processing can all use the method provided in the embodiment of the present application.

[0087] In some embodiments, combined with the above-mentioned explanations of terms, technical explanations and implementation environment descriptions, such as Figure 2 As shown, an audio processing method is provided. The method is applied to a computer device (the computer device can be specifically Figure 1 The terminal or server in the example is used to illustrate, including the following steps:

[0088] Step 202: Obtain a frequency spectrum feature graph of the target audio.

[0089] As can be seen from the description of the above application scenarios, the target audio can be voice audio input by the user, audio data in a video file, or real-time voice audio in a live broadcast scene. The embodiment of this application does not specifically limit the type of target audio. The spectral feature graph is mainly used as a feature for subsequent audio processing. Compared with images, the spectral feature graph also has two dimensions, one of which is the frequency domain and the other is the time domain.

[0090] Thus, the computer device can divide the target audio based on the two dimensions. Among them, the time domain dimension can divide the target audio into multiple audio frames, that is, the time domain dimension is divided into multiple time periods. The frequency domain dimension can be divided into multiple frequency intervals, thereby determining which frequency interval the frequency of the sound signal in the target audio falls into. In summary, based on multiple frequency intervals and multiple audio frames, the computer device can divide the target audio. The area framed by the time period corresponding to each frequency interval and each audio frame can be regarded as a pixel in the image, and the framed area can be regarded as a pixel, and the frequency feature in the framed area can be regarded as a pixel value. Thus, a spectral feature map can be constructed. Among them, the frequency feature of a certain audio frame in a certain frequency interval can refer to the audio energy feature of the audio frame in the frequency interval.

[0091] Step 204: Perform at least one downsampling combination process based on the frequency spectrum feature graph to obtain a downsampled intermediate feature matrix.

[0092] The downsampling combination processing includes at least one downsampling convolution combination processing, and the downsampling convolution combination processing includes sequentially performing a depth convolution processing, a convolution processing of expanding the number of channels, and a convolution processing of shrinking the number of channels.

[0093] It should be noted that deep convolution processing usually involves convolution of multi-channel data. Therefore, before executing this step, the computer device may also expand the spectrum feature map into a feature matrix of multiple channels (or a second-order tensor of multiple channels). Specifically, the computer device may first expand the spectrum feature map into a spectrum map tensor of 1*H*W. Among them, H can represent the frequency domain dimension, W can represent the time domain dimension, and 1 represents the original number of input channels. Taking the number of data channels required for deep convolution processing as c as an example, the computer device may convolve the spectrum feature map with c convolution kernels respectively, so as to obtain the feature matrix of c channels.

[0094] Specifically, deep convolution processing mainly refers to a convolution kernel responsible for convolution processing of the feature matrix of a channel, and the feature matrix of each channel corresponds to a convolution kernel. Among them, the convolution kernel size used for deep convolution processing can be 7*7. It can be seen that deep convolution processing uses convolution kernels of relatively large size. The use of large convolution kernels is mainly to convolve features of a wider field of view to cover more information. It is understandable that if the deep convolution processing is performed after the convolution processing of expanding the number of channels, the number of parameters and the amount of calculation will increase due to the expansion of the channels. If the deep convolution processing is executed last, because the convolution process is about to end, extracting features from the dimension of deep space may affect the feature extraction effect. Therefore, the embodiment of the present application chooses to use a large convolution kernel for convolution processing at the beginning of the deep convolution processing.

[0095] The convolution processing of expanding the number of channels and the convolution processing of shrinking the number of channels mainly refer to the feature matrix of c channels, which is convolved with multiple 1*1*c convolution kernels. Among them, whether the channel is expanded or shrunk after the convolution processing is completed depends on the number of 1*1*c convolution kernels. When the number of 1*1*c convolution kernels is less than c, the number of channels is shrunk. When the number of 1*1*c convolution kernels is greater than c, the number of channels is expanded. Specifically, the process of deep convolution processing can be referred to. Figure 3 , and the convolution processing to expand the number of channels can refer to Figure 4 .

[0096] Depend on Figure 3 It can be seen that deep convolution processing can keep the number of channels of input data and output data unchanged; it can keep the dimensions of input data and output data in the time domain and frequency domain unchanged, and it can also make the dimension of input data larger than the dimension of output data. Figure 3 For each convolution kernel involved in the calculation, the deep convolution processing actually convolves each convolution kernel with the feature matrix of the corresponding channel of each convolution kernel, so as to obtain output data with the same number of input data channels.

[0097] For example, if the input data is a feature matrix of H / 2*W / 2 with c channels, and the deep convolution is directly performed on the c*H / 2*W / 2 input data, the output data may have a reduced dimension, such as c*H / 4*W / 4. However, if the c*H / 2*W / 2 input data is not directly subjected to the deep convolution, but the c*H / 2*W / 2 input data is first padded and then subjected to the deep convolution, the dimension of the output data remains unchanged, that is, it is still c*H / 2*W / 2.

[0098] Depend on Figure 4It can be seen that the convolution processing of expanding the number of channels can make the number of channels of the output data larger than the number of channels of the input data, and at the same time, the dimensions of the input data and the output data in the time domain and frequency domain remain unchanged. Figure 4 The convolution process of expanding the number of channels for a convolution kernel involved in the calculation is actually to perform weighted summation on the eigenvalues ​​at the same position in the feature matrix of each channel according to the weights at the corresponding positions of the convolution kernel, and then all weighted summation results constitute the feature matrix of the convolution kernel corresponding to the output data. Similarly, each convolution kernel can obtain the corresponding feature matrix as the output data through the above convolution calculation process, and the feature matrix corresponding to each convolution kernel can constitute the multi-channel output data, and when the number of convolution kernels is greater than the number of input data channels, the number of output data channels is greater than the number of input data channels.

[0099] For example, if the input data is a feature matrix of H / 2*W / 2 with c channels, and there are 4c 1*1*c convolution kernels. For one of the convolution kernels, the eigenvalues ​​of the first row and first column in the feature matrix of the first channel, the eigenvalues ​​of the first row and first column in the feature matrix of the second channel, ..., the eigenvalues ​​of the first row and first column in the feature matrix of the cth channel can be weighted and summed according to the corresponding weights in the 1*1*c convolution kernel, so that the weighted summation result for "the first row and the first column" can be obtained. Similarly, the weighted summation results of other positions can also be calculated. These weighted summation results can form a feature matrix of H / 2*W / 2 according to the position, which is the same as the dimension of the input data. Since there are 4c convolution kernels, the output data is a feature matrix of 4c*H / 2*W / 2. Similarly, for the convolution processing of shrinking the number of channels performed last in the downsampling combination processing, the number of convolution kernels (such as c) can be smaller than the number of channels of the input data (such as 4c), so that the characteristic matrix of c*H / 2*W / 2 as the output data can be obtained.

[0100] It can be seen from the above implementation process that the number of channels of the output data of the deep convolution processing can be the same as the number of channels of the output data of the convolution processing with the contracted number of channels, and the dimensions in the time domain and frequency domain can remain unchanged. The output data of the convolution processing with the expanded number of channels can expand the number of channels compared to the previous two. In the above example, the expansion is 4 times. In the actual implementation, the corresponding multiples can be expanded according to the needs, and the embodiments of the present application do not make specific limitations on this. In addition, the main processing performed in the downsampling convolution combination processing is convolution processing. Of course, in the actual implementation process, other types of processing related to neural networks can also be inserted, and the embodiments of the present application do not make specific limitations on this.

[0101] Step 206: Perform at least one feature extraction and combination process based on the intermediate feature matrix to obtain a target feature matrix.

[0102] Among them, the feature extraction combined processing includes a first feedforward processing, a multi-head self-attention processing, a convolution processing and a second feedforward processing performed in sequence. Through the above-mentioned at least one downsampling combined processing, combined with the description of each processing in the downsampling combined processing, the computer device can convert the spectrum feature map into multi-channel output data. Since the one-dimensional vector of the multi-channel is processed in the feature extraction combined processing, the computer device can perform linear processing on the output data after at least one downsampling combined processing to obtain a one-dimensional vector of the multi-channel only for the time domain dimension. Combined with the number of channels, the one-dimensional vector of the multi-channel can be regarded as an intermediate feature matrix of downsampling. After at least one feature extraction combined processing, the input data and the output data can remain unchanged in the dimensions of the time domain and the frequency domain, as well as in the number of channels.

[0103] For example, if the output data of at least one downsampling combination processing is 3c*H / 8*W / 4, then after linear processing, a one-dimensional vector of c*W / 4 multi-channels can be obtained, which can be regarded as an intermediate feature matrix of c*W / 4. The input data and the output data can remain unchanged in the dimensions of the time domain and the frequency domain, as well as in the number of channels, that is, the output data can still be c*W / 4.

[0104] Step 208: Perform audio processing according to the target feature matrix to obtain an audio processing result for the target audio.

[0105] Through the above-mentioned processing processes, the computer device can obtain the final feature expression of the target audio, that is, the target feature matrix. The computer device can obtain an audio processing result, such as an audio recognition result, by performing audio processing such as decoding according to the target feature matrix.

[0106] In the above audio processing method, deep convolution processing and convolution processing regarding the number of channels can be performed in the downsampling combination processing, and the deep convolution processing only needs to use the same convolution kernel as the number of channels of the input data, and the number of convolution processing is the same as the number of channels of the input data, instead of using the product of the number of channels of the input data and the number of channels of the output data as in the traditional convolution, and the number of convolution processing is the same as the product, thereby reducing the number of convolution processing based on the convolution kernel, reducing the amount of calculation to reduce the operation cost and improve the processing efficiency. At the same time, the convolution kernel used in the convolution processing regarding the number of channels is actually a vector of the same length as the number of channels of the input data, so compared with the traditional convolution using a matrix as the convolution kernel, the internal calculation amount when performing convolution processing based on the convolution kernel can be reduced to reduce the operation cost and improve the processing efficiency.

[0107] In addition, since the output data of the deep convolution processing can have the same number of channels as the output data of the convolution processing with the number of channels contracted, and the convolution processing with the number of channels expanded in the middle can have more channels than the first two, the internal processing process in the downsampling combination processing can be presented as a data processing structure of small dimensions, large dimensions and small dimensions as a whole. Based on the above data processing structure, since the input data is not directly dimensionally compressed, but after deep convolution processing, the data dimension is first expanded, and then the previous data dimension is restored, the loss of information caused by compressing the data dimension first can be avoided, thereby improving the processing accuracy. Finally, in the feature extraction combination processing, convolution processing can be performed to extract local features, and multi-head self-attention processing can be performed to extract global features, so that features that simultaneously represent the global and local can be extracted. Audio processing based on features that simultaneously represent the global and local can also improve processing accuracy.

[0108] In some embodiments, obtaining a frequency spectrum feature graph of the target audio includes:

[0109] A window having a window length equal to a preset audio frame length and moving according to a preset step length is used to obtain multiple audio frames from the target audio collection; the preset step length is less than the preset audio frame length;

[0110] The frequency characteristics of each audio frame in different frequency intervals among multiple audio frames are obtained and represented as a pixel value sequence, and the pixel value sequence of each audio frame is spliced ​​according to the audio frame time sequence to obtain a frequency spectrum feature map of the target audio.

[0111] Among them, the window length and the preset step size are both measured in time units, such as milliseconds. The preset audio frame length can be 25 milliseconds, and the preset step size can be 10 milliseconds. The embodiment of the present application does not specifically limit the duration set by the preset audio frame length and the preset step size. It should be noted that the reason why the preset step size is set to be less than the preset audio frame length is mainly to make adjacent audio frames form overlapping areas, and the change of frequency characteristics between adjacent audio frames is smoother. In addition, frequency characteristics can refer to energy characteristics, such as the logarithmic energy characteristics of the Mel filter bank, etc., which are not specifically limited in the embodiment of the present application.

[0112] It should be noted that the computer device may perform pre-emphasis processing on the target audio before acquiring multiple audio frames from the target audio. The pre-emphasis processing is mainly to eliminate the radiation effect of the pronunciation system (such as vocal cords and lips) during the phonation process, so as to compensate for the high-frequency part of the speech signal suppressed by the pronunciation system. In addition, after obtaining multiple audio frames, the computer device may also perform windowing processing on each audio frame. The windowing processing is mainly to increase the continuity of the left and right ends of the audio frame to reduce spectrum leakage. The window type used for the windowing processing may be a Hamming window, a Henning window or a rectangular window, etc., which is not specifically limited in the embodiments of the present application.

[0113] For an audio frame obtained from the target audio collection and multiple frequency intervals divided in the frequency domain dimension, the audio frame has corresponding frequency features in each frequency interval. Therefore, like the arrangement of pixel rows or pixel columns in an image, all frequency features corresponding to the audio frame can be arranged in a gradually increasing manner in the frequency domain dimension to form a frequency feature sequence. In order to form a spectrum feature graph, the frequency feature sequence can be represented as a pixel value sequence similar to an image. Based on this, the computer device can arrange the pixel value sequence corresponding to each audio frame collected from the target audio according to the time sequence of the audio frame in the time domain dimension, and splice the formed multiple columns of pixel value sequences to obtain the spectrum feature graph of the target audio.

[0114] In the above embodiment, when acquiring multiple audio frames from the target audio, the window of the audio frame is intercepted from the target audio by moving, and the preset step size used is smaller than the window length, so that there is an overlapping area between adjacent audio frames. That is, there is redundant information between adjacent audio frames. This makes it possible to avoid information loss as much as possible due to the redundant information between adjacent audio frames when performing downsampling combined processing and feature extraction combined processing, even if downsampling is performed, so as to reduce the amount of calculation while ensuring the processing accuracy as much as possible.

[0115] In some embodiments, the target downsampling combination processing in at least one downsampling combination processing also includes a downsampling preprocessing performed before the first downsampling convolution combination processing in the target downsampling combination processing; the downsampling preprocessing is used to downsample the data passed through the target downsampling combination processing and output intermediate data adapted to the first downsampling convolution combination processing, so that the intermediate data undergoes the downsampling convolution combination processing in the target downsampling combination processing for downsampling again.

[0116] Among them, the target downsampling combination processing in at least one downsampling combination processing also includes downsampling preprocessing, which actually means that in at least one downsampling combination processing, there is a downsampling combination processing that also includes downsampling preprocessing. In the actual implementation process, the embodiment of the present application does not limit which downsampling combination processing in at least one downsampling combination processing also includes downsampling preprocessing, and may include all of them, or one or more of the downsampling combination processing may also include downsampling preprocessing.

[0117] It can be seen from the contents of the above embodiments that the downsampling combination processing includes at least one downsampling convolution combination processing. Therefore, the computer device can insert downsampling preprocessing before the first downsampling convolution combination processing. It should be noted that in the multiple downsampling combination processings performed continuously, if the number of downsampling convolution combination processings included in each downsampling combination processing is randomly set, and the number of downsampling combination processings is also randomly set, then except that the downsampling preprocessing in the first downsampling convolution combination processing is actually the first sequence execution, the downsampling preprocessing in the remaining downsampling combination processing is actually equivalent to being randomly inserted in a series of downsampling convolution combination processings.

[0118] Of course, in the actual implementation process, the above situation is supportable, and the number of downsampling combination processing, the number of downsampling convolution combination processing in each downsampling combination processing, and the position of the downsampling preprocessing can all be set according to demand, and the embodiment of the present application does not specifically limit this. Among them, similar to the role that the downsampling convolution combination processing can play, the downsampling preprocessing can also have the function of downsampling. At the same time, the downsampling preprocessing can also map and transform the data to form intermediate data that is compatible with the input data required for the downsampling convolution combination processing in terms of specifications.

[0119] For example, for the first downsampling combination processing, if the input data is a spectrum feature map of H*W, and the specification of the input data required for the first downsampling convolution combination processing in the first downsampling combination processing is c*H / 2*W / 2. Therefore, the downsampling preprocessing performed before the first downsampling convolution combination processing not only needs to realize the downsampling function, that is, converting the spectrum feature map of H*W into the intermediate data of H / 2*W / 2, but also needs to realize the function of expanding the data channel.

[0120] Among them, the downsampling preprocessing may include convolution processing brought about by multiple convolutional layers, and may also include pooling processing brought about by multiple pooling layers. The embodiment of the present application does not specifically limit the processing process of the downsampling preprocessing. It can be known that downsampling can be performed through downsampling preprocessing, and downsampling can be performed again through downsampling convolution combination processing after downsampling preprocessing. Specifically, the processing framework of multiple downsampling combination processing, the downsampling convolution combination processing included in each downsampling combination processing, and the downsampling preprocessing inserted therein can be referred to. Figure 5 .exist Figure 5 In the figure, the black and white image at the bottom is the spectrum feature map.

[0121] In the above embodiment, since downsampling preprocessing can be performed before the first downsampling convolution combination processing, on the one hand, the downsampling preprocessing can reduce the dimension of the input data of the first downsampling convolution combination processing, thereby reducing the amount of calculation to reduce the operation cost and improve the processing efficiency. On the other hand, since the downsampling preprocessing can be converted to obtain intermediate data that is compatible with the first downsampling convolution combination processing in terms of specifications, it is ensured that the processing can proceed normally.

[0122] In some embodiments, the downsampling preprocessing includes normalization processing and at least one downsampling convolution processing; the downsampling convolution processing is used to convolve the data that has passed the downsampling convolution processing for downsampling; the normalization processing is used to normalize the eigenvalues ​​of the data that has passed the normalization processing.

[0123] Among them, the downsampling convolution process can be a conventional two-dimensional convolution process, the convolution kernel used can be 3*3, and the step size can be 2, which is not specifically limited in the embodiment of the present application. It should be noted that whether the downsampling convolution process uses padding can be set according to demand, which is not specifically limited in the embodiment of the present application. The normalization process can use layer normalization or batch normalization, and the embodiment of the present application does not specifically limit the normalization process.

[0124] In addition, in the actual implementation process, the downsampling convolution process can also be replaced by a pooling process. It should also be noted that the normalization process in the downsampling preprocessing can be performed after the downsampling convolution process. If a downsampling convolution process and a normalization process performed in sequence are regarded as a combined process, then in the actual implementation process, the number of combined processes performed in the downsampling preprocessing may not be limited. Figure 5 In the relevant structure, taking the downsampling preprocessing including a downsampling convolution process and a normalization process in sequence as an example, the processing framework can refer to Figure 6 .

[0125] In the above embodiment, since downsampling preprocessing can be performed before the first downsampling convolution combination processing, and the downsampling preprocessing can include downsampling convolution processing, the amount of calculation can be reduced to reduce the operation cost and improve the processing efficiency. In addition, since the downsampling preprocessing can also include normalization processing, the data can be limited to a certain range, reducing the adverse effects caused by singular data to improve the processing accuracy. In addition, the convergence speed of the optimal solution obtained by gradient descent during training can also be accelerated.

[0126] In some embodiments, for the target downsampling preprocessing included in the target downsampling combination processing in at least one downsampling combination processing, the target downsampling convolution processing in the target downsampling preprocessing is for the frequency domain dimension; in addition to the target downsampling preprocessing, the remaining downsampling convolution processing involved in at least one downsampling combination processing targets at least the frequency domain dimension in the time domain dimension and the frequency domain dimension; the frequency features of multiple audio frames of the target audio in the spectrum feature graph are arranged according to the time sequence of the multiple audio frames.

[0127] It should be noted that "target downsampling preprocessing included in the target downsampling combination processing in at least one downsampling combination processing" means that there is at least one downsampling combination processing in at least one downsampling combination processing, and for the downsampling preprocessing, the downsampling convolution processing in the downsampling preprocessing is for the frequency domain dimension. For the remaining downsampling combination processing, the remaining downsampling convolution processing involved in these downsampling combination processing may be for the frequency domain dimension only, or for both the time domain and the frequency domain dimensions.

[0128] The reason for adopting the above design is mainly because in audio processing, the previous and subsequent features in the audio time sequence need to be interdependent, that is, the features in the time domain dimension are more important for audio processing. Before performing feature extraction and combination processing, reducing the resolution of the time domain dimension may affect the processing accuracy. Therefore, some downsampling convolution processing that only downsamples the frequency domain dimension can be interspersed in all downsampling convolution processing to ensure that the resolution of the time domain dimension does not drop too low, resulting in the loss of a large amount of time domain dimension information. In the actual implementation process, whether the downsampling convolution processing is downsampling the frequency domain dimension, downsampling the time domain dimension, or both, can be set through the convolution kernel of the downsampling convolution processing.

[0129] For example, the convolution kernel is usually in matrix form, that is, the size of the convolution kernel in the time domain dimension and the frequency domain dimension is greater than 1, to indicate that downsampling is performed on both the time domain dimension and the frequency domain dimension. If only downsampling is required for the frequency domain dimension, the size of the convolution kernel in the time domain dimension can be set to 1, and the size of the frequency domain dimension can be set to greater than 1. At this time, the convolution kernel degenerates from a matrix form to a vector form.

[0130] In the above embodiment, since the downsampling convolution processing involved in at least one downsampling combination processing can be set to be only for the frequency domain dimension, it can be ensured that before the feature extraction combination processing, the resolution of the time domain dimension will not be reduced to a low level, thereby affecting the processing accuracy. In addition, only performing downsampling convolution processing on the frequency domain dimension can reduce the amount of calculation compared to performing downsampling convolution processing on both the frequency domain dimension and the time domain dimension at the same time, thereby reducing the computing cost and improving the processing efficiency.

[0131] In some embodiments, an audio processing method is provided. Figure 7 As shown, the method is applied to a computer device (the computer device may be specifically Figure 1 The terminal or server in the example is used to illustrate, including the following steps:

[0132] Step 702: Obtain a frequency spectrum feature graph of the target audio.

[0133] Among them, the frequency features of multiple audio frames of the target audio in the spectrum feature graph are arranged according to the time sequence of the multiple audio frames.

[0134] Step 704: based on the frequency spectrum feature graph, perform multiple downsampling combination processing in series to obtain a downsampled intermediate feature matrix; wherein each downsampling combination processing includes multiple downsampling convolution combination processing performed in series.

[0135] The downsampling combination processing includes at least one downsampling convolution combination processing, and the downsampling convolution combination processing includes sequentially performing a depth convolution processing, a convolution processing of expanding the number of channels, and a convolution processing of shrinking the number of channels.

[0136] Step 706: Perform at least one feature extraction and combination process based on the intermediate feature matrix to obtain a target feature matrix.

[0137] Among them, the feature extraction combination processing includes a first feedforward processing, a multi-head self-attention processing, a convolution processing and a second feedforward processing performed in sequence.

[0138] Step 708: Perform audio processing according to the target feature matrix to obtain an audio processing result for the target audio.

[0139] In the above embodiment, since multiple downsampling combination processing can be performed serially, and each downsampling combination processing includes multiple downsampling convolution combination processing performed serially, the amount of data in the subsequent feature extraction combination processing can be reduced as much as possible, the amount of calculation can be reduced to reduce the operation cost and improve the processing efficiency. In addition, since it is performed serially, no additional jump logic is generated in the code execution, thereby improving the code execution efficiency.

[0140] In some embodiments, each downsampling combination processing includes a downsampling preprocessing and multiple downsampling convolution combination processing after the downsampling preprocessing; the output data of the downsampling convolution combination processing in each downsampling combination processing has the same number of channels as the input data of the downsampling convolution combination processing in the current downsampling combination processing, and has a smaller number of channels than the input data of the downsampling convolution combination processing in the next downsampling combination processing.

[0141] Taking the serial downsampling combination processing for three times as an example, the specific processing framework can be referred to Figure 8 .from Figure 8 It can be seen that the number of input data channels of the downsampling convolution combination processing in the first downsampling combination processing is c, and the number of output data channels of the downsampling convolution combination processing in the first downsampling combination processing is also c. That is, the output data of the downsampling convolution combination processing in the first downsampling combination processing has the same number of input data channels as the downsampling convolution combination processing in the first downsampling combination processing, and the same is true for the subsequent second and third downsampling combination processing.

[0142] Comparing the first downsampling combination processing with the second downsampling combination processing, the number of input data channels of the downsampling convolution combination processing in the second downsampling combination processing is 2c. Comparing the second with the third, the number of input data channels of the downsampling convolution combination processing in the third downsampling combination processing is 3c. Obviously, the number of output data channels c of the downsampling convolution combination processing in the first downsampling combination processing is less than 2c, and the number of output data channels c of the downsampling convolution combination processing in the second downsampling combination processing is less than 3c. In the actual implementation process, such a result can be formed by the downsampling preprocessing that is first performed in the downsampling combination processing, that is, channel expansion is achieved through downsampling preprocessing.

[0143] Combination Figure 8 , which is equivalent to the number of channels involved in different downsampling combinations gradually increasing from bottom to top. It should be noted that Figure 8 What is shown is only one incremental value setting of the number of channels in actual implementation. In actual implementation, the number of channels may not be gradually increased as follows. Figure 8In the same manner as in the above, the next downsampling combination processing expands c channels relative to the previous downsampling combination processing. In addition, in the actual implementation process, the number of channels may not necessarily be designed to be incremental, and may be set according to actual needs. For example, the number of channels remains unchanged, and this embodiment of the present application does not specifically limit this.

[0144] In the above embodiment, as the downsampling combination processing is performed sequentially, the number of channels involved in the downsampling combination processing is also increasing, so that more implicit features of audio processing can be gradually discovered, thereby improving the processing accuracy.

[0145] In some embodiments, the target feature extraction combination process in at least one feature extraction combination process is preceded by an intermediate downsampling process; the intermediate downsampling process includes a normalization process, a nonlinear mapping process, and at least one downsampling convolution process.

[0146] Specifically, the processing framework for coexistence of at least one downsampling combination processing and at least one feature extraction combination processing can refer to Fig. 9 . “At least one feature extraction combination process in which the target feature extraction combination process is preceded by an intermediate downsampling process” means that at least one feature extraction combination process has a feature extraction combination process preceded by an intermediate downsampling process. Among them, which feature extraction combination process in at least one feature extraction combination process is preceded by an intermediate downsampling process, and how many feature extraction combination processes are preceded by an intermediate downsampling process, the embodiment of the application does not specifically limit this. Taking the example of only one feature extraction combination process preceded by an intermediate downsampling process, then combined with Fig. 9 , the specific processing framework can be referred to Fig.10 .

[0147] It should be noted that Fig.10 The execution flow inside the intermediate downsampling process is only one example. In the actual implementation process, the downsampling convolution process can be performed more than once, but multiple times. At the same time, the order of downsampling convolution, normalization and nonlinear mapping can be set according to demand, and the embodiment of the present application does not specifically limit this. Among them, the nonlinear mapping process is mainly to introduce nonlinear factors and improve the feature expression ability.

[0148] In addition, it can be seen from the content of the above embodiment that, since a one-dimensional vector of multiple channels is processed in the feature extraction and combination processing, the computer device can perform linear processing on the output data after at least one downsampling and combination processing to obtain a one-dimensional vector of multiple channels only for the time domain dimension. If in the feature extraction and combination processing, the input data and the output data remain unchanged in the dimensions of the time domain and the frequency domain, as well as in the number of channels, the intermediate downsampling processing is actually downsampling the one-dimensional vectors of multiple channels in the time domain dimension. Therefore, the convolution kernel of the downsampling convolution processing in the intermediate downsampling processing can be set to a vector. For example, it can be set to a convolution kernel of size 3, and the step size can be selected to be 2.

[0149] In the above embodiment, since the intermediate downsampling process is interspersed in at least one feature extraction combination process, the amount of calculation can be further reduced to reduce the operation cost and improve the processing efficiency. In addition, since the intermediate downsampling process includes a nonlinear mapping process, a nonlinear factor can be introduced to improve the feature expression capability.

[0150] In some embodiments, at least one feature extraction and combination process is performed based on the intermediate feature matrix to obtain a target feature matrix, including:

[0151] Based on the intermediate feature matrix, multiple batches of feature extraction and combination processing are performed serially to obtain a target feature matrix; wherein the feature extraction and combination processing of each batch includes feature extraction and combination processing performed serially, and there is at least one batch of intermediate downsampling processing before the first feature extraction and combination processing.

[0152] Take the example of performing two batches of feature extraction and combination processing in series, where each batch of feature extraction and combination processing includes multiple serial feature extraction and combination processing, and intermediate downsampling processing is performed before the second batch of feature extraction and combination processing. For the specific processing framework, please refer to Fig.11 .

[0153] In the above embodiment, since multiple batches of feature extraction and combination processing can be performed serially, implicit features that are helpful for audio processing can be mined as much as possible to improve the accuracy of subsequent processing. In addition, since the feature extraction and combination processing is performed serially, no additional jump logic is generated in the code execution, thereby improving the code execution efficiency. Finally, since the intermediate downsampling processing can be interspersed in the process of serial feature extraction and combination processing, the amount of calculation can be reduced to reduce the computing cost and improve the processing efficiency.

[0154] In some embodiments, audio processing is performed according to a target feature matrix to obtain an audio processing result for the target audio, including: obtaining multiple text recognition prediction sequences and their respective occurrence probabilities according to the target feature matrix; merging the same text prediction results that appear consecutively in the target text recognition prediction sequence corresponding to the maximum occurrence probability; deleting the text prediction results that serve as blank marks in the merged target text recognition prediction sequence to obtain an audio processing result.

[0155] Combined with the contents of the above embodiments, it can be known that the feature extraction combination processing can process multi-channel one-dimensional vectors, and the input data and the output data can remain unchanged in the dimensions of the time domain and the frequency domain, as well as the number of channels. Take the output data obtained after at least one feature extraction combination processing as a one-dimensional vector with c channels and a dimension of W / 8 as an example. Combined with the number of c channels, the c*W / 8 tensor can be regarded as the target feature matrix. By linearly processing the c*W / 8 tensor and then using an activation function (such as a softmax function), the linear processing result can be mapped to multiple text recognition prediction sequences and their respective occurrence probabilities. It should be noted that the process of outputting the text recognition prediction sequence in this step does not require strict alignment between the target audio as input and the text recognition prediction sequence as output. Instead, a blank mark is introduced in the output text recognition prediction sequence to obtain an effective text recognition path.

[0156] For example, take the blank symbol "∈" as an example, and the target text recognition prediction sequence is "hhe∈∈lll∈ll o". The prediction results of the same text that appear consecutively are merged, that is, "hh" can be merged into "h", "∈∈" can be merged into "∈", "lll" can be merged into "l", and "ll" can be merged into "l". In this way, a valid text recognition path can be obtained, that is, the merged target text recognition prediction sequence "he∈llo". Finally, the text prediction results that are blank symbols are deleted, and the audio processing result "hello" can be obtained.

[0157] In the above embodiment, since the text prediction process outputs the entire text recognition prediction sequence, it is not necessary for the input and output to be strictly aligned, but a blank mark is used to separate them, effectively distinguishing the redundant repetition of the text prediction results from the reasonable repetition of the text prediction results, so that the text prediction process is less affected by the pronunciation of phonemes, and can accurately predict audio with non-standard pronunciation. At the same time, since there is no need for strict alignment of the input and output, there is no need to annotate the training labels frame by frame during the model training process, but the training labels are annotated for the entire audio, thereby reducing the workload of model training and improving the efficiency of model training.

[0158] In some embodiments, the audio processing result is a text recognition prediction sequence, which is obtained based on the text prediction results output in time sequence; performing audio processing according to the target feature matrix to obtain an audio processing result for the target audio includes:

[0159] When the current output moment is not the first output moment, a reference feature matrix obtained based on the text prediction results output at each output moment before the current output moment is obtained; when the current output moment is the first output moment, a reference feature matrix converted from the start output identifier is obtained;

[0160] Obtaining a similarity matrix for representing the similarity between a reference feature matrix and a target feature matrix, and based on the similarity matrix, fusing the target feature matrix with the reference feature matrix to obtain a global target feature matrix for representing the global features of the target audio;

[0161] According to the global target feature matrix, multiple text prediction results and their respective occurrence probabilities output at the current output moment are obtained, and the text prediction result corresponding to the maximum occurrence probability is output. The above-mentioned process of outputting in time sequence is repeated until the output ends, and the text prediction results output at each output moment are integrated in the output order to obtain the audio processing result.

[0162] Specifically, the above content is mainly the process of outputting the text prediction results in time sequence. For the current output moment, if the current output moment is the first output moment, the reference feature matrix can be obtained by performing text embedding processing on the text prediction results output before the current moment. If the current output moment is not the first output moment, the reference feature matrix can be obtained by performing text embedding processing on the starting output mark, such as "sos" (start of sentence).

[0163] Therefore, the reference feature matrix can be used as the query, and the target feature matrix can be used as the key and value, and the similarity matrix between the reference feature matrix and the target feature matrix can be calculated first. Specifically, the transposed matrix of the target feature matrix can be obtained first, and the transposed matrix of the target feature matrix is ​​multiplied by the reference feature matrix to obtain the first feature matrix after multiplication. The similarity matrix between the reference feature matrix and the target feature matrix can be obtained by processing the first feature matrix after multiplication through the activation function. The similarity matrix is ​​multiplied with the target feature matrix to obtain the second feature matrix after multiplication. Finally, the second feature matrix after multiplication is multiplied by the reference feature matrix to obtain the global target feature matrix used to characterize the global features of the target audio.

[0164] After obtaining the global target feature matrix, the global target feature matrix can be linearly processed, and then the linear processing results can be mapped to multiple text prediction results and their respective occurrence probabilities through an activation function (such as a softmax function). In this way, the text prediction result with the maximum probability of occurrence can be output at the current output moment. At this time, the text prediction result output at the current output moment can be used as the basis for obtaining the reference feature matrix and used at the next output moment. Repeat the above process of outputting in time sequence, and the output can be completed when the output ends (such as outputting the preset end mark of "end"). By integrating the text prediction results according to the output sequence, the audio processing result can be obtained.

[0165] In the above embodiment, since the text prediction result output at each output moment and the target feature matrix obtained by extracting features from the target audio can be used for the decoding process at the same time, the text prediction result output at each output moment can not only carry the previous semantics so that the subsequent decoding recognition can be combined with the previous semantics, but also carry the position information of the word order sequence so that the subsequent decoding process can be based on the text word order, thereby improving the processing accuracy. In addition, since the global target feature matrix that represents the global features of the target audio is used, the decoding process can be based on the global features, thereby also improving the processing accuracy.

[0166] In some embodiments, the method is implemented based on an audio processing model, and the audio processing result includes at least one text prediction result; after performing audio processing according to a target feature matrix to obtain an audio processing result for a target audio, the method further includes:

[0167] The audio processing model is trained by a target loss function; the target loss function is determined based on at least one of the first loss function and the second loss function;

[0168] Among them, the first loss function is constructed based on the audio processing result and the training label corresponding to the audio processing result; the second loss function is constructed based on each text prediction result in the audio processing result and the training label corresponding to each text prediction result.

[0169] Among them, the first loss function can be a CTC (Connectionist Temporal Classification, a time series classification based on a neural network) loss function, and the second loss function can be a cross entropy loss function, or a maximum mutual information loss function of word graph freedom, which is not specifically limited in the embodiment of the present application. In addition, the target loss function can be obtained by weighted summing the first loss function and the second loss function, and the weight of the weighted summation can be set according to the needs, which is not specifically limited in the embodiment of the present application.

[0170] In the above embodiment, since the audio processing model can be trained simultaneously by two loss functions, the model training effect can be improved, thereby improving the subsequent processing accuracy of the model.

[0171] For ease of understanding, now combined Fig.12 , Fig.13 and Fig.14 , the contents mentioned in the above embodiments are explained. Fig.13 , the black and white image at the bottom is the spectrum feature map extracted from the target audio. First, expand the spectrum feature map into a 1*H*W spectrum map tensor. Among them, 1 represents the number of original input channels, H represents the dimension of the frequency domain, that is, the number of features, and W represents the dimension of the time domain, that is, the number of frames. At this time, the frame rate is 10 milliseconds. Then, the 1*H*W spectrum map tensor can be downsampled and convolved.

[0172] (1) Specifically, a standard two-dimensional convolution (Conv2d) can be used to downsample the time domain and frequency domain at the same time to reduce the amount of subsequent calculations. The relevant parameters of the standard two-dimensional convolution can be: convolution kernel size 3*3, step size 2*2, input channel number 1, and output channel number c. Among them, the number of output channels can be adjusted according to needs. After executing the above standard two-dimensional convolution, a tensor of size c*H / 2*W / 2 can be output. From the size of the tensor, it can be seen that the frame rate is reduced by half from 10 milliseconds to 20 milliseconds. Then, the eigenvalues ​​in the tensor of size c*H / 2*W / 2 can be normalized to a reasonable range through layer normalization. Among them, the layer normalization process can act on the channel dimension.

[0173] (2) The output of step (1) is used as input and sent to the downsampling combination process composed of O downsampling convolution combination processes, that is, sent to the first downsampling convolution combination process in the downsampling combination process. The processing process of the downsampling convolution combination process can be referred to Fig.13 The right half of . A tensor of size c*H / 2*W / 2 is input to the deep convolution process. Among them, the deep convolution process can have padding, the convolution kernel size can be 7*7, the number of input channels can be c, and the number of output channels can be c. Therefore, the output data of the deep convolution process can be a tensor of c*H / 2*W / 2. It should be noted that the amount of calculation using deep convolution can be only 1 / c times that of ordinary convolution. In addition, by using a large 7*7 convolution kernel, a larger field of view and modeling capabilities can be provided.

[0174] Then, through layer normalization processing and then through the convolution processing of expanding the number of channels, an output tensor of 4c*H / 2*W / 2 can be obtained. By adding the activation function GeLU, nonlinear capability can be provided. Then, through the convolution processing of shrinking the number of channels, the tensor size can be pulled back to the same size as the input data size of the deep convolution processing, that is, c*H / 2*W / 2. Among them, the convolution kernel of the convolution processing of shrinking the number of channels can be 1*1, the number of input channels can be 4c, and the number of output channels can be c. Then, the output data of the convolution processing of shrinking the number of channels can be scaled, and the result of the scaling processing and the input data of the deep convolution processing can be subjected to residual processing. Among them, the scaling processing can act on the channel dimension, and can specifically be a gamma transformation, which is not specifically limited in the embodiment of the present application. By Fig.13 It can be seen that the downsampling convolution combination process can be performed serially O times.

[0175] (3) Thus, through the downsampling combination processing composed of O downsampling convolution combination processing, a tensor of size c*H / 2*W / 2 can be output. After the above downsampling preprocessing, a tensor of size 2c*H / 4*W / 4 is output. Among them, the downsampling preprocessing includes layer normalization processing and downsampling convolution processing. The convolution kernel of the downsampling convolution processing can be 3*3, the step size can be 2*2, the number of input channels can be c, and the number of output channels can be 2c. In this step, the channel is expanded from the original c to 2c, and the size of the output data is reduced by 1 / 2.

[0176] (4) The output of the previous step is processed by a downsampling combination consisting of P downsampling convolution combinations, and can output a tensor of 2c*H / 4*W / 4.

[0177] (5) The output of the previous step can be output as a tensor of 3c*H / 8*W / 4 after the above downsampling preprocessing. The downsampling preprocessing can also include normalization processing and downsampling convolution processing. Among them, the convolution kernel of the downsampling convolution processing can be 3*1, the step size can be 2*1, the number of input channels can be 2c, and the number of output channels can be 3c. As a result, the number of output channels is enlarged to 3c again, but only the frequency domain dimension is downsampled, and the resolution of the time domain dimension remains unchanged.

[0178] (6) The output of the previous step is processed by a downsampling combination consisting of P downsampling convolution combinations, and can output a tensor of 3c*H / 8*W / 4.

[0179] (7) The output of the previous step can be processed linearly to obtain a tensor of c*W / 4. Thus, Fig.13 The relevant processing is completed.

[0180] (8)Reference Fig.12The above steps (1) to (7) mainly illustrate the following: Fig.12 The processing process of "downsampling combined processing" in the above figure is shown in Figure 2. At this time, the time domain dimension is changed from the original W to W / 4, so the frame rate is changed from the original 10 milliseconds to 40 milliseconds. Through the combined processing of N / 2 serial feature extractions, the final output data can be a tensor of c*W / 4.

[0181] (9) Fig.12 There are two batch processes consisting of N / 2 serial feature extraction combination processes, with an intermediate downsampling process between them. The process of the intermediate downsampling process can be referred to Fig.14 . The intermediate downsampling process is mainly used to further reduce the frame rate in the time domain, thereby reducing the computational complexity of the subsequent feature extraction combination process to achieve the purpose of improving the overall computational efficiency. The specific process includes: inputting the c*W / 4 tensor into the downsampling convolution process (such as a one-dimensional convolution with a convolution kernel of 3, a step size of 2, c input channels and c output channels). After the downsampling convolution process, a c*W / 8 tensor can be output, thereby achieving further downsampling in the time domain. Then, through nonlinear mapping processing (GeLU activation function) and layer normalization processing, the final output data of size c*W / 8 can be obtained.

[0182] (10) The output of the previous step is then processed by N / 2 serial feature extraction combinations to obtain the target feature matrix of the final output. It should be noted that the above (1) to (10) are mainly the encoding process of extracting features, and the subsequent process is mainly the decoding process. In actual implementation, the encoding process of extracting features can be implemented through the encoder architecture, and of course it can also be implemented using the transducer architecture, which is not specifically limited in the embodiments of the present application.

[0183] Regarding the decoding process, the target feature matrix can be directly processed by linear processing and activation function processing to obtain an audio processing result. The target feature matrix can also be input into the decoding end, so that by performing M feature decoding processes, and then processing by linear processing and activation function processing, an audio processing result can be obtained. Among them, the feature decoding process can be implemented by a transformer module or a long short-term memory neural network module, and the embodiment of the present application does not specifically limit this.

[0184] In the above embodiment, since deep convolution processing and convolution processing regarding the number of channels can be performed in the downsampling combination processing, and the deep convolution processing only needs to use the same convolution kernel as the number of channels of the input data, and the number of convolution processing is the same as the number of channels of the input data, it is not necessary to use the product of the number of channels of the input data and the number of channels of the output data as in the traditional convolution, and the number of convolution processing is the same as the product, thereby reducing the number of convolution processing based on the convolution kernel, reducing the amount of calculation to reduce the operation cost and improve the processing efficiency. At the same time, the convolution kernel used for the convolution processing regarding the number of channels is actually a vector of the same length as the number of channels of the input data, so compared with the traditional convolution using a matrix as the convolution kernel, the internal calculation amount when performing convolution processing based on the convolution kernel can be reduced to reduce the operation cost and improve the processing efficiency.

[0185] In addition, since the output data of the deep convolution processing can have the same number of channels as the output data of the convolution processing with the number of channels contracted, and the convolution processing with the number of channels expanded in the middle can have more channels than the first two, the internal processing process in the downsampling combination processing can be presented as a data processing structure of small dimensions, large dimensions and small dimensions as a whole. Based on the above data processing structure, since the input data is not directly dimensionally compressed, but after deep convolution processing, the data dimension is first expanded, and then the previous data dimension is restored, the loss of information caused by compressing the data dimension first can be avoided, thereby improving the processing accuracy. Finally, in the feature extraction combination processing, convolution processing can be performed to extract local features, and multi-head self-attention processing can be performed to extract global features, so that features that simultaneously represent the global and local can be extracted. Audio processing based on features that simultaneously represent the global and local can also improve processing accuracy.

[0186] The embodiment of the present application also provides an application scenario, in which the above-mentioned audio processing method is applied, and the example of a computer device involving a server is used for illustration. Specifically, the application of the audio processing method in the application scenario is as follows:

[0187] The terminal obtains the target audio, and the server extracts the spectral feature map of the target audio. The server performs at least one downsampling combination process based on the spectral feature map to obtain a downsampled intermediate feature matrix. The server performs at least one feature extraction combination process based on the intermediate feature matrix to obtain a target feature matrix. The server performs audio processing according to the target feature matrix to obtain a text recognition result for the target audio. The server returns the text recognition result to the terminal for display.

[0188] The embodiment of the present application also provides an application scenario, in which the above-mentioned audio processing method is applied, and the example of a computer device involving a server is used for illustration. Specifically, the application of the audio processing method in the application scenario is as follows:

[0189] The recording terminal in the conference room obtains the real-time audio of the speaker's speech in the meeting in real time and sends it to the server in real time. The server extracts the spectrum feature map of the real-time audio. The server performs at least one downsampling combination processing based on the spectrum feature map to obtain the downsampled intermediate feature matrix. The server performs at least one feature extraction combination processing based on the intermediate feature matrix to obtain the target feature matrix. The server performs audio processing based on the target feature matrix to obtain the text recognition result for the real-time audio. The server sends the text recognition result to the live broadcast terminal, and in addition to displaying the live video content of the meeting on the corresponding interface, it also displays the text recognition result of the speaker's speech in the meeting in real time below the video content.

[0190] It should be noted that the above application scenarios are illustrative application scenarios, which are used to help understand the solutions of the present application and are not used to limit the actual application scenarios of the present application.

[0191] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0192] Based on the same inventive concept, the embodiment of the present application also provides an audio processing method device for implementing the above-mentioned audio processing method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more audio processing device embodiments provided below can refer to the limitations on the audio processing method above, and will not be repeated here.

[0193] In some embodiments, Fig.15As shown, an audio processing device is provided, which can be a part of a computer device using a software module or a hardware module, or a combination of the two. The device specifically includes: an acquisition module 1502, at least one downsampling combination processing module 1504, at least one feature extraction combination processing module 1506, and an audio processing module 1508, wherein:

[0194] An acquisition module 1502 is used to acquire a frequency spectrum feature graph of the target audio; the frequency features of multiple audio frames of the target audio in the frequency spectrum feature graph are arranged according to the time sequence of the multiple audio frames;

[0195] The downsampling combination processing module 1504 includes at least one downsampling convolution combination processing module; the downsampling combination processing module 1504 is used to perform at least one downsampling combination processing based on the spectrum feature map to obtain a downsampled intermediate feature matrix; the downsampling convolution combination processing module includes a depth convolution processing layer, a convolution processing layer for expanding the number of channels, and a convolution processing layer for shrinking the number of channels connected in sequence;

[0196] A feature extraction and combination processing module 1506 is used to perform at least one feature extraction and combination processing based on the intermediate feature matrix to obtain a target feature matrix; the feature extraction and combination processing module 1506 includes a first feedforward processing layer, a multi-head self-attention processing layer, a convolution processing layer, and a second feedforward processing layer connected in sequence;

[0197] The audio processing module 1508 is used to perform audio processing according to the target feature matrix to obtain an audio processing result for the target audio.

[0198] In some embodiments, the acquisition module 1502 is used to obtain multiple audio frames from the target audio collection using a window whose window length is a preset audio frame length and moves according to a preset step length; the preset step length is smaller than the preset audio frame length; the frequency characteristics of each audio frame in the multiple audio frames distributed in different frequency intervals are obtained and expressed as a pixel value sequence, and the pixel value sequence of each audio frame is spliced ​​according to the audio frame time sequence to obtain a frequency spectrum feature diagram of the target audio.

[0199] In some embodiments, the target downsampling combination processing module in at least one downsampling combination processing module 1504 also includes a downsampling preprocessing module connected before the first downsampling convolution combination processing module in the target downsampling combination processing module; the downsampling preprocessing module is used to downsample the data passing through the target downsampling combination processing module and output intermediate data adapted to the first downsampling convolution combination processing module, so that the intermediate data passes through the downsampling convolution combination processing module in the target downsampling combination processing module for downsampling again.

[0200] In some embodiments, the downsampling preprocessing module includes a normalization processing layer and at least one downsampling convolution processing layer; the downsampling convolution processing layer is used to perform convolution processing on the data passing through the downsampling convolution processing layer for downsampling; the normalization processing layer is used to normalize the eigenvalues ​​of the data passing through the normalization processing layer.

[0201] In some embodiments, for a target downsampling preprocessing module included in a target downsampling combination processing module in at least one downsampling combination processing module 1504; a target downsampling convolution processing layer in the target downsampling preprocessing module is for the frequency domain dimension; except for the target downsampling preprocessing module, the remaining downsampling convolution processing layers involved in at least one downsampling combination processing module 1504 target dimensions including at least the frequency domain dimension in the time domain dimension and the frequency domain dimension; the frequency features of multiple audio frames of the target audio in the spectrum feature graph are arranged according to the time sequence of the multiple audio frames.

[0202] In some embodiments, at least one downsampling combination processing module 1504 is used to perform multiple downsampling combination processing in series based on the spectrum feature map to obtain a downsampled intermediate feature matrix; wherein each downsampling combination processing includes multiple downsampling convolution combination processing performed in series.

[0203] In some embodiments, each downsampling combination processing module 1504 includes a downsampling preprocessing module and multiple downsampling convolution combination processing modules connected after the downsampling preprocessing module; the output data of the downsampling convolution combination processing module in each downsampling combination processing module 1504 has the same number of input data channels as the downsampling convolution combination processing module in the current downsampling combination processing module 1504, and has a smaller number of input data channels than the downsampling convolution combination processing module in the next downsampling combination processing module 1504.

[0204] In some embodiments, the target feature extraction combination processing module in at least one feature extraction combination processing 1506 is connected to an intermediate downsampling processing module; the intermediate downsampling processing module includes a normalization processing layer, a nonlinear mapping processing layer and at least one downsampling convolution processing layer.

[0205] In some embodiments, at least one feature extraction combination processing 1506 is used to perform multiple batches of feature extraction combination processing in series based on an intermediate feature matrix to obtain a target feature matrix; wherein each batch of feature extraction combination processing includes feature extraction combination processing performed in series, and there is at least one batch of intermediate downsampling processing before the first feature extraction combination processing.

[0206] In some embodiments, the audio processing module 1508 is used to obtain multiple text recognition prediction sequences and their respective occurrence probabilities based on the target feature matrix; merge the same text prediction results that appear continuously in the target text recognition prediction sequence corresponding to the maximum occurrence probability; delete the text prediction results that serve as blank marks in the merged target text recognition prediction sequence to obtain the audio processing result.

[0207] In some embodiments, the audio processing module 1508 is used to obtain a reference feature matrix obtained based on the text prediction results output at each output moment before the current output moment when the current output moment is not the first output moment, and to obtain a reference feature matrix converted from a starting output identifier when the current output moment is the first output moment; obtain a similarity matrix used to characterize the similarity between the reference feature matrix and the target feature matrix, and based on the similarity matrix, fuse the target feature matrix with the reference feature matrix to obtain a global target feature matrix used to characterize the global features of the target audio; according to the global target feature matrix, obtain multiple text prediction results output at the current output moment and their respective occurrence probabilities, output the text prediction result corresponding to the maximum occurrence probability, repeat the above-mentioned process of outputting in time sequence until the output ends, and integrate the text prediction results output at each output moment in output order to obtain an audio processing result.

[0208] In some embodiments, the device is implemented based on an audio processing model, and the audio processing result includes at least one text prediction result; the device also includes:

[0209] A model training module is used to train the audio processing model through a target loss function; the target loss function is determined based on at least one of the first loss function and the second loss function; wherein the first loss function is constructed based on the audio processing result and the training label corresponding to the audio processing result; the second loss function is constructed based on each text prediction result in the audio processing result and the training label corresponding to each text prediction result.

[0210] The above-mentioned audio processing device can perform deep convolution processing and convolution processing on the number of channels in the downsampling combination processing, and the deep convolution processing only needs to use the same convolution kernel as the number of channels of the input data, and the number of convolution processing is the same as the number of channels of the input data, instead of using the product of the number of channels of the input data and the number of channels of the output data as in the traditional convolution, and the number of convolution processing is the same as the product, thereby reducing the number of convolution processing based on the convolution kernel, reducing the amount of calculation to reduce the operation cost and improve the processing efficiency. At the same time, the convolution kernel used in the convolution processing on the number of channels is actually a vector of the same length as the number of channels of the input data, so compared with the traditional convolution using a matrix as the convolution kernel, the internal calculation amount when performing convolution processing based on the convolution kernel can be reduced to reduce the operation cost and improve the processing efficiency.

[0211] In addition, since the output data of the deep convolution processing can have the same number of channels as the output data of the convolution processing with the number of channels contracted, and the convolution processing with the number of channels expanded in the middle can have more channels than the first two, the internal processing process in the downsampling combination processing can be presented as a data processing structure of small dimensions, large dimensions and small dimensions as a whole. Based on the above data processing structure, since the input data is not directly dimensionally compressed, but after deep convolution processing, the data dimension is first expanded, and then the previous data dimension is restored, the loss of information caused by compressing the data dimension first can be avoided, thereby improving the processing accuracy. Finally, in the feature extraction combination processing, convolution processing can be performed to extract local features, and multi-head self-attention processing can be performed to extract global features, so that features that simultaneously represent the global and local can be extracted. Audio processing based on features that simultaneously represent the global and local can also improve processing accuracy.

[0212] For the specific definition of the audio processing device, please refer to the definition of the audio processing method above, which will not be repeated here. Each module in the above audio processing device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0213] In one embodiment, a computer device is provided. The computer device may be a terminal or a server. The internal structure diagram thereof may be as follows: Fig.16As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store audio processing models. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an audio processing method is implemented.

[0214] Those skilled in the art will understand that Fig.16 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0215] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0216] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0217] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0218] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0219] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. An audio processing method, characterized in that: The method comprises: Get the frequency spectrum feature map of the target audio; Based on the frequency spectrum feature map, at least one downsampling combination process is performed to obtain a downsampled intermediate feature matrix; the downsampling combination process includes at least one downsampling convolution combination process, and the downsampling convolution combination process includes a depth convolution process, a convolution process for expanding the number of channels, and a convolution process for shrinking the number of channels performed in sequence; the depth convolution process uses a convolution kernel with the same number of channels as the input data, and the number of convolution processes is the same as the number of channels of the input data; the target downsampling combination process in the at least one downsampling combination process also includes a downsampling preprocessing performed before the first downsampling convolution combination process in the target downsampling combination process; the downsampling preprocessing is used to downsample the data that has passed the target downsampling combination process and output intermediate data that is adapted to the first downsampling convolution combination process, so that the intermediate data is downsampled again after the downsampling convolution combination process in the target downsampling combination process; Performing at least one feature extraction and combination process based on the intermediate feature matrix to obtain a target feature matrix; the feature extraction and combination process includes a first feedforward process, a multi-head self-attention process, a convolution process, and a second feedforward process performed in sequence; Audio processing is performed according to the target feature matrix to obtain an audio processing result for the target audio.

2. The method according to claim 1, characterized in that: The step of obtaining a frequency spectrum feature graph of the target audio includes: Acquire multiple audio frames from the target audio collection by using a window whose window length is a preset audio frame length and moves according to a preset step length; the preset step length is smaller than the preset audio frame length; The frequency characteristics of each audio frame in the multiple audio frames distributed in different frequency intervals are obtained and expressed as a pixel value sequence, and the pixel value sequence of each audio frame is spliced ​​according to the audio frame time sequence to obtain the frequency spectrum characteristic diagram of the target audio.

3. The method according to claim 1, characterized in that The downsampling preprocessing includes normalization processing and at least one downsampling convolution processing; the downsampling convolution processing is used to perform convolution processing on the data that has passed the downsampling convolution processing for downsampling; the normalization processing is used to normalize the eigenvalues ​​of the data that has passed the normalization processing.

4. The method according to claim 3, characterized in that For the target downsampling preprocessing included in the target downsampling combination processing in the at least one downsampling combination processing, the target downsampling convolution processing in the target downsampling preprocessing is for the frequency domain dimension; in addition to the target downsampling preprocessing, the remaining downsampling convolution processing involved in the at least one downsampling combination processing targets at least the frequency domain dimension in the time domain dimension and the frequency domain dimension; the frequency features of the multiple audio frames of the target audio in the frequency spectrum feature graph are arranged according to the time sequence of the multiple audio frames.

5. The method according to any one of claims 1 to 4, characterized in that: The downsampling combination processing is performed at least once based on the frequency spectrum feature graph to obtain a downsampled intermediate feature matrix, including: Based on the frequency spectrum feature graph, multiple downsampling combination processes are performed in series to obtain a downsampled intermediate feature matrix; wherein each downsampling combination process includes multiple downsampling convolution combination processes performed in series.

6. The method according to claim 5, characterized in that Each downsampling combination processing includes a downsampling preprocessing and multiple downsampling convolution combination processings after the downsampling preprocessing; the output data of the downsampling convolution combination processing in each downsampling combination processing has the same number of channels as the input data of the downsampling convolution combination processing in the current downsampling combination processing, and has a smaller number of channels than the input data of the downsampling convolution combination processing in the next downsampling combination processing.

7. The method according to claim 1, characterized in that The target feature extraction combination processing in the at least one feature extraction combination processing is preceded by an intermediate downsampling processing; the intermediate downsampling processing includes a normalization processing, a nonlinear mapping processing and at least one downsampling convolution processing.

8. The method according to claim 7, characterized in that The step of performing at least one feature extraction and combination process based on the intermediate feature matrix to obtain a target feature matrix includes: Based on the intermediate feature matrix, multiple batches of feature extraction and combination processing are performed in series to obtain a target feature matrix; wherein each batch of feature extraction and combination processing includes feature extraction and combination processing performed in series, and the intermediate downsampling processing is performed before at least one batch of first feature extraction and combination processing.

9. The method according to claim 1, characterized in that: The performing audio processing according to the target feature matrix to obtain an audio processing result for the target audio includes: According to the target feature matrix, a plurality of character recognition prediction sequences and respective occurrence probabilities are obtained; Merge the prediction results of the same characters that appear continuously in the target character recognition prediction sequence corresponding to the maximum occurrence probability; The text prediction results that are blank markers in the merged target text recognition prediction sequence are deleted to obtain the audio processing result.

10. The method according to claim 1, characterized in that The audio processing result is a text recognition prediction sequence, and the text recognition prediction sequence is obtained based on the text prediction results output in time sequence; the audio processing is performed according to the target feature matrix to obtain the audio processing result for the target audio, including: When the current output moment is not the first output moment, a reference feature matrix obtained based on the text prediction results output at each output moment before the current output moment is obtained; when the current output moment is the first output moment, a reference feature matrix converted from the start output identifier is obtained; Acquire a similarity matrix for characterizing the similarity between the reference feature matrix and the target feature matrix, and based on the similarity matrix, fuse the target feature matrix with the reference feature matrix to obtain a global target feature matrix for characterizing the global features of the target audio; According to the global target feature matrix, multiple text prediction results output at the current output moment and their respective occurrence probabilities are obtained, and the text prediction result corresponding to the maximum occurrence probability is output. The above-mentioned process of outputting in time sequence is repeated until the output is completed, and the text prediction results output at each output moment are integrated in the output order to obtain the audio processing result.

11. The method according to any one of claims 1 to 4 or 7 to 10, characterized in that The method is implemented based on an audio processing model, wherein the audio processing result includes at least one text prediction result; after performing audio processing according to the target feature matrix to obtain the audio processing result for the target audio, the method further includes: The audio processing model is trained by a target loss function; the target loss function is determined based on at least one of the first loss function and the second loss function; Among them, the first loss function is constructed based on the audio processing result and the training label corresponding to the audio processing result; the second loss function is constructed based on each text prediction result in the audio processing result and the training label corresponding to each text prediction result.

12. An audio processing device, characterized in that: The device comprises: An acquisition module is used to obtain a frequency spectrum feature map of the target audio; At least one downsampling combination processing module; the downsampling combination processing module includes at least one downsampling convolution combination processing module; the downsampling combination processing module is used to perform at least one downsampling combination processing based on the frequency spectrum feature map to obtain a downsampled intermediate feature matrix; the downsampling convolution combination processing module includes a deep convolution processing layer, a convolution processing layer with an expanded number of channels, and a convolution processing layer with a contracted number of channels connected in sequence; the deep convolution processing uses a convolution kernel with the same number of channels as the input data, and the number of convolution processing is the same as the number of channels of the input data; the target downsampling combination processing in the at least one downsampling combination processing also includes a downsampling preprocessing performed before the first downsampling convolution combination processing in the target downsampling combination processing; the downsampling preprocessing is used to downsample the data that has passed the target downsampling combination processing and output intermediate data that is adapted to the first downsampling convolution combination processing, so that the intermediate data is downsampled again after the downsampling convolution combination processing in the target downsampling combination processing; At least one feature extraction and combination processing module; the feature extraction and combination processing module is used to perform at least one feature extraction and combination processing based on the intermediate feature matrix to obtain a target feature matrix; the feature extraction and combination processing module includes a first feedforward processing layer, a multi-head self-attention processing layer, a convolution processing layer and a second feedforward processing layer connected in sequence; The audio processing module is used to perform audio processing according to the target feature matrix to obtain an audio processing result for the target audio.

13. The device according to claim 12, characterized in that The acquisition module is also used to obtain multiple audio frames from the target audio collection by using a window whose window length is a preset audio frame length and moves according to a preset step length; obtain the frequency characteristics of each audio frame in the multiple audio frames distributed in different frequency intervals and express them as a pixel value sequence, and splice the pixel value sequence of each audio frame according to the audio frame time sequence to obtain the frequency spectrum feature map of the target audio; the preset step length is smaller than the preset audio frame length.

14. The device according to claim 12, characterized in that The downsampling preprocessing includes normalization processing and at least one downsampling convolution processing; the downsampling convolution processing is used to perform convolution processing on the data that has passed the downsampling convolution processing for downsampling; the normalization processing is used to normalize the eigenvalues ​​of the data that has passed the normalization processing.

15. The device according to claim 14, characterized in that For the target downsampling preprocessing included in the target downsampling combination processing in the at least one downsampling combination processing, the target downsampling convolution processing in the target downsampling preprocessing is for the frequency domain dimension; in addition to the target downsampling preprocessing, the remaining downsampling convolution processing involved in the at least one downsampling combination processing targets at least the frequency domain dimension in the time domain dimension and the frequency domain dimension; the frequency features of the multiple audio frames of the target audio in the frequency spectrum feature graph are arranged according to the time sequence of the multiple audio frames.

16. The device according to any one of claims 12 to 15, characterized in that The downsampling combination processing module is also used to perform multiple downsampling combination processing in series based on the spectrum feature map to obtain a downsampled intermediate feature matrix; wherein each downsampling combination processing includes multiple downsampling convolution combination processing performed in series.

17. The device according to claim 16, characterized in that Each downsampling combination processing includes a downsampling preprocessing and multiple downsampling convolution combination processings after the downsampling preprocessing; the output data of the downsampling convolution combination processing in each downsampling combination processing has the same number of channels as the input data of the downsampling convolution combination processing in the current downsampling combination processing, and has a smaller number of channels than the input data of the downsampling convolution combination processing in the next downsampling combination processing.

18. The device according to claim 12, characterized in that The target feature extraction combination processing in the at least one feature extraction combination processing is preceded by an intermediate downsampling processing; the intermediate downsampling processing includes a normalization processing, a nonlinear mapping processing and at least one downsampling convolution processing.

19. The device according to claim 18, characterized in that The feature extraction and combination processing module is also used to perform multiple batches of feature extraction and combination processing in series based on the intermediate feature matrix to obtain a target feature matrix; wherein each batch of feature extraction and combination processing includes feature extraction and combination processing performed in series, and there is at least one batch of the first feature extraction and combination processing before the intermediate downsampling processing is performed.

20. The device according to claim 12, characterized in that The audio processing module is also used to obtain multiple text recognition prediction sequences and their respective occurrence probabilities based on the target feature matrix; merge the same text prediction results that appear continuously in the target text recognition prediction sequence corresponding to the maximum occurrence probability; delete the text prediction results that serve as blank marks in the merged target text recognition prediction sequence to obtain the audio processing result.

21. The device according to claim 12, characterized in that The audio processing result is a text recognition prediction sequence, which is obtained based on the text prediction results output in time sequence; the audio processing module is also used to obtain a reference feature matrix obtained based on the text prediction results output at each output time before the current output time when the current output time is not the first output time, and to obtain a reference feature matrix converted from the start output identifier when the current output time is the first output time; Acquire a similarity matrix for characterizing the similarity between the reference feature matrix and the target feature matrix, and based on the similarity matrix, fuse the target feature matrix with the reference feature matrix to obtain a global target feature matrix for characterizing the global features of the target audio; According to the global target feature matrix, multiple text prediction results output at the current output moment and their respective occurrence probabilities are obtained, and the text prediction result corresponding to the maximum occurrence probability is output. The above-mentioned process of outputting in time sequence is repeated until the output is completed, and the text prediction results output at each output moment are integrated in the output order to obtain the audio processing result.

22. The device according to any one of claims 12 to 15 or 18 to 21, characterized in that The device is implemented based on an audio processing model, and the audio processing result includes at least one text prediction result; the device also includes: A model training module is used to train the audio processing model through a target loss function; the target loss function is determined based on at least one of the first loss function and the second loss function; wherein the first loss function is constructed based on the audio processing result and the training label corresponding to the audio processing result; the second loss function is constructed based on each text prediction result in the audio processing result and the training label corresponding to each text prediction result.

23. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.

24. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

25. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Method and apparatus for image processing based on convolutional neural network

    CN108090496A

  • Method and device for determining audio type of audio data

    CN108877783A

  • Music genre identification method and device, equipment and storage medium

    CN113450828A

  • Target video output method and device, storage medium and electronic device

    CN114187547A

  • Speech recognition method and device, equipment and storage medium

    CN114333782A