Speech segmentation method, device, computer equipment and medium based on speech speed adjustment
Through the speech segmentation model that performs frame processing and speech speed adjustment of speech data, dynamically adjusts the segmentation parameters, the problem of inaccurate speech endpoint detection in the prior art is solved, and the accuracy of speech recognition is improved.
Patent Information
- Application Number
- CN202210551746.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-18
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2042-05-18
AI Technical Summary
The existing speech endpoint detection method fails to segment according to the user's speech speed, resulting in inaccurate sentence segmentation, affecting the accuracy of speech recognition.
By obtaining the to-process speech data, inputting the trained speech segmentation model after frame processing, using the current slicing parameters of the speech segmentation model for speech segmentation, and adjusting the slicing parameters according to the speech speed of the current voice segment, dynamically adjusting the slicing parameters at the next moment until the speech data segmentation is completed.
It improves the accuracy of speech sync endpoint detection, improves the accuracy of speech recognition, and adapts to the speech speed changes of different users.
Smart Images

Figure CN114783423B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a speech segmentation method, apparatus, computer equipment, and medium based on speech rate adjustment. Background Art
[0002] With the development of human-computer interaction technology, speech recognition technology has become increasingly important. Segmenting speech files is a critical issue in speech recognition systems, as longer speech files consume significant system resources during the speech recognition conversion process and can result in low recognition accuracy. The key to segmenting speech files lies in speech endpoint detection, which locates the starting and ending points of a speech segment in a continuous speech signal. The accuracy of endpoint detection directly impacts the system's speech recognition results. Errors in speech segmentation can significantly deviate from speech signal recognition, potentially rendering speech recognition impossible.
[0003] However, current speech endpoint detection methods primarily rely on acquiring energy in the time or frequency domain and comparing it with a given threshold to determine the start and end points of speech. This approach fails to identify segmentation endpoints based on the user's speaking speed, leading to inaccurate sentence segmentation and, in turn, impacting speech recognition accuracy. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to propose a speech segmentation method, device, computer equipment and medium based on speech rate adjustment, so as to solve the technical problem in the related technology that speech endpoint detection does not identify the segmentation endpoint according to the user's speech rate, resulting in inaccurate sentence segmentation, which in turn affects the accuracy of speech recognition.
[0005] In order to solve the above technical problems, the present application provides a speech segmentation method based on speech rate adjustment, which adopts the following technical solutions:
[0006] Acquire speech data to be processed, and perform frame processing on the speech data to be processed to obtain speech frames;
[0007] Inputting the speech frame into the trained speech segmentation model, performing speech segmentation on the speech data to be processed at the current moment based on the current segmentation parameters of the speech segmentation model to obtain a current speech segment;
[0008] Adjusting the current segmentation parameter according to the speaking speed of the current speech segment to obtain the segmentation parameter at the next moment;
[0009] Based on the next moment segmentation parameter, the speech data to be processed at the next moment is speech segmented by the speech segmentation model until the segmentation of the speech data to be processed is completed, and the target speech segment is output.
[0010] Furthermore, the speech segmentation model includes at least a feature extraction layer, a recognition segmentation layer, and an output layer. The step of performing speech segmentation on the speech data to be processed at the current moment based on the current segmentation parameters of the speech segmentation model to obtain the current speech segment includes:
[0011] Extracting speech features of the speech frame of the speech data to be processed at the current moment through the feature extraction layer;
[0012] Outputting the speech features to the recognition segmentation layer, determining speech segmentation endpoints based on the current segmentation parameters and the speech features, and generating a speech frame sequence to be recognized according to the speech segmentation endpoints;
[0013] The speech frame sequence to be recognized is input into the output layer, and the current speech segment is output.
[0014] Furthermore, the speech segmentation model further includes a parameter adjustment layer, and the step of adjusting the current segmentation parameter according to the speech speed of the current speech segment to obtain the segmentation parameter at the next moment includes:
[0015] Calculating the current speaking rate corresponding to the current voice segment through the parameter adjustment layer;
[0016] The current segmentation parameter is adjusted according to the current speech rate to be the segmentation parameter at the next moment.
[0017] Furthermore, the current segmentation parameter is a current silence duration parameter, and the step of adjusting the current segmentation parameter to a segmentation parameter for the next moment according to the current speech rate includes:
[0018] Comparing the current speaking rate with a preset speaking rate to obtain a comparison result;
[0019] If the comparison result falls within the preset range, the current silence duration parameter is used as the next moment segmentation parameter;
[0020] If the comparison result is not within the preset range, the current silence duration parameter is adjusted according to the current speech rate to obtain the next moment segmentation parameter.
[0021] Furthermore, before the step of inputting the speech frame into the trained speech segmentation model, the method further includes:
[0022] Construct an initial speech segmentation model;
[0023] Acquire a training sample set, wherein the training sample set is marked with voice endpoints;
[0024] Inputting the training sample set into the initial speech segmentation model and outputting a segmentation result;
[0025] The model parameters of the initial speech segmentation model are updated according to the segmentation result until the model converges to obtain a speech segmentation model.
[0026] Furthermore, after the step of obtaining the voice data to be processed, the method further includes:
[0027] Performing denoising processing on the speech data to be processed.
[0028] Furthermore, based on the next moment segmentation parameter, the speech data to be processed at the next moment is segmented by the speech segmentation model until the segmentation of the speech data to be processed is completed, and after the step of outputting the target speech segment, the step further includes:
[0029] Perform speech recognition processing on the target speech segment to obtain a speech recognition result corresponding to the speech data to be processed.
[0030] In order to solve the above technical problems, the embodiment of the present application further provides a speech segmentation device based on speech rate adjustment, which adopts the following technical solution:
[0031] An acquisition module is used to acquire the voice data to be processed, and perform frame processing on the voice data to be processed to obtain voice frames;
[0032] A first segmentation module is configured to input the speech frame into a trained speech segmentation model, perform speech segmentation on the speech data to be processed at a current moment based on current segmentation parameters of the speech segmentation model, and obtain a current speech segment;
[0033] An adjustment module, configured to adjust the current segmentation parameter according to the speech rate of the current speech segment to obtain a segmentation parameter at a next moment;
[0034] The second segmentation module is used to perform speech segmentation on the speech data to be processed at the next moment through the speech segmentation model based on the next moment segmentation parameter until the speech data to be processed is segmented and output a target speech segment.
[0035] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0036] The computer device includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the speech segmentation method based on speech rate adjustment as described above when executing the computer-readable instructions.
[0037] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0038] The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the speech segmentation method based on speech rate adjustment as described above.
[0039] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0040] The present application obtains the voice data to be processed and performs frame processing on the voice data to be processed to obtain voice frames; inputs the voice frames into the trained voice segmentation model, performs voice segmentation on the voice data to be processed at the current moment based on the current segmentation parameters of the voice segmentation model to obtain the current voice segment; adjusts the current segmentation parameters according to the speaking speed of the current voice segment to obtain the segmentation parameters for the next moment; based on the segmentation parameters for the next moment, performs voice segmentation on the voice data to be processed at the next moment through the voice segmentation model until the segmentation of the voice data to be processed is completed, and outputs the target voice segment; the present application adjusts the segmentation parameters of the voice segmentation model according to the speaking speed, performs voice segmentation on the voice data to be processed based on the adjusted segmentation parameters, that is, adjusts the segmentation parameters for the segmentation of the next voice segment according to the speaking speed of the previous voice segment in the voice data, so as to realize dynamic modification of the voice segmentation endpoint according to the user's speaking speed, improve the accuracy of the voice segmentation endpoint detection, and thereby improve the accuracy of speech recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the solutions in this application, a brief introduction will be given below to the drawings required for use in the description of the embodiments of this application. Obviously, the drawings described below are some embodiments of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0042] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0043] Figure 2 is a flow chart of an embodiment of a speech segmentation method based on speech rate adjustment according to the present application;
[0044] Figure 3 1 is a structural diagram of an embodiment of a speech segmentation device based on speech rate adjustment according to the present application;
[0045] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of the application are for the purpose of describing specific embodiments only and are not intended to limit this application. The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of this application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0047] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0048] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0049] This application provides a speech segmentation method based on speech speed adjustment, involving artificial intelligence, which can be applied to Figure 1 In the illustrated system architecture 100, the system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 is used as a medium for providing communication links between the terminal devices 101, 102, and 103 and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0050] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0051] Terminal devices 101, 102, and 103 can be various electronic devices with display screens and support web browsing, including but not limited to smartphones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV), laptop computers, desktop computers, etc.
[0052] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0053] It should be noted that the speech segmentation method based on speech rate adjustment provided in the embodiment of the present application is generally executed by a server / terminal device. Accordingly, the speech segmentation device based on speech rate adjustment is generally set in the server / terminal device.
[0054] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0055] Continue to refer Figure 2 , shows a flow chart of an embodiment of a speech segmentation method based on speech rate adjustment according to the present application, comprising the following steps:
[0056] Step S201: Acquire speech data to be processed, and perform frame processing on the speech data to be processed to obtain speech frames.
[0057] In this embodiment, the voice data to be processed may be voice data directly collected from a user input, or may be a piece of recorded data, or may be audio data extracted from a piece of video data, and there is no limitation here.
[0058] It should be noted that the voice data to be processed refers to long-term audio data that can be segmented to obtain multiple segments of independent target audio data; the above-mentioned segmentation of the voice data to be processed refers to dividing the voice data to be processed into multiple audio segments at the pauses of the voice data to be processed.
[0059] In this embodiment, the voice data to be processed is framed. A voice signal is a non-stationary, time-varying signal, but it can be considered stable and time-invariant within a short timeframe. This short timeframe is typically 10-30 ms. Therefore, when processing the voice signal, to reduce the impact of the overall non-stationary and time-varying nature of the voice signal, the voice signal is segmented. Each segment is called a frame, and the frame length is typically 25 ms. To ensure smooth transitions between frames and maintain continuity, framing generally uses overlapping segmentation, ensuring that adjacent frames partially overlap. The time difference between the starting positions of two adjacent frames is called the frame shift. In practice, the frame shift can be 10 ms. It should be understood that the frame length and frame shift mentioned here are merely exemplary and are not specifically limited in this embodiment.
[0060] It should be emphasized that in order to further ensure the privacy and security of the voice data to be processed, the above-mentioned voice data to be processed can also be stored in a node of a blockchain.
[0061] The blockchain referred to in this application is a new application model for computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Blockchain is essentially a decentralized database, a series of data blocks generated using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of this information (to prevent counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer.
[0062] Step S202: Input the speech frame into the trained speech segmentation model, perform speech segmentation on the speech data to be processed at the current moment based on the current segmentation parameters of the speech segmentation model, and obtain the current speech segment.
[0063] In this embodiment, the speech frames are input into a trained speech segmentation model in chronological order, wherein the speech segmentation model includes a feature extraction layer, a recognition segmentation layer, and an output layer.
[0064] The above-mentioned step of performing speech segmentation on the speech data to be processed at the current moment based on the current segmentation parameters of the speech segmentation model includes:
[0065] Extracting speech features of the speech frame of the speech data to be processed at the current moment through the feature extraction layer;
[0066] Output the speech features to the recognition segmentation layer, determine the speech segmentation endpoint based on the current segmentation parameters and speech features, and generate a speech frame sequence to be recognized according to the speech segmentation endpoint;
[0067] The speech frame sequence to be recognized is input into the output layer, and the current speech segment is output.
[0068] Among them, the feature extraction layer is used to extract speech features of speech frames. Speech features may include Mel Frequency Cepstrum Coefficients (MFCCs), first-order difference MFCCs, and second-order difference MFCCs. Specifically, the feature extraction layer performs Fast Fourier Transform (FFT) on all input speech frames, that is, converts the speech signal corresponding to the time domain into an energy spectrum in the frequency domain, passes the energy spectrum through a set of Mel-scale triangular filter banks to highlight the formant characteristics of the speech, and then calculates the logarithmic energy of the output of each filter bank. After the logarithmic energy is calculated, the MFCC can be obtained through Discrete Fourier Transform (DFT).
[0069] The speech features are input into the recognition segmentation layer for speech endpoint detection to determine the speech segmentation endpoints. The speech data to be processed at the current moment is segmented according to the speech segmentation endpoints to generate a sequence of speech frames to be recognized. The output layer calculates the sequence of speech frames to be recognized and outputs the current speech segment obtained by segmentation at the current moment.
[0070] Speech is a typical time series signal. Recurrent Neural Networks (RNN), especially Long Short-Term Memory (LSTM) recurrent neural networks, have strong time series modeling capabilities and are suitable for speech signal recognition. Based on this, in this embodiment, the recognition segmentation layer can adopt an LSTM network. Specifically, a bidirectional Bi-LSTM layer can be adopted. For the input speech frame, two independent hidden layer representations are obtained by using sequential and reverse recurrent neural networks respectively. Then, certain calculations are performed on these two hidden layer representations (splicing or adding them together) to obtain a final hidden layer representation, which is sent to the output layer for subsequent calculations. This hidden layer representation contains the speech information from both the previous moment and the next moment.
[0071] In this embodiment, the recognition segmentation layer classifies each speech frame based on speech features. Speech frame types include, but are not limited to, unvoiced, voiced, noise, and silence. Unvoiced and voiced are valid speech frames, which are the parts that require speech recognition. Specifically, the recognition segmentation layer outputs a classification result for each speech feature. Based on the classification result, the probability of the speech feature being classified as unvoiced, voiced, noise, or silence is determined. Based on this probability, the probability of the speech frame being a valid speech frame is determined, and the starting and ending points of the speech segment are determined.
[0072] Step S203: adjusting the current segmentation parameters according to the speaking speed of the current speech segment to obtain the segmentation parameters for the next moment.
[0073] In this embodiment, the current segmentation parameters are the segmentation parameters after the speech segmentation model is adjusted at the previous moment. If the current moment is the first time that the processed speech data is segmented, the current segmentation parameters are the parameters obtained after the speech segmentation model training is completed.
[0074] In this embodiment, the speech segmentation model also includes a parameter adjustment layer, which calculates the current speaking speed corresponding to the current speech segment through the parameter adjustment layer. The current speaking speed is the number of words contained in the current speech segment / the length of the current speech segment. The number of words and the length corresponding to the current speech segment are determined through the parameter adjustment layer, and the current speaking speed of the current speech segment is calculated. According to the current speaking speed, the current segmentation parameters of the speech segmentation model are adjusted to the segmentation parameters at the next moment.
[0075] In this embodiment, the speech segmentation endpoints can be dynamically adjusted by adjusting the segmentation parameters, making the speech segmentation more accurate.
[0076] In some optional implementations, the current segmentation parameter is a current silence duration parameter, and the step of adjusting the current segmentation parameter to a segmentation parameter for the next moment according to the current speech rate includes:
[0077] Compare the current speaking speed with the preset speaking speed to obtain a comparison result;
[0078] If the comparison result falls within the preset range, the current silence duration parameter is used as the next moment segmentation parameter;
[0079] If the comparison result is not within the preset range, the current silence duration parameter is adjusted according to the current speaking speed to obtain the next moment segmentation parameter.
[0080] In this embodiment, the preset speaking speed is the speaking speed at the previous moment or the speaking speed obtained after the speech segmentation model training is completed according to the silence duration parameter.
[0081] Compare the difference between the current speaking speed and the preset speaking speed. If the difference falls within the preset range, there is no need to adjust the silence duration parameter. If the difference exceeds the preset range, adjust the silence duration parameter according to the current speaking speed and use the adjusted silence duration parameter as the next moment segmentation parameter.
[0082] For example, if the speaking rate is 10 words per second, adjust the silence duration parameter to 1.0 second. This means that the next silence segment must be longer than 1.0 second before it is considered silence and segmented into independent speech segments. If the silence segment is less than or equal to 1.0 second, it does not need to be segmented independently.
[0083] This embodiment can dynamically adjust the segmentation parameters according to the user's speaking speed, that is, dynamically adjust the speech segmentation endpoints to avoid premature recognition of the user's speech content when the user speaks too fast, resulting in inaccurate speech recognition.
[0084] Step S204: Based on the segmentation parameters at the next moment, the speech data to be processed at the next moment is segmented by the speech segmentation model until the segmentation of the speech data to be processed is completed, and the target speech segment is output.
[0085] In this embodiment, the speech segmentation model performs speech segmentation on the speech data to be processed input at the next moment according to the next moment segmentation parameter. The speech segmentation method is as described in step S202 and will not be repeated here.
[0086] In this embodiment, the completion of the segmentation of the pending voice data is determined by detecting the end of the voice signal of the pending voice data using the voice segmentation model. Specifically, the voice segmentation model detects the pending voice data based on a dual-threshold endpoint detection method. The detection process can be performed simultaneously with the voice segmentation process. When the end of the user input voice data is detected, an end signal is output.
[0087] This application adjusts the segmentation parameters of the speech segmentation model according to the speaking speed, and performs speech segmentation on the speech data to be processed based on the adjusted segmentation parameters. That is, according to the speaking speed of the previous speech segment in the speech data, the segmentation parameters of the next speech segment are adjusted. This can achieve dynamic modification of the speech segmentation endpoint according to the user's speaking speed, improve the accuracy of speech segmentation endpoint detection, and thus improve the accuracy of speech recognition.
[0088] In some optional implementations of this embodiment, the following steps may be performed before inputting the speech frame into the trained speech segmentation model in step 202:
[0089] Construct an initial speech segmentation model;
[0090] Obtaining a training sample set, wherein the training sample set is marked with voice endpoints;
[0091] Input the training sample set into the initial speech segmentation model and output the segmentation results;
[0092] The model parameters of the initial speech segmentation model are updated according to the segmentation results until the model converges to obtain a speech segmentation model.
[0093] Specifically, a training sample set can be obtained from a speech database, and each sentence of the speech data in the training sample set is marked with the starting position and the ending position of the sentence. The training sample set is input into the constructed initial speech segmentation model for training. During the training process, the segmentation results output by each initial speech segmentation model are compared with the corresponding calibrated input sentences to determine whether the segmentation results output by the speech segmentation model are accurate. If they are inaccurate, the model parameters of the speech segmentation model are adjusted and updated, and the above training process is repeated until the adjusted speech segmentation model can output relatively accurate segmentation results, that is, the model converges, and finally a trained speech segmentation model is obtained.
[0094] It should be noted that the speech segmentation model can be pre-configured or has been trained in other links and can be directly called in this embodiment.
[0095] In this embodiment, the speech data is segmented by training the speech segmentation model, which can improve the accuracy and efficiency of speech segmentation.
[0096] In some optional implementations, after the above step of obtaining the voice data to be processed, the method further includes:
[0097] Perform denoising on the speech data to be processed.
[0098] Due to interference from environmental noise and signals from other devices, the input speech contains noise, which can affect speech recognition accuracy. De-noising is necessary in some scenarios, including road noise, restaurant noise, fan noise, and station noise. For example, telephone speech may contain noise from various scenarios. Effective speech detection and denoising can be performed using methods such as energy detection and channel crosstalk. Alternatively, a pre-trained noise reduction model can be used. Specifically, noise power spectrum is used to classify noise from a preset noise library, and the model is trained to obtain noise reduction models corresponding to various noise types.
[0099] In this embodiment, by denoising the speech data to be processed, the accuracy of subsequent speech segmentation can be improved.
[0100] In some optional implementations of this embodiment, after performing speech segmentation on the speech data to be processed at the next moment based on the next moment segmentation parameter by the speech segmentation model until the speech data to be processed is segmented, the step of outputting the target speech segment further includes:
[0101] Perform speech recognition processing on the target speech segment to obtain the speech recognition result corresponding to the speech data to be processed.
[0102] In this embodiment, speech recognition of speech data can be achieved by using automatic speech recognition (ASR) technology, that is, a speech segment can be input into a speech recognition model, and the speech segment is processed by the speech recognition model, that is, the speech segment is converted into corresponding text, and then the text output by the speech recognition model is obtained. The speech recognition model can be a traditional speech recognition model obtained in advance, or it can be a pre-trained one.
[0103] In some optional implementations, the speech segmentation model and the speech recognition model are iteratively jointly trained based on the training sample set. In each round of training, the model parameters of the speech segmentation model and / or the speech recognition model are adjusted according to the joint loss function of the speech segmentation model and the speech recognition model until the joint loss function meets the convergence condition to obtain the trained speech segmentation model and speech recognition model.
[0104] Through these training methods, the trained speech segmentation model and speech recognition model can be guaranteed to have a high detection accuracy, thereby ensuring the accuracy of the speech endpoint detection results and speech recognition results.
[0105] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0106] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results.
[0107] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0108] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware via computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes in the above-described method embodiments. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0109] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0110] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a speech segmentation device based on speech speed adjustment, which is similar to the embodiment of the present invention. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0111] like Figure 3 As shown, the speech segmentation device 300 based on speech rate adjustment in this embodiment includes: an acquisition module 301, a first segmentation module 302, an adjustment module 303 and a second segmentation module 304.
[0112] The acquisition module 301 is used to acquire the speech data to be processed, and perform frame processing on the speech data to be processed to obtain speech frames;
[0113] The first segmentation module 302 is used to input the speech frame into the trained speech segmentation model, and perform speech segmentation on the speech data to be processed at the current moment based on the current segmentation parameters of the speech segmentation model to obtain the current speech segment;
[0114] The adjustment module 303 is used to adjust the current segmentation parameters according to the speech rate of the current speech segment to obtain the segmentation parameters at the next moment;
[0115] The second segmentation module 304 is used to perform speech segmentation on the speech data to be processed at the next moment based on the segmentation parameters at the next moment through the speech segmentation model until the segmentation of the speech data to be processed is completed and the target speech segment is output.
[0116] It should be emphasized that in order to further ensure the privacy and security of the voice data to be processed, the above-mentioned voice data to be processed can also be stored in a node of a blockchain.
[0117] The above-mentioned speech segmentation device based on speech speed adjustment adjusts the segmentation parameters of the speech segmentation model according to the speech speed, and performs speech segmentation on the speech data to be processed based on the adjusted segmentation parameters, that is, according to the speech speed of the previous speech segment in the speech data, the segmentation parameters of the next speech segment are adjusted. This can realize dynamic modification of the speech segmentation endpoint according to the user's speech speed, improve the accuracy of speech segmentation endpoint detection, and thus improve the accuracy of speech recognition.
[0118] In this embodiment, the first segmentation module includes a feature extraction submodule, an identification segmentation submodule, and an output submodule, wherein:
[0119] The feature extraction submodule is used to extract the speech features of the speech frame of the speech data to be processed at the current moment through the feature extraction layer;
[0120] The recognition segmentation submodule is used to output the speech features to the recognition segmentation layer, determine the speech segmentation endpoints based on the current segmentation parameters and the speech features, and generate a speech frame sequence to be recognized according to the speech segmentation endpoints;
[0121] The output submodule is used to input the speech frame sequence to be recognized into the output layer and output the current speech segment.
[0122] In this embodiment, the adjustment module 303 includes a calculation submodule and an adjustment submodule, wherein the calculation submodule is used to calculate the current speaking rate corresponding to the current voice segment through the parameter adjustment layer; the adjustment submodule is used to adjust the current segmentation parameter to the segmentation parameter at the next moment according to the current speaking rate.
[0123] In some optional implementations, the adjustment submodule is further configured to:
[0124] Comparing the current speaking rate with a preset speaking rate to obtain a comparison result;
[0125] If the comparison result falls within the preset range, the current silence duration parameter is used as the next moment segmentation parameter;
[0126] If the comparison result is not within the preset range, the current silence duration parameter is adjusted according to the current speech rate to obtain the next moment segmentation parameter.
[0127] This embodiment can dynamically adjust the segmentation parameters according to the user's speaking speed, that is, dynamically adjust the voice segmentation endpoints to avoid premature recognition of the user's voice content when the user speaks too fast, resulting in inaccurate recognition.
[0128] In some optional implementations, the speech segmentation apparatus based on speech rate adjustment further includes a training module for:
[0129] Construct an initial speech segmentation model;
[0130] Acquire a training sample set, wherein the training sample set is marked with voice endpoints;
[0131] Inputting the training sample set into the initial speech segmentation model and outputting a segmentation result;
[0132] The model parameters of the initial speech segmentation model are updated according to the segmentation result until the model converges to obtain a speech segmentation model.
[0133] In this embodiment, the speech data is segmented by training the speech segmentation model, which can improve the accuracy and efficiency of speech segmentation.
[0134] In some optional implementations of this embodiment, the acquisition module further includes a denoising submodule, which is configured to perform denoising on the speech data to be processed.
[0135] In this embodiment, by denoising the speech data to be processed, the accuracy of subsequent speech segmentation can be improved.
[0136] In this embodiment, the speech segmentation device based on speech rate adjustment further includes a recognition module, which is used to perform speech recognition processing on the target speech segment to obtain a speech recognition result corresponding to the speech data to be processed.
[0137] This embodiment can ensure the accuracy of speech recognition by performing speech recognition on the target speech segment.
[0138] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0139] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0140] The computer device may be a desktop computer, notebook computer, PDA, cloud server, etc. The computer device may interact with the user via a keyboard, mouse, remote control, touchpad, or voice control device.
[0141] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (SMC), a secure digital (SD) card, a flash memory card, etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions for a speech segmentation method based on speech rate adjustment. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0142] In some embodiments, the processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute computer-readable instructions or process data stored in the memory 41, such as computer-readable instructions for executing the speech segmentation method based on speech rate adjustment.
[0143] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0144] This embodiment implements the steps of the speech segmentation method based on speech rate adjustment as in the above embodiment when the processor executes computer-readable instructions stored in the memory. By adjusting the segmentation parameters of the speech segmentation model according to the speech rate, speech segmentation is performed on the processed speech data based on the adjusted segmentation parameters, that is, the segmentation parameters of the next speech segment are adjusted according to the speech rate of the previous speech segment in the speech data. This can achieve dynamic modification of the speech segmentation endpoint according to the user's speech rate, improve the accuracy of speech segmentation endpoint detection, and thereby improve the accuracy of speech recognition.
[0145] The present application also provides another embodiment, namely, providing a computer-readable storage medium, which stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the speech segmentation method based on speech rate adjustment as described above, by adjusting the segmentation parameters of the speech segmentation model according to the speech rate, and performing speech segmentation on the processed speech data based on the adjusted segmentation parameters, that is, adjusting the segmentation parameters of the next speech segment according to the speech rate of the previous speech segment in the speech data, so as to realize dynamic modification of the speech segmentation endpoint according to the user's speech rate, improve the accuracy of speech segmentation endpoint detection, and thereby improve the accuracy of speech recognition.
[0146] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0147] Obviously, the embodiments described above are only some of the embodiments of the present application, rather than all of the embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions described in the aforementioned specific embodiments, or to make equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the present application specification and the accompanying drawings, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present application.
Claims
1. A speech segmentation method based on speech rate adjustment, characterized in that: The steps include: Acquire speech data to be processed, and perform frame processing on the speech data to be processed to obtain speech frames; Inputting the speech frame into a trained speech segmentation model, performing speech segmentation on the speech data to be processed at the current moment based on the current segmentation parameters of the speech segmentation model to obtain a current speech segment, wherein the speech segmentation model includes at least a feature extraction layer, a recognition segmentation layer, and an output layer; Adjusting the current segmentation parameter according to the speaking speed of the current speech segment to obtain the segmentation parameter at the next moment; Based on the next moment segmentation parameter, the speech data to be processed at the next moment is segmented by the speech segmentation model until the segmentation of the speech data to be processed is completed, and a target speech segment is output; The step of performing speech segmentation on the speech data to be processed at the current moment based on the current segmentation parameters of the speech segmentation model to obtain the current speech segment comprises: Extracting speech features of the speech frame of the speech data to be processed at the current moment through the feature extraction layer; Outputting the speech features to the recognition segmentation layer, determining speech segmentation endpoints based on the current segmentation parameters and the speech features, and generating a speech frame sequence to be recognized according to the speech segmentation endpoints; Inputting the to-be-recognized speech frame sequence into the output layer and outputting the current speech segment; The speech segmentation model further includes a parameter adjustment layer, and the step of adjusting the current segmentation parameter according to the speech speed of the current speech segment to obtain the segmentation parameter at the next moment includes: Calculating the current speaking rate corresponding to the current voice segment through the parameter adjustment layer; Adjust the current segmentation parameter as the segmentation parameter at the next moment according to the current speech rate; The current segmentation parameter is a current silence duration parameter, and the step of adjusting the current segmentation parameter to a segmentation parameter for the next moment according to the current speech rate includes: Comparing the current speaking speed with a preset speaking speed to obtain a comparison result, where the preset speaking speed is the speaking speed at the previous moment or the speaking speed obtained after the speech segmentation model training is completed and based on the silence duration parameter; If the comparison result falls within the preset range, the current silence duration parameter is used as the next moment segmentation parameter; If the comparison result is not within the preset range, the current silence duration parameter is adjusted according to the current speech rate to obtain the next moment segmentation parameter.
2. The speech segmentation method based on speech rate adjustment according to claim 1, characterized in that: Before the step of inputting the speech frame into the trained speech segmentation model, the method further includes: Construct an initial speech segmentation model; Acquire a training sample set, wherein the training sample set is marked with voice endpoints; Inputting the training sample set into the initial speech segmentation model and outputting a segmentation result; The model parameters of the initial speech segmentation model are updated according to the segmentation result until the model converges to obtain a speech segmentation model.
3. The speech segmentation method based on speech rate adjustment according to claim 1, characterized in that: After the step of obtaining the voice data to be processed, the method further includes: Performing denoising processing on the speech data to be processed.
4. The speech segmentation method based on speech rate adjustment according to any one of claims 1 to 3, characterized in that: The method further comprises: performing speech segmentation on the speech data to be processed at the next moment by using the speech segmentation model based on the next moment segmentation parameter until the speech data to be processed is segmented and the step of outputting the target speech segment is completed. Perform speech recognition processing on the target speech segment to obtain a speech recognition result corresponding to the speech data to be processed.
5. A speech segmentation device based on speech speed adjustment, characterized in that: include: An acquisition module is used to acquire the voice data to be processed, and perform frame processing on the voice data to be processed to obtain voice frames; A first segmentation module is configured to input the speech frame into a trained speech segmentation model, perform speech segmentation on the speech data to be processed at the current moment based on the current segmentation parameters of the speech segmentation model, and obtain a current speech segment, wherein the speech segmentation model includes at least a feature extraction layer, a recognition segmentation layer, and an output layer; An adjustment module, configured to adjust the current segmentation parameter according to the speech rate of the current speech segment to obtain a segmentation parameter at a next moment; A second segmentation module is configured to perform speech segmentation on the speech data to be processed at the next moment by using the speech segmentation model based on the segmentation parameter at the next moment until the segmentation of the speech data to be processed is completed, and output a target speech segment; The first segmentation module includes a feature extraction submodule, an identification segmentation submodule and an output submodule, where: The feature extraction submodule is used to extract the speech features of the speech frame of the speech data to be processed at the current moment through the feature extraction layer; The recognition segmentation submodule is used to output the speech features to the recognition segmentation layer, determine the speech segmentation endpoints based on the current segmentation parameters and the speech features, and generate a speech frame sequence to be recognized according to the speech segmentation endpoints; The output submodule is used to input the speech frame sequence to be recognized into the output layer and output the current speech segment; The speech segmentation model also includes a parameter adjustment layer, and the adjustment module includes a calculation submodule and an adjustment submodule, wherein: The calculation submodule is used to calculate the current speaking rate corresponding to the current voice segment through the parameter adjustment layer; The adjustment submodule is used to adjust the current segmentation parameter to the next moment segmentation parameter according to the current speech rate, wherein the current segmentation parameter is the current silence duration parameter; The adjustment submodule is further used to: Comparing the current speaking speed with a preset speaking speed to obtain a comparison result, where the preset speaking speed is the speaking speed at the previous moment or the speaking speed obtained after the speech segmentation model training is completed and based on the silence duration parameter; If the comparison result falls within the preset range, the current silence duration parameter is used as the next moment segmentation parameter; If the comparison result is not within the preset range, the current silence duration parameter is adjusted according to the current speech rate to obtain the next moment segmentation parameter.
6. A computer device comprising a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the speech segmentation method based on speech rate adjustment as described in any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the speech segmentation method based on speech rate adjustment according to any one of claims 1 to 4.
Citation Information
Patent Citations
Voice end detection method, device, terminal and storage medium
CN109767792A
Voice sentence segmentation method and device, computer equipment and storage medium
CN113436617A