WO2024139805A1 - 一种音频处理方法及相关装置 - Google Patents

一种音频处理方法及相关装置 Download PDF

Info

Publication number
WO2024139805A1
WO2024139805A1 PCT/CN2023/131671 CN2023131671W WO2024139805A1 WO 2024139805 A1 WO2024139805 A1 WO 2024139805A1 CN 2023131671 W CN2023131671 W CN 2023131671W WO 2024139805 A1 WO2024139805 A1 WO 2024139805A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio
phoneme
features
subnetwork
streaming
Prior art date
Application number
PCT/CN2023/131671
Other languages
English (en)
French (fr)
Inventor
杨展恒
孙思宁
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2024139805A1 publication Critical patent/WO2024139805A1/zh

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/02Feature extraction for speech recognition; Selection of recognition unit
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/26Speech to text systems
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/28Constructional details of speech recognition systems
    • G10L15/30Distributed recognition, e.g. in client-server systems, for mobile phones or network applications
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/02Feature extraction for speech recognition; Selection of recognition unit
    • G10L2015/025Phonemes, fenemes or fenones being the recognition units

Definitions

  • the embodiments of the present application provide an audio processing method and a related device, which establishes a streaming acoustic network to predict N phoneme features and N streaming audio features corresponding to N audio frames in an audio signal, extracts L entities corresponding to the N phoneme features from an entity set based on the obtained N phoneme features, and uses a non-streaming acoustic network to predict the text recognition result of the audio signal based on the N audio frames, N streaming audio features and L entities, thereby improving the accuracy of text recognition.
  • One aspect of the present application provides an audio processing method, comprising:
  • the audio signal includes N audio frames, where N is an integer greater than 1;
  • N audio frames into a streaming acoustic network to obtain N phoneme features and N streaming audio features, wherein the N phoneme features are used to represent phoneme information of the audio signal;
  • the audio signal, N streaming audio features and L entities are input into the non-streaming acoustic network to obtain the text recognition result of the audio signal.
  • the streaming acoustic network processing module is used to input N audio frames into the streaming acoustic network to obtain N phoneme features and N streaming audio features, wherein N phoneme features are used to represent phoneme information of the audio signal;
  • the streaming acoustic network includes a causal encoding subnetwork, a phoneme prediction subnetwork and a phoneme association subnetwork; the streaming acoustic network processing module is further used to:
  • the streaming acoustic network processing module is further used to:
  • the non-streaming acoustic network includes a word prediction subnetwork, a non-causal encoding subnetwork, a context information extraction subnetwork, and an attention bias word association subnetwork; the non-streaming acoustic network processing module is also used to:
  • the word recognition information corresponding to each audio frame in N audio frames, the non-streaming audio features corresponding to N audio frames and The contextual information features are used as the input of the attention bias word joint sub-network, and the text recognition results are output through the attention bias word joint sub-network.
  • the non-streaming audio features and contextual information features corresponding to the N audio frames are used as inputs of a second attention bias subnetwork in the attention bias subnetwork, and the non-streaming audio associated features are output through the second attention bias subnetwork, wherein the parameters of the first attention bias subnetwork are different from the parameters of the second attention bias subnetwork.
  • the non-streaming acoustic network processing module is further configured to:
  • the first audio frame and the preset word recognition information are used as inputs of the word prediction subnetwork, and the word recognition information corresponding to the first audio frame is output through the word prediction subnetwork.
  • the entity extraction module is further used to:
  • N phoneme features P entities are extracted from the entity set, where the phoneme labels of the P entities are the same as the N phoneme features;
  • the processor is used to execute the computer program in the memory, including the method of executing the above aspects;
  • Another aspect of the present application provides a computer-readable storage medium, in which a computer program is stored.
  • the computer-readable storage medium is run on a computer, the computer executes the above-mentioned methods.
  • FIG6 is a flowchart of an audio processing method provided by another embodiment of the present application.
  • FIG11 is a flowchart of an audio processing method provided by another embodiment of the present application.
  • FIG13 is a flowchart of an audio processing method provided by another embodiment of the present application.
  • FIG19 is a flowchart of an audio processing method provided by another embodiment of the present application.
  • end-to-end (E2E) automatic speech recognition (ASR) technology has been widely favored for its simplified architecture and excellent performance.
  • E2E end-to-end
  • ASR automatic speech recognition
  • the end-to-end feature makes its recognition performance highly correlated with the distribution of training data.
  • due to the lack of proper nouns or uncommon combinations (such as names of people and places) in the training data it is difficult for the ASR system to recognize these proprietary entities, which are often the key points to be extracted in a sentence, which ultimately leads to a decline in the system's recognition performance.
  • Artificial Intelligence 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.
  • 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 machines have the functions of perception, reasoning and decision-making.
  • ASR automatic speech recognition technology
  • TTS text-to-speech technology
  • voiceprint recognition technology Enabling 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.
  • Natural language processing 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.
  • Machine Learning is a multi-disciplinary subject that involves 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 self-learning.
  • ASR Automatic Speech Recognition
  • the weighted finite-state transducer is an extension of the finite state receiver (FSA) and is often called a "decoder" in the field of ASR. It consists of four networks: an acoustic model, a context-dependency transducer (FST), a pronunciation dictionary, and a language model, forming a decoding network.
  • RTF Real-time factor
  • Chunk refers to dividing the input streaming voice into blocks of a certain length for processing during the streaming process.
  • Predictor prediction network, component in transducer.
  • the streaming acoustic network also known as the streaming acoustic model, is used to recognize local contexts.
  • end-to-end automatic speech recognition technology it can be understood that the streaming acoustic network returns recognition results while the user is speaking, and many intermediate results are generated before the end of the sentence.
  • the non-streaming acoustic network also known as the non-streaming acoustic model, is used to recognize the global context.
  • end-to-end automatic speech recognition technology it can be understood as returning the recognition result after the user finishes speaking the entire sentence.
  • the existing common solutions are mainly based on the fusion solution of external language model, which combines the language model trained with the training set containing entity information such as proper nouns with the output posterior matrix of the end-to-end ASR model through weighted finite state machine or other means to integrate.
  • the fusion solution based on the external language model is a commonly used solution in engineering. Since the external language model is trained separately and cascaded with the end-to-end ASR model, the ASR model cannot optimize the final result after the cascade during the training process, and cannot achieve the global optimum in the actual reasoning process. In addition, there may be a mismatch between the separately trained external language model and the ASR model, and the fusion process requires manual adjustment of hyperparameters.
  • the external language model is equivalent to a downstream module and cannot make up for the information loss caused by the upstream module ASR.
  • the ASR model training itself does not introduce entity information, so there will be a phenomenon that entities are still poorly recognized after fusion. During the test process, when the audio signal is recognized by the cascaded language model and the automatic speech recognition model, the recognition accuracy of proper nouns or uncommon combinations is low.
  • FIG. 1 is an application environment diagram of the audio processing method in the embodiment of the present application.
  • the audio processing method in the embodiment of the present application is applied to the audio processing system.
  • the audio processing system includes: a server and a terminal device; wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
  • the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
  • CDN Content Delivery Network
  • the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this.
  • the terminal and the server can be directly or indirectly connected by wired or wireless communication, and the embodiment of the present application is not limited here.
  • the server first obtains an audio signal, wherein the audio signal includes N audio frames; secondly, the server inputs the N audio frames into a streaming acoustic network to obtain N phoneme features and N streaming audio features, wherein the N phoneme features are used to characterize the phoneme information of the audio signal; then, the server obtains an entity set, wherein the entity set includes K pre-constructed entities, and the K entities correspond to the K phoneme information; then, the server extracts L entities from the entity set according to the N phoneme features, wherein the L entities correspond to the N phoneme features; finally, the server inputs the N audio frames, the N streaming audio features and the L entities into a non-streaming acoustic network to obtain a text recognition result.
  • the audio processing method provided in this embodiment of the application includes: Step S110 to Step S150. Specifically:
  • the audio signal includes N audio frames, where N is an integer greater than or equal to 1.
  • the audio signal is framed and blocked to obtain N audio frames.
  • the audio signal is acquired in real time and can be the user's voice audio.
  • Each audio frame corresponds to each audio unit in the voice audio.
  • the voice audio is "Send messages to Li Hua and Wang Wei"
  • the audio units are the character units " ⁇ ", “ ⁇ ”, “ ⁇ ”, “ ⁇ ”, “ ⁇ ”, “ ⁇ ”, “ ⁇ ”, “ ⁇ ”, “ ⁇ ”, “ ⁇ ”, “ ⁇ ”, “ ⁇ ”, “ ⁇ ”, “ ⁇ ”, “ ⁇ ”, “ ⁇ ”, “ ⁇ ” in the voice audio
  • the voice audio is "Send messages to Li Hua and Wang Wei”
  • the audio units are the word units "Send”, “messages”, "to", “Li”, “Hua”, “and”, “Wang”, “Wei” in the voice audio.
  • the streaming acoustic network includes a phoneme prediction subnetwork, a causal coding subnetwork and a phoneme association subnetwork, wherein the phoneme prediction subnetwork is a neural network, the causal coding subnetwork is used for audio feature encoding, and the phoneme association subnetwork is used to perform feature fusion between the output of the phoneme prediction subnetwork and the output of the causal coding subnetwork.
  • N audio frames are input into the streaming acoustic network, N streaming audio features are output through the causal coding subnetwork, and N phoneme features are output through the phoneme association subnetwork.
  • N audio frames have a corresponding relationship with N phoneme features, and N audio frames have a corresponding relationship with N streaming audio features.
  • K entities are pre-constructed to form an entity set, and each entity corresponds to a phoneme information.
  • L entities correspond to N phoneme features, and L is an integer greater than or equal to N and less than or equal to K.
  • L entities whose phoneme information is the same as N phoneme features are extracted from the entity set, and the L phoneme information corresponding to the L entities is the same as the N phoneme features.
  • the 4 phoneme information represented by the 4 phoneme features are "wang”, “fang”, “li”, and “hua”
  • the entity set includes entities such as Wang Fang, Wang Fang, Wang Fang, Li Hua, Lihua, Lihua, Fang Wang, Fanghua, Wang Li, Wang Hua, Zhang San, and Zhao Si.
  • 6 entities Wang Fang, Wang Fang, Wang Fang, Li Hua, Lihua, and Lihua
  • the non-streaming acoustic network includes a word prediction subnetwork, a context information extraction subnetwork, a non-causal encoding subnetwork and an attention bias word joint subnetwork; wherein the word prediction subnetwork is a neural network, the non-causal encoding subnetwork is used for audio feature encoding, and the context information extraction subnetwork is used to receive L entities and generate L context vectors of fixed dimensions.
  • N audio frames, N streaming audio features and L entities are input into the non-streaming acoustic network, word recognition information is output through the word prediction subnetwork, context information features are output through the context information extraction subnetwork, non-streaming audio features are output through the non-causal encoding subnetwork, and the text recognition result of the audio signal is output through the attention bias word joint subnetwork.
  • FIG. 3 is a schematic diagram of the audio processing process provided by the embodiment of the present application.
  • an audio signal is obtained, N audio frames of the audio signal are input into a streaming acoustic network, and N audio frames are output through the streaming acoustic network.
  • Phoneme features and N streaming audio features are obtained.
  • an entity set is obtained, and L entities are extracted from the entity set according to the N phoneme features.
  • the audio signal, N streaming audio features and L entities are input into the non-streaming acoustic network, and the text recognition result is output through the non-streaming acoustic network.
  • the audio features corresponding to each audio frame are obtained, and the N audio frames correspond to N audio frame features.
  • the audio frame features are represented in a matrix format.
  • each of the N audio frames is input into the phoneme prediction subnetwork, and the phoneme recognition information corresponding to each of the N audio frames is output through the phoneme prediction subnetwork, each audio frame corresponds to one phoneme recognition information, and N audio frames correspond to N phoneme recognition information.
  • the phoneme recognition information of each audio frame is predicted by the phoneme prediction subnetwork.
  • the phoneme recognition information is represented in a matrix format.
  • the phoneme recognition information corresponding to the i-th audio frame is predicted by the i-1th phoneme recognition information corresponding to the i-th audio frame and the i-th audio frame in the N audio frames.
  • the i-1th phoneme recognition information y_(i-1) ⁇ p corresponding to the i-1th audio frame and the i-th audio frame are used as the input of the phoneme prediction subnetwork in the streaming acoustic network, and the phoneme recognition information corresponding to the i-th audio frame is output through the phoneme prediction subnetwork.
  • the streaming audio feature E_Si corresponding to the i-th audio frame and the phoneme recognition information corresponding to the i-th audio frame are input into the phoneme joint subnetwork in the streaming acoustic network, and the phoneme feature y_i ⁇ p corresponding to the i-th audio frame is output through the phoneme joint subnetwork.
  • the phoneme feature y_i ⁇ p represents the phoneme information corresponding to the i-th audio frame.
  • sub-step S123 further includes sub-steps S1231 to S1232. Specifically:
  • the i-1th phoneme recognition information is generated by the phoneme prediction subnetwork according to the i-1th audio frame, and i is an integer greater than 1.
  • the phoneme prediction subnetwork obtains the phoneme recognition information corresponding to the i-th audio frame through the i-1th phoneme recognition information corresponding to the i-1th audio frame and the i-th audio frame prediction, and the i-1th phoneme recognition information corresponding to the i-1th audio frame is predicted by the phoneme prediction subnetwork through the i-2th phoneme recognition information corresponding to the i-2th audio frame and the i-1th audio frame prediction; for the prediction of the first audio frame among the N audio frames, it is predicted by the phoneme prediction subnetwork through the preset phoneme recognition information and the first audio frame.
  • N streaming audio features are input into the non-causal coding subnetwork, and the non-streaming audio features corresponding to N audio frames are output through the non-causal coding subnetwork, and N audio frames correspond to one non-streaming audio feature.
  • the input streaming audio features generate non-streaming audio features represented by non-streaming high-dimensional features through the non-causal coding subnetwork.
  • the non-streaming audio features are represented in a matrix format.
  • the streaming audio features in matrix format are encoded by a non-causal encoder to obtain non-streaming audio features in matrix format.
  • the context information extraction subnetwork is used to receive L entities and generate L context vectors of fixed dimension.
  • Figure 9 is a structural diagram of the context information extraction subnetwork provided in an embodiment of the present application.
  • the context information extraction subnetwork includes an embedding layer, an intra-transformer layer and an inter-transformer layer.
  • the embedding layer is used to perform feature mapping on the input signal
  • the intra-transformer layer is used to calculate intra-class features
  • the inter-transformer layer is used to calculate inter-class features.
  • the length of all entities is padded so that the length of each of the L entities is H.
  • the entity extraction set c consisting of L entities of length H is input into the context information extraction subnetwork. Specifically, first, each entity in the entity extraction set c is mapped through the embedding layer to obtain a vector E O , and the dimension of the vector E O is L ⁇ H ⁇ D. Then, For each vector E O, the intra-transformer layer of the self-attention transformer module is used to calculate the intra-class feature vector E I , and the dimension of the vector E I is L ⁇ H ⁇ F. Then, the first symbol of the H dimension in E I is taken to obtain a vector of fixed length.
  • the inter-transformer layer of another self-attention transformer module is used to calculate the inter-class features on the L dimension of each vector E I to obtain the context vector EC .
  • the word sequence of the context vector EC is predicted by the word joint decoder, and the phoneme sequence of the context vector EC is predicted by the phoneme joint decoder, thereby introducing pronunciation information in the context vector extractor.
  • L embedding represents the loss function of the embedding layer
  • L phone represents the loss function of the phoneme joint decoder
  • L char represents the loss function of the word joint decoder
  • FIG. 10 is a schematic diagram of a non-streaming acoustic network provided in an embodiment of the present application.
  • the i-1th word recognition information As the input of the word prediction subnetwork in the non-streaming acoustic network, the i-th word recognition information is output through the word prediction subnetwork
  • the entity extraction set c consisting of L entities is used as the input of the context information extraction subnetwork in the non-streaming acoustic network, and the context information extraction subnetwork outputs the context information feature EC corresponding to each of the L entities.
  • the N streaming audio features E Si are used as the input of the non-causal encoding subnetwork in the non-streaming acoustic network, and the non-streaming audio features E NS corresponding to the N audio frames are output through the non-causal encoding subnetwork.
  • the word recognition information, the context information feature EC corresponding to each of the L entities, and the non-streaming audio features E NS corresponding to the N audio frames are used as the input of the attention bias word joint subnetwork in the non-streaming acoustic network, and the text recognition result of the audio signal is output through the attention bias word joint subnetwork.
  • the attention bias word joint subnetwork includes an attention bias subnetwork and a word joint subnetwork.
  • sub-step S154 further includes sub-steps S1541 to S1542. Specifically:
  • the word association feature is used to characterize the association between the word recognition information corresponding to the audio signal and the context information feature
  • the non-streaming audio association feature is used to characterize the association between the non-streaming audio features corresponding to N audio frames and the context information feature.
  • the audio signal is processed by the word prediction subnetwork to obtain the word recognition information of the audio signal;
  • the streaming audio features corresponding to each audio frame in the N audio frames are processed by the non-causal encoding subnetwork to obtain the non-streaming audio features corresponding to each audio frame in the N audio frames;
  • the L entities are processed by the context vector extraction subnetwork to obtain the context information features.
  • the attention bias subnetwork includes a first attention bias subnetwork and a second attention bias subnetwork, wherein the first attention bias subnetwork is used to process word recognition information and context information features to obtain word association features; the second attention bias subnetwork is used to process non-streaming audio features and context information features to obtain non-streaming audio association features.
  • the attention bias subnetwork can learn the correlation between the context vector and the audio signal.
  • the word recognition information and context information features corresponding to the audio signal are used as the input of the first attention bias subnetwork in the attention bias word joint subnetwork, and the word association features are output through the first attention bias subnetwork;
  • the non-streaming audio features and context information features corresponding to the N audio frames are used as the input of the second attention bias subnetwork in the attention bias word joint subnetwork, and the non-streaming audio association features are output through the second attention bias subnetwork
  • the word-related features and the non-streaming audio-related features are fused through the word-joint sub-network to obtain the text recognition result.
  • the word-related features are represented in a matrix format.
  • the non-streaming audio-related features are represented in a matrix format.
  • the word-related features in the matrix format and the non-streaming audio-related features in the matrix format are fused through the word-joint sub-network to obtain the text recognition result.
  • FIG. 12 is a schematic diagram of a non-streaming acoustic network processing flow provided by an embodiment of the present application.
  • the i-1th word recognition information As the input of the word prediction subnetwork in the non-streaming acoustic network, the i-th word recognition information is output through the word prediction subnetwork
  • the N streaming audio features E Si are used as inputs of the non-causal encoding subnetwork in the non-streaming acoustic network, and the non-streaming audio features E NS corresponding to the N audio frames are output through the non-causal encoding subnetwork.
  • the entity extraction set c consisting of L entities is used as input of the context information extraction subnetwork in the non-streaming acoustic network, and the context information extraction subnetwork outputs the context information features E C corresponding to the L entities.
  • the word recognition information and context information features corresponding to the audio signal are used as inputs of the first attention bias subnetwork in the attention bias word joint subnetwork, and the word association features are output through the first attention bias subnetwork;
  • the non-streaming audio features and context information features corresponding to the N audio frames are used as inputs of the second attention bias subnetwork in the attention bias word joint subnetwork, and the non-streaming audio association features are output through the second attention bias subnetwork;
  • the word association features and non-streaming audio association features are used as inputs of the word joint subnetwork in the attention bias word joint subnetwork, and the text recognition result is output through the word joint subnetwork.
  • the first attention bias subnetwork is used to learn the correlation between word recognition information and context information features.
  • the word recognition information and context information features are processed by the first attention bias subnetwork to obtain word association features, and the correlation between word recognition information and context information features is represented by the word association features.
  • FIG 15 is a schematic diagram of the second attention bias subnetwork provided in an embodiment of the present application.
  • the purpose of the second attention bias subnetwork is to integrate contextual information into the transducer model.
  • the non-streaming audio feature E NS and the contextual information feature EC are used as inputs of the second attention bias subnetwork, and the correlation between the non-streaming audio feature E NS and the contextual information feature EC is learned through the second attention bias subnetwork.
  • the i-1th word recognition information is generated by the word prediction subnetwork according to the i-1th audio frame, and i is an integer greater than 1.
  • the word prediction subnetwork predicts the i-th word recognition information through the i-1th word recognition information, and the i-1th word recognition information is predicted by the word prediction subnetwork through the i-2th word recognition information, and so on.
  • the word prediction subnetwork is a neural network that predicts the word recognition information of the current frame through the word recognition information predicted by the previous frame.
  • the i-1th word recognition information is the word recognition information corresponding to the non-empty audio frame closest to the i-th audio frame.
  • sub-step S151 further includes sub-steps S1513 to S1514. Specifically:
  • Table 1 is the experimental results of Experiment 1, which explores the impact of the scheme proposed in the embodiment of the present application on the recognition performance.
  • the experimental test set includes contact scenarios and music retrieval scenarios. Each sentence in the test set contains at least one entity.
  • the original entity library of the former contains 970 name entities, and the latter contains 6253 song name/singer name entities.
  • the evaluation indicators of this experiment are CER and CERR.
  • CER represents word error rate. The lower the CER, the better the recognition performance; CERR is the relative improvement of CER. The higher the CERR, the better the recognition performance.
  • the basic ASR framework of each group of experiments is the same. Baseline represents the basic ASR framework. The basic ASR framework does not contain the context vector extraction subnetwork and the attention bias subnetwork.
  • Table 2 shows the experimental results of Experiment 2.
  • Experiment 2 further analyzes the performance of the entity filtering network.
  • This experiment uses ERR and ALS to evaluate the performance of the filtering algorithm.
  • ERR represents the average probability (recall rate) of entity retention in the test transcript after filtering
  • ALS represents the average size of the entity list after filtering. The higher the ERR, the better the performance of the entity filtering network, and the smaller the ALS, the better the performance of the entity filtering network.
  • From the experimental results it can be seen that compared with the original entity library, by calculating the PSC of the entity, most of the irrelevant entities can be filtered out and a relatively high ERR can be maintained. By calculating the PSC and SOC of the entity, the size of the entity list is further compressed, but a small amount of ERR will be sacrificed. From the comprehensive recognition performance, it can be further improved.
  • Figure 21 is a schematic diagram of an embodiment of the audio processing device 10 in the present application embodiment, and the audio processing device 10 includes: an audio signal acquisition module 110, a streaming acoustic network processing module 120, an entity set acquisition module 130, an entity extraction module 140 and a non-streaming acoustic network processing module 150. Specifically:
  • the streaming acoustic network processing module 120 is further used for:
  • Each of the N audio frame features is used as an input of a causal coding subnetwork in a streaming acoustic network, and a streaming audio feature corresponding to each of the N audio frame features is output through the causal coding subnetwork.
  • Each of the N audio frames is used as an input of a phoneme prediction subnetwork in a streaming acoustic network, and the phoneme recognition information corresponding to each of the N audio frames is output through the phoneme prediction subnetwork.
  • the streaming audio features and phoneme recognition information are input into the phoneme joint subnetwork in the streaming acoustic network, and N phoneme features are output through the phoneme joint subnetwork.
  • the audio processing device establishes a streaming acoustic network, predicts the phoneme recognition information corresponding to each audio frame in the audio signal through the phoneme prediction subnetwork in the streaming acoustic network, encodes the audio frame features through the causal coding subnetwork in the streaming acoustic network to generate streaming audio features, and fuses the streaming audio features with the phoneme recognition information through the phoneme joint subnetwork in the streaming acoustic network to generate phoneme features, thereby improving the accuracy of text recognition.
  • the i-th audio frame and the i-1-th phoneme recognition information are used as inputs of the phoneme prediction subnetwork, and the phoneme recognition information corresponding to the i-th audio frame is output through the phoneme prediction subnetwork.
  • the first audio frame and the preset phoneme recognition information are used as inputs of the phoneme prediction subnetwork, and the phoneme recognition information corresponding to the first audio frame is output through the phoneme prediction subnetwork.
  • the N streaming audio features are used as inputs of a non-causal encoding subnetwork in a non-streaming acoustic network, and the non-causal encoding subnetwork outputs non-streaming audio features corresponding to the N audio frames.
  • the L entities are used as inputs of the context information extraction subnetwork in the non-streaming acoustic network, and the context information extraction subnetwork outputs the context information features corresponding to the L entities.
  • the word recognition information corresponding to each audio frame in N audio frames, the non-streaming audio features corresponding to the N audio frames, and the context information features are used as the input of the attention biased word joint subnetwork, and the text recognition result is output through the attention biased word joint subnetwork.
  • the audio processing device establishes a non-streaming acoustic network, predicts word recognition information corresponding to each audio frame in the audio signal through a word prediction subnetwork in the non-streaming acoustic network, encodes streaming audio features through a non-causal encoding subnetwork in the streaming acoustic network to generate non-streaming audio features, outputs context information features corresponding to L entities through a context information extraction subnetwork in the non-streaming acoustic network, and outputs text recognition results through an attention bias word association subnetwork in the non-streaming acoustic network, thereby improving the accuracy of text recognition.
  • the word association feature is used to characterize the association between the word recognition information corresponding to each audio frame in the N audio frames and the context information feature
  • the non-streaming audio association feature is used to characterize the association between the non-streaming audio features corresponding to the N audio frames and the context information feature.
  • the word-associated features and the non-streaming audio-associated features are used as inputs of a word-association subnetwork in a non-streaming acoustic network, and the text recognition results are output through the word-association subnetwork.
  • the audio processing device establishes a non-streaming acoustic network, predicts word recognition information corresponding to each audio frame in the audio signal through a word prediction subnetwork in the non-streaming acoustic network, encodes streaming audio features through a non-causal encoding subnetwork in the streaming acoustic network to generate non-streaming audio features, outputs context information features corresponding to L entities through a context information extraction subnetwork in the non-streaming acoustic network, learns the similarity between word recognition information and context information features through an attention bias subnetwork in the non-streaming acoustic network to obtain word-related features, as well as the similarity between non-streaming audio features and context information features to obtain non-streaming audio-related features, performs feature fusion on word-related features and non-streaming audio-related features through a word association subnetwork, outputs text recognition results, and improves the accuracy of text recognition.
  • the non-streaming acoustic network processing module 150 is further used to:
  • the word recognition information and context information features corresponding to each audio frame in the N audio frames are used as inputs of the first attention bias subnetwork in the attention bias subnetwork, and the word association features are output through the first attention bias subnetwork.
  • the non-streaming audio features and context information features corresponding to the N audio frames are used as inputs of the second attention bias subnetwork in the attention bias subnetwork, and the non-streaming audio related features are output through the second attention bias subnetwork.
  • the non-streaming acoustic network processing module 150 is further configured to:
  • L entities are extracted from the P entities.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本申请提供了一种音频处理方法以及相关装置。本申请实施例可应用于人工智能领域。其方法包括:首先,获取音频信号,音频信号包括N个音频帧;其次,将N个音频帧输入至流式声学网络,得到N个音素特征及N个流式音频特征,N个音素特征用于表征音频信号的音素信息;接着,获取实体集合,实体集合包括预先构建的K个实体,K个实体对应于K个音素信息;然后,根据N个音素特征从实体集合中提取出L个实体,L个实体对应于N个音素特征;最后,将音频信号、N个流式音频特征及L个实体输入至非流式声学网络,得到文本识别结果。本申请实施例提供的音频处理方法,通过建立流式声学网络及非流式声学网络提高文本识别的准确性。

Description

一种音频处理方法及相关装置
本申请要求于2022年12月26日提交中国专利局、申请号为202211674936.3、申请名称为“一种音频处理方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能技术领域,尤其涉及音频处理。
背景技术
近年来,随着深度学习的蓬勃发展,自动语音识别(ASR)技术以其简化的体系结构及优异的性能广受青睐。而在实际应用中,用于对自动语音识别模型进行训练的训练数据中往往缺乏专有名词或不常见组合(比如人名、地名),导致自动语音识别系统在这些应用场合中性能会受到影响。
现有常见的解决方案主要是基于外部语言模型的融合方案,通过把使用含有专有名词等实体信息的训练集训练的语言模型与自动语音识别模型的输出进行融合,在训练时,分别单独对语言模型与自动语音识别模型进行训练,将分别训练后的语言模型与自动语音识别模型进行级联,在自动语音识别模型训练过程中无法对级联之后的最终结果进行优化,无法达到实际推理流程中的全局最优,并且由于单独训练的外部语言模型与自动语音识别模型可能存在不匹配现象,在测试时,通过级联的语言模型与自动语音识别模型进行对音频信号进行识别时,对专有名词或不常见组合的识别准确率较低。
发明内容
本申请实施例提供了一种音频处理方法及相关装置,通过建立流式声学网络预测音频信号中N个音频帧对应的N个音素特征及N个流式音频特征,根据得到的N个音素特征从实体集合中提取出与N个音素特征具有对应关系的L个实体,由非流式声学网络根据N个音频帧、N个流式音频特征及L个实体预测音频信号的文本识别结果,提高文本识别的准确性。
本申请的一方面提供一种音频处理方法,包括:
获取音频信号,其中,音频信号包括N个音频帧,N为大于1的整数;
将N个音频帧输入至流式声学网络,得到N个音素特征及N个流式音频特征,其中,N个音素特征用于表征音频信号的音素信息;
获取实体集合,其中,实体集合包括K个实体,K个实体对应于K个音素信息,K为大于1的整数;
根据N个音素特征从实体集合中提取出+,其中,L个实体对应于N个音素特征,L为大于等于N且小于等于K的整数;
将音频信号、N个流式音频特征及L个实体输入至非流式声学网络,得到音频信号的文本识别结果。
本申请的另一方面提供了一种音频处理装置,包括:
音频信号获取模块,用于获取音频信号,其中,音频信号包括N个音频帧,N为大于1的整数;
流式声学网络处理模块,用于将N个音频帧输入至流式声学网络,得到N个音素特征及 N个流式音频特征,其中,N个音素特征用于表征音频信号的音素信息;
实体集合获取模块,用于获取实体集合,其中,实体集合包括K个实体,K个实体对应于K个音素信息,K为大于1的整数;
实体提取模块,用于根据N个音素特征从实体集合中提取出L个实体,其中,L个实体对应于N个音素特征,L为大于等于N且小于等于K的整数;
非流式声学网络处理模块,用于将音频信号、N个流式音频特征及L个实体输入至非流式声学网络,得到音频信号的文本识别结果。
在本申请实施例的另一种实现方式中,流式声学网络包括因果编码子网络、音素预测子网络及音素联合子网络;流式声学网络处理模块,还用于:
对N个音频帧进行特征提取,得到N个音频帧特征;
将N个音频帧特征中的每个音频帧特征作为流式声学网络中的因果编码子网络的输入,通过因果编码子网络输出N个音频帧特征中的每个音频帧特征对应的流式音频特征;
将N个音频帧中的每个音频帧作为流式声学网络中的音素预测子网络的输入,通过音素预测子网络输出N个音频帧中的每个音频帧对应的音素识别信息;
将流式音频特征与音素识别信息输入至流式声学网络中的音素联合子网络,通过音素联合子网络输出N个音素特征。
在本申请实施例的另一种实现方式中,针对所述N个音频帧中的第i帧音频帧,流式声学网络处理模块,还用于:
获取第i帧音频帧,及第i-1帧音频帧对应的第i-1个音素识别信息,其中,第i-1个音素识别信息由音素预测子网络根据第i-1帧音频帧生成,i为大于1的整数;
将第i帧音频帧及第i-1个音素识别信息作为音素预测子网络的输入,通过音素预测子网络输出第i帧音频帧对应的音素识别信息。
在本申请实施例的另一种实现方式中,针对所述N个音频帧中的第一帧音频帧,流式声学网络处理模块,还用于:
获取第一帧音频帧,及预设音素识别信息;
将第一帧音频帧及预设音素识别信息作为音素预测子网络的输入,通过音素预测子网络输出第一帧音频帧对应的音素识别信息。
在本申请实施例的另一种实现方式中,非流式声学网络包括字预测子网络、非因果编码子网络、上下文信息提取子网络及注意力偏置字联合子网络;非流式声学网络处理模块,还用于:
将N个音频帧中的每个音频帧作为非流式声学网络中的字预测子网络的输入,通过字预测子网络输出N个音频帧中的每个音频帧对应的字识别信息;
将N个流式音频特征作为非流式声学网络中的非因果编码子网络的输入,通过非因果编码子网络输出N个音频帧对应的非流式音频特征;
将L个实体作为非流式声学网络中的上下文信息提取子网络的输入,通过上下文信息提取子网络输出L个实体对应的上下文信息特征;
将N个音频帧中的每个音频帧对应的字识别信息、N个音频帧对应的非流式音频特征及 上下文信息特征作为注意力偏置字联合子网络的输入,通过注意力偏置字联合子网络输出文本识别结果。
在本申请实施例的另一种实现方式中,注意力偏置字联合子网络包括注意力偏置子网络及字联合子网络;非流式声学网络处理模块,还用于:
将N个音频帧中的每个音频帧对应的字识别信息、N个音频帧对应的非流式音频特征及上下文信息特征作为注意力偏置字联合子网络中的注意力偏置子网络的输入,通过注意力偏置子网络输出字关联特征及非流式音频关联特征,其中,字关联特征用于表征N个音频帧中的每个音频帧对应的字识别信息与上下文信息特征的关联性,非流式音频关联特征用于表征N个音频帧对应的非流式音频特征与上下文信息特征的关联性;
将字关联特征及非流式音频关联特征作为非流式声学网络中的字联合子网络的输入,通过字联合子网络输出文本识别结果。
在本申请实施例的另一种实现方式中,注意力偏置子网络包括第一注意力偏置子网络及第二注意力偏置子网络;非流式声学网络处理模块,还用于:
将N个音频帧中的每个音频帧对应的字识别信息及上下文信息特征作为注意力偏置子网络中的第一注意力偏置子网络的输入,通过第一注意力偏置子网络输出字关联特征;
将N个音频帧对应的非流式音频特征及上下文信息特征作为注意力偏置子网络中的第二注意力偏置子网络的输入,通过第二注意力偏置子网络输出非流式音频关联特征,其中,第一注意力偏置子网络的参数与第二注意力偏置子网络的参数不同。
在本申请实施例的另一种实现方式中,针对所述N个音频帧中的第i帧音频帧,非流式声学网络处理模块,还用于:
获取第i帧音频帧,及第i-1帧音频帧对应的第i-1个字识别信息,其中,第i-1个字识别信息由字预测子网络根据第i-1帧音频帧生成,i为大于1的整数;
将第i帧音频帧及第i-1个字识别信息作为字预测子网络的输入,通过字预测子网络输出第i帧音频帧对应的字识别信息。
在本申请实施例的另一种实现方式中,针对所述N个音频帧中的第一帧音频帧,非流式声学网络处理模块,还用于:
获取第一帧音频帧及预设字识别信息;
将第一帧音频帧及预设字识别信息作为字预测子网络的输入,通过字预测子网络输出第一帧音频帧对应的字识别信息。
在本申请实施例的另一种实现方式中,实体提取模块,还用于:
根据N个音素特征,从实体集合中提取出P个实体,其中,P个实体的音素标签与N个音素特征相同;
根据N个音素特征中每个音素特征在音频信号中出现的先后次序,从P个实体中提取出L个实体,其中,L个实体的音素标签与N个音素特征的顺序相同,P为小于等于K且大于等于L的整数。
在本申请实施例的另一种实现方式中,实体提取模块,还用于:
获取K个实体中每个实体对应的音素信息;
根据K个实体中每个实体对应的音素信息及N个音素特征,计算每个实体的后验及分数,其中,后验及分数用于表征实体与N个音素特征的相似度;
从K个实体中提取出后验及分数大于后验及分数阈值的P个实体。
在本申请实施例的另一种实现方式中,实体提取模块,还用于:
获取P个实体中每个实体的音素信息的音素顺序;
根据N个音素特征中每个音素特征在音频信号中出现的先后次序及每个实体的音素信息的音素顺序,从P个实体中提取出L个实体。
本申请的另一方面提供了一种计算机设备,包括:
存储器、收发器、处理器及总线系统;
其中,存储器用于存储计算机程序;
处理器用于执行存储器中的计算机程序,包括执行上述各方面的方法;
总线系统用于连接存储器及处理器,以使存储器及处理器进行通信。
本申请的另一方面提供了一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行上述各方面的方法。
本申请的另一方面提供了一种包括计算机程序的计算机程序产品,当其在计算机上运行时,使得所述计算机执行以上方面的方法。
从以上技术方案可以看出,本申请实施例具有以下优点:
本申请提供了一种音频处理方法及相关装置,其方法包括:首先,获取音频信号,其中,音频信号包括N个音频帧;其次,将N个音频帧输入至流式声学网络,得到N个音素特征及N个流式音频特征,其中,N个音素特征用于表征音频信号的音素信息;接着,获取实体集合,其中,实体集合包括预先构建的K个实体,K个实体对应于K个音素信息;然后,根据N个音素特征从实体集合中提取出L个实体,其中,L个实体对应于N个音素特征;最后,将N个音频帧、N个流式音频特征及L个实体输入至非流式声学网络,得到音频信号的文本识别结果。基于N个音素特征确定出的L个实体可以为专有名词或不常见组合,当该L个实体用于对音频信号的识别时,可以为非流式声学网络提供与该音频信号中文本相关的专有名词或不常见组合的信息,当音频信号中包括专有名词或不常见组合时,该L个实体能够有效提升非流式声学网络所得到文本识别结果的精度。
附图说明
图1为本申请某一实施例提供的音频处理系统的一个架构示意图;
图2为本申请某一实施例提供的音频处理方法的流程图;
图3为本申请某一实施例提供的音频处理过程的示意图;
图4为本申请另一实施例提供的音频处理方法的流程图;
图5为本申请某一实施例提供的流式声学网络的示意图;
图6为本申请另一实施例提供的音频处理方法的流程图;
图7为本申请另一实施例提供的音频处理方法的流程图;
图8为本申请另一实施例提供的音频处理方法的流程图;
图9为本申请某一实施例提供的上下文信息提取子网络的结构示意图;
图10为本申请某一实施例提供的非流式声学网络的示意图;
图11为本申请另一实施例提供的音频处理方法的流程图;
图12为本申请某一实施例提供的非流式声学网络处理流程的示意图;
图13为本申请另一实施例提供的音频处理方法的流程图;
图14为本申请某一实施例提供的第一注意力偏置子网络的示意图;
图15为本申请某一实施例提供的第二注意力偏置子网络的示意图;
图16为本申请另一实施例提供的音频处理方法的流程图;
图17为本申请另一实施例提供的音频处理方法的流程图;
图18为本申请另一实施例提供的音频处理方法的流程图;
图19为本申请另一实施例提供的音频处理方法的流程图;
图20为本申请又一实施例提供的音频处理方法的流程图;
图21为本申请某一实施例提供的音频处理装置的结构示意图;
图22为本申请某一实施例提供的服务器结构示意图。
具体实施方式
本申请实施例提供了一种音频处理方法,通过建立流式声学网络预测音频信号中N个音频帧对应的N个音素特征及N个流式音频特征,根据得到的N个音素特征从实体集合中提取出与N个音素特征具有对应关系的L个实体,由非流式声学网络根据N个音频帧、N个流式音频特征及L个实体预测音频信号的文本识别结果,提高文本识别的准确性。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例例如能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“对应于”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
近年来,随着深度学习的蓬勃发展,端到端(End-to-End,E2E)自动语音识别(ASR)技术以其简化的体系结构和优异的性能广受青睐。然而端到端的特点导致其识别性能与训练数据分布高度相关。在实际应用中,由于训练数据中缺乏专有名词或不常见组合(比如人名、地名),ASR系统难以识别这些专有实体,而专有实体往往是一句话中需要提取的重点,因此最终导致系统识别性能的下降。
人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。换句话说,人工智能是计算机科学的一个综合技术,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。
人工智能技术是一门综合学科,涉及领域广泛,既有硬件层面的技术也有软件层面的技术。人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、 大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。
语音技术(Speech Technology)的关键技术有自动语音识别技术(ASR)和语音合成技术(TTS)以及声纹识别技术。让计算机能听、能看、能说、能感觉,是未来人机交互的发展方向,其中语音成为未来最被看好的人机交互方式之一。
自然语言处理(Nature Language processing,NLP)是计算机科学领域与人工智能领域中的一个重要方向。它研究能实现人与计算机之间用自然语言进行有效通信的各种理论和方法。自然语言处理是一门融语言学、计算机科学、数学于一体的科学。因此,这一领域的研究将涉及自然语言,即人们日常使用的语言,所以它与语言学的研究有着密切的联系。自然语言处理技术通常包括文本处理、语义理解、机器翻译、机器人问答、知识图谱等技术。
机器学习(Machine Learning,ML)是一门多领域交叉学科,涉及概率论、统计学、逼近论、凸分析、算法复杂度理论等多门学科。专门研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构使之不断改善自身的性能。机器学习是人工智能的核心,是使计算机具有智能的根本途径,其应用遍及人工智能的各个领域。机器学习和深度学习通常包括人工神经网络、置信网络、强化学习、迁移学习、归纳学习、式教学习等技术。
为便于理解本申请实施例提供的技术方案,这里先对本申请实施例使用的一些关键名词进行解释:
自动语音识别技术(Automatic Speech Recognition,ASR):是一种将人的语音转换为文本的技术。
加权有限状态转换机(Weighted Finite-State Transducer,WFST)由有限状态接收机(FSA)拓展而来,在ASR领域常被称为“解码器”。包括声学模型、上下文相关处理的FST(context-dependency transducer)、发音词典、语言模型四个网络,形成的解码网络。
实时率(real time factor,RTF):也称系统实时因子,常用于度量自动语音识别系统解码速度的值。
Chunk:语音块,指流式过程中把输入的流语音分成一定长度的块进行处理。
Transducer:转换机。
Encoder:编码器。
Predictor:预测网络,transducer中的组件。
流式声学网络,也称流式声学模型,用于对局部上下文进行识别。在端对端的自动语音识别技术中,可以理解为用户一边说话流式声学网络一边返回识别结果,在句子结束前会产生许多中间结果。
非流式声学网络,也称非流式声学模型,用于对全局上下文进行识别。在端对端的自动语音识别技术中,可以理解为待用户整句话说完后返回识别结果。
现有常见的解决方案主要是基于外部语言模型的融合方案,通过把使用含有专有名词等实体信息的训练集训练的语言模型与端到端ASR模型的输出后验矩阵通过加权有限状态 机或者其他方式进行融合。
基于外部语言模型的融合方案是工程化中常用的方案,由于外部语言模型单独训练并与端到端ASR模型级联,因此在训练过程中,ASR模型无法对级联之后的最终结果进行优化,无法达到实际推理流程中的全局最优,而且单独训练的外部语言模型与ASR模型可能存在不匹配现象,融合过程需要人工调节超参数。外部语言模型相当于是下游模块,无法弥补由于上游模块ASR带来的信息损失,而ASR模型训练本身并没有引入实体信息,因此会出现融合之后实体仍然识别不佳的现象。在测试过程中,通过级联的语言模型与自动语音识别模型进行对音频信号进行识别时,对专有名词或不常见组合的识别准确率较低。
本申请实施例提供的音频处理方法,通过建立流式声学网络预测音频信号中N个音频帧对应的N个音素特征及N个流式音频特征,根据得到的N个音素特征从实体集合中提取出与N个音素特征具有对应关系的L个实体,由非流式声学网络根据N个音频帧、N个流式音频特征及L个实体预测音频信号的文本识别结果,提高文本识别的准确性。
为了便于理解,请参阅图1,图1为本申请实施例中音频处理方法的应用环境图,如图1所示,本申请实施例中音频处理方法应用于音频处理系统。音频处理系统包括:服务器和终端设备;其中,服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(Content Delivery Network,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器。终端可以是智能手机、平板电脑、笔记本电脑、台式计算机、智能音箱、智能手表等,但并不局限于此。终端和服务器可以通过有线或无线通信方式进行直接或间接地连接,本申请实施例在此不做限制。
服务器首先获取音频信号,其中,音频信号包括N个音频帧;其次,服务器将N个音频帧输入至流式声学网络,得到N个音素特征及N个流式音频特征,其中,N个音素特征用于表征音频信号的音素信息;接着,服务器获取实体集合,其中,实体集合包括预先构建的K个实体,K个实体对应于K个音素信息;然后,服务器根据N个音素特征从实体集合中提取出L个实体,其中,L个实体对应于N个音素特征;最后,服务器将N个音频帧、N个流式音频特征及L个实体输入至非流式声学网络,得到文本识别结果。
下面将从服务器的角度,对本申请中音频处理方法进行介绍。请参阅图2,本申请实施例提供的音频处理方法包括:步骤S110至步骤S150。具体的:
S110、获取音频信号。
其中,音频信号包括N个音频帧,N为大于或等于1的整数。
可以理解的是,获取到音频信号后,对音频信号进行分帧及分块,得到N个音频帧。在端到端自动语音识别场景中,音频信号为实时获取的,可以是用户的语音音频。每个音频帧对应于语音音频中的每个音频单元。例如,语音音频为“给李华和王伟发送信息”,音频单元为语音音频中的字单元“给”、“李”、“华”、“和”、“王”、“伟”、“发”、“送”、“信”、“息”;语音音频为“Send messages to Li Hua and Wang Wei”,音频单元为语音音频中的词单元“Send”、“messages”、“to”、“Li”、“Hua”、“and”、“Wang”、“Wei”。
S120、将N个音频帧输入至流式声学网络,得到N个音素特征及N个流式音频特征。
其中,N个音素特征用于表征音频信号的音素信息。
可以理解的是,流式声学网络包括音素预测子网络、因果编码子网络及音素联合子网络,其中,音素预测子网络为神经网络,因果编码子网络用于音频特征编码,音素联合子网络用于将音素预测子网络的输出与因果编码子网络的输出进行特征融合。将N个音频帧输入至流式声学网络,通过因果编码子网络输出N个流式音频特征,通过音素联合子网络输出N个音素特征。N个音频帧与N个音素特征具有对应关系,N个音频帧与N个流式音频特征具有对应关系。
音素是根据语音的自然属性划分出来的最小语音单位,从声学性质来看,音素是从音质角度划分出来的最小语音单位;从生理性质来看,一个发音动作形成一个音素。例如〔ma〕包含〔m〕〔a〕两个发音动作,是两个音素。N个音频帧对应于N个音素信息,N个音频帧对应的N个音素信息组合成为音频信号的音素信息。一个音素信息中可以包括至少一个音素。
S130、获取实体集合。
其中,实体集合包括K个实体,K个实体对应于K个音素信息,K为大于1的整数。实体集合所包括的实体可以是专有名词或不常见组合,通过实体集合可以有助于后续对音频信号中专有名词或不常见组合(如果有)的识别。实体集合中的实体可以是基于音频信号预先构建的,其中包括了该音频信号所涉及领域的专有名词或不常见组合。
可以理解的是,预先构建K个实体组成实体集合,每个实体对应于一个音素信息。
S140、根据N个音素特征从实体集合中提取出L个实体。
其中,L个实体对应于N个音素特征,L为大于等于N且小于等于K的整数。
可以理解的是,通过实体提取网络从实体集合中提取出音素信息与N个音素特征相同的L个实体,L个实体对应的L个音素信息与N个音素特征相同。例如,4个音素特征表征的4个音素信息为“wang”、“fang”、“li”、“hua”,实体集合中包括王芳、王方、汪芳、李华、梨花、丽华、方往、芳华、王丽、王华、张三、赵四等实体。根据4个音素信息(“wang”、“fang”、“li”、“hua”)从实体集合中提取出6个实体(王芳、王方、汪芳、李华、梨花、丽华)。
S150、将音频信号、N个流式音频特征及L个实体输入至非流式声学网络,得到文本识别结果。
可以理解的是,非流式声学网络包括字预测子网络、上下文信息提取子网络、非因果编码子网络及注意力偏置字联合子网络;其中,字预测子网络为神经网络,非因果编码子网络用于音频特征编码,上下文信息提取子网络用于接收L个实体并生成固定维度的L个上下文向量。将N个音频帧、N个流式音频特征及L个实体输入至非流式声学网络,通过字预测子网络输出字识别信息,通过上下文信息提取子网络输出上下文信息特征,通过非因果编码子网络输出非流式音频特征,通过注意力偏置字联合子网络输出音频信号的文本识别结果。
为便于理解,请参阅图3,图3是本申请实施例提供的音频处理过程的示意图。首先,获取音频信号,将音频信号的N个音频帧输入至流式声学网络,通过流式声学网络输出N个 音素特征及N个流式音频特征。然后,获取实体集合,根据N个音素特征从实体集合中提取出L个实体。最后,将音频信号、N个流式音频特征及L个实体输入至非流式声学网络,通过非流式声学网络输出文本识别结果。
本申请实施例提供的音频处理方法,通过建立流式声学网络预测音频信号中N个音频帧对应的N个音素特征及N个流式音频特征,根据得到的N个音素特征从实体集合中提取出与N个音素特征具有对应关系的L个实体,由非流式声学网络根据N个音频帧、N个流式音频特征及L个实体预测音频信号的文本识别结果,提高文本识别的准确性。
在本申请的图2对应的实施例提供的音频处理方法的一个可选实施例中,流式声学网络包括音素预测子网络、因果编码子网络及音素联合子网络。请参阅图4,步骤S120包括子步骤S121至子步骤S124。需要说明的是,子步骤S122与子步骤S123不存在先后执行的顺序,即子步骤S122与子步骤S123可以是并列执行,也可以是先执行子步骤S122后执行子步骤S123,还可以是先执行子步骤S123后执行子步骤S122。本申请以先执行子步骤S122后执行子步骤S123为例进行说明。具体的:
S121、对N个音频帧进行特征提取,得到N个音频帧特征。
可以理解的是,对N个音频帧中每个音频帧进行特征提取,得的每个音频帧对应的音频特征,N个音频帧对应N个音频帧特征。音频帧特征通过矩阵格式进行表示。
S122、将N个音频帧特征中的每个音频帧特征作为流式声学网络中的因果编码子网络的输入,通过因果编码子网络输出N个音频帧特征中的每个音频帧特征对应的流式音频特征。
可以理解的是,将N个音频帧特征中的每个音频帧特征输入至因果编码子网络,通过因果编码子网络输出N个音频帧特征中的每个音频帧特征对应的流式音频特征,每个音频帧特征对应一个流式音频特征,N个音频帧特征对应N个流式音频特征。输入的音频帧特征通过因果编码子网络产生流式高维特征表示的流式音频特征。流式音频特征通过矩阵格式进行表示。将矩阵格式的音频帧特征通过因果编码器进行编码,得到矩阵格式的流式音频特征。
S123、将N个音频帧中的每个音频帧作为流式声学网络中的音素预测子网络的输入,通过音素预测子网络输出N个音频帧中的每个音频帧对应的音素识别信息。
可以理解的是,将N个音频帧中的每个音频帧输入至音素预测子网络,通过音素预测子网络输出N个音频帧中的每个音频帧对应的音素识别信息,每个音频帧对应一个音素识别信息,N个音频帧对应N个音素识别信息。通过音素预测子网络预测每个音频帧的音素识别信息。音素识别信息通过矩阵格式进行表示。通过N个音频帧中的第i-1帧音频帧对应的第i-1个音素识别信息及第i帧音频帧预测第i帧音频帧对应的音素识别信息。
S124、将N个音频帧特征中的每个音频帧特征对应的流式音频特征与N个音频帧中的每个音频帧对应的音素识别信息输入至流式声学网络中的音素联合子网络,通过音素联合子网络输出N个音素特征。
可以理解的是,将N个音频帧特征中的每个音频帧特征对应的流式音频特征与音素识别信息作为音素联合子网络的输入,通过音素联合子网络输出每个音频帧特征对应的音素 特征。每个音频帧对应一个音素特征,N个音频帧对应N个音素特征。通过音素联合子网络将流式音频特征与音素识别信息进行融合,得到音素特征。音素特征通过矩阵格式表示。将矩阵格式的流式音频特征与矩阵格式的音素识别信息通过音素联合子网络进行融合,得到矩阵格式的音素特征。
为便于理解,请参阅图5,图5为本申请实施例提供的流式声学网络的示意图。首先,对第i帧音频帧进行特征提取,得到第i帧音频帧对应的音频帧特征x_i。接着,将第i帧音频帧对应的音频帧特征x_i作为流式声学网络中的因果编码子网络的输入,通过因果编码子网络输出第i帧音频帧对应的流式音频特征E_Si。然后,将第i-1帧音频帧对应的第i-1个音素识别信息y_(i-1)^p及第i帧音频帧作为流式声学网络中的音素预测子网络的输入,通过音素预测子网络输出第i帧音频帧对应的音素识别信息。最后,将第i帧音频帧对应的流式音频特征E_Si和第i帧音频帧对应的音素识别信息输入至流式声学网络中的音素联合子网络,通过音素联合子网络输出第i帧音频帧对应的音素特征y_i^p。音素特征y_i^p表征第i帧音频帧对应的音素信息。
本申请实施例提供的音频处理方法,建立流式声学网络,通过流式声学网络中的音素预测子网络预测音频信号中每个音频帧对应的音素识别信息,通过流式声学网络中的因果编码子网络对音频帧特征进行编码生成流式音频特征,通过流式声学网络中的音素联合子网络融合流式音频特征与音素识别信息生成音素特征,提高文本识别的准确性。
在本申请的图2对应的实施例提供的音频处理方法的一个可选实施例中,针对所述N个音频帧中的第i帧音频帧,请参阅图6,子步骤S123进一步包括子步骤S1231至子步骤S1232。具体的:
S1231、获取N个音频帧中的第i帧音频帧及第i-1帧音频帧对应的第i-1个音素识别信息。
其中,第i-1个音素识别信息由音素预测子网络根据第i-1帧音频帧生成,i为大于1的整数。
S1232、将第i帧音频帧及第i-1个音素识别信息作为音素预测子网络的输入,通过音素预测子网络输出第i帧音频帧对应的音素识别信息。
可以理解的是,音素预测子网络通过第i-1帧音频帧对应的第i-1个音素识别信息及第i帧音频帧预测得到第i帧音频帧对应的音素识别信息,而第i-1帧音频帧对应的第i-1个音素识别信息则由音素预测子网络通过第i-2帧音频帧对应的第i-2个音素识别信息及第i-1帧音频帧预测得到,以此类推。音素预测子网络为神经网络,通过前一帧的预测得到的音素识别信息预测当前帧的音素识别信息。
本申请实施例提供的音频处理方法,由音素预测子网络根据当前帧及前一帧对应的音素识别信息预测当前帧的音素识别信息,依次对N个音频帧进行预测,得到N个音频帧对应的N个音素识别信息,为提高文本识别的准确性奠定基础。
在本申请的图2对应的实施例提供的音频处理方法的一个可选实施例中,针对所述N个音频帧中的第一帧音频帧,请参阅图7,子步骤S123进一步包括子步骤S1233至子步骤S1234。具体的:
S1233、获取N个音频帧中的第一帧音频帧及预设音素识别信息。
S1234、将第一帧音频帧及预设音素识别信息作为音素预测子网络的输入,通过音素预测子网络输出第一帧音频帧对应的音素识别信息。
可以理解的是,音素预测子网络通过第i-1帧音频帧对应的第i-1个音素识别信息及第i帧音频帧预测得到第i帧音频帧对应的音素识别信息,而第i-1帧音频帧对应的第i-1个音素识别信息则由音素预测子网络通过第i-2帧音频帧对应的第i-2个音素识别信息及第i-1帧音频帧预测得到;对于N个音频帧中的第一帧音频帧的预测,则由音素预测子网络通过预设音素识别信息及第一帧音频帧预测得到。
本申请实施例提供的音频处理方法,由音素预测子网络根据当前帧及前一帧对应的音素识别信息预测当前帧的音素识别信息,依次对N个音频帧进行预测,得到N个音频帧对应的N个音素识别信息,为提高文本识别的准确性奠定基础。
在本申请的图2对应的实施例提供的音频处理方法的一个可选实施例中,非流式声学网络包括字预测子网络、上下文信息提取子网络、非因果编码子网络及注意力偏置字联合子网络。请参阅图8,步骤S150进一步包括子步骤S151至子步骤S154。需要说明的是,子步骤S151、子步骤S152及子步骤S153不存在先后执行的顺序,即子步骤S151、子步骤S152及子步骤S153可以是并列执行,也可以是先执行子步骤S151再子步骤S152后子步骤S153等执行方式。本申请以先执行子步骤S151再子步骤S152后子步骤S153为例进行说明。具体的:
S151、将音频信号作为非流式声学网络中的字预测子网络的输入,通过字预测子网络输出音频信号的字识别信息。
可以理解的是,将音频信号输入至字预测子网络,通过字预测子网络输出音频信号的字识别信息。
S152、将N个流式音频特征作为非流式声学网络中的非因果编码子网络的输入,通过非因果编码子网络输出N个音频帧对应的非流式音频特征。
可以理解的是,将N个流式音频特征输入至非因果编码子网络,通过非因果编码子网络输出N个音频帧对应的非流式音频特征,N个音频帧对应一个非流式音频特征。输入的流式音频特征通过非因果编码子网络产生非流式高维特征表示的非流式音频特征。非流式音频特征通过矩阵格式进行表示。将矩阵格式的流式音频特征通过非因果编码器进行编码,得到矩阵格式的非流式音频特征。
S153、将L个实体作为非流式声学网络中的上下文信息提取子网络的输入,通过上下文信息提取子网络输出L个实体对应的上下文信息特征。
可以理解的是,上下文信息提取子网络用于接收L个实体并生成固定维度的L个上下文向量。请参阅图9,图9是本申请实施例提供的上下文信息提取子网络的结构示意图。上下文信息提取子网络包括embedding层、intra-transformer层及inter-transformer层。其中,embedding层用于对输入信号进行特征映射,intra-transformer层用于计算类内特征,inter-transformer层用于计算类间特征。
对全部实体的长度进行填充,使得为L个实体的长度均为H。将长度均为H的L个实体组成的实体提取集合c输入至上下文信息提取子网络中。具体的,首先,通过embedding层将实体提取集合c中每个实体进行映射,得到向量EO,向量EO的维度为L×H×D。接着,对 于每个向量EO通过自注意力transformer模块的intra-transformer层计算类内特征向量EI,向量EI维度为L×H×F。然后,取EI中的H维第一个符号得到长度固定的向量。最后,通过另一个自注意力transformer模块的inter-transformer层对每个向量EI的L维上计算类间特征,得到上下文向量EC。通过字联合解码器预测上下文向量EC的字序列,通过音素联合解码器预测上下文向量EC的音素序列,从而在上下文向量提取器中引入了发音信息。这部分的损失函数可以通过下式计算:
Lembedding=Lphone+Lchar
其中,Lembedding表示embedding层的损失函数,Lphone表示音素联合解码器的损失函数,Lchar表示字联合解码器的损失函数。
S154、将字识别信息、N个音频帧对应的非流式音频特征及上下文信息特征作为注意力偏置字联合子网络的输入,通过注意力偏置字联合子网络输出文本识别结果。
可以理解的是,将音频信号的字识别信息、N个音频帧对应的非流式音频特征及上下文信息特征输入至注意力偏置字联合子网络,通过注意力偏置字联合子网络输出文本识别结果。注意力偏置字联合子网络包括注意力偏置子网络和字联合子网络。将音频信号的字识别信息、N个音频帧对应的非流式音频特征及上下文信息特征输入至注意力偏置子网络,通过注意力偏置子网络输出字关联特征及非流式音频关联特征;将字关联特征及非流式音频关联特征输入至字联合子网络,通过字联合子网络输出文本识别结果。
为便于理解,请参阅图10,图10是本申请实施例提供的非流式声学网络的示意图。首先,将第i-1个字识别信息作为非流式声学网络中的字预测子网络的输入,通过字预测子网络输出第i个字识别信息接着,将L个实体组成的实体提取集合c作为非流式声学网络中的上下文信息提取子网络的输入,通过上下文信息提取子网络输出L个实体中每个实体对应的上下文信息特征EC。然后,将N个流式音频特征ESi作为非流式声学网络中的非因果编码子网络的输入,通过非因果编码子网络输出N个音频帧对应的非流式音频特征ENS。最后,将字识别信息、L个实体中每个实体对应的上下文信息特征EC、以及N个音频帧对应的非流式音频特征ENS作为非流式声学网络中的注意力偏置字联合子网络的输入,通过注意力偏置字联合子网络输出音频信号的文本识别结果。
本申请实施例提供的音频处理方法,建立非流式声学网络,通过非流式声学网络中的字预测子网络预测音频信号中每个音频帧对应的字识别信息,通过流式声学网络中的非因果编码子网络对流式音频特征进行编码生成非流式音频特征,通过非流式声学网络中的上下文信息提取子网络输出L个实体对应的上下文信息特征,通过非流式声学网络中的注意力偏置字联合子网络输出文本识别结果,提高文本识别的准确性。
在本申请的图8对应的实施例提供的音频处理方法的一个可选实施例中,注意力偏置字联合子网络包括注意力偏置子网络及字联合子网络。请参阅图11,子步骤S154进一步包括子步骤S1541至子步骤S1542。具体地:
S1541、将音频信号对应的字识别信息、N个音频帧对应的非流式音频特征及上下文信息特征作为注意力偏置字联合子网络中的注意力偏置子网络的输入,通过注意力偏置子网 络输出字关联特征及非流式音频关联特征。
其中,字关联特征用于表征音频信号对应的字识别信息与上下文信息特征的关联性,非流式音频关联特征用于表征N个音频帧对应的非流式音频特征与上下文信息特征的关联性。
可以理解的是,通过字预测子网络对音频信号进行处理,得到音频信号的字识别信息;通过非因果编码子网络对N个音频帧中的每个音频帧对应的流式音频特征进行处理,得到N个音频帧中的每个音频帧对应的非流式音频特征;通过上下文向量提取子网络对L个实体进行处理,得到上下文信息特征。
注意力偏置子网络包括第一注意力偏置子网络和第二注意力偏置子网络,其中,第一注意力偏置子网络用于对字识别信息及上下文信息特征进行处理,得到字关联特征;第二注意力偏置子网络用于非流式音频特征及上下文信息特征进行处理,得到非流式音频关联特征。注意力偏置子网络可以学习上下文向量与音频信号之间的关联性。
将音频信号对应的字识别信息及上下文信息特征作为注意力偏置字联合子网络中的第一注意力偏置子网络的输入,通过第一注意力偏置子网络输出字关联特征;将N个音频帧对应的非流式音频特征及上下文信息特征作为注意力偏置字联合子网络中的第二注意力偏置子网络的输入,通过第二注意力偏置子网络输出非流式音频关联特征
S1542、将字关联特征及非流式音频关联特征作为非流式声学网络中的字联合子网络的输入,通过字联合子网络输出文本识别结果。
可以理解的是,通过字联合子网络将字关联特征及非流式音频关联特征进行融合,得到文本识别结果。字关联特征通过矩阵格式表示。非流式音频关联特征通过矩阵格式表示。将矩阵格式的字关联特征和矩阵格式的非流式音频关联特征通过字联合子网络进行融合,得到文本识别结果。
为便于理解,请参阅图12,图12是本申请实施例提供的非流式声学网络处理流程的示意图。首先,将第i-1个字识别信息作为非流式声学网络中的字预测子网络的输入,通过字预测子网络输出第i个字识别信息接着,将N个流式音频特征ESi作为非流式声学网络中的非因果编码子网络的输入,通过非因果编码子网络输出N个音频帧对应的非流式音频特征ENS。然后,将L个实体组成的实体提取集合c作为非流式声学网络中的上下文信息提取子网络的输入,通过上下文信息提取子网络输出L个实体对应的上下文信息特征EC。最后,将音频信号对应的字识别信息及上下文信息特征作为注意力偏置字联合子网络中的第一注意力偏置子网络的输入,通过第一注意力偏置子网络输出字关联特征;将N个音频帧对应的非流式音频特征及上下文信息特征作为注意力偏置字联合子网络中的第二注意力偏置子网络的输入,通过第二注意力偏置子网络输出非流式音频关联特征;将字关联特征及非流式音频关联特征作为注意力偏置字联合子网络中的字联合子网络的输入,通过字联合子网络输出文本识别结果。
本申请实施例提供的音频处理方法,建立非流式声学网络,通过非流式声学网络中的字预测子网络预测音频信号中每个音频帧对应的字识别信息,通过流式声学网络中的非因果编码子网络对流式音频特征进行编码生成非流式音频特征,通过非流式声学网络中的上 下文信息提取子网络输出L个实体对应的上下文信息特征,通过非流式声学网络中的注意力偏置子网络学习字识别信息与上下文信息特征之间的相似性,得到字关联特征,以及非流式音频特征与与上下文信息特征之间的相似性,得到非流式音频关联特征,通过字联合子网络对字关联特征和非流式音频关联特征进行特征融合,输出文本识别结果,提高文本识别的准确性。
在本申请的图11对应的实施例提供的音频处理方法的一个可选实施例中,注意力偏置子网络包括第一注意力偏置子网络和第二注意力偏置子网络。请参阅图13,子步骤S1541进一步包括子步骤S15411至子步骤S15412。具体的:
S15411、将音频信号对应的字识别信息及上下文信息特征作为注意力偏置子网络中的第一注意力偏置子网络的输入,通过第一注意力偏置子网络输出字关联特征。
可以理解的是,第一注意力偏置子网络用于学习字识别信息与上下文信息特征之间的相关性,通过第一注意力偏置子网络对字识别信息与上下文信息特征进行处理,得到字关联特征,通过字关联特征表征字识别信息与上下文信息特征之间的相关性。
请参阅图14,图14为本申请实施例提供的第一注意力偏置子网络的示意图。第一注意力偏置子网络目的在于将上下文信息整合到transducer模型中。将字识别信息与上下文信息特征EC作为第一注意力偏置子网络的输入,通过第一注意力偏置子网络学习字识别信息与上下文信息特征EC的相关性。具体的,将字识别信息作为多头注意力机制(Multi-Head Attention,MHA)的输入查询向量Q,下文信息特征EC作为多头注意力机制的键向量K和值向量V,通过多头注意力机制计算得到隐状态H。隐状态H可通过以下公式计算:
其中,H为隐状态,Q表示查询向量,为上下文信息特征EC的转置矩阵,F表示字识别信息的总数。
S15412、将N个音频帧对应的非流式音频特征及上下文信息特征作为注意力偏置子网络中的第二注意力偏置子网络的输入,通过第二注意力偏置子网络输出非流式音频关联特征。
其中,第一注意力偏置子网络的参数与第二注意力偏置子网络的参数不同。
可以理解的是,第二注意力偏置子网络用于学习非流式音频特征与上下文信息特征之间的相关性,通过第二注意力偏置子网络对非流式音频特征与上下文信息特征进行处理,得到非流式音频关联特征,通过非流式音频关联特征表征非流式音频特征与上下文信息特征之间的相关性。
请参阅图15,图15为本申请实施例提供的第二注意力偏置子网络的示意图。第二注意力偏置子网络目的在于将上下文信息整合到transducer模型中。将非流式音频特征ENS与上下文信息特征EC作为第二注意力偏置子网络的输入,通过第二注意力偏置子网络学习非流式音频特征ENS与上下文信息特征EC的相关性。具体的,将非流式音频特征ENS作为多头注意力机制(Multi-Head Attention,MHA)的输入查询向量Q,下文信息特征EC作为多头注意力机制的键向量K和值向量V,通过多头注意力机制计算得到隐状态H。隐状态H可通过 以下公式计算:
其中,H为隐状态,Q表示查询向量,为上下文信息特征EC的转置矩阵,F表示字识别信息的总数。
本申请实施例提供的音频处理方法,建立非流式声学网络,通过非流式声学网络中的字预测子网络预测音频信号中每个音频帧对应的字识别信息,通过流式声学网络中的非因果编码子网络对流式音频特征进行编码生成非流式音频特征,通过非流式声学网络中的上下文信息提取子网络输出L个实体对应的上下文信息特征,通过非流式声学网络中的第一注意力偏置子网络学习字识别信息与上下文信息特征之间的相似性,得到字关联特征,以及通过非流式声学网络中的第二注意力偏置子网络学习非流式音频特征与上下文信息特征之间的相似性,得到非流式音频关联特征,通过字联合子网络对字关联特征和非流式音频关联特征进行特征融合,输出文本识别结果,提高文本识别的准确性。
在本申请的图8对应的实施例提供的音频处理方法的一个可选实施例中,针对所述N个音频帧中的第i帧音频帧,请参阅图16,子步骤S151进一步包括子步骤S1511至子步骤S1512。具体的:
S1511、获取音频信号中的第i帧音频帧及第i-1帧音频帧对应的第i-1个字识别信息。
其中,第i-1个字识别信息由字预测子网络根据第i-1帧音频帧生成,i为大于1的整数。
S1512、将第i-1个字识别信息作为字预测子网络的输入,通过字预测子网络输出第i个字识别信息。
可以理解的是,字预测子网络通过第i-1个字识别信息预测得到第i个字识别信息,而第i-1个字识别信息则由字预测子网络通过第i-2个字识别信息预测得到,以此类推。字预测子网络为神经网络,通过前一帧的预测得到的字识别信息预测当前帧的字识别信息。第i-1个字识别信息为与第i帧音频帧最近的非空音频帧对应的字识别信息。
本申请实施例提供的音频处理方法,由字预测子网络根据前一个字识别信息预测当前的字识别信息,依次对音频信号中N个音频帧进行预测,得到音频信号对应的字识别信息,为提高文本识别的准确性奠定基础。
在本申请的图8对应的实施例提供的音频处理方法的一个可选实施例中,针对所述N个音频帧中的第一帧音频帧,请参阅图17,子步骤S151进一步包括子步骤S1513至子步骤S1514。具体的:
S1513、获取音频信号中的第一帧音频帧及预设字识别信息。
S1514、将第一帧音频帧及预设字识别信息作为字预测子网络的输入,通过字预测子网络输出第一帧音频帧对应的字识别信息。
可以理解的是,字预测子网络通过第i-1个字识别信息预测得到第i个字识别信息,而第i-1个字识别信息则由字预测子网络通过第i-2个字识别信息预测得到;对于音频信号中的第一个音频帧的预测,则由字预测子网络通过预设字识别信息及第一个音频帧预测得到。
本申请实施例提供的音频处理方法,由字预测子网络根据当前帧及前一帧对应的字识别信息预测当前帧的字识别信息,依次对音频信号中的N个音频帧进行预测,得到音频信 号对应的字识别信息,为提高文本识别的准确性奠定基础。
在本申请的图2对应的实施例提供的音频处理方法的一个可选实施例中,请参阅图18,步骤S140进一步包括子步骤S141至子步骤S142。具体的:
S141、根据N个音素特征,从实体集合中提取出P个实体。
其中,P个实体的音素标签与N个音素特征相同。
可以理解的是,根据N个音素特征,从实体集合中的K个实体中选出与N个音素特征相同的P个实体。例如,4个音素特征表征的4个音素信息为“wang”、“fang”、“li”、“hua”,12个实体包括王芳、王方、汪芳、李华、梨花、丽华、方往、芳华、王丽、王华、张三、赵四,根据4个音素特征,从实体集合中的12个实体中选出与4个音素特征相同的10个实体,10个实体包括王芳、王方、汪芳、李华、梨花、丽华、方往、芳华、王丽、王华。
S142、根据N个音素特征中每个音素特征在音频信号中出现的先后次序,从P个实体中提取出L个实体。
其中,L个实体的音素标签与N个音素特征的顺序相同,P为小于等于K且大于等于L的整数。
可以理解的是,根据N个音素特征中每个音素特征在音频信号中出现的先后次序,以及每个实体对应的音素信息,从P个实体中提取出L个实体。例如,4个音素特征表征的4个音素信息为“wang”、“fang”、“li”、“hua”,并且4个音素信息在音频信号中出现的先后次序为第一个为“wang”,第二个为“fang”、第三个为“li”、第四个为“hua”。根据4个音素特征在音频信号中出现的先后次序,以及每个实体对应的音素信息,从10个实体中选出6个实体,6个实体包括王芳、王方、汪芳、李华、梨花、丽华。
本申请实施例提供的音频处理方法,在提取实体过程中,首先从实体集合中提取出与音素特征相同的实体,而后在提取出的实体中提取出与音素特征在音频信号中出现的先后次序相同的实体,相比于直接从实体集合中提取出音素特征相同且音素特征在音频信号中出现的先后次序相同的实体,降低了计算量,提高了实体提取的速度。
在本申请的图18对应的实施例提供的音频处理方法的一个可选实施例中,请参阅图19,子步骤S141进一步包括子步骤S1411至子步骤S1413。具体的:
S1411、获取K个实体中每个实体对应的音素信息。
S1412、根据K个实体中每个实体对应的音素信息及N个音素特征,计算每个实体的后验及分数。
其中,后验及分数用于表征实体与N个音素特征的相似度。
S1413、从K个实体中提取出后验及分数大于后验及分数阈值的P个实体。
可以理解的是,本申请实施例提供的音频处理方法,在提取实体过程中包括两部分,第一部分为计算各个实体的后验和分数(Posterior Sum Confidence,PSC)。PSC分数仅关注实体中的出现音素序列是否在滑动窗中出现,不关注音素出现的顺序,该阶段计算简便,有利于快速过滤掉不相关的实体。具体而言,对于滑动窗中的后验矩阵(大小为T×F,即有T个时间帧,每帧有F个音素类别)以及候选实体A(包含B个音素),本申请实施例依次处理这B个音素,在后验矩阵的F维中找到对应的列,并在T维中取最大值,记录其分数 (即找到T帧中对应音素最大的分数)。当处理完依次所有的B个音素时,把记录的分数加起来除以B得到平均分数。该分数即为候选实体A的PSC分数,通过设定一个阈值来判断该实体是否被过滤掉。对于实体库中的每一个实体均计算PSC分数并进行过滤。
本申请实施例提供的音频处理方法,在提取实体过程中,通过计算每个实体的后验和分数,进而从实体集合中提取出与音素特征相同的实体,减少了实体提取的时间消耗,提高实体提取的速度。
在本申请的图18对应的实施例提供的音频处理方法的一个可选实施例中,请参阅图20,子步骤S142进一步包括子步骤S1421至子步骤S1422。具体的:
S1421、获取P个实体中每个实体的音素信息的音素顺序。
S1422、根据N个音素特征中每个音素特征在音频信号中出现的先后次序及每个实体的音素信息的音素顺序,从P个实体中提取出L个实体。
可以理解的是,本申请实施例提供的音频处理方法,在提取实体过程中包括两部分,第二部分为计算各个实体的序列顺序分数(Sequence Order Confidence,SOC)。通过动态规划算法实现序列顺序分数的计算。序列顺序分数在于关注候选实体的音素出现顺序,通过实体的音素出现顺序与音素特征在音频信号中出现的先后次序进行对比,进而从P个实体中提取出L个实体。
本申请实施例提供的音频处理方法,在提取实体过程中,通过计算每个实体的序列顺序分数,进而从实体集合中提取出与音素特征相同且音素顺序相同的实体,提高了实体提取的时间消耗,提高实体提取的速度,以及提高了实体提取的准确性。
根据本申请实施例提供的音频处理方法进行了3次实验,实验一为探究本申请实施例提出的方案对于识别性能的影响。实验二进一步分析了实体提取网络的性能。实验三为分析本申请实施例提供的方法的运行耗时性能。
表1为实验一的实验结果,探究本申请实施例提出的方案对于识别性能的影响,实验测试集根据包括联系人场景和音乐检索场景,测试集中每一个句子均包含了至少一个实体,前者原始实体库包含了970个人名实体,后者包含了6253个歌名/歌手名实体。本实验评价指标为CER与CERR,CER表示字错误率,CER越低表示识别性能越好;CERR为CER的相对改进,CERR越高表示识别性能越好。各组实验的基础ASR框架相同,Baseline表示基础ASR框架,基础ASR框架中不包含上下文向量提取子网络和注意力偏置子网络。Baseline+blank list表示在基础ASR框架中加入上下文向量提取子网络和注意力偏置子网络,并且在推理时输入实体列表为空。Baseline+full list表示在基础ASR框架中加入上下文向量提取子网络和注意力偏置子网络,并且在推理时输入列表为原始实体库。Baseline+PSC表示在基础ASR框架中加入上下文向量提取子网络、注意力偏置子网络和实体提取网络,该实体提取网络仅执行第一阶段的PSC计算过程。Baseline+PSC+SOC表示在基础ASR框架中加入上下文向量提取子网络、注意力偏置子网络和实体提取网络,该实体提取网络执行第一阶段的PSC计算过程和SOC计算过程。topline表示在基础ASR框架中加入上下文向量提取子网络,并且对于每一条测试样例均只使用抄本中含有的实体作为实体列表,该方案为上下文偏置模块的理论上限,实际应用中无法实现。
由实验结果可见,使用整个实体库作为输入在是实体总数较少的情况下(联系人场景)能取得30%的相对提升,但是当实体总数变多时(音乐检索场景),性能会急剧下降,相比baseline基本上没有收益。而本申请实施例提出的实体过滤方案则在两种场景中均能获得比较明显的提升,且更接近于topline的性能。其中两阶段均使用的方案比仅使用PSC的方案提升更明显。
表1
表2为实验二的实验结果,实验二进一步分析了实体过滤网络的性能,本实验使用ERR与ALS对过滤算法性能进行评估,ERR表示经过过滤之后测试抄本中实体留存的平均概率(召回率),ALS表示过滤后实体列表的平均大小。ERR越高表示实体过滤网络的性能越好,ALS越小表示实体过滤网络的性能越好。由实验结果可知,相比起原始实体库,通过计算实体的PSC能过滤掉大部分的不相关实体并保持一个比较高的ERR,通过计算实体的PSC和SOC则进一步压缩了实体列表的大小,但会牺牲少许的ERR,综合识别性能来看能进一步取得提升。
表2
表3为实验三的实验结果,实验3进一步分析了本申请实施例提供的方法的运行耗时性能,采用RTF(系统实时因子)作为评估指标,测试环境为单线程2.50GHz Intel(R)Xeon(R)Platinum 8255C CPU。由实验结果可见,当不使用实体过滤方案时,在输入实体库数量上升时(比较联系人场景与音乐检索场景,970→6253),RTF会大幅度下降至不可用的水平(0.196→4.67)。而使用本申请实施例提出的实体过滤方案,则能有效控制系统RTF:即便实体库大小在6000以上,RTF也能稳定在0.15以内。
表3

下面对本申请中的音频处理装置进行详细描述,请参阅图21。图21为本申请实施例中音频处理装置10的一个实施例示意图,音频处理装置10包括:音频信号获取模块110、流式声学网络处理模块120、实体集合获取模块130、实体提取模块140及非流式声学网络处理模块150。具体的:
音频信号获取模块110,用于获取音频信号。
其中,音频信号包括N个音频帧,N为大于1的整数。
流式声学网络处理模块120,用于将N个音频帧输入至流式声学网络,得到N个音素特征及N个流式音频特征。
其中,N个音素特征用于表征音频信号的音素信息。
实体集合获取模块130,用于获取实体集合。
其中,实体集合包括K个实体,K个实体对应于K个音素信息,K为大于1的整数。
实体提取模块140,用于根据N个音素特征从实体集合中提取出L个实体。
其中,L个实体对应于N个音素特征,L为大于等于N且小于等于K的整数。
非流式声学网络处理模块150,用于将N个音频帧、N个流式音频特征及L个实体输入至非流式声学网络,得到音频信号的文本识别结果。
本申请实施例提供的音频处理装置,通过建立流式声学网络预测音频信号中N个音频帧对应的N个音素特征及N个流式音频特征,根据得到的N个音素特征从实体集合中提取出与N个音素特征具有对应关系的L个实体,由非流式声学网络根据N个音频帧、N个流式音频特征及L个实体预测音频信号的文本识别结果,提高文本识别的准确性。
在本申请的图21对应的实施例提供的音频处理装置的一个可选实施例中,流式声学网络处理模块120,还用于:
对N个音频帧进行特征提取,得到N个音频帧特征。
将N个音频帧特征中的每个音频帧特征作为流式声学网络中的因果编码子网络的输入,通过因果编码子网络输出N个音频帧特征中的每个音频帧特征对应的流式音频特征。
将N个音频帧中的每个音频帧作为流式声学网络中的音素预测子网络的输入,通过音素预测子网络输出N个音频帧中的每个音频帧对应的音素识别信息。
将流式音频特征与音素识别信息输入至流式声学网络中的音素联合子网络,通过音素联合子网络输出N个音素特征。
本申请实施例提供的音频处理装置,建立流式声学网络,通过流式声学网络中的音素预测子网络预测音频信号中每个音频帧对应的音素识别信息,通过流式声学网络中的因果编码子网络对音频帧特征进行编码生成流式音频特征,通过流式声学网络中的音素联合子网络融合流式音频特征与音素识别信息生成音素特征,提高文本识别的准确性。
在本申请的图21对应的实施例提供的音频处理装置的一个可选实施例中,针对所述N个音频帧中的第i帧音频帧,流式声学网络处理模块120,还用于:
获取第i帧音频帧,及第i-1帧音频帧对应的第i-1个音素识别信息。
其中,第i-1个音素识别信息由音素预测子网络根据第i-1帧音频帧生成,i为大于1的整数。
将第i帧音频帧及第i-1个音素识别信息作为音素预测子网络的输入,通过音素预测子网络输出第i帧音频帧对应的音素识别信息。
本申请实施例提供的音频处理装置,由音素预测子网络根据当前帧及前一帧对应的音素识别信息预测当前帧的音素识别信息,依次对N个音频帧进行预测,得到N个音频帧对应的N个音素识别信息,为提高文本识别的准确性奠定基础。
在本申请的图21对应的实施例提供的音频处理装置的一个可选实施例中,针对所述N个音频帧中的第一帧音频帧,流式声学网络处理模块120,还用于:
获取第一帧音频帧及预设音素识别信息。
将第一帧音频帧及预设音素识别信息作为音素预测子网络的输入,通过音素预测子网络输出第一帧音频帧对应的音素识别信息。
本申请实施例提供的音频处理装置,由音素预测子网络根据当前帧及前一帧对应的音素识别信息预测当前帧的音素识别信息,依次对N个音频帧进行预测,得到N个音频帧对应的N个音素识别信息,为提高文本识别的准确性奠定基础。
在本申请的图21对应的实施例提供的音频处理装置的一个可选实施例中,非流式声学网络处理模块150,还用于:
将N个音频帧中的每个音频帧作为非流式声学网络中的字预测子网络的输入,通过字预测子网络输出N个音频帧中的每个音频帧对应的字识别信息。
将N个流式音频特征作为非流式声学网络中的非因果编码子网络的输入,通过非因果编码子网络输出N个音频帧对应的非流式音频特征。
将L个实体作为非流式声学网络中的上下文信息提取子网络的输入,通过上下文信息提取子网络输出L个实体对应的上下文信息特征。
将N个音频帧中的每个音频帧对应的字识别信息、N个音频帧对应的非流式音频特征及上下文信息特征作为注意力偏置字联合子网络的输入,通过注意力偏置字联合子网络输出文本识别结果。
本申请实施例提供的音频处理装置,建立非流式声学网络,通过非流式声学网络中的字预测子网络预测音频信号中每个音频帧对应的字识别信息,通过流式声学网络中的非因果编码子网络对流式音频特征进行编码生成非流式音频特征,通过非流式声学网络中的上下文信息提取子网络输出L个实体对应的上下文信息特征,通过非流式声学网络中的注意力偏置字联合子网络输出文本识别结果,提高文本识别的准确性。
在本申请的图21对应的实施例提供的音频处理装置的一个可选实施例中,非流式声学网络处理模块150,还用于:
将N个音频帧中的每个音频帧对应的字识别信息、N个音频帧对应的非流式音频特征及上下文信息特征作为注意力偏置字联合子网络中的注意力偏置子网络的输入,通过注意力偏置子网络输出字关联特征及非流式音频关联特征。
其中,字关联特征用于表征N个音频帧中的每个音频帧对应的字识别信息与上下文信息特征的关联性,非流式音频关联特征用于表征N个音频帧对应的非流式音频特征与上下文信息特征的关联性。
将字关联特征及非流式音频关联特征作为非流式声学网络中的字联合子网络的输入,通过字联合子网络输出文本识别结果。
本申请实施例提供的音频处理装置,建立非流式声学网络,通过非流式声学网络中的字预测子网络预测音频信号中每个音频帧对应的字识别信息,通过流式声学网络中的非因果编码子网络对流式音频特征进行编码生成非流式音频特征,通过非流式声学网络中的上下文信息提取子网络输出L个实体对应的上下文信息特征,通过非流式声学网络中的注意力偏置子网络学习字识别信息与上下文信息特征之间的相似性,得到字关联特征,以及非流式音频特征与与上下文信息特征之间的相似性,得到非流式音频关联特征,通过字联合子网络对字关联特征和非流式音频关联特征进行特征融合,输出文本识别结果,提高文本识别的准确性。
在本申请的图21对应的实施例提供的音频处理装置的一个可选实施例中,非流式声学网络处理模块150,还用于:
将N个音频帧中的每个音频帧对应的字识别信息及上下文信息特征作为注意力偏置子网络中的第一注意力偏置子网络的输入,通过第一注意力偏置子网络输出字关联特征。
将N个音频帧对应的非流式音频特征及上下文信息特征作为注意力偏置子网络中的第二注意力偏置子网络的输入,通过第二注意力偏置子网络输出非流式音频关联特征。
其中,第一注意力偏置子网络的参数与第二注意力偏置子网络的参数不同。
本申请实施例提供的音频处理装置,建立非流式声学网络,通过非流式声学网络中的字预测子网络预测音频信号中每个音频帧对应的字识别信息,通过流式声学网络中的非因果编码子网络对流式音频特征进行编码生成非流式音频特征,通过非流式声学网络中的上下文信息提取子网络输出L个实体对应的上下文信息特征,通过非流式声学网络中的第一注意力偏置子网络学习字识别信息与上下文信息特征之间的相似性,得到字关联特征,以及通过非流式声学网络中的第二注意力偏置子网络学习非流式音频特征与上下文信息特征之间的相似性,得到非流式音频关联特征,通过字联合子网络对字关联特征和非流式音频关联特征进行特征融合,输出文本识别结果,提高文本识别的准确性。
在本申请的图21对应的实施例提供的音频处理装置的一个可选实施例中,针对所述N个音频帧中的第i帧音频帧,非流式声学网络处理模块150,还用于:
获取第i帧音频帧,及第i-1帧音频帧对应的第i-1个字识别信息。
其中,第i-1个字识别信息由字预测子网络根据第i-1帧音频帧生成,i为大于1的整数。
将第i帧音频帧及第i-1个字识别信息作为字预测子网络的输入,通过字预测子网络输出第i帧音频帧对应的字识别信息。
本申请实施例提供的音频处理装置,由字预测子网络根据当前帧及前一帧对应的字识别信息预测当前帧的字识别信息,依次对N个音频帧进行预测,得到N个音频帧对应的N个字识别信息,为提高文本识别的准确性奠定基础。
在本申请的图21对应的实施例提供的音频处理装置的一个可选实施例中,针对所述N个音频帧中的第一帧音频帧,非流式声学网络处理模块150,还用于:
获取第一帧音频帧及预设字识别信息。
将第一帧音频帧及预设字识别信息作为字预测子网络的输入,通过字预测子网络输出第一帧音频帧对应的字识别信息。
本申请实施例提供的音频处理装置,由字预测子网络根据当前帧及前一帧对应的字识别信息预测当前帧的字识别信息,依次对N个音频帧进行预测,得到N个音频帧对应的N个字识别信息,为提高文本识别的准确性奠定基础。
在本申请的图21对应的实施例提供的音频处理装置的一个可选实施例中,实体提取模块140,还用于:
根据N个音素特征,从实体集合中提取出P个实体。
其中,P个实体的音素标签与N个音素特征相同。
根据N个音素特征中每个音素特征在音频信号中出现的先后次序,从P个实体中提取出L个实体,其中,L个实体的音素标签与N个音素特征的顺序相同,P为小于等于K且大于等于L的整数。
本申请实施例提供的音频处理装置,在提取实体过程中,首先从实体集合中提取出与音素特征相同的实体,而后在提取出的实体中提取出与音素特征在音频信号中出现的先后次序相同的实体,相比于直接从实体集合中提取出音素特征相同且音素特征在音频信号中出现的先后次序相同的实体,降低了计算量,提高了实体提取的速度。
在本申请的图21对应的实施例提供的音频处理装置的一个可选实施例中,实体提取模块140,还用于:
获取K个实体中每个实体对应的音素信息。
根据K个实体中每个实体对应的音素信息及N个音素特征,计算每个实体的后验及分数。
其中,后验及分数用于表征实体与N个音素特征的相似度。
从K个实体中提取出后验及分数大于后验及分数阈值的P个实体。
本申请实施例提供的音频处理装置,在提取实体过程中,通过计算每个实体的后验和分数,进而从实体集合中提取出与音素特征相同的实体,减少了实体提取的时间消耗,提高实体提取的速度。
在本申请的图21对应的实施例提供的音频处理装置的一个可选实施例中,实体提取模块140,还用于:
获取P个实体中每个实体的音素信息的音素顺序。
根据N个音素特征中每个音素特征在音频信号中出现的先后次序及每个实体的音素信息的音素顺序,从P个实体中提取出L个实体。
本申请实施例提供的音频处理装置,在提取实体过程中,通过计算每个实体的序列顺序分数,进而从实体集合中提取出与音素特征相同且音素顺序相同的实体,提高了实体提取的时间消耗,提高实体提取的速度,以及提高了实体提取的准确性。
图22是本申请实施例提供的一种服务器结构示意图,该服务器300可因配置或性能不同 而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)322(例如,一个或一个以上处理器)和存储器332,一个或一个以上存储应用程序342或数据344的存储介质330(例如一个或一个以上海量存储设备)。其中,存储器332和存储介质330可以是短暂存储或持久存储。存储在存储介质330的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器322可以设置为与存储介质330通信,在服务器300上执行存储介质330中的一系列指令操作。
服务器300还可以包括一个或一个以上电源326,一个或一个以上有线或无线网络接口350,一个或一个以上输入输出接口358,和/或,一个或一个以上操作系统341,例如WindowsServerTM,MacOSXTM,UnixTM,LinuxTM,FreeBSDTM等等。
上述实施例中由服务器所执行的步骤可以基于该图22所示的服务器结构。
另外,本申请实施例还提供了一种存储介质,所述存储介质用于存储计算机程序,所述计算机程序用于执行上述实施例提供的方法。
本申请实施例还提供了一种包括计算机程序的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例提供的方法。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)或者光盘等各种可以存储程序代码的介质。
以上,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施 例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (16)

  1. 一种音频处理方法,所述方法由计算机设备执行,所述方法包括:
    获取音频信号,所述音频信号包括N个音频帧,N为大于或等于1的整数;
    将所述N个音频帧输入至流式声学网络,得到N个音素特征及N个流式音频特征,其中,所述N个音素特征用于表征所述音频信号的音素信息;
    获取实体集合,其中,所述实体集合包括K个实体,所述K个实体对应于K个音素信息,K为大于1的整数;
    根据所述N个音素特征从所述实体集合中提取出L个实体,其中,所述L个实体对应于所述N个音素特征,L为大于等于N且小于等于K的整数;
    将所述音频信号、所述N个流式音频特征及所述L个实体输入至非流式声学网络,得到所述音频信号的文本识别结果。
  2. 如权利要求1所述的音频处理方法,所述流式声学网络包括因果编码子网络、音素预测子网络及音素联合子网络;
    所述将所述N个音频帧输入至流式声学网络,得到N个音素特征及N个流式音频特征,包括:
    对所述N个音频帧进行特征提取,得到N个音频帧特征;
    将所述N个音频帧特征中的每个音频帧特征作为所述流式声学网络中的因果编码子网络的输入,通过所述因果编码子网络输出所述N个音频帧特征中的每个音频帧特征对应的流式音频特征;
    将所述N个音频帧中的每个音频帧作为所述流式声学网络中的音素预测子网络的输入,通过所述音素预测子网络输出所述N个音频帧中的每个音频帧对应的音素识别信息;
    将所述流式音频特征与所述音素识别信息输入至所述流式声学网络中的音素联合子网络,通过所述音素联合子网络输出N个音素特征。
  3. 如权利要求2所述的音频处理方法,针对所述N个音频帧中的第i帧音频帧,所述将所述N个音频帧中的每个音频帧作为所述流式声学网络中的音素预测子网络的输入,通过所述音素预测子网络输出所述N个音频帧中的每个音频帧对应的音素识别信息,包括:
    获取所述第i帧音频帧,及第i-1帧音频帧对应的第i-1个音素识别信息,其中,所述第i-1个音素识别信息由所述音素预测子网络根据所述第i-1帧音频帧生成,i为大于1的整数;
    将所述第i帧音频帧及所述第i-1个音素识别信息作为所述音素预测子网络的输入,通过所述音素预测子网络输出所述第i帧音频帧对应的音素识别信息。
  4. 如权利要求2所述的音频处理方法,针对所述N个音频帧中的第一帧音频帧,所述将所述N个音频帧中的每个音频帧作为所述流式声学网络中的音素预测子网络的输入,通过所述音素预测子网络输出所述N个音频帧中的每个音频帧对应的音素识别信息,包括:
    获取所述第一帧音频帧及预设音素识别信息;
    将所述第一帧音频帧及所述预设音素识别信息作为所述音素预测子网络的输入,通过所述音素预测子网络输出所述第一帧音频帧对应的音素识别信息。
  5. 如权利要求1所述的音频处理方法,所述非流式声学网络包括字预测子网络、非因 果编码子网络、上下文信息提取子网络及注意力偏置字联合子网络;
    所述将所述音频信号、所述N个流式音频特征及所述L个实体输入至非流式声学网络,得到所述音频信号的文本识别结果,包括:
    将所述音频信号作为所述非流式声学网络中的字预测子网络的输入,通过所述字预测子网络输出所述音频信号对应的字识别信息;
    将所述N个流式音频特征作为所述非流式声学网络中的非因果编码子网络的输入,通过所述非因果编码子网络输出所述N个音频帧对应的非流式音频特征;
    将所述L个实体作为所述非流式声学网络中的上下文信息提取子网络的输入,通过所述上下文信息提取子网络输出所述L个实体对应的上下文信息特征;
    将所述音频信号对应的字识别信息、所述N个音频帧对应的非流式音频特征及所述上下文信息特征作为所述非流式声学网络中的注意力偏置字联合子网络的输入,通过所述注意力偏置字联合子网络输出所述文本识别结果。
  6. 如权利要求5所述的音频处理方法,所述注意力偏置字联合子网络包括注意力偏置子网络及字联合子网络;
    所述将所述音频信号对应的字识别信息、所述N个音频帧对应的非流式音频特征及所述上下文信息特征作为所述非流式声学网络中的注意力偏置字联合子网络的输入,通过所述注意力偏置字联合子网络输出文本识别结果,包括:
    将所述音频信号对应的字识别信息、所述N个音频帧对应的非流式音频特征及所述上下文信息特征作为所述注意力偏置字联合子网络中的注意力偏置子网络的输入,通过所述注意力偏置子网络输出字关联特征及非流式音频关联特征,其中,所述字关联特征用于表征所述音频信号对应的字识别信息与所述上下文信息特征的关联性,所述非流式音频关联特征用于表征所述N个音频帧对应的非流式音频特征与所述上下文信息特征的关联性;
    将所述字关联特征及所述非流式音频关联特征作为所述注意力偏置字联合子网络中的字联合子网络的输入,通过所述字联合子网络输出文本识别结果。
  7. 如权利要求6所述的音频处理方法,所述注意力偏置子网络包括第一注意力偏置子网络及第二注意力偏置子网络;
    所述将所述音频信号对应的字识别信息、所述N个音频帧对应的非流式音频特征及所述上下文信息特征作为所述注意力偏置字联合子网络中的注意力偏置子网络的输入,通过所述注意力偏置子网络输出字关联特征及非流式音频关联特征,包括:
    将所述音频信号对应的字识别信息及所述上下文信息特征作为所述注意力偏置子网络中的第一注意力偏置子网络的输入,通过所述第一注意力偏置子网络输出字关联特征;
    将所述N个音频帧对应的非流式音频特征及所述上下文信息特征作为所述注意力偏置子网络中的第二注意力偏置子网络的输入,通过所述第二注意力偏置子网络输出非流式音频关联特征,其中,所述第一注意力偏置子网络的参数与所述第二注意力偏置子网络的参数不同。
  8. 如权利要求5所述的音频处理方法,针对所述N个音频帧中的第i帧音频帧,所述将所述音频信号作为所述非流式声学网络中的字预测子网络的输入,通过所述字预测子网络 输出所述N个音频帧中的每个音频帧对应的字识别信息,包括:
    获取所述第i帧音频帧,及第i-1帧音频帧对应的第i-1个字识别信息,其中,所述第i-1个字识别信息由所述字预测子网络根据所述第i-1帧音频帧生成,i为大于1的整数;
    将所述第i帧音频帧及所述第i-1个字识别信息作为所述字预测子网络的输入,通过所述字预测子网络输出所述第i帧音频帧对应的字识别信息。
  9. 如权利要求5所述的音频处理方法,针对所述N个音频帧中的第一帧音频帧,所述将所述音频信号作为所述非流式声学网络中的字预测子网络的输入,通过所述字预测子网络输出所述N个音频帧中的每个音频帧对应的字识别信息,包括:
    获取所述第一帧音频帧及预设字识别信息;
    将所述第一帧音频帧及所述预设字识别信息作为所述字预测子网络的输入,通过所述字预测子网络输出所述第一帧音频帧对应的字识别信息。
  10. 如权利要求1所述的音频处理方法,所述根据所述N个音素特征从所述实体集合中提取出L个实体,包括:
    根据所述N个音素特征,从所述实体集合中提取出P个实体,其中,所述P个实体的音素标签与所述N个音素特征相同;
    根据所述N个音素特征中每个音素特征在所述音频信号中出现的先后次序,从所述P个实体中提取出L个实体,其中,所述L个实体的音素标签与所述N个音素特征的顺序相同,P为小于等于K且大于等于L的整数。
  11. 如权利要求10所述的音频处理方法,所述根据所述N个音素特征,从所述实体集合中提取出P个实体,包括:
    获取所述K个实体中每个实体对应的音素信息;
    根据所述K个实体中每个实体对应的音素信息及所述N个音素特征,计算每个实体的后验及分数,其中,所述后验及分数用于表征实体与所述N个音素特征的相似度;
    从所述K个实体中提取出所述后验及分数大于后验及分数阈值的P个实体。
  12. 如权利要求10所述的音频处理方法,所述根据所述N个音素特征中每个音素特征在所述音频信号中出现的先后次序,从所述P个实体中提取出L个实体,包括:
    获取所述P个实体中每个实体的音素信息的音素顺序;
    根据所述N个音素特征中每个音素特征在所述音频信号中出现的先后次序及每个实体的音素信息的音素顺序,从所述P个实体中提取出L个实体。
  13. 一种音频处理装置,包括:
    音频信号获取模块,用于获取音频信号,其中,所述音频信号包括N个音频帧,N为大于1的整数;
    流式声学网络处理模块,用于将所述N个音频帧输入至流式声学网络,得到N个音素特征及N个流式音频特征,其中,所述N个音素特征用于表征所述音频信号的音素信息;
    实体集合获取模块,用于获取实体集合,其中,所述实体集合包括K个实体,所述K个实体对应于K个音素信息,K为大于1的整数;
    实体提取模块,用于根据所述N个音素特征从所述实体集合中提取出L个实体,其中, 所述L个实体对应于所述N个音素特征,L为大于等于N且小于等于K的整数;
    非流式声学网络处理模块,用于将所述音频信号、所述N个流式音频特征及所述L个实体输入至非流式声学网络,得到音频信号的文本识别结果。
  14. 一种计算机设备,包括:存储器、收发器、处理器及总线系统;
    其中,所述存储器用于存储程序;
    所述处理器用于执行所述存储器中的程序,包括执行如权利要求1至12中任一项所述的音频处理方法;
    所述总线系统用于连接所述存储器及所述处理器,以使所述存储器及所述处理器进行通信。
  15. 一种计算机可读存储介质,包括计算机程序,当其在计算机上运行时,使得计算机执行如权利要求1至12中任一项所述的音频处理方法。
  16. 一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行如权利要求1至12中任一项所述的音频处理方法。
PCT/CN2023/131671 2022-12-26 2023-11-15 一种音频处理方法及相关装置 WO2024139805A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211674936.3A CN116959418A (zh) 2022-12-26 2022-12-26 一种音频处理方法及装置
CN202211674936.3 2022-12-26

Publications (1)

Publication Number Publication Date
WO2024139805A1 true WO2024139805A1 (zh) 2024-07-04

Family

ID=88446709

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/131671 WO2024139805A1 (zh) 2022-12-26 2023-11-15 一种音频处理方法及相关装置

Country Status (2)

Country Link
CN (1) CN116959418A (zh)
WO (1) WO2024139805A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116959418A (zh) * 2022-12-26 2023-10-27 腾讯科技(深圳)有限公司 一种音频处理方法及装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113724689A (zh) * 2021-08-09 2021-11-30 科大讯飞股份有限公司 语音识别方法及相关装置、电子设备、存储介质
CN114203161A (zh) * 2021-12-30 2022-03-18 深圳市慧鲤科技有限公司 语音识别方法、装置、设备以及存储介质
CN114242064A (zh) * 2021-12-31 2022-03-25 科大讯飞股份有限公司 语音识别方法及装置、语音识别模型的训练方法及装置
US20220108689A1 (en) * 2020-10-05 2022-04-07 Google Llc Transformer Transducer: One Model Unifying Streaming And Non-Streaming Speech Recognition
US20220310073A1 (en) * 2021-03-26 2022-09-29 Google Llc Mixture Model Attention for Flexible Streaming and Non-Streaming Automatic Speech Recognition
CN116959418A (zh) * 2022-12-26 2023-10-27 腾讯科技(深圳)有限公司 一种音频处理方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220108689A1 (en) * 2020-10-05 2022-04-07 Google Llc Transformer Transducer: One Model Unifying Streaming And Non-Streaming Speech Recognition
US20220310073A1 (en) * 2021-03-26 2022-09-29 Google Llc Mixture Model Attention for Flexible Streaming and Non-Streaming Automatic Speech Recognition
CN113724689A (zh) * 2021-08-09 2021-11-30 科大讯飞股份有限公司 语音识别方法及相关装置、电子设备、存储介质
CN114203161A (zh) * 2021-12-30 2022-03-18 深圳市慧鲤科技有限公司 语音识别方法、装置、设备以及存储介质
CN114242064A (zh) * 2021-12-31 2022-03-25 科大讯飞股份有限公司 语音识别方法及装置、语音识别模型的训练方法及装置
CN116959418A (zh) * 2022-12-26 2023-10-27 腾讯科技(深圳)有限公司 一种音频处理方法及装置

Also Published As

Publication number Publication date
CN116959418A (zh) 2023-10-27

Similar Documents

Publication Publication Date Title
WO2021093449A1 (zh) 基于人工智能的唤醒词检测方法、装置、设备及介质
CN111312245B (zh) 一种语音应答方法、装置和存储介质
CN109509470B (zh) 语音交互方法、装置、计算机可读存储介质及终端设备
WO2022078146A1 (zh) 语音识别方法、装置、设备以及存储介质
WO2022178969A1 (zh) 语音对话数据处理方法、装置、计算机设备及存储介质
WO2024139805A1 (zh) 一种音频处理方法及相关装置
CN112071330A (zh) 一种音频数据处理方法、设备以及计算机可读存储介质
CN113314119B (zh) 语音识别智能家居控制方法及装置
WO2023245389A1 (zh) 歌曲生成方法、装置、电子设备和存储介质
CN112349289A (zh) 一种语音识别方法、装置、设备以及存储介质
CN102945673A (zh) 一种语音指令范围动态变化的连续语音识别方法
WO2024055752A1 (zh) 语音合成模型的训练方法、语音合成方法和相关装置
CN112669842A (zh) 人机对话控制方法、装置、计算机设备及存储介质
CN111274412A (zh) 信息提取方法、信息提取模型训练方法、装置及存储介质
Kaushik et al. Automatic audio sentiment extraction using keyword spotting.
CN111126084A (zh) 数据处理方法、装置、电子设备和存储介质
CN117041430B (zh) 一种提高智能协调外呼系统的外呼质量及鲁棒方法和装置
CN113393841B (zh) 语音识别模型的训练方法、装置、设备及存储介质
WO2024093578A1 (zh) 语音识别方法、装置、电子设备、存储介质及计算机程序产品
CN113823265A (zh) 一种语音识别方法、装置和计算机设备
Mitra et al. Investigating Salient Representations and Label Variance in Dimensional Speech Emotion Analysis
CN113299270B (zh) 语音合成系统的生成方法、装置、设备及存储介质
CN118398004B (zh) 一种语音大模型的构建和训练方法、音频输出方法及应用
US11984113B2 (en) Method and server for training a neural network to generate a textual output sequence
WO2024193596A1 (zh) 自然语言理解方法及冰箱

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23909737

Country of ref document: EP

Kind code of ref document: A1