Voice processing method, device, equipment, and storage medium
By receiving user voice clips in the voice system and determining whether to continue playing the response voice based on the number of text characters, the problem of misjudgment in environmental noise is solved, and the accuracy and reliability of voice processing are improved.
Patent Information
- Application Number
- CN202110963651.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-20
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2041-08-20
AI Technical Summary
Existing voice systems are prone to misjudging user voices in noisy environments, resulting in low voice processing accuracy.
During the playback of the response voice, the user's voice clip is received and the number of text characters is judged. If it is greater than the threshold, the playback is paused; if it is less than the threshold, the playback continues to correct the misjudgment.
It improves the reliability and accuracy of the voice system, reduces misjudgments, and enhances user experience.
Smart Images

Figure CN113611313B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent voice technology, and in particular to a voice processing method, apparatus, device, storage medium and program. Background Art
[0002] The voice system can automatically call the user's client and conduct simple voice communication with the user through an intelligent robot.
[0003] Currently, when the voice system plays audio to a user's client, if it recognizes the audio being sent by the client, it pauses the audio. However, if the user is in a noisy environment, this can lead to false interruptions. For example, if the user is silent while the voice system is playing audio, but the environment is noisy, the system will pause the audio. This results in low audio processing accuracy. Summary of the Invention
[0004] The main purpose of the present invention is to provide a speech processing method, device, equipment, storage medium and program, aiming to solve the technical problem of low accuracy of speech processing in the prior art.
[0005] In a first aspect, an embodiment of the present application provides a speech processing method, the method comprising:
[0006] In the process of playing the first response voice to the client, receiving a first user voice segment in the user voice sent by the client;
[0007] According to the first user voice clip, pausing the playing of the first answer voice;
[0008] After receiving at least one second user voice segment in the user voice sent by the client, if the number of text characters in the at least one second user voice segment is less than or equal to a second threshold, continue to play the first response voice.
[0009] In a possible implementation, if the number of text characters in the at least one second user voice segment is less than or equal to a second threshold, continuing to play the first response voice includes:
[0010] Obtaining a second number of text characters in the at least one second user voice segment, where the at least one second user voice segment is a second user voice segment in the user voice, or the at least one second user voice segment includes at least two other user voice segments in the user voice except the first user voice segment;
[0011] If the second number is less than or equal to the second threshold, continue to play the first answer voice.
[0012] In one possible implementation, obtaining a second number of text characters in the at least one second user voice segment includes:
[0013] Obtaining a user text segment corresponding to the at least one second user voice segment;
[0014] The number of text characters included in the user text segment is determined as the second number.
[0015] In a possible implementation, the first response voice includes a plurality of first response voice segments; and continuing to play the first response voice includes:
[0016] Determining a target response voice segment among the multiple first response voice segments, wherein the target response voice segment is the first response voice segment played last before pausing the first response voice;
[0017] The first response voice is continuously played starting from the first response voice segment next to the target response voice segment.
[0018] In a possible implementation, pausing the playing of the first answer voice includes:
[0019] Determine the first answer voice segment currently being played;
[0020] After the first response voice segment is played, the first response voice is paused.
[0021] In a possible implementation manner, after pausing the playing of the first response voice, the method further includes:
[0022] After receiving a plurality of user voice segments, determining whether the plurality of user voice segments constitute a complete sentence, the plurality of user voice segments including the first user voice segment and the at least one second user voice segment;
[0023] If so, a second response voice is determined according to the multiple user voice segments, and the second response voice is played to the client.
[0024] In a possible implementation, pausing the first response voice according to the first user voice segment includes:
[0025] Obtain a first number of text characters in the first user voice segment, and pause playing the first response voice when the first number is greater than or equal to a first threshold.
[0026] In a possible implementation, the method further includes:
[0027] If a third number of text characters in a second user voice segment in the plurality of voice segments is greater than or equal to the first threshold, the playing of the first response voice is continued to be paused.
[0028] In a second aspect, an embodiment of the present application provides a voice processing device, including a receiving module, a pausing module and a playing module, wherein:
[0029] The receiving module is configured to, during playing of a first response voice to a client, receive a first user voice segment in user voice sent by the client;
[0030] The pausing module is configured to pause the playing of the first response voice according to the first user voice segment;
[0031] The playing module is configured to, after receiving at least one second user voice segment in the user voice sent by the client, if a number of text characters in the at least one second user voice segment is less than or equal to a second threshold, continue to play the first response voice.
[0032] In a possible implementation, the playing module is specifically configured to:
[0033] Obtain a second number of text characters in the at least one second user voice segment, the at least one second user voice segment being a second user voice segment in the user voice, or the at least one second user voice segment including at least two other user voice segments in the user voice except the first user voice segment;
[0034] If the second number is less than or equal to the second threshold, the playing of the first response voice is continued.
[0035] In a possible implementation, the playing module is specifically configured to:
[0036] Obtain a user text segment corresponding to the at least one second user voice segment;
[0037] Determine the number of text characters included in the user text segment as the second number.
[0038] In a possible implementation, the playing module is specifically configured to:
[0039] Determine a target response voice segment in the plurality of first response voice segments, the target response voice segment being the last played first response voice segment before the pausing of the playing of the first response voice;
[0040] The first response voice is continuously played starting from the first response voice segment next to the target response voice segment.
[0041] In a possible implementation, the pause module is specifically configured to:
[0042] Determine the first answer voice segment currently being played;
[0043] After the first response voice segment is played, the first response voice is paused.
[0044] In a possible implementation, the pause module is specifically configured to:
[0045] Obtain a first number of text characters in the first user voice segment, and pause playing the first response voice when the first number is greater than or equal to a first threshold.
[0046] In a possible implementation, the device further includes a judgment module, configured to:
[0047] After receiving a plurality of user voice segments, determining whether the plurality of user voice segments constitute a complete sentence, the plurality of user voice segments including the first user voice segment and the at least one second user voice segment;
[0048] If so, a second response voice is determined according to the multiple user voice segments, and the second response voice is played to the client.
[0049] In a possible implementation, the pause module is further configured to:
[0050] If the third number of text characters in the second user voice segment in the multiple voice segments is greater than or equal to the first threshold, continue to pause the playing of the first answer voice.
[0051] In a third aspect, an embodiment of the present application provides a speech processing device, including a processor and a memory;
[0052] The memory stores computer-executable instructions;
[0053] The processor executes the computer-executable instructions stored in the memory, so that the processor performs the speech processing method as described in the first aspect.
[0054] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the speech processing method described in the first aspect.
[0055] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the speech processing method described in the first aspect when executed by a processor.
[0056] An embodiment of the present invention provides a voice processing method, apparatus, device, storage medium and program. In the process of playing a first response voice to a client, a first user voice segment in the user voice sent by the client is received, a first number of text characters in the first user voice segment is obtained, and when the first number is greater than or equal to a first threshold, the first response voice is paused. After receiving at least one second user voice segment in the user voice sent by the client, if the number of text characters in the at least one second user voice segment is less than or equal to a second threshold, the first response voice is continued to be played. In the above method, when the voice system pauses playing the first response voice, the voice system can also obtain at least one second user voice segment sent by the client. If the number of text characters in the at least one second user voice segment is less than or equal to the second threshold, it means that the voice previously received by the voice system is audio with poor continuity such as environmental noise, user interjections, etc., and the voice system misjudged the pause of the first response voice. At this time, the voice system can continue to play the first response voice to correct the previous misjudgment of the voice system. This can improve the reliability of the voice system and thus improve the accuracy of voice processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0058] Figure 1 A schematic diagram of the architecture of a voice system provided in an embodiment of the present application;
[0059] Figure 2 A flowchart of a speech processing method provided in an embodiment of the present application;
[0060] Figure 3 A schematic diagram of a process for pausing the playback of a response voice provided in an embodiment of the present application;
[0061] Figure 4 A schematic diagram of a process for continuing to play a first response voice provided in an embodiment of the present application;
[0062] Figure 5 A flowchart of another speech processing method provided in an embodiment of the present application;
[0063] Figure 6 A schematic diagram of a speech processing method according to an embodiment of the present invention;
[0064] Figure 7 A schematic diagram of the structure of a speech processing device provided in an embodiment of the present application;
[0065] Figure 8 A schematic diagram of the structure of another speech processing device provided in an embodiment of the present application;
[0066] Figure 9 This is a schematic diagram of the hardware structure of the voice processing device provided in this application.
[0067] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0068] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0069] Next, combine Figure 1 , describes the architecture of the voice system involved in this application.
[0070] Figure 1 This is a schematic diagram of the architecture of a voice system provided in an embodiment of the present application. Figure 1 , including a voice system and a client. The voice system is in communication with the client. The client can be a user's mobile terminal, such as a mobile phone, computer, tablet, or other device. The voice system includes a voice acquisition device, a voice recognition device, a voice interruption device, and a semantic judgment device. The voice acquisition device is connected to the voice recognition device, which is in turn connected to the voice interruption device and the semantic judgment device.
[0071] See Figure 1The voice acquisition device in the voice system can acquire the user voice sent by the user's client and send the user voice to the voice recognition device (ASR). The voice recognition device can convert the user voice into corresponding user text and send the user text to the semantic judgment device or the voice interruption device. The semantic judgment device can generate a corresponding response voice based on the user text corresponding to the user voice. When the voice judgment device generates the corresponding response voice, the voice system can send the response voice to the client. The voice interruption device can determine whether to pause the response voice being broadcast based on the user text corresponding to the user voice. The voice interruption device can also resume playing the paused response voice.
[0072] In related technologies, when a voice system plays voice to a user's client, if the voice system recognizes the voice sent by the user's client, the voice system pauses the voice being played. For example, when the voice system plays the response voice corresponding to the previous user voice to the user's client, if the voice system receives a new user voice sent by the client, the voice system pauses the response voice. However, if there is ambient noise in the user's environment, incorrect interruptions may occur. For example, if the user does not speak, but the user's environment is noisy, or if the user utters a meaningless interjection, the voice system will pause the response voice. This results in low voice processing accuracy.
[0073] In order to solve the technical problem of poor timeliness of voice pause in the voice system in the related art, an embodiment of the present application provides a voice processing method. In the process of playing a first response voice to a client, a first user voice segment in the user voice sent by the client is received, a first number of text characters in the first user voice segment is obtained, and when the first number is greater than or equal to a first threshold, the playing of the first response voice is paused. After receiving at least one second user voice segment in the user voice sent by the client, a second number of text characters in the at least one second user voice segment is obtained, wherein the second user voice segment can be the second user voice segment in the user voice, or at least two other user voice segments in the user voice except the first user voice segment. If the second number is less than or equal to the second threshold, the first response voice continues to be played. In this way, when the voice system plays the response voice to the client, if the voice system receives a new voice sent by the user and recognizes enough text characters in the first voice segment, the voice system pauses the playback of the response voice to improve the timeliness of the voice pause. In addition, the voice system can also obtain at least one second user voice segment sent by the client. If the number of text characters in at least one second user voice segment is less than or equal to the second threshold, it means that the voice previously received by the voice system is audio with poor continuity such as environmental noise, user interjections, etc., and the voice system misjudged the pause of the first response voice. At this time, the voice system can continue to play the first response voice to correct the previous misjudgment of the voice system. This can improve the reliability of the voice system and thus improve the accuracy of voice processing.
[0074] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0075] Figure 2 This is a flow chart of a speech processing method provided in an embodiment of the present application. Figure 2 , the method may include:
[0076] S201: During the process of playing a first response voice to a client, a first user voice segment in a user voice sent by the client is received.
[0077] The execution subject of the embodiment of the present application can be a voice system or a voice processing device set in the voice system. The voice processing device can be implemented by software or by a combination of software and hardware.
[0078] The voice system includes a voice acquisition device, a voice recognition device, a voice interruption device and a semantic judgment device. Optionally, the voice acquisition device is used to acquire the user voice sent by the user's client. The voice recognition device can convert the user voice into corresponding user text. For example, the voice recognition device can be a device equipped with automatic speech recognition technology (ASR). The voice interruption device can interrupt the voice being played by the voice system and resume playing the interrupted voice. The semantic judgment device can generate a response text corresponding to the user text. For example, the voice judgment device can be installed with a multi-round dialogue management (DM) system and a natural language understanding (NLU) system to generate a response text through DM and NLU.
[0079] Optionally, the client can be a user's mobile phone, computer, or other device. The first response voice is a response voice corresponding to the user voice sent by the client to the voice system. For example, in actual application, the voice system can obtain the user voice sent by the user's client in real time and generate a response voice corresponding to the user voice.
[0080] The first user voice segment may be the first voice segment corresponding to the user voice. Optionally, when the client sends the user voice to the voice system, the client may divide the user voice into multiple voice segments for sending. For example, when the user uses the client to send voice to the voice system, the client sends the voice segment to the voice system when it obtains a 20-millisecond user voice segment. For example, in actual application, the voice duration of the user sent through the client is relatively long (greater than 20 milliseconds). Therefore, each time the client receives a voice segment of a preset duration (20 milliseconds), the client sends the voice segment to the voice system. In this way, the client can split the user voice into multiple voice segments and send multiple voice segments to the voice system in the order in which the voice segments are obtained.
[0081] Optionally, when a client sends a user voice to the voice system, the first voice segment sent by the client to the voice system is the first user voice segment corresponding to the user voice. For example, if the user voice includes voice segment A, voice segment B, and voice segment C, and the client sends the voice segments to the voice system in the order of voice segment A - voice segment B - voice segment C, then voice segment A is the first user voice segment corresponding to the user voice.
[0082] S202: Pause playing of the first answer voice according to the first user voice clip.
[0083] Optionally, the first response voice can be paused according to the following feasible implementation method: obtain a first number of text characters in the first user voice segment, and pause the first response voice when the first number is greater than or equal to a first threshold. Optionally, the text characters are characters in the first user voice segment, and the first number is the number of text characters in the first user voice segment. For example, if the first user voice segment includes 1 text character, the first number is 1; if the first user voice segment includes 10 text characters, the first number is 10. For example, when the first threshold is 1, if the number of text characters in the first user voice segment is greater than or equal to 1, the voice system pauses the first response voice. For example, when the voice system is playing the response voice to the user's client, if the voice system receives the first user voice segment, and the number of characters in the text corresponding to the first user voice segment is greater than the first threshold, the voice system pauses the response voice being played to the user's client.
[0084] Optionally, the speech system may determine the first number of text characters based on the first user speech segment. For example, when a speech recognition device in the speech system obtains the first user speech segment through a speech acquisition device, the speech recognition device may convert the first user speech segment into user text corresponding to the first user speech segment, and then determine the first number of text characters based on the user text. For example, if the first user speech segment obtained by the speech recognition device is the speech "How is the weather today?", the speech recognition device may convert the speech into the text "How is the weather today?", and then determine that the text includes 7 text characters.
[0085] Optionally, the speech recognition device may be a device that has ARS installed. In actual application, the speech recognition device may continuously convert the speech segments into text recognition results in JSON format, where the text recognition results include the number of characters in the speech text corresponding to the speech segment.
[0086] Optionally, the specific process of pausing the first response voice is as follows: determining the first response voice segment currently being played. The first response voice includes multiple first response voice segments. For example, the first response voice may include first response voice segment 1, first response voice segment 2, and first response voice segment 3.
[0087] After the first response voice segment is played, the first response voice segment is paused. For example, the first response voice segment includes first response voice segment 1 and first response voice segment 2. If the voice system is playing first response voice segment 1, the voice system stops playing first response voice segment 2 after playing first response voice segment 1.
[0088] Next, combine Figure 3, the process of pausing the playing of the answering voice is explained.
[0089] Figure 3 This is a schematic diagram of a process for pausing the playing of a response voice provided in an embodiment of the present application. Figure 3 , including: a client and a voice system. Among them, the voice system generates a 10-second response voice corresponding to the user voice based on the user voice received from the client, and plays the 10-second response voice to the client.
[0090] See Figure 3 After the voice system plays the response voice to the client for 3 seconds, the remaining response voice played in the voice system is 7 seconds. At this time, the client sends the first user voice clip to the voice system. The voice system receives the first user voice clip and converts the first user voice clip into text information. It determines that the number of text characters in the text information is greater than the first threshold, and the voice system pauses playing the remaining 7 seconds of the response voice.
[0091] S203: After receiving at least one second user voice segment in the user voice sent by the client, if the number of text characters in the at least one second user voice segment is less than or equal to a second threshold, continue playing the first response voice.
[0092] Optionally, if the user speech includes multiple speech segments, after the speech system obtains the first user speech segment, the speech system may also obtain at least one second user speech segment. Optionally, the at least one second user speech segment is the second user speech segment in the user speech. For example, if the user speech includes speech segment A and speech segment B, where speech segment A is the first speech segment and speech segment B is the second speech segment, then speech segment A is the first user speech segment in the user speech, and speech segment B is the second user speech segment in the user speech.
[0093] Optionally, the at least one second user voice segment includes at least two other user voice segments in the user voice except the first user voice segment. For example, the second user voice segment may be all user voice segments in the user voice except the first user voice segment. For example, if the user voice includes voice segment A, voice segment B, and voice segment C, where voice segment A is the first voice segment, voice segment B is the second voice segment, and voice segment C is the third voice segment, then voice segment A is the first user voice segment in the user voice, and voice segment B and voice segment C are the second user voice segments in the user voice.
[0094] After the voice system receives at least one second voice segment in the user voice sent by the client, if the number of text characters in the at least one second user voice segment is less than or equal to the second threshold, the voice system continues to play the first response voice. The second threshold is a pre-set number. For example, if the number of text characters in the at least one second user voice segment is 0, the voice system continues to play the first response voice. In this way, when the number of text characters in the at least one second user voice segment is less than or equal to the second threshold, it means that the voice system's interruption based on the first user voice segment is a misjudgment. At this time, the voice system can resume playing the first response voice in a very short time, thereby improving the user experience and improving the reliability of voice processing.
[0095] Optionally, the second number of text characters in the at least one second user voice segment can be obtained according to the following feasible implementation: obtaining a user text segment corresponding to the at least one second user voice segment. For example, after a speech recognition device in a speech system receives the at least one second user voice segment, the speech system may convert the at least one second user voice segment into a user text segment.
[0096] The number of text characters included in the user text segment is determined as the second number. For example, if the user text segment corresponding to the second user voice segment includes 1 text character, the second number is 1; if the user text segment corresponding to the second user voice segment includes 10 text characters, the second number is 10.
[0097] Optionally, the first response voice includes multiple first response voice segments, and the first response voice can continue to be played according to the following feasible implementation method: determine a target response voice segment among the multiple first response voice segments. The target response voice segment is the first response voice segment that was last played before the first response voice was paused. For example, the first response voice includes the first response voice segment 1 and the first response voice segment 2. If the first response voice segment that was last played before the voice system paused the first response voice was the first response voice segment 1, the first response voice segment 1 is determined as the target response voice segment.
[0098] Playback of the first response voice continues from the first response voice segment following the target response voice segment. For example, if the first response voice segment includes first response voice segment 1 and second response voice segment 2, and if first response voice segment 1 is the target response voice segment and precedes first response voice segment 2, then when the voice system determines to continue playing the first response voice, it starts playing the first response voice segment from first response voice segment 2.
[0099] Next, combine Figure 4, the process of continuing to play the first response voice is explained.
[0100] Figure 4 This is a schematic diagram of a process for continuing to play the first response voice provided in an embodiment of the present application. Figure 4 , including a client and a voice system. The voice system pauses playing the response voice, with 5 seconds of the response voice remaining. While the voice system pauses playing the response voice, the voice system receives a second user voice segment sent by the client and converts the second user voice segment into a user text segment. The voice system determines that the number of text characters in the user text segment is less than a second threshold, and the voice system plays the remaining 5 seconds of the response voice to the client.
[0101] An embodiment of the present application provides a voice processing method, which, in the process of playing a first response voice to a client, receives a first user voice segment in the user voice sent by the client, obtains a first number of text characters in the first user voice segment, and when the first number is greater than or equal to a first threshold, determines the first response voice segment currently being played, and after completing the playing of the first response voice segment, pauses the playing of the first response voice, and after receiving at least one second user voice segment in the user voice sent by the client, if the number of text characters in the at least one second user voice segment is less than or equal to the second threshold, determines the first response voice segment that was last played before pausing the playing of the first response voice among multiple first response voice segments, and continues playing the first response voice starting from the next first response voice segment. According to the above method, when the voice system plays the first response voice to the client, if the voice system recognizes that the number of text characters corresponding to the first voice segment is greater than or equal to the first threshold, it means that the client has voice input. At this time, the voice system pauses the playback of the first response voice to improve the timeliness of the voice pause, and when the first response voice is paused, the voice system accurately determines whether the new user voice received by the voice system is audio with poor continuity such as environmental noise, user voice words, etc. based on the number of text characters corresponding to at least one second voice segment. If so, the voice system determines that the pause in the response voice is a misjudgment, and the voice system continues to play the response voice at the pause position to correct the previous misjudgment of the voice system. This can improve the reliability and accuracy of voice processing.
[0102] exist Figure 2 Based on the embodiment shown below, combined with Figure 5 , the above-mentioned speech processing method is described in detail.
[0103] Figure 5 This is a flow chart of another speech processing method provided in an embodiment of the present application. Figure 5 , the method comprising:
[0104] S501, in the process of playing the first response voice to the client, receiving a first user voice segment in the user voice sent by the client.
[0105] It should be noted that the execution process of step S501 can refer to step S201, and the embodiments of the present application will not be described here.
[0106] S502, obtaining a first number of text characters in the first user voice segment, and pausing playing the first response voice according to the first number.
[0107] Optionally, when the first number of text characters in the first user voice segment is greater than or equal to the first threshold, the voice system pauses playing the first response voice.
[0108] Optionally, the voice system can also determine the completion degree of the user voice corresponding to the first user voice segment according to the first user voice segment. The completion degree is used to indicate whether the user voice is completed. For example, the voice recognition device in the voice system converts the first user voice segment into text, and recognizes the completion degree of the converted user text segment. If the completion degree output by the voice recognition device indicates that the user voice is not completed, the voice system continues to obtain the second user voice segment corresponding to the user voice. If the completion degree output by the voice recognition device indicates that the user voice is completed, the voice recognition device sends the user text corresponding to the first user voice segment to the semantic judgment device, and the semantic recognition device generates the response voice corresponding to the user text and plays the response voice to the client.
[0109] Optionally, when the voice system pauses playing the first response voice, if the third number of text characters in the second user voice segment in the plurality of voice segments obtained by the voice system is greater than or equal to the first threshold, the voice system continues to pause playing the first response voice. For example, the user voice obtained by the voice system includes voice segment A and voice segment B, voice segment A is the first voice segment, and voice segment B is the second voice segment. If the voice system pauses playing the response voice according to voice segment A, and the third number of text characters of the user text corresponding to voice segment B is greater than or equal to the first threshold, the voice system continues to pause playing the first response voice.
[0110] S503, receiving a plurality of user voice segments, and determining whether the plurality of user voice segments constitutes a complete sentence.
[0111] The multiple user voice segments include a first user voice segment and at least one second user voice segment. A complete sentence is a sentence that can recognize the user's intention. For example, when the voice system receives multiple user voice segments, if the voice system can obtain the user's voice corresponding to the multiple user voice segments based on the multiple user voice segments, then the multiple voice segments constitute a complete sentence. Optionally, the voice recognition device in the voice system is a device equipped with ASR technology, and the ASR technology can be used to determine whether the multiple voice segments can form a complete sentence.
[0112] S504: If yes, determine a second response voice according to the multiple user voice segments, and play the second response voice to the client.
[0113] Optionally, if multiple user voice segments can form a complete sentence, the voice system determines a second response voice based on the multiple user voice segments and plays the second response voice to the client. For example, when multiple user voice segments can form a complete sentence, the voice recognition device can send the user text corresponding to the multiple user voice segments to the semantic judgment device. The semantic judgment device can generate corresponding response text based on the user text and convert the response text into the second response voice. If the conversion of the second response voice is successful, the voice system plays the second response voice to the client.
[0114] An embodiment of the present application provides a voice processing method, which, in the process of playing a first response voice to a client, receives a first user voice segment in the user voice sent by the client, obtains a first number of text characters in the first user voice segment, and pauses the playing of the first response voice based on the first number, receives multiple user voice segments, and determines whether the multiple user voice segments constitute a complete sentence. If so, determines a second response voice based on the multiple user voice segments, and plays the second response voice to the client. According to the above method, after the voice system pauses playing the first response voice, if the multiple user voice segments received by the voice system can constitute a complete sentence, the voice system can generate a corresponding second response voice and play the second response voice to the client. In this way, the voice system can obtain the second response voice in a timely manner and play the second response voice when stopping playing the first response voice, thereby improving the reliability of voice processing and the timeliness of voice processing.
[0115] Based on any of the above embodiments, Figure 6 , the process of the above-mentioned speech processing method is explained.
[0116] Figure 6 This is a process diagram of a speech processing method provided in an embodiment of the present application. Figure 6, including a client and a voice system. The voice system is sending a response voice to the client. The response voice includes a voice segment 1, a voice segment 2 and a voice segment 3. The playing time of the voice segment 1 is 1 second, the playing time of the voice segment 2 is 1 second, and the playing time of the voice segment 3 is 1 second.
[0117] Please refer to Figure 6 After the voice system plays the response voice 1.5 seconds to the client, the client sends a first user voice segment to the voice system, the voice system converts the first user voice segment into a first user text segment, and obtains the number of text characters in the first user text segment. When the number of text characters is greater than a first threshold, the voice system determines the voice segment 2 as a target voice segment, and pauses playing the response voice when the voice segment 2 is played.
[0118] Please refer to Figure 6 After the voice system pauses playing the response voice, the client sends a second user voice segment to the voice system, the voice system converts the second user voice segment into a second user text segment, and obtains the number of text characters in the second user text segment. When the number of text characters is less than a second threshold, the voice system determines to resume playing the response voice, and the voice system plays the voice segment 3 to the client. In this way, when the voice system plays the response voice to the client, if the voice system identifies that the number of text characters corresponding to the first voice segment is greater than or equal to the first threshold, it indicates that the client has voice input. At this time, the voice system pauses playing the response voice, improves the timeliness of voice pause, and when the response voice is paused, the voice system determines whether the voice input by the client is environmental noise or meaningless tone words and the like discontinuous audio according to the number of text characters corresponding to the second voice segment. If so, the voice system determines that the pause of playing the response voice is a misjudgment. At this time, the voice system replays the response voice at the paused position to correct the previous misjudgment of the voice system, so as to improve the reliability and accuracy of voice processing.
[0119] Figure 7 A structural schematic diagram of a voice processing device provided by an embodiment of the present application is shown. Please refer to Figure 7 The voice processing device 10 includes a receiving module 11, a pausing module 12 and a playing module 13, wherein:
[0120] The receiving module 11 is configured to, in the process of playing a first response voice to a client, receive a first user voice segment in a user voice sent by the client;
[0121] The pausing module 12 is configured to pause playing the first response voice according to the first user voice segment;
[0122] The playback module 13 is configured to, after receiving at least one second user voice segment in the user voice sent by the client, continue to play the first response voice if the number of text characters in the at least one second user voice segment is less than or equal to a second threshold.
[0123] In a possible implementation, the playback module 13 is specifically configured to:
[0124] Obtaining a second number of text characters in the at least one second user voice segment, where the at least one second user voice segment is a second user voice segment in the user voice, or the at least one second user voice segment includes at least two other user voice segments in the user voice except the first user voice segment;
[0125] If the second number is less than or equal to the second threshold, continue to play the first answer voice.
[0126] In a possible implementation, the playback module 13 is specifically configured to:
[0127] Obtaining a user text segment corresponding to the at least one second user voice segment;
[0128] The number of text characters included in the user text segment is determined as the second number.
[0129] In a possible implementation, the playback module is specifically configured to:
[0130] Determining a target response voice segment among the multiple first response voice segments, wherein the target response voice segment is the first response voice segment played last before pausing the first response voice;
[0131] The first response voice is continuously played starting from the first response voice segment next to the target response voice segment.
[0132] In a possible implementation, the pause module 12 is specifically configured to:
[0133] Determine the first answer voice segment currently being played;
[0134] After the first response voice segment is played, the first response voice is paused.
[0135] In a possible implementation, the pause module is specifically configured to:
[0136] Obtain a first number of text characters in the first user voice segment, and pause playback of the first response voice when the first number is greater than or equal to a first threshold. The speech processing device provided in the embodiment of the present application can implement the technical solution shown in the above method embodiment, and its implementation principles and beneficial effects are similar and will not be further described here.
[0137] The speech processing device shown in the embodiment of the present application can be a chip, a hardware module, a processor, etc. Of course, the speech processing device can be in other forms, and the embodiment of the present application does not specifically limit this.
[0138] Figure 8 This is a structural diagram of another speech processing device provided in an embodiment of the present application. Figure 7 The basic lines of the embodiment shown are shown in Figure 8 The speech processing device further includes a judgment module 14, which is configured to:
[0139] After receiving a plurality of user voice segments, determining whether the plurality of user voice segments constitute a complete sentence, the plurality of user voice segments including the first user voice segment and the at least one second user voice segment;
[0140] If so, a second response voice is determined according to the multiple user voice segments, and the second response voice is played to the client.
[0141] In a possible implementation, the pause module 12 is further configured to:
[0142] If the third number of text characters in the second user voice segment in the multiple voice segments is greater than or equal to the first threshold, continue to pause the playing of the first answer voice.
[0143] The speech processing device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment. Its implementation principles and beneficial effects are similar and will not be repeated here.
[0144] The speech processing device shown in the embodiment of the present application can be a chip, a hardware module, a processor, etc. Of course, the speech processing device can be in other forms, and the embodiment of the present application does not specifically limit this.
[0145] Figure 9 The hardware structure diagram of the voice processing device provided for this application. Figure 9The speech processing device 20 may include: a processor 21 and a memory 22, wherein the processor 21 and the memory 22 can communicate; illustratively, the processor 21 and the memory 22 communicate via a communication bus 23, the memory 22 is used to store program instructions, and the processor 21 is used to call the program instructions in the memory to execute the speech processing method shown in any of the above method embodiments.
[0146] Optionally, the speech processing device 20 may further include a communication interface, which may include a transmitter and / or a receiver.
[0147] Optionally, the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), or application-specific integrated circuits (ASICs). A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in this application may be directly implemented by a hardware processor or implemented by a combination of hardware and software modules in the processor.
[0148] The present application provides a readable storage medium having a computer program stored thereon; the computer program is used to implement the speech processing method as described in any of the above embodiments.
[0149] An embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed, a computer is caused to perform the above-mentioned speech processing method.
[0150] All or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above-mentioned method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disc, and any combination thereof.
[0151] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable terminal device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable terminal device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0152] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0153] These computer program instructions can also be loaded onto a computer or other programmable terminal device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0154] Obviously, those skilled in the art may make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations.
[0155] In this application, the term "include" and its variations may refer to non-restrictive inclusion; the term "or" and its variations may refer to "and / or". In this application, the terms "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In this application, "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship.
[0156] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A speech processing method, characterized in that: include: In the process of playing the first response voice to the client, receiving a first user voice segment in the user voice sent by the client; Determine whether the user voice has ended; If the user voice has not ended, pausing the playing of the first response voice according to the first user voice segment; receiving at least one second voice segment of the user voice sent by the client; If the number of text characters in the at least one second user voice segment is less than or equal to a second threshold, the first response voice continues to be played.
2. The method according to claim 1, characterized in that If the number of text characters in the at least one second user voice segment is less than or equal to a second threshold, continuing to play the first response voice includes: Obtaining a second number of text characters in the at least one second user voice segment, where the at least one second user voice segment is a second user voice segment in the user voice, or the at least one second user voice segment includes at least two other user voice segments in the user voice except the first user voice segment; If the second number is less than or equal to the second threshold, continue to play the first answer voice.
3. The method according to claim 2, characterized in that Obtaining a second number of text characters in the at least one second user voice segment includes: Obtaining a user text segment corresponding to the at least one second user voice segment; The number of text characters included in the user text segment is determined as the second number.
4. The method according to any one of claims 1 to 3, characterized in that The first response voice includes a plurality of first response voice segments; and continuing to play the first response voice includes: Determining a target response voice segment among the multiple first response voice segments, wherein the target response voice segment is the first response voice segment played last before pausing the first response voice; The first response voice is continuously played starting from the first response voice segment next to the target response voice segment.
5. The method according to any one of claims 1 to 3, characterized in that Pausing the playing of the first answer voice includes: Determine the first answer voice segment currently being played; After the first response voice segment is played, the first response voice is paused.
6. The method according to any one of claims 1 to 3, characterized in that After pausing the playing of the first answer voice, the method further includes: After receiving a plurality of user voice segments, determining whether the plurality of user voice segments constitute a complete sentence, the plurality of user voice segments including the first user voice segment and the at least one second user voice segment; If so, a second response voice is determined according to the multiple user voice segments, and the second response voice is played to the client.
7. The method according to any one of claims 1 to 3, characterized in that Pausing the first answer voice according to the first user voice segment includes: Obtain a first number of text characters in the first user voice segment, and pause playing the first response voice when the first number is greater than or equal to a first threshold.
8. The method according to any one of claims 1 to 3, characterized in that The method further comprises: If the third number of text characters in the second user voice segment in the multiple voice segments is greater than or equal to the first threshold, continue to pause the playing of the first answer voice.
9. A speech processing device, characterized in that: It includes a receiving module, a judging module, a pausing module and a playing module, wherein: The receiving module is used to receive the first user voice segment in the user voice sent by the client during the process of playing the first response voice to the client; the judging module is used to judge whether the user voice has ended; The pause module is configured to pause playing the first response voice according to the first user voice segment if the user voice has not ended; The receiving module is further configured to receive at least one second voice segment of the user voice sent by the client; The playing module is configured to continue playing the first response voice if the number of text characters in the at least one second user voice segment is less than or equal to a second threshold.
10. A speech processing device, characterized in that: The speech processing device includes: a memory, a processor, and a speech processing program stored in the memory and executable on the processor. When the speech processing program is executed by the processor, the steps of the speech processing method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a speech processing program, which, when executed by a processor, implements the steps of the speech processing method according to any one of claims 1 to 8.
12. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the speech processing method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Voice interruption method and device
CN111540349A
Automatic turn delineation in multi-turn dialogue
US20210158812A1