Speech processing method and related device

By encoding the speech data and dividing the feature intervals, the CTC decoding process is optimized, which solves the problem of low CTC decoding efficiency and improves the accuracy and efficiency of speech recognition.

CN118658481APending Publication Date: 2024-09-17MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410347199.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-25
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

In existing speech recognition technology, there are long inference times and spike effects in the CTC decoding process, resulting in low decoding efficiency and easy misrecognition, affecting recognition performance.

Method used

By encoding the speech data, determine the clustering weight of the encoding features, divide it into feature intervals, and decode the weighted features to shorten the sequence length, optimize the decoding speed, and reduce the computational complexity.

Benefits of technology

It improves speech processing efficiency and recognition accuracy, reduces computing resource consumption, reduces the risk of misrecognition, and enhances the accuracy of decoding results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118658481A
    Figure CN118658481A
Patent Text Reader

Abstract

The invention provides a voice processing method and a related device. The method comprises the steps that N voice frames of voice data to be processed are coded to obtain N coding features, the clustering weight of each coding feature is determined, and one voice frame corresponds to one coding feature; dividing the N coding features into M feature intervals based on the clustering weight of each coding feature, M being an integer greater than or equal to 1, and M being less than or equal to N; for each feature interval, determining weighted features of the feature interval based on coding features included in the feature interval and clustering weights of the coding features; and carrying out decoding processing on the weighted features of the M feature intervals to obtain a voice processing result of the voice data to be processed. According to the invention, the length of the to-be-decoded sequence can be shortened, and the overall speech recognition speed is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a speech processing method and related devices. Background Art

[0002] Speech processing is to convert human speech signals into a form that computers can understand and process, thereby realizing functions such as speech recognition, speech synthesis, and emotion recognition. Speech processing includes speech signal collection, feature extraction, model training and optimization. With the development of artificial intelligence technology, the demand for speech recognition, natural language processing and other fields is increasing. Improving speech processing efficiency can not only improve user experience, but also promote the application and development of related technologies.

[0003] In current speech recognition technology, in order to convert speech data into corresponding text output, it is usually necessary to perform recognition processing on the speech data. Popular end-to-end speech recognition methods mainly include the attention mechanism based on encoder-decoder and the method based on connectionist temporal classification (CTC). By processing speech data, redundant information can be reduced and the expression of key features can be enhanced. Therefore, how to perform speech processing efficiently is a hot research issue. Summary of the invention

[0004] The embodiments of the present application provide a speech processing method and related devices, which can shorten the overall sequence length, optimize the decoding speed, and thus improve the speech processing efficiency.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] The present invention provides a method for speech processing, the method comprising:

[0007] Encode N speech frames of the speech data to be processed to obtain N encoding features, and determine the clustering weight of each encoding feature, where one speech frame corresponds to one encoding feature, and N is an integer greater than 1;

[0008] Dividing the N coding features into M feature intervals based on the clustering weight of each coding feature, where M is an integer greater than or equal to 1, and M is less than or equal to N;

[0009] For each feature interval, based on the coding features included in the feature interval and the clustering weights of the coding features, determine the weighted features of the feature interval;

[0010] The weighted features of the M feature intervals are decoded to obtain a speech processing result of the speech data to be processed.

[0011] An embodiment of the present application provides a speech processing device, including:

[0012] The encoding module is used to encode N speech frames of the speech data to be processed, obtain N encoding features, and determine the clustering weight of each encoding feature, where one speech frame corresponds to one encoding feature, and N is an integer greater than 1;

[0013] A partitioning module, configured to partition the N coding features into M feature intervals based on a clustering weight of each coding feature, where M is an integer greater than or equal to 1, and M is less than or equal to N;

[0014] A determination module, configured to determine, for each feature interval, a weighted feature of the feature interval based on the coding features included in the feature interval and the clustering weights of the coding features;

[0015] The decoding module is used to decode the weighted features of the M feature intervals to obtain the speech processing result of the speech data to be processed.

[0016] An embodiment of the present application provides an electronic device, the electronic device comprising:

[0017] A memory for storing computer executable instructions;

[0018] The processor is used to implement the speech processing method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.

[0019] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the speech processing method provided in the embodiment of the present application when executed by a processor.

[0020] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, the speech processing method provided in the embodiment of the present application is implemented.

[0021] The embodiments of the present application have the following beneficial effects:

[0022] The embodiment of the present application encodes N speech frames of the speech data to be processed to obtain N coding features, and determines the clustering weight of each coding feature, wherein encoding each speech frame can convert the speech data to be processed into a more representative coding feature, abstract and compress the complex information of the speech signal, thereby helping to highlight the key information in the speech signal. Determining the clustering weight of each coding feature can better understand the correlation between different coding features and the importance of coding features, so that more attention can be paid to key information that has a significant contribution to the speech signal in feature representation. Then, the coding features are divided into M feature intervals according to the clustering weights, and the clustering weights reflect the importance of each coding feature. By applying the clustering weights to the feature division process, multiple coding features corresponding to the same character in the speech signal are divided into one feature interval. For each feature interval, multiple coding features contained in the feature interval are integrated into a weighted feature through clustering weights. In this way, while retaining the information of each speech frame, the coding features with high clustering weights can also be strengthened to better capture the important information of the speech signal, thereby ensuring the accuracy of the decoding results obtained by decoding the weighted features in the subsequent decoding process. In addition, since multiple coding features in a feature interval are integrated into a weighted feature through clustering weights, in the decoding processing stage, it is not necessary to decode the original N coding features of the speech data to be processed, but only a smaller number of weighted features need to be decoded, which can greatly reduce the amount of data to be processed and the computational complexity, thereby reducing the consumption of computing resources and improving speech processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 is a schematic diagram of the architecture of a speech processing system 100 provided in an embodiment of the present application;

[0024] Figure 2 is a schematic diagram of the structure of the server 400 provided in an embodiment of the present application;

[0025] Figure 3 This is a schematic diagram of an implementation flow of the speech processing method provided in an embodiment of the present application;

[0026] Figure 4 A schematic diagram of the peak effect phenomenon provided in an embodiment of the present application;

[0027] Figure 5 A schematic diagram of another implementation flow of the speech processing method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0029] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0030] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0031] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0032] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0033] 1) Connectionist Temporal Classification (CTC): The CTC algorithm is an algorithm widely used in tasks such as optical character recognition (OCR) and automatic speech recognition (ASR). The core advantage of this algorithm is that it can handle the problem that the length of the input sequence and the target sequence do not match and are difficult to align directly. CTC introduces special blank labels and defines a set of rules to achieve segmented alignment of the output sequence, so that the model can learn to output corresponding labels in different time periods without knowing the exact correspondence between the input and output in advance.

[0034] 2) Character Token: In speech recognition, it is the multi-classification target for each frame of audio, which is the set of all possible output characters. When a frame of speech is input, the system outputs a posterior probability distribution of the Token set, which is usually normalized by the softmax function. For example, if the Token set contains the three characters "你 (nǐ)", "好 (hǎo)", and "啊 (ā)", the output after softmax might be [0.1, 0.1, 0.8], indicating that the probability of this frame of speech being recognized as "啊 (ā)" is the highest, at 80%, while the probabilities of being recognized as "你 (nǐ)" or "好 (hǎo)" are each 10%.

[0035] 3) CTC Decoding: The process of converting the posterior probability sequence of multiple frames of Tokens into the final recognition result. This process usually uses dynamic search algorithms such as Greedy Search or Beam Search, aiming to find an output sequence with the highest overall probability. These algorithms consider options with higher probabilities of output Tokens for each frame and try to maximize the global output probability of the entire sequence while maintaining the accuracy of single-frame output to determine the final recognition result.

[0036] 4) Time Step Interval: An interval composed of consecutive time steps. In many fields, especially in numerical calculations and simulations, a time step is a concept used to discretize time. It divides the continuous time axis into small discrete steps for numerical calculations or model simulations. A time step interval is usually used to describe the range of discrete time, where each time step represents a discrete time point. For example, in numerical simulations, the evolution of a physical system can be approximated by a series of time steps. These time steps usually have equal time intervals and are used to update the state of the system. The choice of the time step interval depends on the specific application and model requirements. Smaller time steps can provide higher precision but also increase the computational cost. Larger time steps may lead to reduced precision but can significantly reduce the computational time.

[0037] Among existing speech processing technologies, a notable feature of the Connectionist Temporal Classification (CTC) algorithm is its spike characteristic, that is, when encoding sequence data, the labels output by most time frames are "blank" (i.e., frames without valid information). This feature can be used to detect and dynamically skip time frames that do not contain valid information, thereby shortening the length of the input sequence. This approach reduces the amount of data that needs to be processed, thereby reducing the consumption of computing resources and helping to prevent memory overflow problems caused by processing long sequences. In the conventional CTC decoding process, the system performs a token search on each frame of the input sequence to determine the most likely character or phoneme and retains those paths with the highest probability. In this way, even if there are a large number of blank frames in the sequence, the system can effectively extract valuable information from it and ultimately output accurate recognition results. This process not only improves the efficiency of speech processing, but also ensures the performance and stability of the model.

[0038] The currently popular CTC method introduces blank labels to process speech input, thus overcoming the problem of manual alignment required in some traditional methods. However, there are some problems in the CTC decoding process. First, CTC decoding usually requires searching each frame, resulting in a long inference time and failure to meet real-time requirements. Secondly, CTC will have a "spike effect", that is, the labels output by most frames are blank, and other labels are only briefly output on a few frames, resulting in a waste of decoding time. Therefore, the processing of speech data needs further research and improvement. It is necessary to find a speech processing method that can not only extract effective speech features, but also reduce the time complexity and reduce the impact of the spike effect during the decoding process.

[0039] However, the prior art also has obvious disadvantages. First, relying on the CTC spike characteristics to detect empty frames is prone to misrecognition. If a frame that should output a specific token is mistakenly identified as an empty frame during the detection process, the frame will be discarded, resulting in a missing character in the decoding result. Even if this misrecognition occurs only once, it will have a significant impact on the overall speech processing performance. Secondly, during the CTC decoding process, the result of each frame of audio output is a probability distribution matrix, which contains the posterior probability corresponding to each TOKEN (including blank labels). In some cases, although the probability of the blank label is the highest, the probability of other non-blank labels is low, but they still carry a certain amount of information, which may have an impact on the entire sequence search process. If these frames dominated by blank labels are simply discarded, it is equivalent to abandoning the information carried by these non-blank labels, which may damage the final recognition performance. Therefore, when designing and optimizing the CTC algorithm, it is necessary to find a more precise method to deal with the empty frame problem, and at the same time consider how to retain the amount of information that may be useful for sequence search, so as not to affect the recognition accuracy.

[0040] In order to solve the problems existing in the prior art, the embodiment of the present application simplifies the CTC decoding process by utilizing the spike effect to identify and delete blank frames, because blank frames do not participate in the token search. The embodiment of the present application proposes a new scheme, which can determine the approximate boundary of the audio output label and perform clustering weighted processing on the features within the boundary, which can shorten the length of the entire sequence and optimize the decoding speed. Specifically, the embodiment of the present application linearly maps the intermediate state of the encoder output to generate a clustering weight matrix, and then uses the matrix to determine the boundary position of the output text and find the frame boundary of each character output. On this basis, the frames in the boundary area are weighted clustered to obtain a short sequence matrix after clustering processing, and finally CTC decoding is performed on this short sequence matrix to produce the final recognition result. The embodiment of the present application aims to improve the CTC decoding process in speech processing and improve decoding efficiency and recognition accuracy.

[0041] In the embodiments of the present application, user information, user voice data and other related data are involved. When the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0042] In a specific implementation, the embodiment of the present application provides a speech processing method and a related device, wherein, after encoding and processing N speech frames of the speech data to be processed and obtaining N coding features, the clustering weight of each coding feature is first determined, and the clustering weight can characterize the correlation between different coding features and the importance of the coding features, and then the clustering weight is applied to the feature division process, and the multiple coding features corresponding to the same character in the speech signal are divided into a feature interval. For each feature interval, the multiple coding features contained in the feature interval are integrated into a weighted feature through the clustering weight, so that while retaining the information of each speech frame, the important information of the speech signal can be better captured, thereby ensuring the accuracy of the decoding result obtained by decoding the weighted features in the subsequent decoding process. In addition, since the multiple coding features in a feature interval are integrated into a weighted feature through the clustering weight, it is not necessary to decode the original N coding features of the speech data to be processed in the decoding processing stage, but only a smaller number of weighted features need to be decoded. Therefore, the embodiment of the present application can shorten the length of the sequence to be decoded, thereby greatly reducing the amount of data to be decoded and the computational complexity, and improving the decoding speed.

[0043] The following describes an exemplary application of the electronic device provided by the embodiment of the present application. The device provided by the embodiment of the present application can be implemented as a laptop, a tablet computer, a desktop computer, a set-top box, a mobile device (for example, a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device), a smart phone, a smart speaker, a smart watch, a smart TV, a vehicle-mounted terminal and other types of user terminals, and can also be implemented as a server. The following describes an exemplary application when the device is implemented as a server.

[0044] See also Figure 1 , Figure 1 1 is a schematic diagram of the architecture of the speech processing system 100 provided in the embodiment of the present application. To support an exemplary application, the terminal 200 is connected to the server 400 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two. The data processing system 100 can also include a database 500 for obtaining speech data to be processed. The database 500 can be independent of the server 400 or located inside the server 400. Figure 1 In the description, the database 500 is independent of the server 400 as an example.

[0045] The server 400 receives the voice processing request sent by the terminal 200, and the processing request includes the voice data to be processed. The server 400 obtains the voice data to be processed, and then encodes the N voice frames of the voice data to be processed to obtain N encoding features, and determines the clustering weight of each encoding feature. Among them, each encoding feature corresponds to a voice frame, and these encoding features are arranged according to time information, and N is an integer greater than 1. Based on the clustering weight of each encoding feature, the server 400 divides the N encoding features into M feature intervals, and M is an integer greater than or equal to 1 and less than or equal to N. For each feature interval, the server 400 determines the weighted features according to the included encoding features and clustering weights. Finally, the server 400 decodes the weighted features of these M feature intervals, thereby outputting the voice processing results to the terminal 200.

[0046] In some embodiments, the server 400 may 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 delivery networks (CDN), and big data and artificial intelligence platforms. The terminal 200 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a car terminal, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.

[0047] See also Figure 2 , Figure 2 is a schematic diagram of the structure of the server 400 provided in an embodiment of the present application, Figure 2 The server 400 shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the server 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not described in detail. Figure 2 Various buses are labeled as bus system 440 .

[0048] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0049] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0050] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.

[0051] The memory 450 includes a volatile memory or a nonvolatile memory, and may also include both volatile and nonvolatile memories. The nonvolatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0052] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0053] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0054] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;

[0055] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);

[0056] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.

[0057] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 The speech processing device 455 stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: an encoding module 4551, a division module 4552, a determination module 4553 and a decoding module 4554. These modules are logical, so they can be arbitrarily combined or further divided according to the functions implemented. The functions of each module will be described below.

[0058] In other embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the speech processing method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (Application Specific Integ rated Circuit, ASIC), digital signal processors (Digital Signal Processor, DSP), programmable logic devices (Programmable Logic Device, PLD), complex programmable logic devices (Complex Programmable Logic Device, CPLD), field programmable gate arrays (Field-Progr ammable Gate Array, FPGA) or other electronic components.

[0059] The following describes the speech processing method provided by the embodiment of the present application. As mentioned above, the electronic device that implements the speech processing method of the embodiment of the present application may be a server. Therefore, the execution subject of each step will not be repeatedly described below. Figure 3 , Figure 3 This is a schematic diagram of an implementation flow of the voice processing method provided in the embodiment of the present application, which will be combined with Figure 3 The steps shown are explained, Figure 3 The subject of the steps is an electronic device, and the electronic device can be as described above. In cases where special instructions are given, the electronic device can be taken as a server as an example.

[0060] In step 101, N speech frames of speech data to be processed are coded to obtain N coding features, and a clustering weight of each coding feature is determined.

[0061] In some embodiments, obtaining the voice data to be processed usually involves capturing the original sound signal from a microphone, an audio file, or other audio input source. The voice data to be processed refers to the original audio signal before any processing. The voice data to be processed is usually a digital signal obtained by sampling and quantizing an analog sound wave, that is, the original recording or sound file. The voice data to be processed contains all the sound information, such as the speaker's tone, speaking speed, volume, and background noise. In digital format, the voice data to be processed usually exists in the form of a waveform, which can be described by parameters such as sampling rate (the number of samples collected per second).

[0062] In some embodiments, the audio signal in the processed voice data is framed to obtain N voice frames. Framing is to divide the continuous audio signal into a series of short-term sample sets, and each frame generally includes but is not limited to audio data of 20 to 40 milliseconds in length.

[0063] In some embodiments, the N coding features are new representations obtained by coding the N speech frames of the speech data to be processed, and are used to capture higher-level speech information in the speech processing system. One speech frame corresponds to one coding feature, and one coding feature is a feature vector, each of which represents the acoustic information within a time window of the speech data to be processed. Coding processing refers to the process of transforming and mapping the feature sequence of the N speech frames of the speech data to be processed through a deep neural network, such as a convolutional neural network (CNN) or a recurrent neural network (RNN). The specific coding processing may include using a weight matrix and an activation function to perform linear and nonlinear transformations on the feature sequence of the speech frame, thereby generating N coding features.

[0064] For example, in speech processing, the speech data to be processed is input into an audio encoder, which is usually a deep neural network. The audio encoder transforms the input feature sequence through its multi-layer structure, and each layer generates a new feature representation, which is called encoded features. In this process, the audio encoder maps the speech data to be processed to a higher-level representation space through the weight matrix and activation function of each layer. For example, the convolution layer applies multiple filters to extract local features and adds nonlinearity through the activation function. The subsequent pooling layer downsamples the local features to obtain N encoded feature sequences arranged according to the time information of N speech frames and N is an integer greater than 1.

[0065] The clustering weight is an importance weight assigned to each coding feature, which is used to indicate the contribution of each coding feature to the overall speech processing task or its relevance to a specific category. In some embodiments, the clustering weight of each coding feature can be determined by the following two steps:

[0066] Step 1: For each coding feature, perform a linear transformation on the coding feature to obtain the linear transformation result corresponding to the coding feature.

[0067] In some embodiments, the linear transformation of each coded feature can be achieved by matrix multiplication and bias addition to obtain the corresponding linear transformation result. For example, a weight matrix and bias vector are constructed for each coded feature vector, and the parameters of the weight matrix and bias vector are updated by back propagation during the training process. When the input sample passes through the hidden layer of the neural network, the corresponding weight matrix is ​​applied to each coded feature vector for matrix multiplication, and then the corresponding bias vector is added to achieve a linear transformation.

[0068] Step 2: Use the preset activation function to process the linear transformation results to obtain the clustering weights of the encoded features.

[0069] In some embodiments, after each coding feature is linearly transformed, it is necessary to perform a nonlinear transformation through an activation function to obtain the corresponding clustering weight. The activation function can be some common functions, such as a sigmoid function, a tanh function, or a ReLU function. By inputting the linear transformation result into the activation function, the output can be limited to a certain range and the nonlinear capability can be enhanced to better capture the features in the speech data to be processed. The clustering weight corresponding to each coding feature can be a scalar, and the clustering weights corresponding to multiple coding features constitute a clustering weight sequence. The clustering weight sequence is a vector composed of multiple scalars, each of which is obtained by processing the corresponding coding feature vector through a linear layer.

[0070] The result of the activation function can be regarded as the nonlinear transformation result of the encoded features. Then, these nonlinear transformation results are mapped into clustering weights through a linear layer (usually containing weights and biases). This linear layer is actually a fully connected layer, which converts the encoded features (which may be multidimensional) after nonlinear transformation into a single scalar value. After passing through the linear layer, each encoded feature is converted into a scalar value, which is the clustering weight. Each encoded feature corresponds to a clustering weight, which reflects the importance or weight of each frame in the clustering operation. Finally, the obtained clustering weights will be used for clustering operations after boundary judgment.

[0071] In step 102, N coding features are divided into M feature intervals based on the clustering weight of each coding feature.

[0072] In some embodiments, by analyzing the numerical features of the clustering weights, the peaks and valleys therein are identified, thereby determining potential boundary positions. For example, by detecting the numerical change pattern in the clustering weights, the extreme points therein are found, and the positions corresponding to these extreme points are regarded as boundary positions. In this way, the coding features can be divided according to these boundary positions to form different feature intervals. When the boundary position is determined, the feature interval is the time step interval corresponding to each character, and these time step intervals include the coding features corresponding to the starting frame of each character in the input sequence to the coding features corresponding to the ending frame, thereby dividing multiple coding features into different feature intervals.

[0073] In some embodiments, it is necessary to divide N coding features into M feature intervals based on the clustering weight of each coding feature, which is specifically achieved through the following two steps:

[0074] Step 1: Based on the clustering weight of each coded feature, select the coded features as the interval boundaries from N coded features.

[0075] In some embodiments, by parsing the numerical characteristics of the clustering weights of each coding feature, the importance or weight distribution of the coding feature in different clusters can be obtained. Secondly, the numerical change pattern in these clustering weights is detected to find the extreme points therein, that is, the points where the weight value changes from increasing to decreasing (or vice versa). The positions of these extreme points often reflect the turning points or transition areas between different clusters, which can be regarded as potential interval boundary positions. Finally, based on the extreme points, different coding features are divided according to these positions to form different feature intervals. For example, assuming that there are N coding features, the clustering weights of the coding features are checked for each coding feature, and the peaks and valleys are identified. By determining the extreme points in each coding feature, the extreme points are used as potential interval boundary positions. In this way, the coding features are divided into different intervals according to these interval boundary positions.

[0076] In some embodiments, based on the clustering weight of each coding feature, selecting a coding feature as an interval boundary from N coding features can be achieved by the following seven steps:

[0077] Step 1: Determine the target coding feature among the N coding features as the coding feature serving as the interval boundary.

[0078] In some embodiments, the first coding feature and the last coding feature are used as target coding features, and the target coding feature is used as the coding feature of the interval boundary.

[0079] Step 2: For each coding feature in the non-target coding features, when the clustering weight of the coding feature is less than the clustering weight of the previous coding feature of the coding feature and less than the clustering weight of the next coding feature of the coding feature, the coding feature is determined as the coding feature of the interval boundary.

[0080] In some embodiments, when the clustering weight of a coding feature is less than the clustering weight of the previous coding feature of the coding feature, and the clustering weight of the coding feature is less than the clustering weight of the next coding feature of the coding feature, the interval boundary is found, and the coding feature is determined as the coding feature of the interval boundary. This is based on intuitive observations and the characteristics of the Transformer attention at the encoder. The monotonic attention mechanism should have an attention trough at the boundary of the text mark. It can also be understood that the peak effect of CTC causes each position with the highest probability of producing a character to have a peak, and there is always a minimum value between the two peaks, which serves as the boundary between the two characters. Specifically, all coding features that meet the conditions are found to form a set. By traversing the clustering weights of the coding features, the coding features are determined as interval boundaries when the above conditions are met. This process can be regarded as finding the trough of the clustering weight, thereby segmenting the corresponding feature interval.

[0081] For example, assuming that the clustering weight sequence is [2,3,1,4,5,2,6,4,3], from intuitive observation and the judgment rules of interval boundaries, we know that the "1" at the third position is smaller than the "3" at the second position and smaller than the "4" at the fourth position. Similarly, the "2" at the sixth position is smaller than the "5" at the fifth position and the "6" at the seventh position. Therefore, the "1" at the third position and the "2" at the sixth position are interval boundary positions. In addition, since the starting position and the ending position are also regarded as interval boundary positions, the "2" at the first position and the "3" at the ninth position are also regarded as interval boundary positions. Therefore, the first position, the third position, the sixth position, and the ninth position in the clustering weight sequence [2,3,1,4,5,2,6,4,3] are all interval boundary positions, that is, the corresponding interval boundary position set is [1,3,6,9].

[0082] Step 3: Determine whether the number of encoded features at the interval boundary is greater than 2.

[0083] Among them, when the number of coded features of the interval boundary is greater than 2, it means that the interval boundary position includes at least one other interval boundary position in addition to the first and last digits. Then at least two feature intervals can be divided by the interval boundary position, and the fifth step is entered. When the number of coded features of the interval boundary is not greater than 2, the number M of interval boundary positions must be 2, which means that the interval boundary position only includes the first and last digits, and the fourth step is entered.

[0084] Step 4: Divide the N coded features into a feature interval.

[0085] In some embodiments, after all interval boundaries are found, the number of coding features of these interval boundaries is M, and the number of coding features of interval boundaries is an integer greater than or equal to 2. When M is 2, that is, when there are only two interval boundary positions, the two coding features are constructed into a feature interval, that is, the first and last coding features are constructed into a feature interval.

[0086] Step 5: Divide the N coding features into M feature intervals according to the preset interval division rules.

[0087] In some embodiments, two adjacent feature intervals include overlapping coding features. When the interval division rule indicates backward overlap, in the fifth step, for the jth coding feature as the interval boundary, if j is greater than or equal to 1 and less than M-1, the coding features between the jth coding feature as the interval boundary and the jth end coding feature among the N coding features are divided into one feature interval, and the jth end coding feature is the next coding feature of the j+1th coding feature as the interval boundary; if j is equal to M-1, the coding features between the jth coding feature as the interval boundary and the j+1th coding feature as the interval boundary among the N coding features are divided into one feature interval.

[0088] In some embodiments, for the jth coding feature as the interval boundary, if j is greater than or equal to 1 and less than M-1, that is, the jth coding feature is any coding feature before the penultimate coding feature among the M coding features, a feature interval is constructed from the jth coding feature to the jth ending coding feature, and the jth ending coding feature is the next coding feature after the j+1th coding feature. Specifically, when there are multiple interval boundary positions and the number of interval boundary positions is greater than 2, the middle interval boundary position is moved to the right by one position so that two adjacent feature intervals partially overlap, and the overlapping part is the j+1th coding feature as the interval boundary, and the next coding feature after the j+1th coding feature.

[0089] In some embodiments, when j is equal to M-1, the jth coding feature is the coding feature at the end position of the feature interval. The end position of the feature interval belongs to the interval boundary position, but there is no coding feature at the next position of the end position of the feature interval, so the end position of the feature interval does not need to be moved to the right.

[0090] For example, if the clustering weight sequence is [2,3,1,4,5,2,6,4,3], then the corresponding interval boundary position set is [1,3,6,9]. Since there are four interval boundary positions, there are three feature intervals, and the corresponding but non-overlapping feature intervals are [1,3], [3,6], [6,9]. In order to take into account the context information, the interval boundary position is moved one position to the right. Since the next position of the end position of the interval boundary position has no coded feature, it cannot be moved to the right. Therefore, the feature intervals with overlapping parts after moving to the right are [1,4], [3,7], [6,9].

[0091] In some embodiments, when the interval division rule indicates forward overlap, for the kth coding feature as the interval boundary, if k is equal to 1, the coding features between the kth coding feature as the interval boundary and the k+1th coding feature as the interval boundary among the N coding features are divided into one feature interval. If k is greater than 1 and less than or equal to M-1, the coding features between the kth starting coding feature and the k+1th coding feature as the interval boundary among the N coding features are divided into one feature interval, and the kth starting coding feature is the previous coding feature of the kth coding feature.

[0092] In some embodiments, when k is equal to 1, the kth coding feature is the coding feature at the starting position of the feature interval. The starting position of the feature interval belongs to the interval boundary position, but there is no coding feature at the previous position of the starting position of the feature interval, so the starting position of the feature interval does not need to be moved to the left.

[0093] In some embodiments, when k is greater than 1, the kth starting coding feature to the k+1th coding feature is a feature interval, where the value range of k is 2 to M-1. Specifically, for the feature interval, starting from the previous coding feature of the kth coding feature, until the k+1th coding feature, these coding features are constructed as feature intervals, that is, the middle interval boundary position is moved one position to the left. In the interval boundary position set, each feature interval will overlap to some extent. The coding features corresponding to the adjacent interval boundary positions are constructed into a series of continuous feature intervals in the above manner, thereby achieving more accurate prediction results.

[0094] For example, if the clustering weight sequence is [2,3,1,4,5,2,6,4,3], the corresponding interval boundary position set is [1,3,6,9], and the corresponding but non-overlapping feature intervals are [1,3], [3,6], [6,9]. In order to take into account the context information, the interval boundary position is moved to the left by one position. Since the previous position of the starting position of the interval boundary position has no coded features, it cannot be moved to the left. Therefore, the feature intervals with overlapping parts after moving to the left are [1,3], [2,6], [5,9]. In this way, when constructing the feature interval, the overlapping parts between frame intervals are taken into account, so that some overlapping information can be obtained between adjacent feature intervals. In this way, the information of the left and right contexts can be comprehensively utilized to achieve more accurate prediction results. Therefore, the existence of overlapping parts can increase the model's consideration of context information and improve the modeling ability of the input sequence.

[0095] In some embodiments, each feature interval can also add multiple frames to the left or right, which means that there will be a certain overlap between adjacent feature intervals. The frame intervals themselves are non-overlapping, but in order to take into account the information of the left and right contexts, there will be a certain degree of overlap between the frame intervals. Specifically, the overlap is to allow some additional frames to be added to the left and right sides as information in order to better handle the influence of the context. The extra overlap is achieved by manually adding one or more frames, so that the information on both the left and right sides can be considered to a certain extent.

[0096] Continue with the first step of step 102 .

[0097] Step 2: Divide the N coded features into M feature intervals based on the coded features that serve as interval boundaries.

[0098] In some embodiments, in the case of determining the coding features of the interval boundaries, each character corresponds to a feature interval, which includes the coding features of the character from the start frame to the end frame in the input sequence. N coding features are divided into M feature intervals according to the coding features as the interval boundaries. This means that by finding the coding features corresponding to the start and end frames of each character in the input sequence, multiple coding features are classified according to the characters they belong to, and they are divided into different feature intervals, the coding features in the input sequence can be more effectively sorted and organized, so that subsequent processing and analysis can be more accurate.

[0099] In step 103, for each feature interval, based on the coding features included in the feature interval and the clustering weights of the coding features, a weighted feature of the feature interval is determined.

[0100] In some embodiments, determining the weighted features of the feature interval may be achieved by the following two steps:

[0101] Step 1: Normalize the clustering weights of the coding features included in the feature interval to obtain normalized weights.

[0102] In some embodiments, when normalizing the clustering weights corresponding to the coded features included in the feature interval, first, a clustering weight sequence is taken as input, where each weight represents the importance factor of each frame in the feature interval. Then, the normalized weights are obtained by normalizing these clustering weights. Specifically, a softmax operation is performed on the clustering weight sequence, which involves processing the weight values ​​one by one and converting them into probability values ​​between 0 and 1. The softmax function is calculated by dividing each weight value by the sum of all weight values, and the purpose of doing so is to make the sum of all weight values ​​equal to 1. By normalizing the clustering weights corresponding to the coded features included in the feature interval, each weight value can be mapped to its relative importance in the entire feature interval.

[0103] Step 2: Based on the normalized weights, the encoded features are weighted to obtain the weighted features of the feature interval.

[0104] In some embodiments, each coding feature in the feature interval is multiplied by various corresponding normalized weight values ​​to obtain each weighted coding feature. Each weighted coding feature is bitwise summed to obtain a weighted feature corresponding to the feature interval. The weighted feature can effectively extract semantic information from the speech signal and provide a more accurate and comprehensive feature representation for subsequent speech processing, speech synthesis and other tasks. By weighting the coding features based on the normalized weights, the contribution of different frames in the feature interval can be effectively considered and a more accurate and comprehensive feature representation can be provided.

[0105] In step 104, the weighted features of the M feature intervals are decoded to obtain a speech processing result of the speech data to be processed.

[0106] In some embodiments, the weighted feature sequence of M feature intervals is taken as input, and a path search is performed using a CTC decoding operation, such as a beam search algorithm. The CTC decoding operation is intended to map a continuous weighted feature sequence to a final output speech processing result. Then, according to the search algorithm, the optimal output character sequence is found in all possible paths. These paths include all possible state transitions from the starting state to the ending state, and each state corresponds to a character or a blank mark. According to the information in the weighted feature sequence, the score of each path is calculated, and the path with the highest score is selected as the final output. In the path search process, feature intervals that still contain blank marks after clustering will be considered, and the blank intervals of multiple frames will be clustered into one blank interval. Therefore, the final label sequence will remove the blank marks, and the length will be less than the length of the feature sequence after clustering. Finally, the label sequence corresponding to the optimal path is output as the speech processing result, and this label sequence is the final output character sequence, which represents the result after the speech data to be processed is decoded. By decoding the weighted features, the continuous feature sequence can be mapped to the optimal output character sequence, and the speech processing of the speech data to be processed can be realized.

[0107] Through the above-mentioned method, the embodiment of the present application extracts features from the processed speech data to obtain the original speech feature sequence, and performs coding processing on this basis to obtain multiple coding features, and determines the clustering weights corresponding to each coding feature. Subsequently, based on the clustering weights corresponding to each coding feature, the interval boundary position is determined, and the speech feature sequence can be accurately divided. Then, based on the boundary position, the multiple coding features are divided into at least one feature interval, which effectively compresses the length of the decoding sequence, reduces the consumption of computing resources, and saves processing time. Then, all frames in the feature interval are clustered by weighted coefficients, and the information of each frame is retained, which is conducive to improving the performance and accuracy of the model. Finally, by weighted processing of the coding features and clustering weights in the feature interval, the length of the decoding sequence can be shortened, the consumption of computing resources can be reduced, the real-time factor of the model is effectively reduced, and more efficient speech processing is achieved.

[0108] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.

[0109] The speech processing method provided in the embodiment of the present application can be applied to any scenario requiring speech processing, for example, it can be applied to speech recognition scenarios, translation scenarios, intelligent question-and-answer scenarios, etc.

[0110] When performing CTC decoding, whether using greedy search or beam search algorithm, a search is required for each frame, which leads to a long inference time and affects the overall real-time factor (RTF) timeliness. In addition, there is a spike effect in the CTC decoding process. The labels predicted by most frames are blank. Only when non-blank labels appear will the weight be increased briefly, such as Figure 4 As stated, Figure 4 A schematic diagram of the spike effect provided in the embodiment of the present application. Therefore, in the decoding stage where most of the middle is blank, a token search is performed at each time step, resulting in a waste of decoding time.

[0111] In the prior art, a large number of blank labels are repeatedly removed during CTC decoding, resulting in a waste of intermediate decoding time and low efficiency. However, the embodiment of the present application determines the approximate boundary of the audio output label part and clusters and weights the features within the boundary, thereby shortening the overall sequence length and optimizing the decoding and recognition speed.

[0112] See also Figure 5 , Figure 5 Another implementation flow diagram of the speech processing method provided in the embodiment of the present application is shown below. Figure 5 The steps shown are described in detail.

[0113] Step 301: input a frame-level speech feature sequence, input the speech feature sequence into an audio encoder, perform downsampling, and obtain an intermediate coding feature sequence.

[0114] Before inputting frame-level speech features (corresponding to the initial speech features in other embodiments), first, a frame-level speech feature sequence is extracted from the original audio data, which usually includes framing the original audio, generating an audio feature vector for each frame, and these feature vectors are arranged in chronological order to form a sequence, namely, a speech feature sequence.

[0115] Next, this frame-level speech feature sequence is input into the audio encoder. In conventional end-to-end speech processing, the original speech feature sequence is usually downsampled to obtain a coded feature sequence. The coded feature sequence (h1, ..., hT2) obtained after processing by the audio encoder is a new sequence obtained by compressing and converting the original speech feature sequence. The length of the coded feature sequence (denoted as T2) is usually smaller than the length of the original speech feature sequence (denoted as T1), so the coded feature sequence is shorter than the original sequence, thereby reducing the computational complexity and saving computational time to a certain extent.

[0116] Each element x in the original speech feature sequence (x1, ..., xT1) represents a feature vector of a frame, and each element h in the encoded feature sequence is also a feature vector. By framing and encoder processing the original speech feature sequence, the speech signal is converted into a series of frame-level feature vectors, which will be used for subsequent speech processing tasks.

[0117] Step 302: The encoded feature sequence is linearly transformed and activated by an activation function to obtain a clustering weight sequence.

[0118] In some embodiments, the coded feature sequence is linearly transformed through a linear layer neural network (linear). The linear layer neural network weights each coded feature vector to obtain a scalar value. Then, the result of the linear transformation is activated using a nonlinear transformation through a ReLU activation function to obtain a clustering weight sequence. The length of the sequence obtained by linear transformation and activation function of the coded feature sequence is equal to that of the coded feature sequence, both of which are T2. Each element in the clustering weight sequence (l1 to lT2) is a scalar, which represents the weighted weight of the coded feature of the corresponding time step in the clustering process.

[0119] Step 303: Determine character boundaries based on the clustering weight sequence.

[0120] In some embodiments, the frame boundary of each character is determined by the value of the clustering weight sequence. The character boundary refers to the time step interval corresponding to each character, that is, the frame interval where the character starts and ends. First, the frame boundary of each character output is determined based on a threshold or other determination mechanism using the clustering weight sequence. The value in the clustering weight sequence represents the weight of each frame in the clustering process.

[0121] In conventional CTC decoding, the intermediate hidden features generated by the encoder are processed by the softmax function to obtain the posterior probability of each frame belonging to the set of all tags. These posterior probabilities will have a spike effect, that is, at certain time steps, the posterior probability of a specific character will be significantly higher than other characters. This is because the goal of CTC decoding is to find the most likely character sequence, and the spike effect can help the decoder find the correct character more easily during the search process.

[0122] In some embodiments, the clustering weight sequence is used to determine the frame boundary of each character output according to the judgment mechanism. First, in the clustering weight sequence (l1, ..., lT2), by observing the relationship between the value lt of each time step and the adjacent time step values ​​lt-1 and lt+1, find the position that satisfies lt≤lt-1 and lt≤lt+1, that is, the value of lt is less than both the value of the left time step and the value of the right time step. Such a position is defined as a character boundary. This judgment method is based on the intuitive observation of the Transformer attention characteristics at the encoder. It can be understood that the peak effect of CTC causes the position with the highest probability of each character to form a peak, and a trough is formed between the two peaks, and the trough position is used as the character boundary.

[0123] Next, determine the set (1, T3) formed by all trough positions, and add the start and end positions of the clustering weight sequence (l1, ..., lT2) to this set respectively. The start and end positions are also understood as a trough, so that the interval information of the start and end positions can be retained.

[0124] In some embodiments, in speech processing, in order to accurately determine the frame interval of each character in the speech signal, the (1, T3) trough set is used to determine the frame interval of each character one by one. However, due to the special nature of the speech signal, there is less information overlap between adjacent frames, which is prone to inaccuracy, so it is necessary to perform a certain degree of overlap processing on each frame interval.

[0125] In order to avoid some inaccuracies, for each character frame interval in the trough set, the frame interval of each character can be extended to the left or right by one or more frames. For example, for a character frame interval [Ti, Ti+1], where Ti belongs to the trough set (1, T3), the interval can be extended to [Ti, (Ti+1)+1]. In this way, the influence of left and right information can be weighed in the derivation process, so that the frames on both sides can affect the prediction result of the current character.

[0126] The frame intervals themselves are non-overlapping, that is, there is no overlap between the frame intervals of adjacent characters. However, in order to allow the information on the left and right sides to cross-influence each other, one or more additional frames can be added to the right side of the frame interval of each character to achieve overlap, so that the information on the left and right sides can cross-influence each other in the overlapping part.

[0127] Step 304: Character clustering.

[0128] In some embodiments, the audio sequence is divided according to character boundaries to obtain various frame intervals, and the encoding features of each frame interval are weighted clustered using clustering weights to obtain a clustered feature sequence.

[0129] In some embodiments, the audio sequence is soft-aligned at the token level through character boundary judgment, that is, the audio sequence is divided into intervals representing different characters, which are also frame intervals of the characters. Subsequently, for the coded feature vectors of multiple frames in each frame interval, weighted clustering processing is required. For example, a character "you" is determined, and the frame interval of the word "you" has 10 frames. Currently, it is necessary to perform a weighted summation operation on these 10 frames, and aggregate the coded features of the 10 frames in the interval into the weighted features of 1 frame, which is equivalent to the coded features of these 10 frames are all describing the word "you", and the coded features of these 10 frames are clustered. In this process, the so-called "clustering" refers to the weighted summation of the coded features in the frame interval to obtain a representative feature vector, rather than the clustering operation in the traditional sense. Such an operation enables the features of multiple frames that originally describe the same character to be integrated to form a more compact representation, thereby reducing the length of the feature sequence, which is conducive to improving the efficiency of subsequent CTC decoding search.

[0130] In some embodiments, after obtaining the character boundary, each character token interval is determined according to the character boundary. Assume that there is a character token interval [Ti, (Ti+1)+1], which means that the interval contains 10 frames of audio data. Next, each frame of audio is predicted, and a linear function and a ReLU activation function are used for processing. For example, the encoded feature vector of each frame of audio is used as input, and after processing through a linear transformation and a ReLU activation function, the corresponding clustering weight is obtained. These clustering weights can be used to represent the importance or weight of each frame in the frame interval, that is, the contribution of the corresponding frame. Such predictions can better understand the role of each frame of audio data in the entire frame interval, and provide an important basis for subsequent weighted clustering operations.

[0131] In the clustering process, the coded feature sequence (h1...hT2) is used as input and weighted clustering is performed with the weight sequence (l1...lT2). First, the weight sequence is normalized using the softmax function so that its sum is 1 to ensure the validity of the weight. Then, weighted clustering is performed by multiplying and accumulating frame by frame, that is, the hidden layer coded feature vector ht of each frame is multiplied by the corresponding normalized weight lt, and the results are accumulated. Formula (1) is as follows:

[0132] kt=∑softmax(lt)*ht (1);

[0133] The feature vector kt obtained in this way represents the features after weighted clustering within the frame interval of the character. Finally, by performing a weighted clustering operation on the frame interval of each character, a clustered feature sequence (k1, ..., kT3) is obtained. Here, T3 is smaller than T2 because the length of the sequence after clustering will be shorter than the length before clustering. For example, in 10 frames of audio data, the weighted clustering operation compresses the features of 10 frames into a feature vector, i.e., 1 frame, which directly represents the features of the frame interval. In this way, the information of the original audio data is represented by fewer frames, thereby reducing the length of CTC decoding.

[0134] Step 305: Perform CTC decoding on the clustered feature sequence to obtain a speech processing result.

[0135] In some embodiments, the clustered feature sequence (k1, ..., kT3) is input into the CTC decoder for decoding operation. In the process of CTC decoding, the commonly used path search algorithm is Beam Search. Beam Search retains multiple candidate paths during the search process and selects the path with the highest probability as the final output. It uses a beam width parameter (beam width) to determine the number of candidate paths retained. Through continuous expansion and pruning, Beam Search can find the path with the highest probability in the search space. Then, based on information such as the model output probability distribution and language features, the final output character sequence (y1, ..., yT4) is obtained. Here, T4 is usually smaller than T3. In this process, there may be some vectors representing blank intervals, because when compressing the feature sequence, the blank intervals of multiple frames are clustered into one blank interval. During the decoding process, continuous blank intervals are merged and blank frames are removed from the output character sequence. Therefore, CTC decoding is the process of converting the clustered feature sequence into the final output character sequence. Through the path search algorithm (such as Beam Search), the path with the highest probability is selected as the final output, and the continuous blank intervals are merged and removed to obtain accurate speech processing results.

[0136] In summary, the embodiment of the present application obtains a coding feature sequence by inputting a frame-level speech feature sequence and inputting it into an audio encoder for downsampling, thereby reducing the amount of data, improving the computational efficiency, and retaining the important information of the speech signal. Then, the coding feature sequence is processed by linear transformation and nonlinear activation function to obtain a clustering weight sequence, and the frame interval of the character is determined by characterizing the weighting coefficient and using the CTC peak effect, thereby achieving a significant optimization effect in the speech processing system, improving the recognition accuracy, and shortening the length of the sequence to be decoded, reducing the consumption of computing resources, and saving the time of CTC decoding. According to the clustering weight sequence, the character boundary is judged, and the audio sequence is divided according to the character boundary to obtain each frame interval. Through the CTC peak effect, the frame interval can be judged more accurately. And the coding features of the frame interval of each character are weighted clustered using the clustering weight to obtain the clustered feature sequence, and the information of all frames is retained by the weighted clustering method, while reducing the redundancy of the features, and further improving the recognition accuracy. Finally, the clustered feature sequence is decoded by CTC to obtain the speech processing result, which can effectively optimize the real-time factor (RTF) of the speech processing system, improve the recognition speed and efficiency, and ensure the accuracy of the processing results.

[0137] The following is a description of an exemplary structure of the speech processing device 455 provided in the present application as a software module. In some embodiments, for example, Figure 2 As shown, the software modules stored in the speech processing device 455 of the memory 450 may include:

[0138] The encoding module 4551 is used to encode N speech frames of the speech data to be processed, obtain N encoding features, and determine the clustering weight of each encoding feature, where one speech frame corresponds to one encoding feature, and N is an integer greater than 1;

[0139] A partitioning module 4552, configured to partition the N coding features into M feature intervals based on the clustering weight of each coding feature, where M is an integer greater than or equal to 1, and M is less than or equal to N;

[0140] A determination module 4553 is used to determine, for each feature interval, a weighted feature of the feature interval based on the coding features included in the feature interval and the clustering weights of the coding features;

[0141] The decoding module 4554 is used to decode the weighted features of the M feature intervals to obtain the speech processing result of the speech data to be processed.

[0142] In some embodiments, the encoding module is also used to perform a linear transformation on each encoding feature to obtain a linear transformation result corresponding to the encoding feature; and process the linear transformation result using a preset activation function to obtain a clustering weight of the encoding feature.

[0143] In some embodiments, the partitioning module is further used to select a coding feature as an interval boundary from the N coding features based on the clustering weight of each coding feature; and partition the N coding features into M feature intervals based on the coding features as interval boundaries.

[0144] In some embodiments, the encoding module is further used to determine a target encoding feature among the N encoding features as a encoding feature serving as an interval boundary; the target encoding feature includes a first encoding feature and a last encoding feature; for each encoding feature among the non-target encoding features, when the clustering weight of the encoding feature is less than the clustering weight of the previous encoding feature of the encoding feature and less than the clustering weight of the next encoding feature of the encoding feature, the encoding feature is determined as a encoding feature serving as an interval boundary.

[0145] In some embodiments, the encoding module is also used to divide the N encoding features into a feature interval when the number of encoding features serving as interval boundaries is 2 and includes the target encoding feature; when the number of encoding features serving as interval boundaries is greater than 2, the N encoding features are divided into M feature intervals according to a preset interval division rule, wherein two adjacent feature intervals include overlapping encoding features.

[0146] In some embodiments, the encoding module is also used to target the jth encoding feature that serves as the interval boundary; if j is greater than or equal to 1 and less than M-1, then the encoding features among the N encoding features that are located between the jth encoding feature that serves as the interval boundary and the jth end encoding feature are divided into a feature interval, and the encoding feature after the jth end encoding feature to the j+1th encoding feature that serves as the interval boundary; if j is equal to M-1, then the encoding features among the N encoding features that are located between the jth encoding feature that serves as the interval boundary and the j+1th encoding feature that serves as the interval boundary are divided into a feature interval.

[0147] In some embodiments, the encoding module is also used to target the kth encoding feature as the interval boundary; if k is equal to 1, then the encoding features among the N encoding features that are located between the kth encoding feature as the interval boundary and the k+1th encoding feature as the interval boundary are divided into a feature interval; if k is greater than 1 and less than or equal to M-1, then the encoding features among the N encoding features that are located between the kth starting encoding feature and the k+1th encoding feature as the interval boundary are divided into a feature interval, and the kth starting encoding feature is the previous encoding feature of the kth encoding feature.

[0148] In some embodiments, the determination module is further used to normalize the clustering weights of the coding features included in the feature interval to obtain normalized weights; based on the normalized weights, weighted processing is performed on the coding features to obtain weighted features of the feature interval.

[0149] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer readable storage medium, and the processor executes the computer executable instruction, so that the electronic device performs the above-mentioned speech processing method of the embodiment of the present application.

[0150] The present application embodiment provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions or computer programs are stored. When the computer-executable instructions or computer programs are executed by a processor, the processor will be caused to execute the speech processing method provided by the present application embodiment, for example, Figure 3 method.

[0151] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.

[0152] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0153] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0154] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.

[0155] In summary, the embodiment of the present application obtains a coding feature sequence by inputting a frame-level speech feature sequence and inputting it into an audio encoder for downsampling, thereby reducing the amount of data, improving the computational efficiency, and retaining the important information of the speech signal. Then, the coding feature sequence is processed by linear transformation and nonlinear activation function to obtain a clustering weight sequence, and the character feature interval is determined by characterizing the weighting coefficient and using the CTC peak effect, thereby achieving a significant optimization effect in the speech processing system, improving the recognition accuracy, and shortening the length of the sequence to be decoded, reducing the consumption of computing resources, and saving the time of CTC decoding. According to the clustering weight sequence, the character boundary is judged, and the audio sequence is divided according to the character boundary to obtain each character feature interval. Through the CTC peak effect, the character feature interval can be judged more accurately. And the clustering weight is used to perform weighted clustering processing on the features of each character feature interval to obtain a clustered feature sequence, and the information of all frames is retained by the weighted clustering method, while reducing the redundancy of the features, further improving the recognition accuracy. Finally, the clustered feature sequence is decoded by CTC to obtain the speech processing result, which can effectively optimize the real-time factor (RTF) of the speech processing system, improve the recognition speed and efficiency, and ensure the accuracy of the processing results.

[0156] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A speech processing method, characterized in that: The method comprises: Encode N speech frames of the speech data to be processed to obtain N encoding features, and determine the clustering weight of each encoding feature, where one speech frame corresponds to one encoding feature, and N is an integer greater than 1; Dividing the N coding features into M feature intervals based on the clustering weight of each coding feature, where M is an integer greater than or equal to 1, and M is less than or equal to N; For each feature interval, based on the coding features included in the feature interval and the clustering weights of the coding features, determine the weighted features of the feature interval; The weighted features of the M feature intervals are decoded to obtain a speech processing result of the speech data to be processed.

2. The method according to claim 1, characterized in that The clustering weight based on each coding feature divides the N coding features into M feature intervals, including: Based on the clustering weight of each coded feature, select the coded features as the interval boundaries from the N coded features; The N coding features are divided into M feature intervals based on the coding features as interval boundaries.

3. The method according to claim 1, characterized in that Determining the clustering weight of each coding feature includes: For each coding feature, perform a linear transformation on the coding feature to obtain a linear transformation result corresponding to the coding feature; The linear transformation result is processed using a preset activation function to obtain the clustering weight of the coding feature.

4. The method according to claim 2, characterized in that The step of selecting a coding feature as an interval boundary from the N coding features based on the clustering weight of each coding feature includes: Determine a target coding feature among the N coding features as a coding feature serving as a boundary of an interval; the target coding feature includes a coding feature at the first position and a coding feature at the last position; For each coding feature in the non-target coding features, when the clustering weight of the coding feature is less than the clustering weight of the previous coding feature of the coding feature and less than the clustering weight of the next coding feature of the coding feature, the coding feature is determined as a coding feature serving as an interval boundary.

5. The method according to claim 4, characterized in that The dividing the N coding features into M feature intervals based on the interval division positions includes: When the number of coding features serving as interval boundaries is 2 and includes the target coding feature, dividing the N coding features into one feature interval; When the number of coding features serving as interval boundaries is greater than 2, the N coding features are divided into M feature intervals according to a preset interval division rule, wherein two adjacent feature intervals include overlapping coding features.

6. The method according to claim 5, characterized in that When the interval division rule indicates backward overlap, the N coding features are divided into M feature intervals according to the preset interval division rule, including: For the jth encoded feature as the interval boundary; If j is greater than or equal to 1 and less than M-1, the coding features between the j-th coding feature as the interval boundary and the j-th ending coding feature among the N coding features are divided into a feature interval, and the j-th ending coding feature is the next coding feature after the j+1-th coding feature as the interval boundary; If j is equal to M-1, the coding features between the jth coding feature as the interval boundary and the j+1th coding feature as the interval boundary among the N coding features are divided into one feature interval.

7. The method according to claim 5, characterized in that When the interval division rule indicates forward overlap, the N coding features are divided into M feature intervals according to the preset interval division rule, including: For the kth encoded feature as the interval boundary; If k is equal to 1, then the coding features between the kth coding feature as the interval boundary and the k+1th coding feature as the interval boundary among the N coding features are divided into one feature interval; If k is greater than 1 and less than or equal to M-1, the coding features between the kth starting coding feature and the k+1th coding feature as the interval boundary among the N coding features are divided into a feature interval, and the kth starting coding feature is the previous coding feature of the kth coding feature.

8. The method according to claim 1, characterized in that The determining of the weighted features of the feature interval based on the coding features included in the feature interval and the clustering weights of the coding features includes: Normalizing the clustering weights of the coding features included in the feature interval to obtain normalized weights; Based on the normalized weight, the encoding feature is weighted to obtain the weighted feature of the feature interval.

9. A speech processing device, characterized in that: The device comprises: The encoding module is used to encode N speech frames of the speech data to be processed, obtain N encoding features, and determine the clustering weight of each encoding feature, where one speech frame corresponds to one encoding feature, and N is an integer greater than 1; A partitioning module, configured to partition the N coding features into M feature intervals based on a clustering weight of each coding feature, where M is an integer greater than or equal to 1, and M is less than or equal to N; A determination module, configured to determine, for each feature interval, a weighted feature of the feature interval based on the coding features included in the feature interval and the clustering weights of the coding features; The decoding module is used to decode the weighted features of the M feature intervals to obtain the speech processing result of the speech data to be processed.

10. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions; A processor, configured to implement the method according to any one of claims 1 to 8 when executing the computer executable instructions stored in the memory.

11. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer programs are executed by a processor, the method according to any one of claims 1 to 8 is implemented.

12. A computer program product comprising computer executable instructions or a computer program, characterized in that: When the computer executable instructions or computer programs are executed by a processor, the method according to any one of claims 1 to 8 is implemented.