Two-stage speech recognition method, device, computer equipment and readable storage medium

Through the two-stage speech recognition method, comprehensive analysis of different detection thresholds and deep learning models are used to solve the problem of low speech recognition accuracy in complex noise environments and achieve higher recognition accuracy and noise removal effects.

CN118248133BActive Publication Date: 2024-09-20DMAI (GUANGZHOU) CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202410658621.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2024-09-20
Estimated Expiration
2044-05-27

AI Technical Summary

Technical Problem

Existing speech recognition methods have low recognition accuracy in complex noise environments. Traditional human voice detection methods are not ideal and difficult to effectively distinguish between speech and noise.

Method used

Using a two-stage speech recognition method, the pre-trained human voice detection model is used to perform human voice detection under different detection thresholds. Through comprehensive analysis of the first human voice detection result and the second human voice detection result, the target human voice detection result is determined. And perform speech recognition, using the memory module and deep learning model based on the feed-forward fully connected network to screen and identify the vocal timing segments.

Benefits of technology

It improves the accuracy of speech recognition in complex noise environments, can more accurately identify human voice signals, reduces noise interference, and enhances the accuracy and reliability of speech recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118248133B
    Figure CN118248133B
Patent Text Reader

Abstract

The present invention discloses a two-stage speech recognition method, device, computer equipment and readable storage medium, comprising: first obtaining audio containing speech to be recognized and background noise, then using a pre-trained human voice detection model to perform human voice detection under different detection thresholds, and respectively obtaining a first human voice detection result with a high threshold and a second human voice detection result with a low threshold. By comprehensively analyzing these two results, the target human voice detection result is determined. Finally, speech recognition is performed on this result to obtain an accurate speech recognition result. With such a design, through two-stage human voice detection, the accuracy of speech recognition in a complex noise environment is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of speech processing, and in particular to a two-stage speech recognition method, device, computer equipment and readable storage medium. Background Art

[0002] With the advancement of science and technology, speech recognition technology plays an increasingly important role in various applications, such as smart homes and autonomous driving. However, in practical applications, speech recognition systems are often interfered by background noise, resulting in a decrease in recognition accuracy. In order to solve this problem, existing speech recognition methods usually use certain human voice detection technologies to distinguish between speech and noise. However, traditional human voice detection methods do not work well in complex noisy environments. Therefore, it is particularly important to develop a method that can effectively improve the accuracy of speech recognition in noisy environments. Summary of the invention

[0003] The object of the present invention is to provide a two-stage speech recognition method, apparatus, computer equipment and readable storage medium.

[0004] In a first aspect, an embodiment of the present invention provides a two-stage speech recognition method, comprising:

[0005] Acquire audio to be recognized, where the audio to be recognized includes speech to be recognized and background noise;

[0006] Calling a pre-trained human voice detection model, performing human voice detection on the audio to be recognized according to different detection thresholds, and obtaining a first human voice detection result and a second human voice detection result, wherein the detection threshold of the first human voice detection result is higher than the detection threshold of the second human voice detection result;

[0007] Determine a target human voice detection result according to the first human voice detection result and the second human voice detection result;

[0008] Perform speech recognition on the target human voice detection result to obtain a target speech recognition result corresponding to the speech to be recognized.

[0009] In an embodiment of the present invention, the pre-trained human voice detection model is obtained by training based on a preset feedforward fully connected network, the hidden layer of the preset feedforward fully connected network includes a memory module, and the pre-trained human voice detection model is called to perform human voice detection on the audio to be recognized according to different detection thresholds to obtain a first human voice detection result and a second human voice detection result, including:

[0010] Calling a pre-trained human voice detection model and setting a first detection threshold and a second detection threshold, wherein the first detection threshold is greater than the second detection threshold;

[0011] Inputting the audio to be recognized into the human voice detection model, and obtaining a plurality of first speech time sequence segments as the first human voice detection result through the trained memory module according to the first detection threshold;

[0012] The audio to be recognized is input into the human voice detection model, and a plurality of second speech time sequence segments are obtained as the second human voice detection results through the trained memory module according to the second detection threshold.

[0013] In the embodiment of the present invention, determining a target human voice detection result according to the first human voice detection result and the second human voice detection result includes:

[0014] The plurality of first speech time sequence segments are used to screen the plurality of second speech time sequence segments to obtain the target human voice detection result.

[0015] In the embodiment of the present invention, the step of screening the plurality of second voice time sequence segments by using the plurality of first voice time sequence segments to obtain the target human voice detection result includes:

[0016] Intersecting each second speech time sequence segment in the plurality of second speech time sequence segments with each first speech time sequence segment in the plurality of first speech time sequence segments in sequence;

[0017] The second speech time sequence segments with intersection are retained, and the first speech time sequence segments without intersection are deleted, so as to obtain at least one undetermined speech time sequence segment;

[0018] The at least one pending speech time sequence segment is used as the target human voice detection result.

[0019] In the embodiment of the present invention, performing speech recognition on the target human voice detection result to obtain a target speech recognition result corresponding to the speech to be recognized includes:

[0020] Call the pre-trained speech recognition model;

[0021] Inputting the target human voice detection result into the speech recognition model to obtain text content corresponding to the target human voice detection result;

[0022] The text content is used as the target speech recognition result.

[0023] In an embodiment of the present invention, the pre-trained speech recognition model called is a speech recognition model based on a non-autoregressive model, or an autoregressive speech recognition model, or an end-to-end deep speech recognition model.

[0024] In an embodiment of the present invention, the method further includes:

[0025] In response to a feedback operation on the target speech recognition result, model parameters of the speech recognition model are optimized and adjusted.

[0026] In a second aspect, an embodiment of the present invention provides a two-stage speech recognition device, comprising:

[0027] An acquisition module, used for acquiring audio to be recognized, wherein the audio to be recognized includes speech to be recognized and background noise;

[0028] The recognition module is used to call a pre-trained human voice detection model, perform human voice detection on the audio to be recognized according to different detection thresholds, and obtain a first human voice detection result and a second human voice detection result, wherein the detection threshold of the first human voice detection result is higher than the detection threshold of the second human voice detection result; determine a target human voice detection result according to the first human voice detection result and the second human voice detection result; perform speech recognition on the target human voice detection result to obtain a target speech recognition result corresponding to the speech to be recognized.

[0029] In a third aspect, an embodiment of the present invention provides a computer device, comprising a processor and a non-volatile memory storing computer instructions, wherein when the computer instructions are executed by the processor, the computer device executes the two-stage speech recognition method described in at least one possible implementation of the first aspect.

[0030] In a fourth aspect, an embodiment of the present invention provides a readable storage medium, wherein the readable storage medium includes a computer program, and when the computer program is executed, the computer device where the readable storage medium is located is controlled to execute the two-stage speech recognition method described in at least one possible implementation manner of the first aspect.

[0031] Compared with the prior art, the beneficial effects provided by the present invention include: adopting the two-stage speech recognition method, device, computer equipment and readable storage medium disclosed in the present invention, by acquiring audio containing the speech to be recognized and background noise, and then using a pre-trained human voice detection model, human voice detection is performed under different detection thresholds, and a first human voice detection result with a high threshold and a second human voice detection result with a low threshold are obtained respectively. By comprehensively analyzing these two results, the target human voice detection result is determined. Finally, speech recognition is performed on this result to obtain an accurate speech recognition result. With such a design, through two-stage human voice detection, the accuracy of speech recognition in a complex noise environment is effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can also be obtained based on these drawings without creative work.

[0033] Figure 1 A schematic diagram of a flow chart of a two-stage speech recognition method provided by an embodiment of the present invention;

[0034] Figure 2 A schematic block diagram of the structure of a two-stage speech recognition device provided by an embodiment of the present invention;

[0035] Figure 3 A schematic block diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0037] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings.

[0038] In order to solve the technical problems in the aforementioned background technology, Figure 1 The following is a flow chart of a two-stage speech recognition method provided in an embodiment of the present disclosure. The two-stage speech recognition method is introduced in detail below.

[0039] Step S201, obtaining audio to be recognized, wherein the audio to be recognized includes speech to be recognized and background noise;

[0040] Step S202, calling a pre-trained human voice detection model, performing human voice detection on the audio to be recognized according to different detection thresholds, and obtaining a first human voice detection result and a second human voice detection result, wherein the detection threshold of the first human voice detection result is higher than the detection threshold of the second human voice detection result;

[0041] Step S203, determining a target voice detection result according to the first voice detection result and the second voice detection result;

[0042] Step S204, performing speech recognition on the target voice detection result to obtain a target speech recognition result corresponding to the speech to be recognized.

[0043] In an embodiment of the present invention, exemplarily, the server obtains an audio file containing a speech to be recognized and background noise from a multimedia file uploaded by a user. For example, a user uploads an audio recording of a conversation in a noisy cafe, which contains not only the user's conversation voice, but also other sounds in the cafe, such as the sound of a coffee machine, other people's conversations, etc. as background noise. The server loads a pre-trained human voice detection model, which can distinguish between human voice and background noise. The server first uses a higher detection threshold to perform human voice detection on the audio and obtains a first human voice detection result. At this high threshold, the model only recognizes the very obvious human voice part in the audio as human voice, and other relatively weak or blurred parts are ignored. Subsequently, the server uses a lower detection threshold to perform human voice detection on the same audio and obtains a second human voice detection result. At this low threshold, the model recognizes more audio parts that are likely to be human voices as human voices, including some relatively weak or short human voices. The server compares the first human voice detection result and the second human voice detection result, and finds that the second human voice detection result contains more audio clips that are likely to be human voices, but it may also contain some background noise parts that are mistakenly identified as human voices. In order to obtain a more accurate voice detection result, the server combines the two detection results and removes the obviously misidentified parts of the second voice detection result through algorithm analysis, retaining more real voice fragments, thereby obtaining the target voice detection result. Finally, the server uses advanced speech recognition technology to recognize the target voice detection result. In this process, the server converts the voice fragments into text information, identifies the content of the user's conversation in the cafe, and returns it to the user as the target voice recognition result. In this way, users can easily obtain the voice content in the audio recorded in a noisy environment.

[0044] In a more detailed implementation, suppose a user is using an intelligent assistant application. He records an audio clip of an interview on the street through the microphone on his mobile phone and uploads it to the server for voice recognition. In addition to the conversation between the interviewer and the interviewee, this audio clip also contains background noise such as vehicle noise and crowd noise on the street. The server receives this audio file to be recognized. On the server, there is a human voice detection model that has been trained with a large amount of voice data. After receiving the audio file uploaded by the user, the server first uses this model to process the audio. In order to more accurately identify the human voice, the server uses two different detection thresholds for human voice detection. First, the server uses a higher detection threshold for processing, which means that the model will only identify those very obvious and strong human voice signals as human voices, and ignore those signals that are relatively weak or interfered by noise. In this way, we get the first human voice detection result, which mainly contains the clearest and most significant human voice part in the audio. Then, the server uses a lower detection threshold to process the audio. This time, the model will identify more signals that may be human voices as human voices, including some relatively weak or short human voice fragments. This results in the second voice detection result containing more voice information, but it may also contain some noise signals that are mistakenly identified as human voices. In order to obtain more accurate voice detection results, the server needs to perform comprehensive processing on the first and second voice detection results. Through comparative analysis, the server found that the second voice detection result does contain more voice information, but there are also some obvious misidentified parts, that is, noise signals are mistakenly identified as human voices. In order to remove these misidentified parts, the server uses an intelligent algorithm that can determine which parts are human voices and which parts are noise based on the characteristics of the audio signal and context information. After the algorithm is processed, we get the target voice detection result, which contains most of the voice information in the audio and effectively removes the interference of noise signals. The last step is to perform speech recognition on the target voice detection result. The server calls a high-performance speech recognition engine that can convert voice signals into text information. During the processing, the engine will identify each word and phrase in the audio based on the acoustic characteristics and language model of the speech signal, and combine them into complete sentences. After the recognition process, the server obtains the target speech recognition result, which is the conversation content in the audio uploaded by the user. This result is returned to the user and displayed on the interface of the smart assistant application. The user can understand the content and details of the interview by reading the recognition result. At the same time, this recognition result can also be used for subsequent text analysis and data mining tasks.

[0045] In an embodiment of the present invention, the pre-trained human voice detection model is obtained by training based on a preset feedforward fully connected network, and the hidden layer of the preset feedforward fully connected network includes a memory module. The aforementioned step S202 can be implemented through the following example.

[0046] Calling a pre-trained human voice detection model and setting a first detection threshold and a second detection threshold, wherein the first detection threshold is greater than the second detection threshold;

[0047] Inputting the audio to be recognized into the human voice detection model, and obtaining a plurality of first speech time sequence segments as the first human voice detection result through the trained memory module according to the first detection threshold;

[0048] The audio to be recognized is input into the human voice detection model, and a plurality of second speech time sequence segments are obtained as the second human voice detection results through the trained memory module according to the second detection threshold.

[0049] In an embodiment of the present invention, exemplarily, a pre-trained human voice detection model is stored on the server, and this model is obtained by training based on a preset feedforward fully connected network. The characteristic of this network structure is that a memory module is included in the hidden layer, so that the model can better process sequence data and capture the time dependency in the audio. Before performing human voice detection, the server first sets two different detection thresholds for this model: a first detection threshold and a second detection threshold. Among them, the first detection threshold is higher and is used to filter out obvious human voice signals in the audio; the second detection threshold is lower and is used to capture more signals that may be human voices. The server inputs the audio to be identified into the human voice detection model and sets the model to use the first detection threshold for processing. When the audio flows through the memory module of the model, those speech time sequence segments that exceed the first detection threshold are marked as human voices, while those below the threshold are ignored. In this way, the server obtains multiple first speech time sequence segments, which constitute the first human voice detection results. These segments mainly contain the most significant and clear human voice parts in the audio. Next, the server inputs the same audio to be identified into the human voice detection model again, but this time a lower second detection threshold is set. During the processing, the model will capture more signals that may be human voices, including some relatively weak or short human voice fragments. Therefore, the server obtains multiple second voice time sequence fragments, which constitute the second human voice detection result. Compared with the first human voice detection result, the second human voice detection result contains more human voice information, but it may also contain some noise signals that are mistakenly identified as human voices. By adjusting the detection threshold and utilizing the memory module in the feedforward fully connected network, the server can more accurately identify the human voice part of the audio to be identified, providing an accurate data basis for subsequent speech recognition.

[0050] In the embodiment of the present invention, the aforementioned step S203 can be implemented through the following example execution.

[0051] The plurality of first speech time sequence segments are used to screen the plurality of second speech time sequence segments to obtain the target human voice detection result.

[0052] In the embodiment of the present invention, illustratively, on the server, we have obtained two groups of human voice detection results: the first voice sequence segment (based on the higher first detection threshold) and the second voice sequence segment (based on the lower second detection threshold). In order to obtain a more accurate target human voice detection result, the server will perform further screening processing.

[0053] Specifically, the server compares and analyzes the first speech time sequence segment with the second speech time sequence segment. Since the first speech time sequence segment is obtained based on a higher threshold, it mainly contains the prominent and clear human voice part in the audio. The second speech time sequence segment contains more human voice information, but may also contain some noise signals.

[0054] During the screening process, the server first checks whether each first voice time sequence segment has a corresponding second voice time sequence segment. If there is a corresponding one, it means that this part of the human voice is recognized under both thresholds, so its reliability is high and should be retained in the target human voice detection result.

[0055] For those vocal parts that only appear in the second speech sequence segment but not in the first speech sequence segment, the server will perform a more detailed analysis. If the strength and stability of this part of the vocal signal meet certain standards, it will also be added to the target vocal detection result. This is because although these parts are ignored in the first detection, they may still contain valid vocal information because their strength or clarity is slightly lower than the first detection threshold.

[0056] Through this method, the server can take advantage of the advantages of both detection results, retaining the prominent and clear human voice part while capturing as many possible signals as possible. The final target human voice detection result will be more accurate and comprehensive, providing a high-quality data foundation for subsequent speech recognition.

[0057] For example, in an audio clip containing background music and multiple people talking, through this screening method, the server can more accurately identify each person's voice clip while ignoring the interference of background music. This is crucial for subsequent speech recognition and text conversion.

[0058] In the embodiment of the present invention, the aforementioned step of screening the plurality of second voice timing segments by using the plurality of first voice timing segments to obtain the target human voice detection result can be implemented through the following example.

[0059] Intersecting each second speech time sequence segment in the plurality of second speech time sequence segments with each first speech time sequence segment in the plurality of first speech time sequence segments in sequence;

[0060] The second speech time sequence segments with intersection are retained, and the first speech time sequence segments without intersection are deleted, so as to obtain at least one undetermined speech time sequence segment;

[0061] The at least one pending speech time sequence segment is used as the target human voice detection result.

[0062] In an embodiment of the present invention, exemplarily, a plurality of first voice sequence segments and a plurality of second voice sequence segments are stored on the server. These segments represent the human voice parts identified under different detection thresholds. In order to obtain a more accurate target human voice detection result, the server will perform an intersection operation. Specifically, the server will compare each second voice sequence segment with all first voice sequence segments to see whether there is an overlapping or intersecting part between them. This intersection process is like finding a common area of ​​two segments on the timeline. For example, suppose that there is a second voice sequence segment from the 5th second to the 10th second, and a first voice sequence segment from the 7th second to the 12th second. These two segments have overlapping parts on the timeline, namely, from the 7th second to the 10th second, so they have an intersection. After completing the intersection operation, the server will check whether each second voice sequence segment has an intersection with at least one first voice sequence segment. If there is an intersection, it means that this second voice sequence segment is identified as a human voice under two different detection thresholds, so its reliability is high and should be retained. For those first voice timing segments that have no intersection with all second voice timing segments, the server will delete them. These segments may be misidentified due to noise or other interference factors, so they should not be included in the target human voice detection results. After the above screening process, what remains on the server are the second voice timing segments that have intersections with at least one first voice timing segment. These segments are called "pending voice timing segments" because they have passed the preliminary screening but still need further processing and verification. Finally, the server will use all pending voice timing segments as the final target human voice detection results. These segments represent the most reliable and significant human voice parts in the audio, providing a high-quality data foundation for subsequent speech recognition. For example, in an audio containing multiple people's conversations and background noise, through this screening method, the server can more accurately identify each person's voice segment and eliminate the interference of background noise. This is crucial for subsequent speech recognition and text conversion, which can improve the accuracy and efficiency of recognition. In addition, in an embodiment of the present invention, if each second voice timing segment in the multiple second voice timing segments is intersected with each first voice timing segment in the multiple first voice timing segments in turn, and it is found that there is no intersection, voice recognition will not be performed, and feedback will be recorded.

[0063] In the embodiment of the present invention, the aforementioned step S204 may be implemented through the following example execution.

[0064] Call the pre-trained speech recognition model;

[0065] Inputting the target human voice detection result into the speech recognition model to obtain text content corresponding to the target human voice detection result;

[0066] The text content is used as the target speech recognition result.

[0067] In an embodiment of the present invention, exemplarily, a pre-trained speech recognition model is stored on the server. This model has been trained with a large amount of speech data and has the ability to convert speech signals into text. When the server needs to perform speech recognition on the target voice detection result, it will first call this pre-trained speech recognition model. The server takes the previously obtained target voice detection result as input and passes it to the speech recognition model. This process is like playing a recording to the model, and the model will "understand" this recording and convert it into corresponding text. For example, if the target voice detection result is a voice about "The weather is so good today", then this voice will be input into the speech recognition model. After receiving the target voice detection result, the speech recognition model will use its own algorithm and model parameters to parse and recognize this voice. Through a series of complex calculations and processing, the model will eventually convert this voice into corresponding text content. Continuing with the above example, the speech recognition model will convert the voice about "The weather is so good today" into the same text content: "The weather is so good today". The server will use the text content output by the speech recognition model as the final target speech recognition result. This result can be used directly by the server or transmitted to other devices or applications through the network. In our example, the text "It's a nice day today" is the final target speech recognition result, which can be used for subsequent text processing, analysis or display operations. In this way, the server can use the pre-trained speech recognition model to accurately convert the target voice detection result into text content, which provides convenience for subsequent applications.

[0068] In an embodiment of the present invention, the pre-trained speech recognition model called is a speech recognition model based on a non-autoregressive model, or an autoregressive speech recognition model, or an end-to-end deep speech recognition model.

[0069] In an embodiment of the present invention, exemplarily, on the server, multiple types of speech recognition models are pre-stored, including non-autoregressive-based speech recognition models, autoregressive speech recognition models, and end-to-end deep speech recognition models. These models have been trained with a large amount of voice data and have the ability to convert voice signals into text. When the server needs to perform speech recognition on the target voice detection result, it will select the most appropriate speech recognition model to call according to the specific application scenario and requirements. Suppose the server needs to quickly convert a piece of speech into text, and has high real-time requirements. In this case, the server will choose to call a non-autoregressive-based speech recognition model.

[0070] For example, the server receives an urgent voice message that needs to be quickly converted into text for further processing. At this time, the server will call the non-autoregressive speech recognition model, which can process the voice signal in parallel and quickly output the recognition result. In this way, the server can complete the speech recognition task in a short time and meet the real-time requirements.

[0071] If the server needs higher recognition accuracy, especially when processing complex or long sentences, it may choose to call the autoregressive speech recognition model.

[0072] For example, the server receives a speech lecture that contains multiple professional terms and long sentences and needs to be accurately converted into text records. At this time, the server will call the autoregressive speech recognition model, which can more accurately recognize complex speech content through word-by-word prediction and correction. Although the processing speed is relatively slow, it can provide higher recognition accuracy.

[0073] When the server needs to handle speech recognition tasks in multiple languages, an end-to-end deep speech recognition model may be a better choice. This type of model can directly process the original speech signal and output the corresponding text content without complex preprocessing and alignment.

[0074] For example, the server needs to process voice data from different countries and regions, which may contain various languages ​​and dialects. In order to simplify the processing flow and improve the recognition accuracy, the server will call the end-to-end deep speech recognition model. This model can automatically learn the feature representation in the voice signal and directly output the corresponding text content. In this way, the server can efficiently handle speech recognition tasks in multiple languages.

[0075] In the embodiments of the present invention, the following implementation modes are also provided.

[0076] In response to a feedback operation on the target speech recognition result, model parameters of the speech recognition model are optimized and adjusted.

[0077] In an embodiment of the present invention, illustratively, the speech recognition system running on the server not only provides recognition services, but also has the ability to optimize according to user feedback. When the user finds that the speech recognition result is wrong, the problem can be pointed out through feedback operation, and the server will optimize and adjust the model parameters of the speech recognition model according to these feedbacks to improve the recognition accuracy in the future. After using the speech recognition service, the user receives the recognition result returned by the server. For example, the user said "please turn on the light", but the server mistakenly recognized it as "please turn on the TV". The user found that the recognition result was wrong, so through the feedback mechanism of the system, pointed out that the correct text should be "please turn on the light" instead of "please turn on the TV". After receiving the user's feedback, the server first verifies the validity of the feedback. After confirming that it is valid, the server will store this incorrect recognition case and its correct result for subsequent model optimization. Based on the user's feedback data, the server will start an optimization process to adjust the parameters of the speech recognition model. This optimization process may include adjusting the model's weights, biases and other parameters so that the model can more accurately recognize similar voice inputs. After the optimization is completed, the server will apply the new model parameters to the speech recognition model. In this way, the next time the user inputs a similar voice, the model will be able to recognize the correct content more accurately. In this way, the server can continuously optimize the voice recognition model based on user feedback, improve recognition accuracy and user experience.

[0078] In order to more clearly describe the solution provided by the embodiments of the present application, a relatively complete example is given below.

[0079] In an embodiment of the present invention, the two-stage speech recognition can be implemented by the following units: a human voice detection unit, which performs human voice detection based on a deep learning FSMN model, and FSMN can adjust the effect of human voice detection by setting different thresholds. A speech screening unit, the speech screening module is a key tool, which plays an important role in the entire speech processing process. By carefully screening the speech after human voice detection, it is ensured that each segment of speech contains clear human voice information, and the situation of truncation of human voice is effectively avoided. In this way, not only the accuracy of speech recognition can be improved, but also the integrity and coherence of speech data can be guaranteed, laying a solid foundation for subsequent speech processing and application. The working principle of the speech screening module is to accurately locate the starting and ending points of each segment of speech according to the preset human voice detection algorithm, so as to ensure that the human voice is not accidentally truncated. This sophisticated processing method not only improves the quality of speech data, but also helps to improve the performance and stability of the overall speech processing system. A speech recognition unit, the speech recognition module is used to recognize the screened speech segments as text, including but not limited to using a Paraformer model, a Whisper model, a Wenet model, etc.

[0080] The specific steps include:

[0081] (1) Assume that the original audio length is 10 seconds and the background noise in the audio is relatively strong.

[0082] (2) The original speech is passed through a human voice detection model with a higher threshold, such as a threshold of 0.98. In this way, the detected speech segments will definitely contain human voices, but the detected speech segments will be narrow and may truncate the human voices. Suppose the detected speech segments are [0.3, 0.7], [3.6, 4.9], [8.2, 9.0].

[0083] (3) The original speech is passed through a human voice detection model with a lower threshold, such as a threshold of 0.8. In this way, the detected speech segments will be returned wider and will not truncate the human voice, but some segments may contain pure noise. Assume that the detected speech segments are [0.1, 1.2], [1.8, 2.3], [3.2, 5.0], [8.0, 9.5].

[0084] (4) Use the voice screening module to screen the voice segments in step (2) and step (3). The specific screening method is that for the voice segment in step (2), if it has an intersection with the voice segment in step (3), it means that there is a human voice in the segment, and the segment is retained; otherwise, it is pure noise and the segment is deleted. Finally, the voice segment information that is still retained in step (2) is output. The final voice segments after screening are [0.1, 1.2], [3.2, 5.0], [8.0, 9.5].

[0085] (5) Use the speech recognition module to perform speech recognition on the speech segment output in step (4) and output the final recognized text.

[0086] Through the above steps, the interference caused by noise to the speech recognition system is effectively reduced, thereby improving the accuracy and stability of the system. This innovative method is not only applicable to various types of speech recognition systems, but also has many advantages in practice, such as low cost, high efficiency, and simple implementation.

[0087] First, the two-stage speech detection method performs well in noisy environments. Through precise signal processing and analysis, it can effectively distinguish between speech signals and background noise, thereby avoiding noise interference in the speech recognition process. Secondly, in the specific speech recognition process of the second stage, with the help of the accurate detection results of the previous stage, the system can more accurately locate and recognize speech signals, further improving the accuracy and reliability of recognition.

[0088] In addition, due to the concise implementation logic and clear process of this method, it has high operational convenience in practical applications. Operators can easily master the implementation points of this method without complicated operation procedures and expensive equipment support. Therefore, not only does this method have a wider application, but it also brings new possibilities for improving the overall performance of various speech recognition systems.

[0089] Please refer to Figure 2 , Figure 2 A two-stage speech recognition device 110 provided in an embodiment of the present invention includes:

[0090] An acquisition module 1101 is used to acquire audio to be recognized, where the audio to be recognized includes speech to be recognized and background noise;

[0091] The recognition module 1102 is used to call a pre-trained human voice detection model, perform human voice detection on the audio to be recognized according to different detection thresholds, and obtain a first human voice detection result and a second human voice detection result, wherein the detection threshold of the first human voice detection result is higher than the detection threshold of the second human voice detection result; determine a target human voice detection result according to the first human voice detection result and the second human voice detection result; perform speech recognition on the target human voice detection result to obtain a target speech recognition result corresponding to the speech to be recognized.

[0092] It should be noted that the implementation principle of the aforementioned two-stage speech recognition device 110 can refer to the implementation principle of the aforementioned two-stage speech recognition device 110, and will not be repeated here. It should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into a physical entity, or physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the two-stage speech recognition device 110 can be a separately established processing element, or it can be integrated in a chip of the above-mentioned device. In addition, it can also be stored in the memory of the above-mentioned device in the form of program code, and called and executed by a processing element of the above-mentioned device. The function of the above two-stage speech recognition device 110. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0093] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (digital signal processors, DSP), or one or more field programmable gate arrays (FPGA), etc. For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0094] The embodiment of the present invention provides a computer device 100, which includes a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device 100 executes the aforementioned two-stage speech recognition device 110. Figure 3 As shown, Figure 3 The computer device 100 provided in the embodiment of the present invention is a structural block diagram. The computer device 100 includes a two-stage speech recognition device 110, a memory 111, a processor 112 and a communication unit 113.

[0095] To achieve data transmission or interaction, the memory 111, the processor 112 and the communication unit 113 are electrically connected to each other directly or indirectly. For example, the electrical connection between these components can be achieved through one or more communication buses or signal lines. The two-stage speech recognition device 110 includes at least one software function module that can be stored in the memory 111 in the form of software or firmware or solidified in the operating system (OS) of the computer device 100. The processor 112 is used to execute the two-stage speech recognition device 110 stored in the memory 111, such as the software function modules and computer programs included in the two-stage speech recognition device 110.

[0096] An embodiment of the present invention provides a readable storage medium, which includes a computer program. When the computer program is executed, the computer device where the readable storage medium is located is controlled to execute the aforementioned two-stage speech recognition method.

[0097] For illustrative purposes, the foregoing description is made with reference to specific embodiments. However, the above illustrative discussion is not intended to be exhaustive or to limit the present disclosure to the precise form disclosed. Numerous modifications and variations are possible in accordance with the above teachings. These embodiments are selected and described in order to best illustrate the principles of the present disclosure and its practical application, so that those skilled in the art can best utilize the present disclosure and utilize various embodiments with different modifications to suit the intended specific application.

Claims

1. A two-stage speech recognition method, It is characterized in that include: Acquire audio to be recognized, where the audio to be recognized includes speech to be recognized and background noise; Calling a pre-trained human voice detection model, performing human voice detection on the audio to be recognized according to different detection thresholds, and obtaining a first human voice detection result and a second human voice detection result, wherein the detection threshold of the first human voice detection result is higher than the detection threshold of the second human voice detection result; Determine a target human voice detection result according to the first human voice detection result and the second human voice detection result; Performing speech recognition on the target human voice detection result to obtain a target speech recognition result corresponding to the speech to be recognized; The pre-trained human voice detection model is obtained by training based on a preset feedforward fully connected network, the hidden layer of the preset feedforward fully connected network includes a memory module, the pre-trained human voice detection model is called, human voice detection is performed on the audio to be recognized according to different detection thresholds, and a first human voice detection result and a second human voice detection result are obtained, including: Calling a pre-trained human voice detection model and setting a first detection threshold and a second detection threshold, wherein the first detection threshold is greater than the second detection threshold; Inputting the audio to be recognized into the human voice detection model, and obtaining a plurality of first speech time sequence segments as the first human voice detection result through the trained memory module according to the first detection threshold; Inputting the audio to be recognized into the human voice detection model, and obtaining a plurality of second speech time sequence segments as the second human voice detection results through the trained memory module according to the second detection threshold; The determining a target human voice detection result according to the first human voice detection result and the second human voice detection result includes: Using the multiple first speech time sequence segments to screen the multiple second speech time sequence segments to obtain the target human voice detection result; The using the multiple first speech time sequence segments to screen the multiple second speech time sequence segments to obtain the target human voice detection result includes: Intersecting each second speech time sequence segment in the plurality of second speech time sequence segments with each first speech time sequence segment in the plurality of first speech time sequence segments in sequence; The second speech time sequence segments with intersection are retained, and the second speech time sequence segments without intersection are deleted, so as to obtain at least one undetermined speech time sequence segment; The at least one pending speech time sequence segment is used as the target human voice detection result.

2. The method according to claim 1, It is characterized in that The performing speech recognition on the target human voice detection result to obtain a target speech recognition result corresponding to the speech to be recognized includes: Call the pre-trained speech recognition model; Inputting the target human voice detection result into the speech recognition model to obtain text content corresponding to the target human voice detection result; The text content is used as the target speech recognition result.

3. The method according to claim 2, It is characterized in that The pre-trained speech recognition model called is a speech recognition model based on a non-autoregressive speech recognition model, or an autoregressive speech recognition model, or an end-to-end deep speech recognition model.

4. The method according to claim 2, It is characterized in that The method further comprises: In response to a feedback operation on the target speech recognition result, model parameters of the speech recognition model are optimized and adjusted.

5. A two-stage speech recognition device, It is characterized in that include: An acquisition module, used for acquiring audio to be recognized, wherein the audio to be recognized includes speech to be recognized and background noise; A recognition module, configured to call a pre-trained human voice detection model, perform human voice detection on the audio to be recognized according to different detection thresholds, and obtain a first human voice detection result and a second human voice detection result, wherein the detection threshold of the first human voice detection result is higher than the detection threshold of the second human voice detection result; Determine a target human voice detection result according to the first human voice detection result and the second human voice detection result; Performing speech recognition on the target human voice detection result to obtain a target speech recognition result corresponding to the speech to be recognized; The pre-trained human voice detection model is obtained by training based on a preset feedforward fully connected network, and the hidden layer of the preset feedforward fully connected network includes a memory module. The recognition module is specifically used to: call the pre-trained human voice detection model and set a first detection threshold and a second detection threshold, and the first detection threshold is greater than the second detection threshold; input the audio to be recognized into the human voice detection model, and obtain a plurality of first voice time sequence segments as the first human voice detection result according to the first detection threshold through the trained memory module; input the audio to be recognized into the human voice detection model, and obtain a plurality of second voice time sequence segments as the second human voice detection result according to the second detection threshold through the trained memory module; The recognition module is further specifically used to: use the multiple first voice time sequence segments to screen the multiple second voice time sequence segments to obtain the target human voice detection result; The recognition module is also specifically used to: intersect each second speech timing segment in the multiple second speech timing segments with each first speech timing segment in the multiple first speech timing segments in turn; retain the second speech timing segments with intersections, and delete the second speech timing segments without intersections, to obtain at least one pending speech timing segment; and use the at least one pending speech timing segment as the target human voice detection result.

6. A computer device, It is characterized in that The computer device includes a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device executes the two-stage speech recognition method according to any one of claims 1 to 4.

7. A readable storage medium, It is characterized in that The readable storage medium includes a computer program, and when the computer program is executed, the computer device where the readable storage medium is located is controlled to execute the two-stage speech recognition method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Speech processing method and device, and device for speech processing

    CN106971723A

  • Voice call data processing method and device, memory medium and mobile terminal

    CN108449498A

  • Echo cancellation method and device, electronic equipment and readable storage medium

    CN111798863A

  • Noise detection method, nonvolatile readable storage medium and electronic equipment

    CN112700789A

  • Target voice detection method and device, equipment and storage medium

    CN113936678A