Voice interaction system, related methods, devices and equipment

By using the sentence end detection model in the smart speaker and combining phonetic and semantic features to determine the end of the user's voice, the problem of inaccurate timing of closing the microphone in the existing technology is solved, and the response speed and the accuracy of semantic understanding are improved.

CN113160854BActive Publication Date: 2024-10-18ALIBABA GROUP HOLDING LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202010085433.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-01-22
Publication Date
2024-10-18
Estimated Expiration
2040-01-22

Smart Images

  • Figure CN113160854B_ABST
    Figure CN113160854B_ABST
Patent Text Reader

Abstract

The present application discloses a voice interaction system, related methods, devices and equipment. Among them, the system shown collects user voice data through a smart speaker; if the user voice silence duration is greater than a first duration threshold, a sentence end detection request for the voice data is sent to the server; the server determines the acoustic feature information of the subsequent voice according to the acoustic feature information of the voice data through the first acoustic feature determination subnetwork included in the sentence end detection model; and determines the semantic feature information of the subsequent voice according to the text sequence of the voice data through the semantic feature determination subnetwork included in the sentence end detection model; determines whether the voice data includes sentence end information according to the acoustic feature information and semantic feature information of the subsequent voice through the sentence end prediction subnetwork included in the sentence end detection model; if the sentence end information is detected, the smart speaker turns off the microphone. This processing method can effectively improve the accuracy of the timing of the smart speaker microphone closing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and specifically to a voice interaction system, method and device, an end-of-sentence detection method and device, an end-of-sentence detection model construction method and device, a smart speaker, and an electronic device. Background Art

[0002] A smart speaker is a product of a speaker upgrade. It is a tool for home consumers to access the Internet using voice, such as ordering songs, shopping online, or getting weather forecasts. It can also control smart home devices, such as opening curtains, setting refrigerator temperature, and heating up the water heater in advance.

[0003] The interaction between users and smart speakers is mainly through voice. Users give voice commands to smart speakers, which recognize user commands through voice recognition technology and execute them. After determining that the user has given the command, the smart speaker usually turns off the microphone and ends the sound reception. At present, a typical smart speaker microphone muting solution is that if the smart speaker detects that the silence time after the user finishes speaking reaches a preset threshold, it will turn off the microphone. For example, the smart speaker makes relevant judgments based on the Voice Activity Detection (VAD) signal. The VAD signal is used to indicate whether the user's voice is silent. The silent part is 0, and the sound part is non-0; the microphone is muted when the silence time reaches a certain threshold (such as 700 milliseconds).

[0004] However, in the process of implementing the present invention, the inventors found that the technical solution has at least the following problems: 1) The microphone-closing logic of this method only considers voice information. Even if the user has finished speaking, the speaker still has to wait for the silence time to reach a fixed length threshold before closing the microphone. This will result in a slow response to closing the microphone. At the same time, the long wait may introduce other background noise, which will affect the accuracy of the subsequent semantic understanding process; 2) If the pause time in the middle of the user's sentence is longer than the silence threshold, the microphone will be closed even if the words have not been finished, which will result in the user's sentence received by the speaker being interrupted. In summary, the existing solution has the problem of inaccurate timing of closing the microphone of the smart speaker. Summary of the invention

[0005] The present application provides a voice interaction system to solve the problem of inaccurate microphone muting timing of smart speakers in the prior art. The present application also provides a voice interaction method and device, a sentence end detection method and device, a sentence end detection model construction method and device, a smart speaker, and an electronic device.

[0006] The present application provides a voice interaction system, comprising:

[0007] The smart speaker is used to collect user voice data; if the user voice silence duration is greater than a first duration threshold, a sentence end detection request for the voice data is sent to a server; if the server detects the sentence end information, the microphone is turned off;

[0008] The server is used to receive the end-of-sentence detection request; determine the acoustic feature information of subsequent speech of the speech data according to the acoustic feature information of multiple data frames of the speech data through the first acoustic feature determination subnetwork included in the end-of-sentence detection model; and determine the semantic feature information of the subsequent speech according to the text sequence of the speech data through the semantic feature determination subnetwork included in the end-of-sentence detection model; determine whether the speech data includes end-of-sentence information according to the acoustic feature information and semantic feature information of the subsequent speech through the end-of-sentence prediction subnetwork included in the end-of-sentence detection model.

[0009] The present application also provides a voice interaction method, comprising:

[0010] Collect user voice data;

[0011] If the user's voice silence duration is greater than the first duration threshold, sending a sentence end detection request for the voice data to the server;

[0012] If the server detects the end of sentence information, the microphone is turned off.

[0013] Optionally, the silence duration is determined in the following manner:

[0014] The silence duration is determined by a voice activity detection module.

[0015] Optionally, also include:

[0016] If the server does not detect the end-of-sentence information and the silence time is greater than the second duration threshold, the microphone is turned off.

[0017] Optionally, also include:

[0018] Determine the ambient noise value;

[0019] If the environmental noise value is greater than the noise threshold, clearing the noise data in the user voice data;

[0020] The silence duration is determined according to the user voice data after noise removal.

[0021] Optionally, also include:

[0022] Determine the user's speaking time according to the user voice data;

[0023] Determine the speech duration threshold based on the user's historical voice data;

[0024] If the user's speaking time reaches a speaking time threshold, it is determined that the voice data includes sentence end information.

[0025] Optionally, if the server detects the end of sentence information, it collects the instruction information of the user confirming that the speech is completed;

[0026] According to the instruction information, the microphone is turned off.

[0027] Optionally, extracting first voiceprint voice data from user voice data;

[0028] Determining the silence duration according to the first voiceprint speech data;

[0029] The sentence end detection request includes a sentence end detection request for the first voiceprint speech data.

[0030] Optionally, also include:

[0031] According to the user voice data, determining whether there are first voice segment data and second voice segment data that are not contextually semantically related;

[0032] If the above judgment result is yes, the microphone is turned off.

[0033] The present application also provides a voice interaction method, comprising:

[0034] Receiving a sentence end detection request for user voice data sent by a terminal device;

[0035] Determine the acoustic feature information of subsequent speech of the speech data at least according to the acoustic feature information of multiple data frames of the speech data through the first acoustic feature determination subnetwork included in the sentence end detection model; and determine the semantic feature information of the subsequent speech according to the text sequence of the speech data through the semantic feature determination subnetwork included in the sentence end detection model;

[0036] Through the sentence-end prediction subnetwork included in the sentence-end detection model, it is determined whether the speech data includes sentence-end information according to the acoustic feature information and semantic feature information of the subsequent speech.

[0037] Optionally, also include:

[0038] The sentence end detection model is learned from a set of correspondences between acoustic feature information of a plurality of data frames corresponding to the training speech data and labeling information of whether the training speech data includes a sentence end.

[0039] Optionally, the first acoustic feature determination subnetwork includes: a second acoustic feature determination subnetwork and a third acoustic feature determination subnetwork;

[0040] Determining the acoustic feature information of the speech data according to the acoustic feature information of the plurality of data frames through a second acoustic feature determination subnetwork;

[0041] The acoustic feature information of the subsequent speech is determined by the third acoustic feature determination subnetwork according to the acoustic feature information of the speech data and the text sequence.

[0042] Optionally, the sentence end detection model includes a speech recognition subnetwork, and the speech recognition subnetwork includes the second acoustic feature determination subnetwork and a pronunciation unit determination subnetwork;

[0043] The method further comprises:

[0044] The pronunciation unit determination subnetwork is used to determine the pronunciation unit sequence of the speech data according to the acoustic feature information of the speech data.

[0045] Optionally, the sentence end detection model includes a language model subnetwork, and the language model subnetwork includes the semantic feature determination subnetwork and a text prediction subnetwork;

[0046] The method further comprises:

[0047] The text sequence is determined through the language model subnetwork; and the text corresponding to the subsequent speech is determined through the text prediction subnetwork based on the acoustic feature information and semantic feature information of the subsequent speech.

[0048] Optionally, the sentence end detection model includes a language model subnetwork, and the language model subnetwork includes the semantic feature determination subnetwork and a text prediction subnetwork;

[0049] The method further comprises:

[0050] The text sequence is determined through the language model subnetwork; and the text corresponding to the subsequent speech is determined through the text prediction subnetwork based on the acoustic feature information and semantic feature information of the subsequent speech.

[0051] Optionally, determining features of deep fusion of the acoustic feature information and semantic feature information of the subsequent speech according to the acoustic feature information and semantic feature information of the subsequent speech through a feature deep fusion subnetwork included in the sentence end detection model;

[0052] Determining, by the text prediction subnetwork, a text corresponding to the subsequent speech according to the deep fusion features;

[0053] Through the sentence-end prediction subnetwork, it is determined whether the speech data includes sentence-end information according to the deep fusion features.

[0054] Optionally, determining features of deep fusion of the acoustic feature information and semantic feature information of the subsequent speech according to the acoustic feature information and semantic feature information of the subsequent speech through a feature deep fusion subnetwork included in the sentence end detection model;

[0055] Through the sentence-end prediction subnetwork, it is determined whether the speech data includes sentence-end information according to the deep fusion features.

[0056] Optionally, also include:

[0057] Learning the initialization parameters of the semantic feature determination subnetwork and the text prediction subnetwork from a corpus that annotates sentence start and end symbols;

[0058] The speech recognition subnetwork and the language model subnetwork are learned from the correspondence between acoustic feature information of a plurality of data frames corresponding to the training speech data, pronunciation unit sequence labeling information, and text sequences labeling sentence start symbols and end symbols;

[0059] The sentence end detection subnetwork is learned from a set of correspondences between acoustic feature information of a plurality of data frames corresponding to the training speech data and annotation information of whether the training speech data includes a sentence end.

[0060] Optionally, also include:

[0061] The initialization parameters of the speech recognition subnetwork are learned from the correspondence between the acoustic feature information of multiple data frames corresponding to the training speech data and the pronunciation unit sequence annotation information.

[0062] Optionally, the network structure of the third acoustic feature determination subnetwork includes: a Transformer model;

[0063] The network structure of the semantic feature determination sub-network includes: a Transformer model.

[0064] The present application also provides a sentence end detection method, comprising:

[0065] Obtain the voice data to be detected;

[0066] Determining acoustic feature information of the speech data;

[0067] By using a sentence end detection model, it is determined whether the speech data includes sentence end information according to the acoustic feature information.

[0068] The present application also provides a method for constructing a sentence end detection model, including:

[0069] Determining a set of corresponding relationships between acoustic feature information of a plurality of data frames corresponding to the training speech data and annotation information of whether the training speech data includes the end of a sentence;

[0070] Construct the network structure of the sentence end detection model;

[0071] The acoustic feature information is used as input data of the sentence end detection model, and the annotation information is used as output data of the sentence end detection model to train the network parameters of the sentence end detection model.

[0072] The present application also provides a voice interaction device, comprising:

[0073] A voice collection unit, used to collect user voice data;

[0074] A request sending unit, configured to send a sentence end detection request for the voice data to a server if the user voice silence duration is greater than a first duration threshold;

[0075] The microphone closing unit is used to close the microphone if the server detects the end of sentence information.

[0076] The present application also provides a smart speaker, comprising:

[0077] Processor; and

[0078] The memory is used to store a program for implementing a voice interaction method. After the device is powered on and runs the program of the method through the processor, the following steps are performed: collecting user voice data; if the user voice silence duration is greater than a first duration threshold, sending a sentence end detection request for the voice data to a server; if the server detects the sentence end information, turning off the microphone.

[0079] The present application also provides a voice interaction device, comprising:

[0080] A request receiving unit, configured to receive a sentence end detection request for user voice data sent by a terminal device;

[0081] A feature determination unit, configured to determine acoustic feature information of subsequent speech of the speech data at least according to acoustic feature information of multiple data frames of the speech data through a first acoustic feature determination subnetwork included in the sentence end detection model; and to determine semantic feature information of the subsequent speech according to a text sequence of the speech data through a semantic feature determination subnetwork included in the sentence end detection model;

[0082] The sentence end determination unit is used to determine whether the speech data includes sentence end information according to the acoustic feature information and semantic feature information of the subsequent speech through the sentence end prediction subnetwork included in the sentence end detection model.

[0083] The present application also provides an electronic device, comprising:

[0084] Processor; and

[0085] A memory for storing a program for implementing a voice interaction method. After the device is powered on and the program of the method is run through the processor, the following steps are performed: receiving a sentence end detection request for user voice data sent by a terminal device; determining the acoustic feature information of subsequent voice of the voice data through a first acoustic feature determination subnetwork included in a sentence end detection model, at least based on the acoustic feature information of multiple data frames of the voice data; and determining the semantic feature information of the subsequent voice based on a text sequence of the voice data through a semantic feature determination subnetwork included in the sentence end detection model; determining whether the voice data includes sentence end information based on the acoustic feature information and semantic feature information of the subsequent voice through a sentence end prediction subnetwork included in the sentence end detection model.

[0086] The present application also provides a sentence end detection device, comprising:

[0087] A voice data acquisition unit, used to acquire voice data to be detected;

[0088] An acoustic feature extraction unit, used to determine the acoustic feature information of the speech data;

[0089] The sentence end information determination unit is used to determine whether the speech data includes sentence end information according to the acoustic feature information through a sentence end detection model.

[0090] The present application also provides an electronic device, comprising:

[0091] Processor; and

[0092] The memory is used to store a program for implementing the sentence end detection method. After the device is powered on and runs the program of the method through the processor, the following steps are performed: obtaining speech data to be detected; determining acoustic feature information of the speech data; and determining whether the speech data includes sentence end information based on the acoustic feature information through a sentence end detection model.

[0093] The present application also provides a sentence end detection model construction device, comprising:

[0094] A training data determination unit, used to determine a set of corresponding relationships between acoustic feature information of a plurality of data frames corresponding to training speech data and annotation information of whether the training speech data includes a sentence end;

[0095] A network construction unit, used to construct the network structure of the sentence end detection model;

[0096] A learning unit is used to use the acoustic feature information as input data of the sentence end detection model, use the annotation information as output data of the sentence end detection model, and train the network parameters of the sentence end detection model.

[0097] The present application also provides an electronic device, comprising:

[0098] Processor; and

[0099] The memory is used to store a program for implementing a method for building a sentence end detection model. After the device is powered on and runs the program of the method through the processor, the following steps are performed: determining a set of corresponding relationships between acoustic feature information of multiple data frames corresponding to training speech data and annotation information of whether the training speech data includes the end of a sentence; building a network structure of a sentence end detection model; using the acoustic feature information as input data of the sentence end detection model and the annotation information as output data of the sentence end detection model to train the network parameters of the sentence end detection model.

[0100] The present application also provides an electronic device, comprising:

[0101] Processor; and

[0102] The memory is used to store a program for implementing a voice interaction method. After the device is powered on and runs the program of the method through the processor, the following steps are performed: collecting user voice data; if the user voice silence duration is greater than a first duration threshold, sending a sentence end detection request for the voice data to a server; if the server detects the sentence end information, turning off the microphone.

[0103] Optionally, the equipment includes: an ordering machine, a vending machine, a ticket machine, and a chat robot.

[0104] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the computer-readable storage medium is run on a computer, the computer executes the above-mentioned various methods.

[0105] The present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the above-mentioned various methods.

[0106] Compared with the prior art, this application has the following advantages:

[0107] The voice interaction system provided in the embodiment of the present application collects user voice data through a smart speaker; if the user voice silence duration is greater than a first duration threshold, a sentence end detection request for the voice data is sent to a server; the server responds to the request, and determines the acoustic feature information of subsequent voice of the voice data according to the acoustic feature information of multiple data frames of the voice data through the first acoustic feature determination subnetwork included in the sentence end detection model; and determines the semantic feature information of the subsequent voice according to the text sequence of the voice data through the semantic feature determination subnetwork included in the sentence end detection model; determines whether the voice data includes sentence end information according to the acoustic feature information and semantic feature information of the subsequent voice through the sentence end prediction subnetwork included in the sentence end detection model; if the server detects the sentence end information, the smart speaker turns off the microphone. This processing method allows the learnable sentence end detection model to use both speech and semantic information to determine whether to close the microphone. While using speech signals, semantic signals are also used. Semantic signals are helpful for determining the end of a sentence. If the semantics indicate that the sentence is incomplete, then even if there is a long pause, it can be judged as not the end of the sentence, reducing misjudgment; if the semantics indicate that the sentence is complete, then even if the silence time does not reach the threshold, it can be judged as the end of the sentence, and the microphone can be closed, shortening the response time of the speaker; therefore, the accuracy of the timing of closing the microphone of the smart speaker can be effectively improved, thereby saving the time of closing the microphone, and also reducing the situation where the sentence is interrupted due to mistaken closing of the microphone. In addition, this processing method also has at least the following technical effects:

[0108] 1) Since the input data of the sentence end detection model is the acoustic features of multiple data frames of speech data, and the output data is the sentence end detection result, the model is a complete end-to-end model. Since the end-to-end model works in a data-driven manner and does not rely on human experience, it can mute the microphone more flexibly, accurately, and timely, and can effectively shorten the microphone mute time on the end.

[0109] 2) Since the acoustic and semantic features of the subsequent speech are automatically integrated during the speech decoding process, and the end of the sentence is judged based on the integrated features during decoding, the delay caused by the alignment of the acoustic and semantic features is avoided. At the same time, the time consumed by the sentence end detection subnetwork is almost negligible, so the microphone can be muted more accurately and quickly, which can effectively shorten the microphone muting time on the terminal.

[0110] 3) Since the sentence end judgment is based on the dual information of voice and semantics of the subsequent speech, the information is richer and the judgment is more accurate, so the microphone can be muted more accurately, which can effectively shorten the microphone muting time on the terminal. BRIEF DESCRIPTION OF THE DRAWINGS

[0111] Figure 1 A structural diagram of an embodiment of a voice interaction system provided by the present application;

[0112] Figure 2 A schematic diagram of a scenario of an embodiment of a voice interaction system provided by the present application;

[0113] Figure 3 A schematic diagram of device interaction of an embodiment of a voice interaction system provided by the present application;

[0114] Figure 4 A schematic diagram of a sentence end detection model of an embodiment of a voice interaction system provided by the present application;

[0115] Figure 5 A specific schematic diagram of a sentence end detection model of an embodiment of a voice interaction system provided by the present application;

[0116] Figure 6 A specific schematic diagram of a sentence end detection model of an embodiment of a voice interaction system provided by the present application;

[0117] Figure 7 A specific schematic diagram of a sentence end detection model of an embodiment of a voice interaction system provided by the present application;

[0118] Figure 8 A specific schematic diagram of a sentence end detection model of an embodiment of a voice interaction system provided by the present application;

[0119] Fig. 9 A specific schematic diagram of a sentence end detection model of an embodiment of a voice interaction system provided by the present application;

[0120] Fig.10 A rendering of an embodiment of a voice interaction system provided by the present application;

[0121] Fig.11 The present application provides a flowchart of an embodiment of a voice interaction method. DETAILED DESCRIPTION

[0122] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0123] In the present application, a voice interaction system, method and device, a sentence end detection method and device, a sentence end detection model construction method and device, a smart speaker, and an electronic device are provided. Each solution is described in detail in the following embodiments.

[0124] First embodiment

[0125] Please refer to Figure 1, which is a schematic diagram of an embodiment of a voice interaction system of the present application. The voice interaction system provided in this embodiment includes: a server 1 and an intelligent speaker 2.

[0126] Server 1 may be a server deployed on a cloud server, or may be a server dedicated to implementing a voice interaction system, and may be deployed in a data center.

[0127] Smart Speaker 2 can be a tool for home consumers to surf the Internet using voice, such as ordering songs, shopping online, or getting weather forecasts. It can also control smart home devices, such as opening curtains, setting refrigerator temperature, and heating up water heaters in advance.

[0128] Please refer to Figure 2 , which is a scenario diagram of the voice interaction system of the present application. The server 1 and the smart speaker 2 can be connected through a network, such as the smart speaker 2 can be connected to the Internet through WIFI, etc. The user interacts with the smart speaker through voice. The user issues a voice command to the smart speaker 2 (such as asking about the weather, asking the smart speaker to adjust the air-conditioning operation mode, etc.). If the smart speaker 2 detects that the user's voice silence duration reaches a first duration threshold, it sends a sentence end detection request for the voice data to the server 1; the server 1 uses the sentence end detection model to detect whether the user's command is finished; if the server 1 detects the end of the sentence information, the smart speaker 2 turns off the microphone and ends the sound reception. The smart speaker 2 recognizes the user's command through voice recognition technology and executes the command.

[0129] For example, the user pauses after saying "Today is Hangzhou", but the server 1 determines that the semantics are obviously incomplete and the speech does not include the end of the sentence information, so the microphone will not be muted.

[0130] For another example, after the user finishes saying "How is the weather in Hangzhou today", there is a pause in the voice. The server 1 also determines that the semantics are complete, and the voice includes the end of the sentence information, so the microphone can be muted without waiting. In addition, before automatically muting the microphone, the user can be asked whether he has finished speaking, and the microphone can be muted after the user indicates that he has finished speaking.

[0131] Please refer to Figure 3, which is a device schematic diagram of the voice interaction system of the present application. In this embodiment, the smart speaker collects user voice data; if the user voice silence duration is greater than the first duration threshold, a sentence end detection request for the voice data is sent to the server; the server responds to the request, and determines the acoustic feature information of the subsequent voice of the voice data through the first acoustic feature determination subnetwork included in the sentence end detection model, at least according to the acoustic feature information of multiple data frames of the voice data; and determines the semantic feature information of the subsequent voice according to the text sequence of the voice data through the semantic feature determination subnetwork included in the sentence end detection model; determines whether the voice data includes sentence end information according to the acoustic feature information and semantic feature information of the subsequent voice through the sentence end prediction subnetwork included in the sentence end detection model; if the server detects the sentence end information, the smart speaker turns off the microphone.

[0132] The first duration threshold can be determined according to actual needs, such as being set to 100 milliseconds. The smaller the first duration threshold, the more frequent the sentence end detection is, which can save more microphone closing time, but the server load is greater.

[0133] The silence duration can be determined in the following manner: Determine the silence duration through a voice activity detection (VAD) module. The VAD signal can be used to indicate whether the user's voice is silent, with the silent part being 0 and the sound part being non-0. In the case of a large ambient noise, the noise data can be cleared first, and then the silence duration detection is performed on the user's voice data after the noise is cleared.

[0134] In this embodiment, if the server does not detect the end of the sentence information and the silence time is greater than the second time threshold, the microphone is turned off. The second time threshold can be determined according to actual needs, such as being set to 1 second. In this way, even if the server does not detect the end of the sentence information, if the user's voice is silent for too long, the microphone will be turned off even if the words are not finished, which can avoid the possibility of other background noise introduced by long waiting time, affecting the accuracy of the subsequent semantic understanding process.

[0135] The model provided in the embodiment of the present application uses an end-to-end deep neural network to fuse speech and semantic information to predict the probability of whether a user has finished speaking a sentence. In order to avoid ASR (Automatic Speech Recognition) decoding to obtain text first and then re-extracting features from the text, the decoding process of ASR is actually improved. A language model pre-trained with large-scale text data can be introduced into it, and deep speech and semantic fusion is directly performed inside the model, so as to directly use the intermediate fused speech information and semantic information to judge whether the sentence is finished during the decoding process.

[0136] like Figure 4 As shown, the server 1 determines the subnetwork through the first acoustic feature included in the sentence end detection model, and determines the subnetwork according to the acoustic feature information (x1, x2, ..., x T ), determine the subsequent voice of the voice data (y u ) And, determining a subnetwork through the semantic features included in the sentence end detection model, according to the text sequence (y0, ..., y u-1 ), determine the semantic feature information of the subsequent speech Determine whether the speech data includes sentence end information based on the acoustic feature information and semantic feature information of the subsequent speech by using the sentence end prediction subnetwork included in the sentence end detection model. Finally, the sentence end probability (P(y ep |y U-1 ,…,y0,x)).

[0137] The text sequence of the speech data (y0, ..., y u-1 ), which can be determined by the language model subnetwork included in the sentence end detection model. In this embodiment, the acoustic feature fbank feature is extracted from the user speech data as the input data of the model, denoted as x1, x2, ..., x T Since the technology for extracting acoustic features is a relatively mature existing technology, it will not be described here in detail.

[0138] In this embodiment, the server 1 is also used to learn the sentence end detection model from the correspondence between the acoustic feature information of multiple data frames corresponding to the training speech data and the annotation information of whether the training speech data includes the sentence end.

[0139] In specific implementation, the server can first obtain the training data set and build a model network, and then use machine learning to continuously adjust the network parameters according to the training data until the gap between the predicted data output by the network and the labeled data in the training data is less than the gap threshold. The model training is completed and the adjusted network parameters can be stored for use in the sentence end detection stage.

[0140] like Figure 5 As shown, in this embodiment, the first acoustic feature determination subnetwork includes: a second acoustic feature determination subnetwork and a third acoustic feature determination subnetwork; the acoustic feature information (h of the speech data) is determined by the second acoustic feature determination subnetwork according to the acoustic feature information of the plurality of data frames. enc); through the third acoustic feature determination subnetwork, the acoustic feature information of the subsequent speech is determined according to the acoustic feature information of the speech data and the text sequence. By adopting this processing method, a more accurate h enc , which can improve the accuracy of sentence end detection.

[0141] like Figure 6 As shown, the second acoustic feature determination subnetwork can adopt the encoder structure in the speech recognition network. The Encoder network is used to determine the acoustic features x1, x2, ..., x T Encode and obtain the encoded feature h enc . Among them, x1,x2,…,x T is the original feature, and there may be no connection between the features; while the encoded feature h enc It is a higher-level feature, and there are connections between features. Figure 6 It can be seen that the Encoder network of this embodiment is mainly composed of a 2-layer CNN and a 5-layer transformer network. Each layer of transformer block may include a normalization layer, a multi-head attention layer, a dense layer, a residual layer, followed by a normalization layer and a feed forward layer.

[0142] like Figure 7As shown, during the specific implementation, the sentence end detection model may include a speech recognition subnetwork, and the speech recognition subnetwork includes the second acoustic feature determination subnetwork and the pronunciation unit determination subnetwork; the server can also be used to determine the pronunciation unit sequence of the speech data according to the acoustic feature information of the speech data through the pronunciation unit determination subnetwork. In this embodiment, an additional pronunciation unit determination subnetwork (Pinyin network PinyinNet) is connected to the Encoder part to output the Pinyin sequence. The PinyinNet can only rely on the Encoder to perform CTC (Connectionist temporal classification) decoding of Pinyin. During training, the loss loss can be calculated using the labeled Pinyin (ground truth Pinyin), and the loss will be returned to the Encoder as regularization to train a better Encoder. For example: output "tian mao jing ling jin tian hang zhou tian qi zen me yang". This processing method allows the acoustic feature encoding to be performed according to the more accurate second acoustic feature determination subnetwork, thereby improving the accuracy of sentence end detection. It should be noted that the pronunciation unit determination subnetwork is only effective in the model training stage and does not need to be used in the sentence end detection stage. In addition, the pronunciation unit determination subnetwork does not need to be trained separately.

[0143] like Figure 7 As shown, in a specific implementation, the sentence end detection model may also include a language model subnetwork, and the language model subnetwork includes the semantic feature determination subnetwork and the text prediction subnetwork; the server can also be used to determine the text corresponding to the subsequent speech through the text prediction subnetwork according to the acoustic feature information and semantic feature information of the subsequent speech; if the next text is a sentence end symbol, the text sequence can be sent back to the smart speaker.

[0144] It should be noted that the text sequence of the speech data (y0, ..., y u-1 ), which can be determined by the language model subnetwork included in the sentence end detection model. In specific implementation, a language model pre-trained with large-scale text data can be introduced into the model, and deep speech and semantic fusion can be directly performed inside the model, so as to directly use the intermediate fused speech information and semantic information to judge whether it is the end of the sentence during the decoding process. In addition, by introducing a language model pre-trained with large-scale text data into the model, the accuracy of semantic features can be effectively improved, thereby improving the accuracy of sentence end detection. Since the training of language models belongs to the relatively mature existing technology, it will not be repeated here.

[0145] like Figure 7As shown, in this embodiment, the decoding part of the model includes a third acoustic feature determination subnetwork (AM transformer) and a semantic feature determination subnetwork (LM transformer). Among them, the AM transformer can simultaneously pay attention to the acoustic features h of the encoder. enc and the decoded text y0,y1,…,y u-1 , LMtransformer only pays attention to the decoded text y0,y1,…,y u-1 Therefore, the AM transformer mainly relies on complete acoustic features and decoded text (decoded text is also generated in this process) to predict the features of the next word from an acoustic perspective; the LM transformer is first initialized by a language model trained on large-scale text, and mainly relies on decoded text to predict the features of the next word from the perspective of the language model. The features obtained by the AM transformer and the LM transformer are and

[0146] As Figure 8 As shown in the figure, the corresponding AM transformer and LM transformer models can be specifically described as follows: AM transformer and LM transformer both use the transformer model structure, where AM transformer contains two layers of transformer blocks and LM transformer contains three layers of transformer blocks. Each transformer block contains a normalization layer, a multi-head attention layer, a dense layer, a residual layer, followed by a normalization layer and a feed forward layer.

[0147] In summary, the network structure of the third acoustic feature determination subnetwork can adopt the Transformer model; the network structure of the semantic feature determination subnetwork adopts the Transformer model. With this network structure, the decoding speed is faster than that of the LSTM network, so the efficiency of sentence end detection can be effectively improved.

[0148] As Fig. 9As shown, through the feature deep fusion subnetwork included in the sentence end detection model, the deep fusion features of the acoustic feature information and semantic feature information of the subsequent speech are determined according to the acoustic feature information and semantic feature information of the subsequent speech; through the text prediction subnetwork, the text corresponding to the subsequent speech is determined according to the deep fusion features; through the sentence end prediction subnetwork, whether the speech data includes sentence end information is determined according to the deep fusion features.

[0149] In specific implementation, the encoded acoustic features can be and text features In this embodiment, a deep fusion network is used (which can be replaced by other networks) to obtain the fused features. The fusion methods here include but are not limited to direct splicing, or using an attention mechanism, or using a gating mechanism.

[0150] It should be noted that fusion is the fusion of the two parts of information from AM and LM. However, the fusion of these two parts of information requires a certain mechanism. The simplest mechanism is to directly splice the vectors of the two, which can be used for feature alignment. In addition, the attention mechanism is to sum the information of the two weighted by importance. The gating mechanism is to selectively allow one piece of information to pass through and not the other.

[0151] After the server has fused the features through the feature deep fusion sub-network, the deep fusion features will be input into the decoder module of the speech recognition sub-network (i.e., the text prediction sub-network) to decode the next word. In the specific implementation, during the training phase, the decoder can use a greedy algorithm, i.e., y0,y1,…,y u-1 Using the annotated text (groundtruth text), directly predict the probability P(y u |y u-1 ,…,y0,x). In the prediction stage (inference), the decoder can use the beam search algorithm, y0,y1,…,y u-1 Using the decoded text, predict the probability output P(y u |y u-1 ,…,y0,x) (there are beam size candidate words).

[0152] After the user voice data is decoded by the speech recognition subnetwork in the sentence end detection model, the deep fusion feature of the last end symbol can be taken and input into the Endpointer network (sentence end detection subnetwork) to determine whether it is the end of the sentence, and the output is 0 or 1, 0 can represent not the end of the sentence, and 1 can represent the end of the sentence. In specific implementation, the Endpointer network can be a binary classification network composed of two fully connected layers.

[0153] It should be noted that the encoder network, AM transformer network, LM transformer network, and deep fusion network Fusion in the sentence end detection model structure can all be replaced by other networks. For example, the encoder network can be replaced by LSTM, Bi-LSTM, RNN, Bert, etc., the AM transformer and LM transformer networks can be replaced by unidirectional language models such as LSTM, GPT, GPT-2, and the Fusion network can be replaced by Gated Fusion Network, Memory Network, etc.

[0154] for Fig. 9 The sentence end detection model shown in the figure can be specifically used by the server to learn the initialization parameters of the semantic feature determination subnetwork and the text prediction subnetwork from the corpus of the labeled sentence start and end symbols; learn the speech recognition subnetwork and the language model subnetwork from the correspondence between the acoustic feature information of multiple data frames corresponding to the training speech data, the pronunciation unit sequence labeling information, and the text sequence of the labeled sentence start and end symbols; learn the sentence end detection subnetwork from the correspondence between the acoustic feature information of multiple data frames corresponding to the training speech data and the labeling information of whether the training speech data includes the sentence end. Wherein, the labeled text sequence of the training speech data may include the sentence start and end symbols.

[0155] In specific implementation, the pronunciation unit determination subnetwork and the second acoustic feature determination subnetwork in the speech recognition subnetwork can also be learned from the correspondence between the acoustic feature information of multiple data frames corresponding to the training speech data and the pronunciation unit sequence annotation information.

[0156] The present application implements the training of the entire end-to-end sentence end model provided, which may include three parts: a pre-trained language model (LM transformer), an end-to-end ASR module (including Encoder, PinyinNet, AM transformer, LM transformer, Fusion, Decoder), and a sentence end module (Endpointer).

[0157] (1) Pre-trained language model LM transformer

[0158] During the training process, the LM transformer in the model structure I is first pre-trained with a large-scale Chinese corpus, and the model parameters obtained by the pre-training are used as initialization.

[0159] (2) Training data construction of end-to-end ASR module

[0160] In this embodiment, the end-to-end ASR module includes the above-mentioned Encoder, PinyinNet, AM transformer, LM transformer, Fusion, and Decoder structures. The input of the model is the fbank features of the audio, as well as the pinyin and text corresponding to the audio. For any sentence of text, a start token can be added at the beginning and end. <s>and an end token <e>,for example" <s>Tmall Genie: What's the weather like in Hangzhou today? <e>The LM transformer is initialized with the parameters of the pre-trained language model, and all parameters of the end-to-end ASR module are tuned together during training.

[0161] (3) Construction of training data for the sentence end module

[0162] In this embodiment, the input of the entire end-to-end sentence-end model is the fbank feature, and the output is the judgment of whether it is the end of the sentence. After the end-to-end ASR module is trained, the sentence-end module mainly trains the parameters of the Endpointer network. The construction process of the training data may include two parts, one is the acquisition of the fbank feature, and the other is the label of whether it is the end of the sentence. In this embodiment, the time to call the end-to-end sentence-end model is mainly determined based on VAD, and the audio fbank segment obtained when the VAD silence duration reaches the duration threshold (such as 100ms) is intercepted, and then input into the end-to-end ASR module to obtain the decoded text; at the same time, the complete audio is also input into the end-to-end ASR module to obtain the decoded text. If the text decoded from the audio segment is the same as the text decoded from the complete audio, the sentence-end label is 1; if they are not the same, the sentence-end label is 0. During training, the parameters of the end-to-end ASR module can be fixed, and only the parameters of the Endpointer can be trained.

[0163] like Fig.10 As shown, the sentence end detection under the prior art is only performed on the speaker end. If silence of 700ms is detected, a microphone closing signal is initiated, and then the text is sent down for processing of subsequent tasks. The end-to-end sentence end model provided in the embodiment of the present application is performed in the cloud, and the calling timing is determined according to the VAD on the speaker end. Every time the VAD on the end detects silence of 100ms, the end will request the cloud to perform sentence end detection to determine whether it is the end of the sentence. If it is not the end of the sentence, no response is made, and the end continues to receive the sound until the next silence of 100ms, when a request for sentence end detection is again initiated to the cloud; if it is determined to be the end of the sentence at this time, a microphone closing signal is initiated to the end, and the text is sent down for processing of subsequent tasks; if the last silence of 100ms is still determined to be not the end of the sentence, the microphone is closed according to the original microphone closing logic (silence reaches 700ms).

[0164] It can be seen from the above embodiments that the voice interaction system provided by the embodiments of the present application collects user voice data through a smart speaker; if the user voice silence duration is greater than the first duration threshold, a sentence end detection request for the voice data is sent to the server; the server responds to the request, and determines the acoustic feature information of the subsequent voice of the voice data according to the acoustic feature information of multiple data frames of the voice data through the first acoustic feature determination subnetwork included in the sentence end detection model; and determines the semantic feature information of the subsequent voice according to the text sequence of the voice data through the semantic feature determination subnetwork included in the sentence end detection model; determines whether the voice data includes sentence end information according to the acoustic feature information and semantic feature information of the subsequent voice through the sentence end prediction subnetwork included in the sentence end detection model; if the server detects the sentence end information, the smart speaker turns off the microphone. This processing method allows the learnable sentence end detection model to use both voice and semantic information to determine whether to mute the microphone. While using voice signals, semantic signals are also used. Semantic signals are helpful in determining the end of a sentence. If the semantics indicate that the sentence is incomplete, then even if there is a long pause, it can be judged as not the end of the sentence, reducing misjudgment. If the semantics indicate that the sentence is complete, then even if the silence time does not reach the threshold, it can be judged as the end of the sentence, and the microphone can be muted, shortening the response time of the speaker. Therefore, the accuracy of the timing of muting the microphone of the smart speaker can be effectively improved, thereby saving the time for muting the microphone, and also reducing the situation where the sentence is interrupted due to mistakenly muting the microphone.

[0165] Second embodiment

[0166] In the above embodiment, a voice interaction system is provided. Correspondingly, the present application also provides a voice interaction method, and the execution subject of the method can be a smart speaker, a vending machine, a ticket machine, a chat robot, etc. The method corresponds to the embodiment of the above system. The parts of this embodiment that are the same as the first embodiment are not repeated here, please refer to the corresponding parts in the first embodiment.

[0167] Please refer to Fig.11 , which is a schematic diagram of an embodiment of a speech recognition method provided by the present application. The method comprises:

[0168] Step S901: Collect user voice data.

[0169] Step S903: If the silence duration of the user's voice is greater than the first duration threshold, a sentence end detection request for the voice data is sent to the server.

[0170] In one example, the silence duration is determined in the following manner: determining the silence duration through a voice activity detection module.

[0171] Step S905: If the server detects the end of sentence information, the microphone is turned off.

[0172] In an example, the method may further include the following step: if the server does not detect the end-of-sentence information and the silence time is greater than a second duration threshold, turning off the microphone.

[0173] In one example, the method may further include the following steps: 1) determining the ambient noise value; 2) if the ambient noise value is greater than a noise threshold, clearing the noise data in the user voice data; 3) determining the silence duration based on the denoised user voice data.

[0174] For example, when a user is interacting with a smart speaker by voice, the surrounding environment is relatively noisy (such as the TV volume is relatively loud, the house sound insulation effect is poor, etc.). At this time, since the smart speaker cannot detect the user's voice silence information, it is impossible to perform sentence end detection processing in time through the server, resulting in the failure to close the microphone in time. In this case, the noise value of the surrounding environment can be determined by existing technology. If the environmental noise value is determined to be greater than the noise threshold (which can be determined according to actual needs, and the unit can be decibel), the noise data in the collected user voice data must be cleared, such as the sound of the TV, the noise generated by cars on the road, etc., so as to ensure that the user's silence information is detected in time, so that the end of the sentence detection processing can be performed later through the server. This processing method can effectively improve the accuracy of the microphone closing time.

[0175] In one example, the method may further include the following steps: 1) determining the user's speaking duration based on the user voice data; 2) determining a speaking duration threshold based on the user's historical voice data; 3) if the user's speaking duration reaches the speaking duration threshold, determining that the voice data includes sentence end information.

[0176] For example, based on the historical voice interaction duration records between the user and the smart speaker, it is found that the user usually speaks for a short time (such as 20 seconds). The speech duration threshold (such as 25 seconds) can be determined based on this duration. When the user interacts with the smart speaker by voice, the user's speech duration (such as 26 seconds) can be determined first. If the user's speech duration is longer than the threshold, it can be directly determined that the user has finished speaking without the need for end-of-sentence detection processing on the server side, thereby achieving timely mic muting. This processing method allows the microphone to be muted even if the ambient noise is large. In addition, it can also effectively reduce the server load.

[0177] In one example, if the server detects the end of a sentence, it collects the instruction information of the user confirming that the speech is finished; according to the instruction information, the microphone is turned off. For example, after the smart speaker detects the end of a sentence through the server, it asks the user whether the speech is finished. If the user confirms that it is, the microphone is turned off. This processing method can avoid accidentally turning off the microphone, thereby effectively improving the user experience.

[0178] In one example, the method may further include the following steps: 1) extracting first voiceprint voice data from user voice data; 2) determining the silence duration based on the first voiceprint voice data; 3) the end-of-sentence detection request includes a sentence-end detection request for the first voiceprint voice data. For example, when a user interacts with a smart speaker and there are other users speaking at the same time, the collected user voice data includes voice data of at least two voiceprints, from which the first voiceprint voice data of the real user can be extracted, and the silence duration is determined based on the data; in this case, the end-of-sentence detection request includes a sentence-end detection request for the first voiceprint voice data. With this processing method, the real user's voice data can be accurately extracted without determining the ambient noise value; therefore, the accuracy of the microphone closing time can be effectively improved.

[0179] In one example, the method may further include the following steps: 1) judging whether there are first voice segment data and second voice segment data that are not contextually semantically related based on the user voice data; 2) if the above judgment result is yes, turning off the microphone. For example, when the user is interacting with the smart speaker and there are other users speaking around, the collected user voice data includes the previous and next two segments of voice data whose contextual semantic information is not related, and it is directly judged that the user has finished speaking. With this processing method, the microphone can be turned off in time, thereby effectively improving the accuracy of the microphone turning off time.

[0180] In one example, the method may further include the following steps: 1) judging whether there are first voice segment data and second voice segment data that are not semantically related to the context based on the user voice data; 2) if the above judgment result is yes, sending a sentence end detection request for the first voice segment data to the server; if the server detects the sentence end information, turning off the microphone. For example, after the user says "How is the weather in Hangzhou today" to the smart speaker, he immediately speaks to other users. The user's voice does not pause or the pause time does not reach the first duration threshold, and it is the voice of the same user's voiceprint. At this time, the smart speaker detects that the semantics of the two voice contents are not related, and sends a sentence end detection request for the first voice segment data to the server. If the server determines that the semantics of the voice segment are also complete, it means that the sentence end information is detected, and the microphone can be muted without waiting. Even if the user is always talking to other users, it will not affect the microphone muting. With this processing method, the microphone can be muted in time, thereby effectively improving the accuracy of the microphone muting time.

[0181] In specific implementation, if the server does not detect the end-of-sentence information, it can continue to collect the user's third voice segment data that is semantically related to the first voice segment. When the silence time after the third voice segment reaches the first duration threshold, a sentence end detection request for the third voice segment data is sent to the server; if the server detects the end-of-sentence information, the microphone is turned off.

[0182] Third embodiment

[0183] In the above embodiment, a voice interaction method is provided, and correspondingly, the present application also provides a voice interaction device. The device corresponds to the embodiment of the above method. The parts of this embodiment that are the same as the first embodiment are not repeated here, please refer to the corresponding parts in the first embodiment.

[0184] A voice interaction device provided by the present application includes:

[0185] A voice collection unit, used to collect user voice data;

[0186] A request sending unit, configured to send a sentence end detection request for the voice data to a server if the user voice silence duration is greater than a first duration threshold;

[0187] The microphone closing unit is used to close the microphone if the server detects the end of sentence information.

[0188] Fourth embodiment

[0189] The present application also provides an electronic device. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described below is only illustrative.

[0190] An electronic device of this embodiment includes: a microphone, a processor and a memory; the memory is used to store a program for implementing a voice interaction method. After the device is powered on and runs the program of the method through the processor, the following steps are performed: collecting user voice data; if the user voice silence duration is greater than a first duration threshold, sending a sentence end detection request for the voice data to a server; if the server detects the sentence end information, turning off the microphone.

[0191] The electronic device may be a smart speaker, a food ordering machine, a vending machine, a ticket machine, a chat robot, and the like.

[0192] Fifth embodiment

[0193] In the above embodiment, a voice interaction system is provided. Correspondingly, the present application also provides a voice interaction method, and the execution subject of the method can be a server, etc. The method corresponds to the embodiment of the above system. The parts of this embodiment that are the same as the first embodiment are not repeated here, please refer to the corresponding parts in the first embodiment.

[0194] A speech recognition method provided by the present application includes:

[0195] Step 1: Receive a sentence end detection request for user voice data sent by a terminal device.

[0196] Step 2: Determine the acoustic feature information of subsequent speech of the speech data at least based on the acoustic feature information of multiple data frames of the speech data through the first acoustic feature determination subnetwork included in the sentence end detection model; and determine the semantic feature information of the subsequent speech based on the text sequence of the speech data through the semantic feature determination subnetwork included in the sentence end detection model.

[0197] In one example, the first acoustic feature determination subnetwork includes: a second acoustic feature determination subnetwork and a third acoustic feature determination subnetwork; the acoustic feature information of the speech data is determined by the second acoustic feature determination subnetwork according to the acoustic feature information of the plurality of data frames; the acoustic feature information of the subsequent speech is determined by the third acoustic feature determination subnetwork according to the acoustic feature information of the speech data and the text sequence. The text sequence can be determined by the language model subnetwork in the sentence end detection model.

[0198] In one example, the sentence end detection model includes a speech recognition subnetwork, and the speech recognition subnetwork includes the second acoustic feature determination subnetwork and a pronunciation unit determination subnetwork; the method may also include the following steps: determining the pronunciation unit sequence of the speech data according to the acoustic feature information of the speech data through the pronunciation unit determination subnetwork.

[0199] In one example, the sentence end detection model includes a language model subnetwork, and the language model subnetwork includes the semantic feature determination subnetwork and the text prediction subnetwork; the method may also include the following steps: determining the text corresponding to the subsequent speech according to the acoustic feature information and semantic feature information of the subsequent speech through the text prediction subnetwork.

[0200] In one example, through the feature deep fusion subnetwork included in the sentence end detection model, based on the acoustic feature information and semantic feature information of the subsequent speech, the deep fusion features of the acoustic feature information and semantic feature information of the subsequent speech are determined; through the text prediction subnetwork, based on the deep fusion features, the text corresponding to the subsequent speech is determined; through the sentence end prediction subnetwork, based on the deep fusion features, it is determined whether the speech data includes sentence end information.

[0201] In one example, through the feature deep fusion subnetwork included in the sentence end detection model, the deep fusion features of the acoustic feature information and semantic feature information of the subsequent speech are determined according to the acoustic feature information and semantic feature information of the subsequent speech; through the sentence end prediction subnetwork, it is determined whether the speech data includes sentence end information according to the deep fusion features.

[0202] Step 3: Determine whether the speech data includes sentence-end information based on the acoustic feature information and semantic feature information of the subsequent speech through the sentence-end prediction subnetwork included in the sentence-end detection model.

[0203] In one example, the method may further include the following steps: learning the sentence end detection model from a set of correspondences between acoustic feature information of multiple data frames corresponding to the training speech data and annotation information of whether the training speech data includes the sentence end.

[0204] In one example, the sentence end detection model can be trained through the following steps: 1) learning the initialization parameters of the semantic feature determination subnetwork and the text prediction subnetwork from a corpus that annotates sentence start symbols and end symbols; 2) learning the speech recognition subnetwork and the language model subnetwork from the correspondence between the acoustic feature information of multiple data frames corresponding to the training speech data, the pronunciation unit sequence annotation information, and the text sequence annotating the sentence start symbols and end symbols; 3) learning the sentence end detection subnetwork from the correspondence between the acoustic feature information of multiple data frames corresponding to the training speech data and the annotation information of whether the training speech data includes the sentence end.

[0205] In one example, the method may further include the following step: learning the initialization parameters of the speech recognition subnetwork from the correspondence between acoustic feature information of multiple data frames corresponding to the training speech data and pronunciation unit sequence annotation information.

[0206] In one example, the network structure of the third acoustic feature determination subnetwork includes: a Transformer model; the network structure of the semantic feature determination subnetwork includes: a Transformer model.

[0207] Sixth embodiment

[0208] In the above embodiment, a voice interaction method is provided, and correspondingly, the present application also provides a voice interaction device. The device corresponds to the embodiment of the above method. The parts of this embodiment that are the same as the first embodiment are not repeated here, please refer to the corresponding parts in the first embodiment.

[0209] A voice interaction device provided by the present application includes:

[0210] A request receiving unit, configured to receive a sentence end detection request for user voice data sent by a terminal device;

[0211] A feature determination unit, configured to determine acoustic feature information of subsequent speech of the speech data at least according to acoustic feature information of multiple data frames of the speech data through a first acoustic feature determination subnetwork included in the sentence end detection model; and to determine semantic feature information of the subsequent speech according to a text sequence of the speech data through a semantic feature determination subnetwork included in the sentence end detection model;

[0212] The sentence end determination unit is used to determine whether the speech data includes sentence end information according to the acoustic feature information and semantic feature information of the subsequent speech through the sentence end prediction subnetwork included in the sentence end detection model.

[0213] Seventh embodiment

[0214] The present application also provides an electronic device. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described below is only illustrative.

[0215] An electronic device of the present embodiment includes: a processor and a memory; the memory is used to store a program for implementing a voice interaction method, and after the device is powered on and runs the program of the method through the processor, the following steps are performed: receiving a sentence end detection request for user voice data sent by a terminal device; determining the acoustic feature information of subsequent voice of the voice data through a first acoustic feature determination subnetwork included in a sentence end detection model, at least based on the acoustic feature information of multiple data frames of the voice data; and determining the semantic feature information of the subsequent voice based on a text sequence of the voice data through a semantic feature determination subnetwork included in the sentence end detection model; determining whether the voice data includes sentence end information based on the acoustic feature information and semantic feature information of the subsequent voice through a sentence end prediction subnetwork included in the sentence end detection model.

[0216] Eighth embodiment

[0217] In the above embodiment, a voice interaction system is provided. Correspondingly, the present application also provides a sentence end detection method, and the execution subject of the method can be a server, etc. The method corresponds to the embodiment of the above system. The parts of this embodiment that are the same as the first embodiment are not repeated here, please refer to the corresponding parts in the first embodiment.

[0218] A sentence end detection method provided by the present application includes:

[0219] Step 1: Obtain the voice data to be detected;

[0220] Step 2: Determine the acoustic feature information of the speech data;

[0221] Step 3: Determine whether the speech data includes sentence-end information based on the acoustic feature information through a sentence-end detection model.

[0222] Since the sentence end detection model can be the sentence end detection model in the embodiment, it will not be described here in detail. Please refer to the description of the corresponding part of the embodiment 1 for details.

[0223] Ninth embodiment

[0224] In the above embodiment, a sentence end detection method is provided, and correspondingly, the present application also provides a sentence end detection device. The device corresponds to the embodiment of the above method. The parts of this embodiment that are the same as the first embodiment are not repeated here, please refer to the corresponding parts in the first embodiment.

[0225] The present application provides a sentence end detection device comprising:

[0226] A voice data acquisition unit, used to acquire voice data to be detected;

[0227] An acoustic feature extraction unit, used to determine the acoustic feature information of the speech data;

[0228] The sentence end information determination unit is used to determine whether the speech data includes sentence end information according to the acoustic feature information through a sentence end detection model.

[0229] Tenth embodiment

[0230] The present application also provides an electronic device. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described below is only illustrative.

[0231] An electronic device of this embodiment includes: a microphone, a processor and a memory; the memory is used to store a program for implementing a sentence end detection method. After the device is powered on and the program of the method is run through the processor, the following steps are performed: acquiring speech data to be detected; determining acoustic feature information of the speech data; and determining whether the speech data includes sentence end information based on the acoustic feature information through a sentence end detection model.

[0232] Eleventh Embodiment

[0233] In the above embodiment, a voice interaction system is provided. Correspondingly, the present application also provides a method for constructing a sentence end detection model. The execution subject of the method can be a server, etc. The method corresponds to the embodiment of the above system. The parts of this embodiment that are the same as the first embodiment are not repeated here. Please refer to the corresponding parts in the first embodiment.

[0234] A method for constructing a sentence end detection model provided in this application includes:

[0235] Step 1: determining a corresponding relationship set between acoustic feature information of a plurality of data frames corresponding to training speech data and annotation information of whether the training speech data includes the end of a sentence;

[0236] Step 2: Construct the network structure of the sentence end detection model;

[0237] Step 3: Use the acoustic feature information as input data of the sentence end detection model, use the annotation information as output data of the sentence end detection model, and train the network parameters of the sentence end detection model.

[0238] In one example, the network structure of the sentence end detection model is as follows: Fig. 9 As shown, for the model of this structure, the following training steps can also be included before step 3: 1) learning the initialization parameters of the semantic feature determination subnetwork and the text prediction subnetwork from the corpus with the sentence start and end symbols annotated; 2) learning the speech recognition subnetwork and the language model subnetwork from the correspondence between the acoustic feature information of multiple data frames corresponding to the training speech data, the pronunciation unit sequence annotation information, and the text sequence with the sentence start and end symbols annotated. After that, step 3 can be executed.

[0239] Twelfth Embodiment

[0240] In the above embodiment, a method for constructing a sentence end detection model is provided. Correspondingly, the present application also provides a voice interaction device. The device corresponds to the embodiment of the above method. The parts of this embodiment that are the same as the first embodiment are not repeated here. Please refer to the corresponding parts in the first embodiment.

[0241] The present application provides a method for constructing a sentence end detection model, comprising:

[0242] A training data determination unit, used to determine a set of corresponding relationships between acoustic feature information of a plurality of data frames corresponding to training speech data and annotation information of whether the training speech data includes a sentence end;

[0243] A network construction unit, used to construct the network structure of the sentence end detection model;

[0244] A learning unit is used to use the acoustic feature information as input data of the sentence end detection model, use the annotation information as output data of the sentence end detection model, and train the network parameters of the sentence end detection model.

[0245] Thirteenth Embodiment

[0246] The present application also provides an electronic device. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described below is only illustrative.

[0247] An electronic device of the present embodiment includes: a microphone, a processor and a memory; the memory is used to store a program for implementing a method for building a sentence end detection model. After the device is powered on and the program of the method is run through the processor, the following steps are performed: determining a set of corresponding relationships between acoustic feature information of multiple data frames corresponding to training speech data and annotation information of whether the training speech data includes the end of a sentence; building a network structure of a sentence end detection model; using the acoustic feature information as input data of the sentence end detection model and the annotation information as output data of the sentence end detection model, and training the network parameters of the sentence end detection model.

[0248] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

[0249] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0250] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0251] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0252] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.< / e> < / s> < / e> < / s>

Claims

1. A voice interaction system, characterized in that: include: Smart speakers, used to collect user voice data; If the user's voice silence duration is greater than the first duration threshold, sending a sentence end detection request for the voice data to the server; If the server detects the end of sentence information, the microphone is turned off; A server end is used to learn a sentence-end detection model from a set of corresponding relationships between acoustic feature information of multiple data frames corresponding to training speech data and annotation information of whether the training speech data includes a sentence-end; and, receive the sentence-end detection request; determine the acoustic feature information of subsequent speech of the speech data according to the acoustic feature information of multiple data frames of the speech data through the first acoustic feature determination subnetwork included in the sentence-end detection model; and determine the semantic feature information of the subsequent speech according to the text sequence of the speech data through the semantic feature determination subnetwork included in the sentence-end detection model; determine the deep fusion features of the acoustic feature information and semantic feature information of the subsequent speech according to the acoustic feature information and semantic feature information of the subsequent speech through the feature deep fusion subnetwork included in the sentence-end detection model; determine whether the speech data includes sentence-end information according to the deep fusion features through the sentence-end prediction subnetwork included in the sentence-end detection model; determine the text corresponding to the subsequent speech according to the deep fusion features through the text prediction subnetwork included in the sentence-end detection model; if the text corresponding to the subsequent speech is a sentence terminator, send the text sequence back to the smart speaker.

2. A voice interaction method for the system according to claim 1, characterized in that: include: Collect user voice data; If the user's voice silence duration is greater than the first duration threshold, sending a sentence end detection request for the voice data to the server; If the server detects the end of sentence information, the microphone is turned off.

3. The method according to claim 2, characterized in that The silence duration is determined in the following manner: The silence duration is determined by a voice activity detection module.

4. The method according to claim 2, characterized in that: Also includes: If the server does not detect the end-of-sentence information and the silence time is greater than the second duration threshold, the microphone is turned off.

5. The method according to claim 2, characterized in that: Also includes: Determine the ambient noise value; If the environmental noise value is greater than the noise threshold, clearing the noise data in the user voice data; The silence duration is determined according to the user voice data after noise removal.

6. The method according to claim 2, characterized in that Also includes: Determine the user's speaking time according to the user voice data; Determine the speech duration threshold based on the user's historical voice data; If the user's speaking time reaches a speaking time threshold, it is determined that the voice data includes sentence end information.

7. The method according to claim 2, characterized in that If the server detects the end of the sentence, it collects the instruction information of the user confirming that the speech is completed; According to the instruction information, the microphone is turned off.

8. The method according to claim 2, characterized in that: Extracting first voiceprint voice data from user voice data; Determining the silence duration according to the first voiceprint speech data; The sentence end detection request includes a sentence end detection request for the first voiceprint speech data.

9. The method according to claim 2, characterized in that: Also includes: According to the user voice data, determining whether there are first voice segment data and second voice segment data that are not contextually semantically related; If the above judgment result is yes, the microphone is turned off.

10. A voice interaction method for the system of claim 1, characterized in that: include: Receiving a sentence end detection request for user voice data sent by a terminal device; Determine the acoustic feature information of subsequent speech of the speech data at least according to the acoustic feature information of multiple data frames of the speech data through the first acoustic feature determination subnetwork included in the sentence end detection model; and determine the semantic feature information of the subsequent speech according to the text sequence of the speech data through the semantic feature determination subnetwork included in the sentence end detection model; Through the sentence-end prediction subnetwork included in the sentence-end detection model, it is determined whether the speech data includes sentence-end information according to the acoustic feature information and semantic feature information of the subsequent speech.

11. The method according to claim 10, characterized in that The first acoustic feature determination subnetwork includes: a second acoustic feature determination subnetwork and a third acoustic feature determination subnetwork; Determining the acoustic feature information of the speech data according to the acoustic feature information of the plurality of data frames through a second acoustic feature determination subnetwork; The acoustic feature information of the subsequent speech is determined by the third acoustic feature determination subnetwork according to the acoustic feature information of the speech data and the text sequence.

12. The method according to claim 10, characterized in that The sentence end detection model includes a speech recognition subnetwork, wherein the speech recognition subnetwork includes a second acoustic feature determination subnetwork and a pronunciation unit determination subnetwork; The method further comprises: The pronunciation unit determination subnetwork is used to determine the pronunciation unit sequence of the speech data according to the acoustic feature information of the speech data.

13. The method according to claim 10, characterized in that Determining features of deep fusion of the acoustic feature information and the semantic feature information of the subsequent speech according to the acoustic feature information and the semantic feature information of the subsequent speech through a feature deep fusion subnetwork included in the sentence end detection model; Through the sentence-end prediction subnetwork, it is determined whether the speech data includes sentence-end information according to the deep fusion features.

14. The method according to claim 10, characterized in that Also includes: Learning the initialization parameters of the semantic feature determination subnetwork and the text prediction subnetwork from a corpus that annotates sentence start and end symbols; A speech recognition subnetwork and a language model subnetwork are learned from the correspondence between acoustic feature information of a plurality of data frames corresponding to the training speech data, pronunciation unit sequence labeling information, and text sequences labeling sentence start and end symbols; The sentence end detection model is learned from a set of correspondences between acoustic feature information of a plurality of data frames corresponding to the training speech data and annotation information of whether the training speech data includes a sentence end.

15. The method according to claim 14, characterized in that Also includes: The initialization parameters of the speech recognition subnetwork are learned from the correspondence between the acoustic feature information of multiple data frames corresponding to the training speech data and the pronunciation unit sequence annotation information.

16. The method according to claim 11, characterized in that The network structure of the third acoustic feature determination subnetwork includes: a Transformer model; The network structure of the semantic feature determination sub-network includes: a Transformer model.

17. A method for detecting the end of a sentence, characterized in that: include: Obtain the voice data to be detected; Determining acoustic feature information of the speech data; Determining whether the speech data includes sentence-end information according to the acoustic feature information by using a sentence-end detection model; the sentence-end detection model is learned from a corresponding relationship set, and the corresponding relationship includes a corresponding relationship between acoustic feature information of multiple data frames corresponding to the training speech data and annotation information of whether the training speech data includes a sentence-end; The sentence end detection model includes: a first acoustic feature determination subnetwork, a semantic feature determination subnetwork, a feature depth fusion subnetwork, a sentence end prediction subnetwork, and a text prediction subnetwork; The first acoustic feature determination subnetwork is used to determine the acoustic feature information of subsequent speech of the speech data according to the acoustic feature information of the multiple data frames of the speech data; The semantic feature determination subnetwork is used to determine the semantic feature information of the subsequent speech according to the text sequence of the speech data; The feature deep fusion subnetwork is used to determine the features of the deep fusion of the acoustic feature information and the semantic feature information of the subsequent speech according to the acoustic feature information and the semantic feature information of the subsequent speech; The sentence-end prediction subnetwork is used to determine whether the speech data includes sentence-end information based on the deep fusion features; the text prediction subnetwork is used to determine the text corresponding to the subsequent speech based on the deep fusion features; if the text corresponding to the subsequent speech is a sentence terminator, the text sequence is used as the speech recognition text.

18. A method for constructing a sentence end detection model, wherein the sentence end detection model is used to execute the sentence end detection method according to claim 17, characterized in that: include: Determining a set of corresponding relationships between acoustic feature information of a plurality of data frames corresponding to the training speech data and annotation information of whether the training speech data includes the end of a sentence; Construct the network structure of the sentence end detection model; The acoustic feature information is used as input data of the sentence end detection model, and the annotation information is used as output data of the sentence end detection model to train the network parameters of the sentence end detection model.

19. A voice interaction device, used to execute the voice interaction method according to claim 2, characterized in that: include: A voice collection unit, used to collect user voice data; A request sending unit, configured to send a sentence end detection request for the voice data to a server if the user voice silence duration is greater than a first duration threshold; The microphone closing unit is used to close the microphone if the server detects the end of the sentence information.

20. A smart speaker, used to execute the voice interaction method according to claim 2, characterized in that: include: processor; as well as The memory is used to store a program for implementing the voice interaction method. After the smart speaker is powered on and runs the program of the method through the processor, the following steps are performed: collecting user voice data; if the user voice silence duration is greater than a first duration threshold, sending a sentence end detection request for the voice data to the server; if the server detects the sentence end information, turning off the microphone.

21. A voice interaction device, used to execute the voice interaction method according to claim 10, characterized in that: include: A request receiving unit, configured to receive a sentence end detection request for user voice data sent by a terminal device; A feature determination unit, configured to determine acoustic feature information of subsequent speech of the speech data at least according to acoustic feature information of multiple data frames of the speech data through a first acoustic feature determination subnetwork included in the sentence end detection model; and to determine semantic feature information of the subsequent speech according to a text sequence of the speech data through a semantic feature determination subnetwork included in the sentence end detection model; The sentence end determination unit is used to determine whether the speech data includes sentence end information according to the acoustic feature information and semantic feature information of the subsequent speech through the sentence end prediction subnetwork included in the sentence end detection model.

22. An electronic device, used to execute the voice interaction method according to claim 10, characterized in that: include: processor; as well as A memory for storing a program for implementing a voice interaction method. After the device is powered on and the program of the method is run through the processor, the following steps are performed: receiving a sentence end detection request for user voice data sent by a terminal device; determining the acoustic feature information of subsequent voice of the voice data through a first acoustic feature determination subnetwork included in a sentence end detection model, at least based on the acoustic feature information of multiple data frames of the voice data; and determining the semantic feature information of the subsequent voice based on a text sequence of the voice data through a semantic feature determination subnetwork included in the sentence end detection model; determining whether the voice data includes sentence end information based on the acoustic feature information and semantic feature information of the subsequent voice through a sentence end prediction subnetwork included in the sentence end detection model.

23. A sentence end detection device, used to execute the sentence end detection method according to claim 17, characterized in that: include: A voice data acquisition unit, used to acquire voice data to be detected; An acoustic feature extraction unit, used to determine the acoustic feature information of the speech data; The sentence end information determination unit is used to determine whether the speech data includes sentence end information according to the acoustic feature information through a sentence end detection model.

24. An electronic device, used to execute the sentence end detection method according to claim 17, characterized in that: include: processor; as well as The memory is used to store a program for implementing the sentence end detection method. After the device is powered on and runs the program of the method through the processor, the following steps are performed: obtaining speech data to be detected; determining acoustic feature information of the speech data; and determining whether the speech data includes sentence end information based on the acoustic feature information through a sentence end detection model.

25. A sentence end detection model construction device, used to execute the sentence end detection model construction method according to claim 18, characterized in that: include: A training data determination unit, used to determine a set of corresponding relationships between acoustic feature information of a plurality of data frames corresponding to training speech data and annotation information of whether the training speech data includes a sentence end; A network construction unit, used to construct the network structure of the sentence end detection model; A learning unit is used to use the acoustic feature information as input data of the sentence end detection model, use the annotation information as output data of the sentence end detection model, and train the network parameters of the sentence end detection model.

26. An electronic device, used to execute the sentence end detection model construction method according to claim 18, characterized in that: include: processor; as well as The memory is used to store a program for implementing a method for building a sentence end detection model. After the device is powered on and runs the program of the method through the processor, the following steps are performed: determining a set of corresponding relationships between acoustic feature information of multiple data frames corresponding to training speech data and annotation information of whether the training speech data includes the end of a sentence; building a network structure of a sentence end detection model; using the acoustic feature information as input data of the sentence end detection model and the annotation information as output data of the sentence end detection model to train the network parameters of the sentence end detection model.

27. An electronic device, used to execute the voice interaction method according to claim 2, characterized in that: include: processor; as well as The memory is used to store a program for implementing a voice interaction method. After the device is powered on and runs the program of the method through the processor, the following steps are performed: collecting user voice data; if the user voice silence duration is greater than a first duration threshold, sending a sentence end detection request for the voice data to a server; if the server detects the sentence end information, turning off the microphone.

28. The device according to claim 27, characterized in that The equipment includes: an ordering machine, a vending machine, a ticketing machine, and a chat robot.

Citation Information

Patent Citations

  • Method and system for endpoint automatic detection of audio record

    CN102971787A

  • Voice command detection model constructing method, detection method and system, man-machine interaction method and device

    CN107665704A

  • Cloud-terminal-based speech processing method and apparatus

    CN107919130A