WO2023241473A1 - 处理语音数据的方法及终端设备 - Google Patents

处理语音数据的方法及终端设备 Download PDF

Info

Publication number
WO2023241473A1
WO2023241473A1 PCT/CN2023/099358 CN2023099358W WO2023241473A1 WO 2023241473 A1 WO2023241473 A1 WO 2023241473A1 CN 2023099358 W CN2023099358 W CN 2023099358W WO 2023241473 A1 WO2023241473 A1 WO 2023241473A1
Authority
WO
WIPO (PCT)
Prior art keywords
voice data
data
server
voice
confidence level
Prior art date
Application number
PCT/CN2023/099358
Other languages
English (en)
French (fr)
Inventor
宋凯凯
周剑辉
吴奇强
宋超领
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023241473A1 publication Critical patent/WO2023241473A1/zh

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/28Constructional details of speech recognition systems
    • G10L15/30Distributed recognition, e.g. in client-server systems, for mobile phones or network applications
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • G10L2015/223Execution procedure of a spoken command

Definitions

  • the present application relates to the field of terminal technology, and in particular, to a method for processing voice data and a terminal device.
  • the electronic device can obtain the user's voice data and transmit the voice data to the server in real time.
  • the server processes the voice data to obtain machine instructions corresponding to the voice data.
  • the server sends the machine instructions to The electronic device then executes the machine instructions.
  • this application provides a method and terminal device for processing voice data, which can reduce the load of the server.
  • an embodiment of the present application provides a method for processing voice data, which is characterized in that applied to a terminal device, the method includes:
  • the first voice data when it is determined that the first voice data is the first round of dialogue in the first session and the first session is a wake-up-triggered session, identify the first voice data and obtain the first A recognition result and a first confidence level, the first confidence level is used to indicate the credibility of the first recognition result; if the first confidence level is greater than or equal to a first threshold, based on the first recognition
  • the result is a first machine instruction.
  • the first machine instruction may be used to instruct the user to perform operations indicated by the first voice data.
  • the terminal device when the terminal device obtains the first voice data and determines that the first voice data is the first round of conversation in the first session without wake-up triggering, the terminal device can recognize the first voice data to obtain the first Recognition results and first confidence level. Since the first confidence level may indicate the confidence level of the first recognition result, for the first round of sessions in the wake-up-free trigger session, the terminal device may perform the first recognition result when the first confidence level is greater than or equal to the first threshold.
  • the degree of credibility is high, the local end generates the first machine instruction based on the first recognition result, which saves bandwidth with the server, reduces the load pressure on the server, and improves the efficiency of processing the first voice data. .
  • the determining that the first voice data is the first round of dialogue in the first session and the The first session is a session that avoids wake-up triggering, including:
  • the first status indication information corresponding to the first voice data is detected, it is determined that the first voice data is the first round of dialogue in the first session and the first session is a wake-up trigger-free session. .
  • the first status indication information may be used to indicate that the first voice data is the first round of dialogue in the first session and the first session is a wake-up trigger-free session. Through the first status indication information, it can be accurately and clearly indicated that the first voice data is the first round of dialogue in the first session and the first session is a wake-up trigger-free session.
  • first status indication information corresponding to the first voice data can be generated, and the first status indication information can be used to indicate that the first voice data is the first one in the first conversation. It is a round-robin conversation and the first conversation is a conversation that avoids wake-up triggering.
  • the first status indication information can be added to the first voice data, or the first voice data and the first status indication information can be encapsulated in the same data packet, or the first voice data can be It is stored corresponding to the first status indication information.
  • the first status indication information may include a first session identifier, a first round identifier, and a first trigger type.
  • the session corresponding to the first session identifier is the first session
  • the first round identifier is used to indicate that the first voice data is the first round of conversation
  • the first trigger type identifier is used to indicate that the triggering mode of the first session is wake-up-free. trigger.
  • the second machine instruction is obtained from the server based on the first voice data.
  • the first voice data may be the Nth round of dialogue in the wake-up-free triggered session, or it may be any round of dialogue that is not wake-up-free triggered.
  • the common point is that the terminal device has responded to the user at least once at this time, that is, the terminal device can determine that it has started a conversation with the user. Therefore, it can directly request the server to process the first voice data to improve the accuracy of processing the first voice data.
  • the first voice data includes a preset wake-up word, an event corresponding to an event wake-up trigger, and a key wake-up trigger. Any one of the corresponding key operations generates second status indication information corresponding to the first voice data.
  • the second status indication information can be used to indicate that the first voice data is the Nth round of dialogue in the second session, and /Or, the second session is triggered in a voice wake-up trigger, an event wake-up trigger, or a key wake-up trigger, where N is an integer greater than 1.
  • the second status indication information can be added to the first voice data, or the first voice data and the second status indication information can be encapsulated in the same data packet, or the first voice data can be It is stored corresponding to the second status indication information.
  • the second status indication information may include a second session identifier and a second round identifier, where the second session identifier corresponds to the second session, and the second round identifier is used to indicate that the first voice data is the N rounds dialogue.
  • the second status indication information may include a second trigger type identifier, and the second trigger type identifier may be used to indicate that the trigger mode of the second session is a voice wake-up trigger, an event wake-up trigger, or a key wake-up trigger.
  • the method further includes: sending the first voice data to the server; and obtaining second machine instructions from the server based on the first voice data, including: receiving the server based on the The second machine instruction sent by the first voice data.
  • sending the first voice data to the server includes: when the first voice data is detected, sending the first voice data to the server; and receiving the first voice data from the server.
  • the method further includes: sending a first request to the server, the first request being used to request the server to process the first voice data. to identify.
  • sending the first voice data to the server includes:
  • the method further includes: sending first text data corresponding to the first voice data to the server; and obtaining a second machine instruction from the server based on the first voice data, including : Receive the second machine instruction sent by the server based on the first text data.
  • sending the first text data corresponding to the first voice data to the server includes: if the first confidence level is less than the first threshold, sending a third text data to the server. Two requests and the first text data, the second request is used to request the server to identify the first text data.
  • the second request may carry the first text data.
  • the terminal device may also send the first text data to the server when it obtains the first text data.
  • second status indication information corresponding to the second voice data may be detected.
  • the second status indication information is used to indicate that the second voice data is the Nth round of dialogue in the first session, and N is greater than 1. integer.
  • the first recognition result may include at least one of the first text data and the first intention data corresponding to the first voice data
  • the first entity set may include at least one of the second entity set and the third entity set
  • the first entity set may include at least one of the second entity set and the third entity set.
  • a model may include at least one of a second model and a third model.
  • the second entity set and the third entity set may include at least one identical entity.
  • the terminal device can determine the first text data corresponding to the first voice data through the second entity set and the second model, and determine the first intention based on the first text data through the third entity set and the third model. data.
  • the method further includes: if the first confidence is less than the first threshold, obtaining a first entity from the server based on the first voice data, the first entity being The server recognizes the first voice data and adds the first entity to the first entity set.
  • the method further includes: if the first confidence level is less than the first threshold, obtaining a second recognition result from the server based on the first voice data, the second recognition result The first voice data is recognized by the server; and the first model is updated based on the second recognition result.
  • the first recognition result includes first text data corresponding to the first voice data
  • the second recognition result includes second text data corresponding to the first voice data
  • Obtaining the second recognition result from the server based on the first voice data includes: sending the first voice data to the server;
  • the first recognition result includes first intention data corresponding to the first voice data
  • the second recognition result includes at least one of second intention data and second text data
  • the Both the second intention data and the second text data correspond to the first voice data
  • obtaining the second recognition result from the server based on the first voice data includes:
  • the server may determine the second text data corresponding to the first voice data through the fifth entity set and the fifth model, and determine the second intention based on the second text data through the fourth entity set and the fourth model. data.
  • the terminal device stores the first entity from the server to the second entity set and/or the third entity set of the terminal, thereby expanding the second entity set and/or the third entity set of the terminal, so that the terminal device obtains it again
  • the voice data of the first entity may be included, the voice data can be accurately identified, There is no need to request the server to recognize the voice data again.
  • the terminal device updates the second model and/or the third model of the terminal device by using the second text data and/or the second intention data obtained from the recognition of the first voice data by the server, so that the second model and/or the third model of the terminal device are updated.
  • the third model has a more accurate recognition capability, and when voice data that may be similar to the first voice data is acquired again, it can accurately identify the voice data, and there is no need to request the server to recognize the voice data again.
  • the first recognition result includes first intention data corresponding to the first voice data, and if the first confidence level is greater than or equal to a first threshold, based on the first Before the recognition result generates the first machine instruction, the method further includes: determining that the first intention data includes the first intention.
  • the terminal device can continue to perform subsequent steps when it is determined that the first intention data includes the first intention, but does not continue to perform subsequent steps when it is determined that the first intention data does not include the first intention, which reduces the It reduces the load pressure on terminal devices and servers, reduces incorrect responses to user conversations, and further improves the accuracy and user experience of processing voice data.
  • embodiments of the present application provide a method for processing voice data, which is characterized in that it is applied to a terminal device, and the method includes:
  • the first voice data when it is determined that the first voice data is the first round of dialogue in the first session, or when it is determined that the first voice data is the Nth dialogue in the first session and the When the first session is a session that does not require wake-up triggering, the first voice data is recognized to obtain a first recognition result and a first confidence level.
  • the first confidence level is used to indicate the credibility of the first recognition result. degree; if the first confidence level is greater than or equal to the first threshold, generate a first machine instruction based on the first recognition result.
  • the terminal device when the terminal device obtains the first voice data and determines that the first voice data is the first round of dialogue in the first session or the first session is a session that does not require a wake-up trigger, the terminal device may process the first voice data. Recognition is performed to obtain a first recognition result and a first confidence level. Since the first confidence level may indicate the confidence level of the first recognition result, for any round of the wake-up-free triggered sessions, or for the first round of sessions among the non-wake-free triggered sessions, the terminal device may When the first confidence level is greater than or equal to the first threshold, that is, the credibility of the first recognition result is relatively high, the local end generates the first machine instruction based on the first recognition result, thereby saving bandwidth with the server. This reduces the load pressure on the server and improves the efficiency of processing the first voice data.
  • the method further includes:
  • embodiments of the present application provide a method for processing voice data, which is applied to the first device.
  • the method includes:
  • the first voice data recognizes the first voice data to obtain a first recognition result and a first confidence level, the first confidence level is used to indicate the credibility of the first recognition result; if The first confidence level is high is equal to or equal to the first threshold, then a first machine instruction is generated based on the first recognition result.
  • the method further includes:
  • the first device may include a terminal device
  • the second device may include a server
  • embodiments of the present application provide a device for processing voice data.
  • the device has the function of implementing the behavior of a terminal device or a first device in the above aspects and possible implementations of the above aspects.
  • Functions can be implemented by hardware, or by hardware executing corresponding software.
  • Hardware or software includes one or more modules or units corresponding to the above functions. For example, a transceiver module or unit, a processing module or unit, an acquisition module or unit, etc.
  • embodiments of the present application provide an electronic device, including: a memory and a processor.
  • the memory is used to store a computer program; the processor is used to execute any one of the first aspect and any one of the second aspect when calling the computer program.
  • embodiments of the present application provide a chip system.
  • the chip system includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement any of the above-mentioned aspects of the first aspect.
  • the chip system may be a single chip or a chip module composed of multiple chips.
  • embodiments of the present application provide a computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, the method described in any one of the above-mentioned first aspects is implemented.
  • embodiments of the present application provide a computer program product.
  • the electronic device causes the electronic device to execute any one of the first aspect, any one of the second aspect, or any one of the third aspect. The method described in one item.
  • Figure 2 is a schematic structural diagram of a system for processing voice data provided by an embodiment of the present application
  • Figure 3 is a schematic diagram of a scenario for processing voice data provided by an embodiment of the present application.
  • Figure 9 is a schematic diagram of a display interface provided by an embodiment of the present application.
  • FIG 11 is a schematic flowchart of another method for processing voice data provided by an embodiment of the present application.
  • FIG. 1 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.
  • the electronic device 100 may include a processor 110, a memory 120, a communication module 130, a microphone 140, and the like.
  • the processor 110 may include one or more processing units, and the memory 120 is used to store program codes and data.
  • the processor 110 can execute computer execution instructions stored in the memory 120 to control and manage the actions of the electronic device 100 .
  • the communication module 130 may be used for communication between various internal modules of the electronic device 100, or communication between the electronic device 100 and other external electronic devices, etc.
  • the communication module 130 may include an interface, etc., such as a USB interface.
  • the USB interface may be an interface that complies with the USB standard specification, and may specifically be a Mini USB interface, Micro USB interface, etc. USB interface, USB Type C interface, etc.
  • the USB interface can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through them. This interface can also be used to connect other electronic devices, such as AR devices, etc.
  • the communication module 130 may include an audio device, a radio frequency circuit, a Bluetooth chip, a wireless fidelity (Wi-Fi) chip, a near-field communication (NFC) module, etc., and may be configured through a variety of different The interaction between the electronic device 100 and other electronic devices is realized in a manner.
  • Wi-Fi wireless fidelity
  • NFC near-field communication
  • the user can interact with the terminal device by triggering a session with the terminal device, causing the terminal device to perform operations desired by the user, including completing tasks instructed by the user, chatting with the user, etc.
  • the preprocessing module 211 can be used to preprocess the collected original voice data.
  • the preprocessing module 211 can reduce or remove interference signals in the original voice data, where the interference signals can include noise emitted by other objects in the user's environment, sounds played by the speaker of device A 210, and noise from the microphone itself. The noise generated by the physical structure during the sound collection process, etc.
  • the preprocessing module 211 may determine relevant data required for subsequent steps of processing the voice data, such as the location of the sound source corresponding to the voice data, the microphone that receives the voice data, etc.
  • VAD 214 also known as voice endpoint detection module or voice boundary module.
  • VAD 214 can be used to identify the part that actually includes the user's voice from the voice data, and can also delete the part that does not include the user's voice, thereby reducing the amount of data for subsequent processing. In some embodiments, if the VAD 214 determines that the voice data does not include the user's voice, the voice data may not be subsequently processed, that is, the voice data may be discarded.
  • the VAD 214 when the VAD 214 determines that the voice data includes the user's voice, it may also add a session identifier to the voice data, and the session identifier may be used to indicate the session to which the voice data belongs. In some embodiments, when the VAD 214 determines that the voice data includes the user's voice, it can also add a turn identifier to the voice data, and the turn identifier can be used to indicate the turn of the voice data in the conversation.
  • the session may refer to a continuous dialogue between the user and device A 210, and a session may include at least one round of dialogue.
  • event wake-up trigger means that device A 210 wakes up the voice assistant application to process voice data when detecting a specific event
  • voice wake-up trigger means that the user wakes up the voice assistant application to process voice data by speaking a preset wake-up word
  • button wake-up trigger means The user wakes up the voice assistant to process voice data by clicking a specific button
  • wake-up-free triggering means that device A 210 processes voice data without waking up the voice assistant.
  • ASRa 215 can be used to convert speech data into text data.
  • ASRa 215 can convert the speech data into a letter sequence, and then combine the letters included in the letter sequence to obtain a word or corresponding Chinese character.
  • device A 210 also includes entity set 1 corresponding to ASRa 215, and entity set 1 may include at least one entity (which may also be called a semantic entity).
  • entity can be a noun that represents the exact object.
  • entity set 1 may be an array including at least one entity item, and each entity item may include a standard name and a synonym corresponding to the same entity, where the standard name may be official, formal, or widely known.
  • the name, synonyms can be popular names, slang or privately customized names, etc.
  • ASRa 215 can be based on real The entities included in the entity set 1 determine the text data corresponding to the voice data, thereby improving the accuracy of converting the voice data into text data.
  • entity set 1 includes "restaurant”
  • the letter sequence converted by ASRa 215 to speech data includes "c, a, n, t, i, n, g”.
  • the pinyin combination is “can, "ting”, and there are many Chinese characters whose pinyin is "can” and "ting”. If it is only based on the pinyin combination, it is difficult for ASRa 215 to determine the actual corresponding Chinese character.
  • ASRa 215 can determine that the Chinese character corresponding to this pinyin combination is "restaurant”.
  • ASRa 215 may also determine a confidence level 1 corresponding to the converted text data, the confidence level 1 being used to describe how trustworthy the text data is. In some embodiments, ASRa 215 may also determine indication information 1 corresponding to the converted text data, and the indication information 1 may be used to indicate whether the text data includes entities in entity set 1.
  • NLUa 216 may also determine a confidence level 2 corresponding to the intent data, which may be used to indicate a degree of credibility of the intent data. In some embodiments, NLUa 216 may also determine indication information 2 corresponding to the intent data, which may be used to indicate whether the intent is included in the text data. In some embodiments, NLUa 216 may also determine indication information 3 corresponding to the intent data, which may be used to indicate whether the text data includes a slot value.
  • the decision module 217 may be used to determine whether to process the voice data locally on device A 210 or to request device B 220 to process the voice data. In some embodiments, the decision-making module 217 may determine whether to continue processing the voice data locally on device A 210 or to request device B 220 to process the voice data based on the confidence corresponding to the text data or intent data determined by ASRa 215. If the confidence level is high, you can continue to process the voice data locally on device A 210 to save bandwidth between device A 210 and device B 220, reduce the load pressure on device B 220, and increase the speed of processing voice data; if the If the confidence level is low, device B 220 can be requested to process the voice data to improve the accuracy of processing voice data.
  • device B 220 also stores an entity set 3 corresponding to ASRb 221.
  • the entity set 3 may include at least one entity.
  • entity set 3 may include more entities than entity set 1 .
  • device B 220 also stores an entity set 4 corresponding to NLUb 222.
  • the entity set 4 may include at least one entity.
  • the entity set 4 may include at least one entity.
  • entity set 4 may include more entities than entity set 2.
  • VAD 214, ASRa 215, NLUa 216, decision module 217, DMa 218, ASRb 221, NLUb 222, and DMb 223 can be implemented through machine learning models.
  • device A 210 and device B 220 may include more or fewer modules than shown in Figure 2.
  • device A 210 may also include a natural language generation (natural language generator, NLG) module and a speech synthesis module (text to speech, TTS) module.
  • NLG natural language generator
  • TTS text to speech
  • the NLG module can generate corresponding text data according to the machine instructions or status changes executed by the device A 210.
  • the TTS module can be the opposite of the function of ASRa 215.
  • the TTS module can be used to generate corresponding voice data based on text data.
  • the combination of NLG module, TTS module, NLUa 216, ASRa 215 and DMa 218 can realize the function of device A 210 talking to the user.
  • device B 220 may also include modules that are similar or identical to other modules in device A 210.
  • multiple modules included in device A 210 can be aggregated into fewer modules, or each module can be further split into more modules; similarly, multiple modules included in device B 220 can be Aggregated into fewer modules, or each module can be further split into more modules.
  • the function of at least one module included in the voice assistant application in device A 210 can also be implemented by the operating system of device A 210.
  • the voice data can be preprocessed by the voice assistant application.
  • at least one module included in the voice assistant application in device A 210 can also implement at least part of the functions implemented by the operating system of device A 210.
  • the first recognition result may include first intention data, and may also include first text data; the first model may include a third model, and may also include a second model; the first entity set may include a third set, and may also include a second entity set; the second entity may include entities in the third entity set, and may also include entities in the second entity set; the first confidence level may be determined based on at least one of the second confidence level and the third confidence level; The second recognition result may include second intention data; the first entity may include entities in the fourth entity set. It should be noted that this method is not limited to the specific sequence shown in Figure 4 and below. It should be understood that in other embodiments, the order of some steps of the method can be exchanged with each other according to actual needs, or some of the steps can be It can also be omitted or deleted.
  • the method includes the following steps:
  • device A 210 When device A 210 detects the first voice data, it determines whether the first voice data includes the user's voice. If so, execute S402, otherwise it ends.
  • device A 210 can execute S401 through VAD 214.
  • the first voice data may not be what the user said to device A 210.
  • the first voice data may be noise in the environment around device A 210. Therefore, the first voice data may not be for processing.
  • the first voice data may be voice data that device A 210 can obtain through a microphone. In some embodiments, the first voice data may be voice data that device A 210 can acquire in real time and continuously through the microphone. In some embodiments, the first voice data may be voice data obtained and preprocessed by device A 210, where the preprocessing method may include noise reduction, vocal enhancement, etc., of course, in practical applications, preprocessed The method may also include more or less methods, and the embodiments of this application do not limit the preprocessing method.
  • device A 210 can detect that the first voice data carries the first status indication information or the second status indication information; or, device A 210 can obtain the third status indication information from the data packet contained in the first voice data.
  • One status indication information or second status indication information, or device A 210 can obtain the first status indication information or the second status indication information stored corresponding to the first voice data.
  • Device A 210 determines the first text data and the second confidence level corresponding to the first voice data.
  • device A 210 may also determine first process indication information corresponding to the first text data, and the first process indication information may be used to indicate whether the first text data includes entities in the second entity set.
  • the first process indication information may be a preset first value or a second value. Wherein, when the first process indication information is the first value, it can mean that the first text data includes entities in the second entity set, that is, the entities in the second entity set are hit; when the first process indication information is the second When the value is a value, it can mean that the first text data does not include the entities in the second entity collection, that is, the entities in the second entity collection are not hit.
  • the first value may be 1 and the second value may be 0.
  • device A 210 includes a third entity set, and the third entity set may include at least one entity.
  • Device A 210 may determine the first intention data corresponding to the first voice data and the first intent data corresponding to the first voice data based on the third entity set. The third degree of confidence.
  • device A 210 may determine second process indication information and third process indication information corresponding to the first intention data, and the second process indication information may be used to indicate whether the first intention is included in the first intention data, The third process indication information may be used to indicate whether the first slot value is included in the first intention data.
  • the second entity set and the third entity set may include at least one identical entity.
  • Device A 210 determines whether the first confidence level is greater than or equal to the first threshold. If so, execute S406; otherwise, execute S407.
  • Z represents the first confidence level
  • Process indication information the values of O, P and Q are all 0 or 1
  • c represents the third weight.
  • a may be greater than c.
  • the first weight and the third weight can also be other values.
  • device A 210 may send the second request and the first text data to device B 220 at different times respectively.
  • device A 210 may send the first text data to device B 220 at any time after determining the first text data in S403 and before sending the second request to device B 220 in S407. Therefore, the second request also The first text data does not need to be carried.
  • device A 210 sends the first text data to device B 220 in advance before sending the second request through S407. Then if it is determined through S405 that the first text data needs to be continued to be processed through device B 220, it is not necessary to send the first text data again. text data, improving the efficiency of processing the first voice data.
  • device B 220 may include a fourth entity set, and the fourth entity set may include at least one entity.
  • Device B 220 may determine second intent data corresponding to the first voice data based on the fourth entity set.
  • the fourth entity set may include more entities than the third entity set. In some embodiments, the fourth entity set may include at least some entities in the third entity set.
  • Device B 220 determines the second machine instruction corresponding to the first voice data based on the second intention data.
  • device B 220 may send second intent data to device A 210.
  • Device A 210 may update the third model based on the second intention data, so that the updated third model has more accurate recognition capabilities.
  • device A 210 may use the first text data as a sample, the second intent data as an annotation of the first text data, and train the third model through the first text data and the second intent data.
  • the first request carries the first voice data, and the first request may be used to request recognition of the first voice data.
  • Device B 220 determines the second text data corresponding to the first voice data.
  • device B 220 can execute S412 through ASRb 221.
  • device B 220 may determine second text data corresponding to the first voice data through the fifth model.
  • Device B 220 can input the first voice data into the fifth model to obtain the second text data output by the fifth model.
  • the fifth model may be equivalent to ASRb 221.
  • the fifth entity set may include more entities than the second entity set. In some embodiments, the fifth entity set may include at least some entities in the second entity set.
  • Device B 220 determines the second intention data corresponding to the first voice data based on the second text data.
  • Device B 220 determines the second machine instruction corresponding to the first voice data based on the second intention data.
  • device B 220 can execute S414 through DMb 223.
  • device B 220 sends the second machine instruction to device A 210.
  • device A 210 may, after processing the first voice data to obtain the first text data and the first intention data, send the first text data to device B 220, and obtain the first text data based on the first intention data. Based on the degree of confidence, it is determined whether to continue processing the first voice data on the device A 210 itself, or to request the device B 220 to process the first voice data. Because it is possible to continue processing the first voice data on the device A 210 when the credibility of the first intention data is high, and to request device B 220 when the credibility of the first intent data is low. The first text data is recognized again, thus saving the bandwidth between device A 210 and device B 220, reducing the load pressure on device B 220, and improving the efficiency of processing the first voice data. And it can be understood that since the first intention data is obtained by processing the first text data, the credibility of the first intention data can also be understood as the credibility of the first intention data and the first text data as a whole.
  • the user of device A 210 says to device A 210: "Navigate to the main entrance of hotel A", and device A 210 detects the corresponding first voice data.
  • VAD 214 detects the first voice data and determines that it includes the user's voice, and the first voice data is the first round of dialogue in the wake-up-free trigger session.
  • ASRa 215 recognizes the first voice data and obtains the first text data as "Navigate to Hotel A” and the second confidence level is 90%.
  • NLUa 216 identifies the first text data and obtains the first intention data as "Intent: Navigation; Slot value: Hotel A", and the third confidence level is 90%.
  • the decision module 217 multiplies the second confidence level and the third confidence level to obtain a first confidence level of 81%.
  • the decision module 217 determines to continue processing subsequent steps by device A 210.
  • DMa 218 generates first machine instructions based on the first intent data.
  • the voice control module 213 starts the navigation application, and the navigation application executes the first machine instruction to start navigation, and the end point of the navigation is Hotel A.
  • the decision module 217 determines that device B 220 will perform identification again.
  • Device A 210 sends first text data to device B 220.
  • NLUb 222 identifies the first text data and obtains the second intention data as "Intent: Navigation; Slot value: Hotel A”.
  • DMb 223 generates second machine instructions based on the second intent data.
  • Device B 220 sends a second machine instruction to device A 210.
  • the voice control module 213 starts the navigation application, and the navigation application executes the second machine instruction to start navigation, and the end point of the navigation is Hotel A.
  • the first status indication information may also include only the first trigger type identifier
  • the second status indication information may also include only the second trigger type identifier. That is, for the user to pass When the voice assistant application is awakened by any wake-up method such as a specific event, a key operation, or a preset wake-up word, no matter which round of voice data the first voice data is, device A 210 directly requests device B 220 to process the first voice data through S411. First voice data, for the first voice data without waking up, no matter which round of voice data the first voice data is, device A 210 first attempts to process the first voice on device A 210 through S403-S406. data, and if the credibility of the recognition result is not high, S407 is executed again to request device B 220 to process the first voice data.
  • any wake-up method such as a specific event, a key operation, or a preset wake-up word
  • the first recognition result may include first intention data, and may also include first text data; the first model may include a third model, and may also include a second model; the first entity set may include a third set, and may also include second The entity set; the second entity may include entities in the third entity set, and may also include entities in the second entity set; the first confidence level may be determined based on at least one of the second confidence level and the third confidence level; the second The recognition result may include second intent data; the first entity may include entities in the fourth entity set. It should be noted that this method is not limited to the specific order described in Figure 5 and below. It should be understood that in other embodiments, the order of some steps of the method can be exchanged with each other according to actual needs, or some of the steps can be exchanged. It can also be omitted or deleted.
  • the method includes the following steps:
  • device A 210 determines the first text data and the second confidence level corresponding to the first voice data.
  • device A 210 can execute S501 through ASRa 215.
  • Device A 210 determines the first intention data and the third confidence level corresponding to the first voice data based on the first text data.
  • Device A 210 determines whether the first confidence level is greater than or equal to the first threshold. If so, execute S504, otherwise execute S505.
  • device A 210 can execute S503 through the decision-making module 217.
  • Device A 210 determines the first machine instruction corresponding to the first voice data based on the first intention data.
  • device A 210 can execute S504 through DMa 218.
  • Device A 210 sends a second request to Device B 220.
  • Device B 220 determines second intent data corresponding to the first voice data based on the first text data.
  • device B can execute S506 through NLUb 222.
  • Device B 220 determines the second machine instruction corresponding to the first voice data based on the second intention data.
  • device B 220 can execute S507 through DMb 223.
  • device B 220 sends the second machine instruction to device A 210.
  • the way in which device A 210 executes S501-S505 can be similar or the same as the way in which device A 210 executes S403-S407; the way in which device B executes S506-S508 can be the same as the way in which device B 220 executes S408.
  • the methods of -S410 are similar or identical and will not be repeated here.
  • the first voice data can be any voice data, which further increases the amount of voice data processed by the local end of device A 210, thereby further saving the bandwidth between device A 210 and device B 220, and reducing The load pressure on device B 220 improves the efficiency of processing the first voice data.
  • the first recognition result may include first text data; the first model may include a second model; the first entity set may include a second entity set; the second entity may include entities in the second entity set; the first confidence level It may be a second confidence level; the second recognition result may include second text data; and the first entity may be an entity in the fifth entity set and/or the fourth entity set.
  • this method is not limited to the specific order described in Figure 6 and below. It should be understood that in other embodiments, the order of some steps of the method can be exchanged with each other according to actual needs, or some of the steps can be exchanged with each other according to actual needs. It can also be omitted or deleted.
  • the method includes the following steps:
  • the first status indication information corresponding to the first voice data can be generated, and the first status indication information can be used to indicate that the second voice data is the first voice data.
  • the first round of dialogue in a session and the first session is a session that avoids wake-up triggering.
  • device A 210 detects that the first voice data includes a preset wake-up word, an event corresponding to an event wake-up trigger, and Any one of the key operations corresponding to the key wake-up trigger generates second status indication information corresponding to the first voice data.
  • the second status indication information can be used to indicate that the first voice data is the Nth round in the second session.
  • the trigger mode of the second conversation and/or the second conversation is voice wake-up trigger, event wake-up trigger or key press wake-up trigger, where N is an integer greater than 1.
  • Device A 210 detects the first status indication information or the second status indication information corresponding to the first voice data. If the first status indication information is detected, S603 is executed, and if the second status indication information is detected, S607 is executed.
  • device A 210 can perform S602 through the decision-making module 217.
  • Device A 210 determines the first text data and the second confidence level corresponding to the first voice data.
  • device A 210 can perform S603 through ASRa 215.
  • device A 210 may determine first text data corresponding to the first voice data and a second confidence level based on the second model.
  • device A 210 includes a second entity set, and the second entity set may include at least one entity.
  • Device A 210 may determine the first text data and the second confidence level corresponding to the first voice data based on the first entity set.
  • device A 210 may also determine first process indication information corresponding to the first text data.
  • Device A 210 determines the first intention data corresponding to the first voice data based on the first text data.
  • device A 210 can execute S605 through NLUa 216.
  • device A 210 may determine the first intent data corresponding to the first voice data through the third model.
  • device A 210 includes a third entity set, the third entity set may include at least one entity, and device A 210 may determine the first intent data corresponding to the first voice data based on the third entity set. In some embodiments, device A 210 may determine second process indication information and third process indication information corresponding to the first intent data.
  • the second entity set and the third entity set may include at least one identical entity.
  • device A 210 may not continue to perform subsequent steps, that is, discard the first voice data, when determining that the second process indication information is a third value, that is, the first intention data does not include the first intention.
  • Device A 210 determines the first machine instruction corresponding to the first voice data based on the first intention data.
  • device A 210 can execute S606 through DMa 218.
  • Device A 210 sends the first request to Device B 220.
  • the first request carries the first voice data.
  • device B 220 can execute S608 through ASRb 221.
  • device B 220 may determine second text data corresponding to the first voice data through the fifth model.
  • device B 220 may include a fifth entity set, and the fifth entity set may include at least one entity.
  • Device B 220 may determine second text data corresponding to the first voice data based on the fifth entity set.
  • Device B 220 determines the second intention data corresponding to the first voice data based on the second text data.
  • device B 220 can execute S609 through NLUb 222.
  • device B 220 may determine second intent data corresponding to the first voice data through the fourth model.
  • Device B 220 can input the second text data to the fourth model to obtain the second intent data output by the fourth model.
  • the fourth entity set may include more entities than the third entity set. In some embodiments, the fourth entity set may include at least some entities in the third entity set.
  • Device B 220 determines the second machine instruction corresponding to the first voice data based on the second intention data.
  • device B 220 sends the second machine instruction to device A 210.
  • device B 220 may send the first entity to device A 210.
  • Device A 210 may add the first entity to at least one of the second entity set and the third entity set.
  • the first entity may be an entity obtained by recognizing the first text data by device B 220 and/or an entity obtained by identifying the first voice data.
  • the first entity may be the second text data and the fifth entity.
  • entities included in the set, and/or the first entity may be an entity included in the second intent data and the fourth entity set.
  • device B 220 may send second text data to device A 210.
  • Device A 210 may update the second model based on the second text data, so that the updated second model has more accurate recognition capabilities.
  • device A 210 can use the first voice data as a sample, the second text data as annotations of the first text data, and train the second model through the first voice data and the second text data.
  • At least one of S601 and S602 can be omitted based on the same reason as omitting S401 and S402.
  • device A 210 can determine whether to continue processing the first voice data on device A 210 itself based on the credibility of the first text data, or to request device B 220 to process the first voice data, making the judgment in advance. The opportunity for continued processing by device A 210 or recognition again by device B 220, thereby requesting device B 220 to process the first voice data earlier when it is difficult to accurately process the first voice data, thereby improving the efficiency of processing the first voice data. efficiency and accuracy.
  • the user of device A 210 says to device A 210: "Navigate to the main entrance of hotel A", and device A 210 detects the corresponding first voice data.
  • VAD 214 detects the first voice data and determines that it includes the user's voice, and the first voice data is the first round of dialogue in the wake-up-free trigger session.
  • ASRa 215 recognizes the first voice data and obtains the first text data as "Navigate to attraction A" and the second confidence level is 60%.
  • NLUa 216 identifies the first text data and obtains the first intention data as "Intent: Navigation; Slot value: A attraction”.
  • DMa 218 generates first machine instructions based on the first intent data.
  • the voice control module 213 starts the navigation application, and the navigation application executes the first machine instruction to start navigation, and the end point of the navigation is attraction A.
  • the decision-making module 217 determines that device B 220 will recognize it again.
  • Device A 210 sends the first voice data to device B 220.
  • ASRb 221 recognizes the first voice data and obtains the second text data as "Navigate to the main entrance of Hotel A”.
  • NLUb 222 identifies the second text data and obtains the second intention data as "Intent: Navigation; Slot value: Front entrance of Hotel A”.
  • DMb 223 generates second machine instructions based on the second intent data.
  • Device B 220 sends a second machine instruction to device A 210.
  • the voice control module 213 starts the navigation application, and the navigation application executes the second machine instruction to start navigation, and the end point of the navigation is the main entrance of Hotel A.
  • the first recognition result may include first intention data, and may also include first text data; the first model may include a third model, and may also include a second model; the first entity set may include a third set, and may also include a second entity set; the second entity may include entities in the third entity set, and may also include entities in the second entity set; the first confidence level may be determined based on at least one of the second confidence level and the third confidence level; The second recognition result may include second intent data and may also include second text data; the first entity may include entities in the fourth entity set and/or the fifth entity set.
  • device A 210 detects the first voice data, it determines whether the first voice data includes the user's voice. If so, execute S702, otherwise it ends.
  • device A 210 can execute S701 through VAD 214.
  • the first status indication information corresponding to the first voice data can be generated, and the first status indication information can be used to indicate that the second voice data is the first voice data.
  • the first round of dialogue in a session and the first session is a session that avoids wake-up triggering.
  • device A 210 detects that the first voice data includes a preset wake-up word, an event corresponding to an event wake-up trigger, and Any one of the key operations corresponding to the key wake-up trigger generates second status indication information corresponding to the first voice data.
  • the second status indication information can be used to indicate that the first voice data is the Nth round in the second session.
  • the trigger mode of the second conversation and/or the second conversation is voice wake-up trigger, event wake-up trigger or key press wake-up trigger, where N is an integer greater than 1.
  • Device A 210 detects the first status indication information or the second status indication information corresponding to the first voice data. If the first status indication information is detected, S703 is executed, and if the second status indication information is detected, S707 is executed.
  • device A 210 can perform S702 through the decision-making module 217.
  • Device A 210 determines the first text data and the second confidence level corresponding to the first voice data.
  • device A 210 can execute S703 through ASRa 215.
  • device A 210 may determine first text data corresponding to the first voice data and a second confidence level based on the second model.
  • device A 210 includes a second entity set, and the second entity set may include at least one entity.
  • Device A 210 may determine the first text data and the second confidence level corresponding to the first voice data based on the first entity set.
  • device A 210 may also determine first process indication information corresponding to the first text data.
  • Device A 210 determines the first intention data and the third confidence level corresponding to the first voice data based on the first text data.
  • device A 210 can execute S704 through NLUa 216.
  • device A 210 may determine the first intent data and the third confidence level corresponding to the first voice data through the third model.
  • device A 210 includes a third entity set, and the third entity set may include at least one entity.
  • Device A 210 may determine the first intention data corresponding to the first voice data and the first intent data corresponding to the first voice data based on the third entity set. The third degree of confidence.
  • the second entity set and the third entity set may include at least one identical entity.
  • the processing result in S703 will be passed to the processing result in S704, so the second confidence level can reflect the third confidence level to a certain extent, and the third confidence level is certain.
  • the degree can also reflect the second confidence level, so either the second confidence level or the third confidence level can be omitted.
  • Device A 210 determines whether the first confidence level is greater than or equal to the first threshold. If so, execute S706; otherwise, execute S707.
  • device A 210 can execute S705 through the decision-making module 217.
  • S706 Device A 210 determines the first machine instruction corresponding to the first voice data based on the first intention data.
  • device A 210 can execute S706 through DMa 218.
  • Device A 210 sends the first request to Device B 220.
  • the first request carries the first voice data.
  • device A 210 may send the first voice data to device B 220 at any time after determining that the first voice data carries the first status indication information in S702 and before sending the first request to device B 220 in S707. Therefore, the first request may not carry the first text data.
  • device A 210 sends the first voice data to device B 220 in advance before sending the first request through S707. Then if it is determined through S705 that the first voice data needs to be continued to be processed through device B 220, it is not necessary to send the first voice data again. voice data, improving the efficiency of processing the first voice data.
  • Device B 220 determines the second text data corresponding to the first voice data.
  • device B 220 can execute S708 through ASRb 221.
  • device B 220 may determine second text data corresponding to the first voice data through the fifth model.
  • Device B 220 can input the first voice data into the fifth model to obtain the second text data output by the fifth model.
  • device B 220 may include a fifth entity set, and the fifth entity set may include at least one entity.
  • Device B 220 may determine second text data corresponding to the first voice data based on the fifth entity set.
  • the fifth entity set may include more entities than the second entity set. In some embodiments, the fifth entity set may include at least some entities in the second entity set.
  • Device B 220 determines second intention data corresponding to the first voice data based on the second text data.
  • device B can execute S709 through NLUb 222.
  • device B 220 may determine second intent data corresponding to the first voice data through the fourth model.
  • Device B 220 can input the second text data to the fourth model to obtain the second intent data output by the fourth model.
  • device B 220 may include a fourth entity set, and the fourth entity set may include at least one entity.
  • Device B 220 may determine second intent data corresponding to the first voice data based on the fourth entity set.
  • the fourth entity set may include more entities than the third entity set. In some embodiments, the fourth entity set may include at least some entities in the third entity set.
  • Device B 220 determines the second machine instruction corresponding to the first voice data based on the second intention data.
  • device B 220 can execute S710 through DMb 223.
  • device B 220 sends the second machine instruction to device A 210.
  • device B 220 may send the first entity to device A 210.
  • Device A 210 may add the first entity to at least one of the second entity set and the third entity set.
  • the first entity may be an entity obtained by recognizing the first voice data and/or the first text data by device B 220. That is, the first entity may be an entity included in the second text data and the fifth entity set, And/or, the first entity may be an entity included in the second intent data and the fourth entity set.
  • device B 220 may send second text data to device A 210.
  • Device A 210 may update the second model based on the second text data, so that the updated second model has a more accurate recognition capability.
  • device A 210 can use the first voice data as a sample, the second text data as annotations of the first voice data, and train the second model through the first voice data and the second text data.
  • device B 220 may send second intent data to device A 210.
  • Device A 210 may update the third model based on the second intention data, so that the updated third model has more accurate recognition capabilities.
  • device A 210 may use the first text data as a sample, the second intent data as an annotation of the first text data, and train the third model through the first text data and the second intent data.
  • device A 210 can send the first voice data to device B 220, thereby determining that the credibility of the first intention data is low, and requesting device B 220 to recognize the first voice data. Since the first The voice data includes a larger amount than the first text data, so the accuracy of processing the first voice data can be further improved.
  • the user of device A 210 says to device A 210: "Navigate to the main entrance of hotel A", and device A 210 detects the corresponding first voice data.
  • VAD 214 detects the first voice data and determines that it includes the user's voice, and the first voice data is the first round of dialogue in the wake-up-free trigger session.
  • ASRa 215 recognizes the first voice data and obtains the first text data as "Navigate to Hotel A” and the second confidence level is 90%.
  • device A 210 also sends the first voice data to device B 220.
  • NLUa 216 identifies the first text data and obtains the first intention data as "Intent: Navigation; Slot value: Hotel A", and the third confidence level is 90%.
  • the decision module 217 multiplies the second confidence level and the third confidence level to obtain a first confidence level of 81%.
  • the decision module 217 determines to continue processing subsequent steps by device A 210.
  • DMa 218 generates first machine instructions based on the first intent data.
  • the voice control module 213 starts the navigation application, and the navigation application executes the first machine instruction to start navigation, and the end point of the navigation is Hotel A.
  • ASRb 221 recognizes the first voice data and obtains the second text data as "Navigate to the main entrance of Hotel A”.
  • NLUb 222 identifies the second text data and obtains the second intention data as "Intent: Navigation; Slot value: Front entrance of Hotel A”.
  • DMb 223 generates second machine instructions based on the second intent data.
  • Device B 220 sends a second machine instruction to device A 210.
  • the voice control module 213 starts the navigation application, and the navigation application executes the second machine instruction to start navigation, and the end point of the navigation is the main entrance of Hotel A.
  • the first recognition result may include first intention data, and may also include first text data; the first model may include a third model, and may also include a second model; the first entity set may include a third set, and may also include a second entity set; the second entity may include entities in the third entity set, and may also include entities in the second entity set; the first confidence level may be determined based on at least one of the second confidence level and the third confidence level; The second recognition result may include second intent data and may also include second text data; the first entity may include entities in the fourth entity set and/or the fifth entity set.
  • device A 210 can execute S801 through VAD 214.
  • the first status indication information corresponding to the first voice data can be generated, and the first status indication information can be used to indicate that the second voice data is the first voice data.
  • the first round of dialogue in a session and the first session is a session that avoids wake-up triggering.
  • device A 210 detects that the first voice data includes a preset wake-up word, an event corresponding to an event wake-up trigger, and Any one of the key operations corresponding to the key wake-up trigger generates second status indication information corresponding to the first voice data.
  • the second status indication information can be used to indicate that the first voice data is the Nth round in the second session.
  • the trigger mode of the second conversation and/or the second conversation is voice wake-up trigger, event wake-up trigger or key press wake-up trigger, where N is an integer greater than 1.
  • Device A 210 detects the first status indication information or the second status indication information corresponding to the first voice data. If the first status indication information is detected, S803 is executed, and if the second status indication information is detected, S807 is executed.
  • device A 210 can execute S802 through the decision-making module 217.
  • Device A 210 determines the first text data and the second confidence level corresponding to the first voice data.
  • device A 210 can perform S803 through ASRa 215.
  • device A 210 may determine first text data corresponding to the first voice data and a second confidence level based on the second model.
  • device A 210 includes a second entity set, and the second entity set may include at least one entity.
  • Device A 210 may determine the first text data and the second confidence level corresponding to the first voice data based on the first entity set.
  • device A 210 may also determine first process indication information corresponding to the first text data.
  • Device A 210 determines the first intention data and the third confidence level corresponding to the first voice data based on the first text data.
  • device A 210 can execute S804 through NLUa 216.
  • device A 210 may determine the first intent data and the third confidence level corresponding to the first voice data through the third model.
  • device A 210 includes a third entity set, and the third entity set may include at least one entity.
  • Device A 210 may determine the first intention data corresponding to the first voice data and the first intent data corresponding to the first voice data based on the third entity set. The third degree of confidence.
  • the second entity set and the third entity set may include at least one identical entity.
  • the processing result in S803 will be passed to the processing result in S804, so the second confidence level can reflect the third confidence level to a certain extent, and the third confidence level is certain.
  • the degree can also reflect the second confidence level, so either the second confidence level or the third confidence level can be omitted.
  • S805 Device A 210 determines whether the first confidence level is greater than or equal to the first threshold. If so, perform S806; otherwise, perform S812.
  • device A 210 can execute S805 through the decision-making module 217.
  • Device A 210 determines the first machine instruction corresponding to the first voice data based on the first intention data.
  • device A 210 can execute S806 through DMa 218.
  • Device A 210 sends the first request to Device B 220.
  • the first request carries the first voice data.
  • Device B 220 determines second text data corresponding to the first voice data.
  • device B 220 can execute S808 through ASRb 221.
  • device B 220 may determine second text data corresponding to the first voice data through the fifth model.
  • device B 220 may include a fifth entity set, and the fifth entity set may include at least one entity.
  • Device B 220 may determine second text data corresponding to the first voice data based on the fifth entity set.
  • the fifth entity set may include more entities than the second entity set. In some embodiments, the fifth entity set may include at least some entities in the second entity set.
  • Device B 220 determines second intention data corresponding to the first voice data based on the second text data.
  • device B can execute S809 through NLUb 222.
  • device B 220 may determine second intent data corresponding to the first voice data through the fourth model.
  • device B 220 may include a fourth entity set, and the fourth entity set may include at least one entity.
  • Device B 220 may determine second intent data corresponding to the first voice data based on the fourth entity set.
  • the fourth entity set may include more entities than the third entity set. In some embodiments, the fourth entity set may include at least some entities in the third entity set.
  • Device B 220 determines the second machine instruction corresponding to the first voice data based on the second intention data.
  • device B 220 can execute S810 through DMb 223.
  • device B 220 sends the second machine instruction to device A 210.
  • device B 220 may send the first entity to device A 210.
  • Device A 210 may add the first entity to at least one of the second entity set and the third entity set.
  • the first entity may be an entity obtained by recognizing the first voice data and/or the first text data by device B 220. That is, the first entity may be an entity included in the second text data and the fifth entity set, And/or, the first entity may be an entity included in the second intent data and the fourth entity set.
  • device B 220 may send second text data to device A 210.
  • Device A 210 may update the second model based on the second text data, so that the updated second model has more accurate recognition capabilities.
  • device A 210 can use the first voice data as a sample, the second text data as an annotation of the first voice data, and train the second model through the first voice data and the second text data.
  • device B 220 may send second intent data to device A 210.
  • Device A 210 may update the third model based on the second intention data, so that the updated third model has more accurate recognition capabilities.
  • device A 210 may use the first text data as a sample, the second intent data as an annotation of the first text data, and train the third model through the first text data and the second intent data.
  • Device A 210 obtains second voice data based on the first voice data, and obtains the second machine instruction from device B 220 based on the second voice data.
  • device A 210 can request the user to start the Nth round of dialogue based on the first voice data.
  • Device A 210 obtains the second voice data in a similar or identical manner to obtaining the first voice data.
  • the second voice data can be It is the Nth round of conversation in the first conversation, so the second voice data corresponds to the second status indication information.
  • the second status indication information may include a first session identifier, a second round identifier, and a first trigger type of the first session, wherein the second round identifier may be used to indicate that the second voice data is the first session identifier.
  • N rounds of dialogue may include a first session identifier, a second round identifier, and a first trigger type of the first session, wherein the second round identifier may be used to indicate that the second voice data is the first session identifier.
  • device A 210 may generate a third machine instruction based on the first voice data, where the third machine instruction generates dialogue prompt information, and the dialogue prompt information may be used to prompt the user to start the Nth round of dialogue.
  • Device A 210 sends the dialogue prompt information based on the third machine instruction, and the user starts the Nth round of dialogue after sensing the dialogue prompt information.
  • Device A 210 collects the second voice data through the microphone.
  • device A 210 may perform steps similar to S807 after detecting the second voice data and performing similar or identical steps to S801 and S802 based on the second voice data. Or the same step is to send the second voice data to the device B 220.
  • the device B 220 can perform similar or identical steps as S808-S810 to process the second voice data and send the second machine instruction to the device A 210.
  • device A 210 processes the first voice data to obtain the first text data and the first intention data, it can determine whether to continue on the local side of device A 210 based on the credibility of the first intention data.
  • To process the first voice data still request device B 220 to process the first voice data. Because it is possible to continue processing the first voice data on the device A 210 when the credibility of the first intention data is high, and when the credibility of the first intention data is low, based on the first voice
  • the data acquires the second voice data, thereby once again confirming to the user the operation the user wishes to perform, and then requesting device B 220 to recognize the second voice data again, thereby improving the accuracy of the second machine instruction.
  • S801 can be omitted for the same reason as omitting S401.
  • the user of device A 210 says to device A 210: "Navigate to the main entrance of hotel A", and device A 210 detects the corresponding first voice data.
  • VAD 214 detects the first voice data and determines that it includes the user's voice, and the first voice data is the first round of dialogue in the wake-up-free trigger session.
  • ASRa 215 recognizes the first voice data and obtains the first text data as "Navigate to Hotel A” and the second confidence level is 90%.
  • NLUa 216 identifies the first text data and obtains the first intention data as "Intent: Navigation; Slot value: Hotel A", and the third confidence level is 90%.
  • the decision module 217 multiplies the second confidence level and the third confidence level to obtain a first confidence level of 81%.
  • the decision module 217 determines to continue processing subsequent steps by device A 210.
  • DMa 218 generates first machine instructions based on the first intent data.
  • the voice control module 213 starts the navigation application, and the navigation application executes the first machine instruction to start navigation, and the end point of the navigation is Hotel A.
  • the decision module 217 determines that device B 220 performs identification again.
  • Device A 210 displays a first interface on the display screen as shown in Figure 9.
  • the first interface includes prompt information "Where are you going" displayed by device A 210 based on the first voice data.
  • device A 210 can play the message related to the first interface.
  • the voice corresponding to the prompt information is the third voice data.
  • the VAD 214 detects the second voice data and determines that it includes the user's voice, and that the second voice data is the second round of dialogue in the wake-up-free trigger session.
  • Device A 210 sends second voice data to device B 220.
  • ASRb 221 recognizes the second voice data and the first voice data, and obtains the second text data as "Navigate to the main entrance of Hotel A”.
  • NLUb 222 identifies the second text data and obtains the second intention data as "Intent: Navigation; Slot value: Front entrance of Hotel A”.
  • DMb 223 generates second machine instructions based on the second intent data.
  • Device B 220 sends a second machine instruction to device A 210.
  • the voice control module 213 starts the navigation application, and the navigation application executes the second machine instruction to start navigation, and the end point of the navigation is the main entrance of Hotel A.
  • Device B can also display a second interface as shown in Figure 10.
  • the second interface includes the prompt message "Okay, let's start navigating for you.”
  • device A 210 can play the voice corresponding to the prompt message, that is, the second interface. Four voice data, thereby notifying the user of the corresponding processing results.
  • FIG. 11 is a flow chart of a method for processing voice data provided by an embodiment of the present application. It should be noted that this method is not limited to the specific sequence shown in Figure 11 and below. It should be understood that in other embodiments, the order of some steps of the method can be exchanged with each other according to actual needs, or some of the steps can be It can also be omitted or deleted.
  • the method includes the following steps:
  • the first voice data is the first round of dialogue in the first session and the first session is a session that does not require a wake-up trigger
  • the first voice data is recognized and the first recognition result and the first confidence level are obtained.
  • a confidence level is used to indicate the degree of credibility of the first recognition result.
  • Device A 210 determines whether the first confidence level is greater than or equal to the first threshold. If so, execute S1104; otherwise, execute S1105.
  • Device A 210 generates the first machine instruction based on the first recognition result.
  • Device A 210 obtains the second machine instruction from the server based on the first voice data.
  • the device A 210 when device A 210 obtains the first voice data and determines that the first voice data is the first round of dialogue in the first session without wake-up triggering, the device A 210 can recognize the first voice data and obtain the second voice data.
  • the Recognition result and first confidence level Since the first confidence level may indicate the confidence level of the first recognition result, for the first round of sessions in the wake-up-free trigger session, device A 210 may perform the first recognition step when the first confidence level is greater than or equal to the first threshold, that is, the first recognition result.
  • the local end When the credibility of the result is high, the local end generates the first machine instruction based on the first recognition result, which saves the bandwidth with the server, reduces the load pressure on the server, and improves the efficiency of processing the first voice data. efficiency.
  • S1102 may be replaced by: when it is determined that the first voice data is the first round of dialogue in the first session, or when it is determined that the first voice data is the Nth dialogue in the first session and the first session When a conversation is triggered without waking up, the first voice data is recognized to obtain a first recognition result and a first confidence level, where the first confidence level is used to indicate the credibility of the first recognition result.
  • S1102 may be replaced by: recognizing the first voice data to obtain a first recognition result and a first confidence level, where the first confidence level is used to indicate the credibility of the first recognition result.
  • inventions of the present application also provide an electronic device.
  • the electronics provided by this embodiment includes: a memory and a processor.
  • the memory is used to store the computer program; the processor is used to execute the method described in the above method embodiment when the computer program is called.
  • the electronic device provided in this embodiment can execute the above method embodiments, and its implementation principles and technical effects are similar, and will not be described again here.
  • embodiments of the present application also provide a chip system.
  • the chip system includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the method described in the above method embodiment.
  • the chip system may be a single chip or a chip module composed of multiple chips.
  • Embodiments of the present application also provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described in the above method embodiment is implemented.
  • An embodiment of the present application also provides a computer program product.
  • the computer program product When the computer program product is run on an electronic device, the electronic device implements the method described in the above method embodiment when executed.
  • the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • this application can implement all or part of the processes in the methods of the above embodiments by instructing relevant hardware through a computer program.
  • the computer program can be stored in a computer-readable storage medium.
  • the computer program When executed by a processor, the steps of each of the above method embodiments may be implemented.
  • the computer program includes computer program code, which may be in the form of source code, object code, executable file or some intermediate form.
  • the computer-readable storage medium may at least include: any entity or device capable of carrying computer program code to the camera device/terminal device, recording media, computer memory, read-only memory (ROM), random access Memory (random access memory, RAM), electrical carrier signals, telecommunications signals, and software distribution media.
  • ROM read-only memory
  • RAM random access Memory
  • electrical carrier signals telecommunications signals
  • software distribution media For example, U disk, mobile hard disk, magnetic disk or CD, etc.
  • the disclosed devices/devices and methods can be implemented in other ways.
  • the apparatus/equipment embodiments described above are only illustrative.
  • the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or units. Components may be combined or may be integrated into another system, or some features may be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, which may be in electrical, mechanical or other forms.
  • the term “if” may be interpreted as “when” or “once” or “in response to determining” or “in response to detecting” depending on the context. ". Similarly, the phrase “if determined” or “if [the described condition or event] is detected” may be interpreted, depending on the context, to mean “once determined” or “in response to a determination” or “once the [described condition or event] is detected ]” or “in response to detection of [the described condition or event]”.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本申请提供一种处理语音数据的方法及终端设备,涉及终端技术领域,其中,该方法包括:获取第一语音数据,当确定所述第一语音数据为第一会话中的首轮次对话且所述第一会话为免唤醒触发的会话时,对所述第一语音数据进行识别,得到第一识别结果和第一置信度,所述第一置信度用于指示所述第一识别结果的可信程度,若所述第一置信度大于或等于第一阈值,则基于所述第一识别结果生成第一机器指令。本申请提供的技术方案能够降低服务器的负载。

Description

处理语音数据的方法及终端设备
本申请要求于2022年6月13日提交国家知识产权局、申请号为202210667633.2、申请名称为“处理语音数据的方法及终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及一种处理语音数据的方法及终端设备。
背景技术
目前,车载设备和智能音箱等电子设备已经逐渐称为人们生活中不可缺少的一部分。为了提高人机交互效率和用户体体验,基于语音的人机交互逐渐受到了广泛关注,因此亟需一种处理语音数据的方法。
现有技术中,电子设备可以获取用户的语音数据,并将该语音数据实时传输给服务器,由服务器对该语音数据进行处理从而得到与该语音数据对应的机器指令,服务器将该机器指令发送给电子设备,然后电子设备执行该机器指令。
但由于电子设备的数量可能非常庞大,大量的电子设备持续向服务器发送语音数据,会使得服务器接收到大量的语音数据,这会导致服务器的负载过大,进而导致不能及时处理语音数据等其他问题。
发明内容
有鉴于此,本申请提供一种处理语音数据的方法及终端设备,能够降低服务器的负载。
为了实现上述目的,第一方面,本申请实施例提供一种处理语音数据的方法,其特征在于,应用于终端设备,所述方法包括:
获取第一语音数据;当确定所述第一语音数据为第一会话中的首轮次对话且所述第一会话为免唤醒触发的会话时,对所述第一语音数据进行识别,得到第一识别结果和第一置信度,所述第一置信度用于指示所述第一识别结果的可信程度;若所述第一置信度大于或等于第一阈值,则基于所述第一识别结果生成第一机器指令。
其中,第一机器指令可以用于指示用户通过第一语音数据所指示的操作。
在本申请实施例中,终端设备可以在获取到第一语音数据,且确定第一语音数据为免唤醒触发的第一会话中的首轮次对话时,对第一语音数据进行识别得到第一识别结果和第一置信度。由于第一置信度可以指示第一识别结果的置信度,因此,对于免唤醒触发的会话中的首轮次会话,终端设备可以在第一置信度大于或等于第一阈值,即第一识别结果的可信程度较高的情况下,在本端基于第一识别结果生成第一机器指令,节省了与服务器之间的带宽,降低了对服务器的负载压力,提高了处理第一语音数据的效率。
在一些实施例中,所述确定所述第一语音数据为第一会话中的首轮次对话且所述 第一会话为免唤醒触发的会话,包括:
若检测到与所述第一语音数据对应的第一状态指示信息,则确定所述第一语音数据为所述第一会话中的首轮次对话且所述第一会话为免唤醒触发的会话。
其中,第一状态指示信息可以用于指示第一语音数据为第一会话中的首轮次对话且第一会话为免唤醒触发的会话。通过第一状态指示信息,可以准确明了地指示第一语音数据是第一会话中的首轮次对话且第一会话为免唤醒触发的会话。
在一些实施例中,所述方法还包括:若所述第一置信度小于所述第一阈值,则基于所述第一语音数据,从服务器获取第二机器指令。
在一些实施例中,如果在第一语音数据之前,不存在未结束的第二会话,且也并未检测到与事件唤醒触发对应的事件,未检测到与按键唤醒触发对应的按键操作、未在第一语音数据中检测到任一预设唤醒词,则可以生成与第一语音数据对应的第一状态指示信息,第一状态指示信息可以用于指示第语音数据为第一会话中的首轮次对话且第一会话为免唤醒触发的会话。在一些实施例中,可以在第一语音数据中添加第一状态指示信息,或者,可以将第一语音数据和第一状态指示信息封装在同一个数据包中,或者,可以将第一语音数据和第一状态指示信息对应存储。
在一些实施例中,第一状态指示信息可以包括第一会话标识、第一轮次标识和第一触发类型。其中,第一会话标识对应的会话为第一会话,第一轮次标识用于指示第一语音数据为第一轮次对话,第一触发类型标识用于指示第一会话的触发方式为免唤醒触发。
在第一识别结果的可信程度较低的情况下,终端设备可以请求服务器再次对第一语音数据进行识别,从而得到准确性更高的第二机器指令,提高了处理语音数据的准确性。
在一些实施例中,若检测到第一语音数据以及与第一语音数据对应的第二状态指示信息,则基于第一语音数据,从服务器获取第二机器指令。
如果检测到与第一语音数据对应的第二状态指示信息,那么第一语音数据可能是免唤醒触发的会话中的第N轮次对话,也可能为非免唤醒触发的任意轮次对话,其共同点在于此时终端设备至少对用户进行了一次应答,即终端设备能够确定已经开始与用户进行对话,因此,可以直接请求服务器处理第一语音数据,以提高处理第一语音数据的准确性。
在一些实施例中,如果在第一语音数据之前存在未结束的第二会话,和/或,检测到第一语音数据中包括预设唤醒词、与事件唤醒触发对应的事件和与按键唤醒触发对应的按键操作中的任一个,则生成与第一语音数据对应的第二状态指示信息,第二状态指示信息可以用于指示第一语音数据为第二会话中的第N轮次对话,和/或,第二会话的触发方式为语音唤醒触发、事件唤醒触发或按键唤醒触发,其中,N为大于1的整数。在一些实施例中,可以在第一语音数据中添加第二状态指示信息,或者,可以将第一语音数据和第二状态指示信息封装在同一个数据包中,或者,可以将第一语音数据和第二状态指示信息对应存储。
在一些实施例中,第二状态指示信息可以包括第二会话标识和第二轮次标识,其中,第二会话标识与第二会话对应,第二轮次标识用于指示第一语音数据为第N轮次 对话。在一些实施例中,第二状态指示信息可以包括第二触发类型标识,第二触发类型标识可以用于指示第二会话的触发方式为语音唤醒触发、事件唤醒触发或按键唤醒触发。
在一些实施例中,所述方法还包括:向所述服务器发送所述第一语音数据;所述基于所述第一语音数据,从服务器获取第二机器指令,包括:接收所述服务器基于所述第一语音数据发送的所述第二机器指令。
终端设备可以向服务器发送获取到的第一语音数据,从而使得服务器从对第一语音数据识别开始处理,提高了处理第一语音数据的准确性。
在一些实施例中,所述向所述服务器发送所述第一语音数据,包括:当检测到第一语音数据时,向所述服务器发送所述第一语音数据;在所述接收所述服务器基于所述第一语音数据发送的所述第二机器指令之前,所述方法还包括:向所述服务器发送第一请求,所述第一请求用于请求所述服务器对所述第一语音数据进行识别。
终端设备先向服务器发送第一语音数据,那么在确定请求服务器对第一语音数据进行识别时,就不必再发送第一语音数据,提高了处理第一语音数据的效率。
在一些实施例中,所述向所述服务器发送所述第一语音数据,包括:
若所述第一置信度小于所述第一阈值,则向所述服务器发送第一请求和所述第一语音数据,所述第一请求用于请求所述服务器对所述第一语音数据进行识别。
在一些实施例中,第一请求中可以携带第一语音数据。
终端设备在确定请求服务器处理第一语音数据时,再向服务器发送第一语音数据,减少了向服务器发送数据的数据量和频率,进一步节省了与服务器之间的带宽,减少了服务器的负载压力。
在一些实施例中,所述方法还包括:向所述服务器发送与所述第一语音数据对应的第一文本数据;所述基于所述第一语音数据,从服务器获取第二机器指令,包括:接收所述服务器基于所述第一文本数据发送的所述第二机器指令。
终端设备向服务器发送与第一语音数据对应的第一文本数据,而非第一语音数据,减少了向服务器发送的数据量,既节省了服务器之间的带宽,降低了服务器的负载压力,也提高了处理第一语音数据的效率。
在一些实施例中,所述向所述服务器发送与所述第一语音数据对应的第一文本数据,包括:若所述第一置信度小于所述第一阈值,则向所述服务器发送第二请求和所述第一文本数据,所述第二请求用于请求所述服务器对所述第一文本数据进行识别。
在一些实施例中,第二请求中可以携带第一文本数据。
在一些实施例中,终端设备也可以在得到第一文本数据时,就向服务器发送第一文本数据。
在一些实施例中,所述基于所述第一语音数据,从服务器获取第二机器指令,包括:基于所述第一语音数据,获取第二语音数据,第二语音数据为第一会话中的第N轮次对话,N为大于1的整数;接收所述服务器基于所述第二语音数据发送的所述第二机器指令。
在一些实施例中,可以检测到与第二语音数据对应的第二状态指示信息,第二状态指示信息用于指示第二语音数据为第一会话中的第N轮次对话,N为大于1的整数。
在一些实施例中,所述对所述第一语音数据进行识别,得到第一识别结果和第一置信度,包括:基于存储的第一实体集合和第一模型,对所述第一语音数据进行识别,得到所述第一识别结果和所述第一置信度。
其中,第一识别结果可以包括与第一语音数据对应的第一文本数据和第一意图数据中的至少一个,第一实体集合可以包括第二实体集合和第三实体集合中的至少一个,第一模型可以包括第二模型和第三模型中的至少一个。在一些实施例中,第二实体集合和第三实体集合可以包括至少一个相同的实体。
在一些实施例中,终端设备可以通过第二实体集合和第二模型,确定第一语音数据对应的第一文本数据,通过第三实体集合和第三模型,基于第一文本数据确定第一意图数据。
在一些实施例中,所述方法还包括:若所述第一置信度小于所述第一阈值,则基于所述第一语音数据从所述服务器获取第一实体,所述第一实体由所述服务器对所述第一语音数据进行识别得到;将所述第一实体添加至所述第一实体集合。
在一些实施例中,所述方法还包括:若所述第一置信度小于所述第一阈值,则基于所述第一语音数据从所述服务器获取第二识别结果,所述第二识别结果由所述服务器对所述第一语音数据进行识别得到;基于所述第二识别结果更新所述第一模型。
在一些实施例中,所述第一识别结果包括与所述第一语音数据对应的第一文本数据,所述第二识别结果包括与所述第一语音数据对应的第二文文本数据,所述基于所述第一语音数据从所述服务器获取第二识别结果,包括:向所述服务器发送所述第一语音数据;
获取所述服务器基于所述第一语音数据发送的所述第二文本数据。
在一些实施例中,所述第一识别结果包括与所述第一语音数据对应的第一意图数据,所述第二识别结果包括第二意图数据和第二文本数据中的至少一个,所述第二意图数据和所述第二文本数据均与所述第一语音数据对应,所述基于所述第一语音数据从所述服务器获取第二识别结果,包括:
向所述服务器发送所述第一语音数据;获取所述服务器基于所述第一语音数据发送的所述第二意图数据和所述第二文本数据中的至少一个;或,
向所述服务器发送与所述第一语音数据对应的第一文本数据,获取所述服务器基于所述第一文本数据发送的所述第二意图数据。
在一些实施例中,服务器可以通过第五实体集合和第五模型,确定与第一语音数据对应的第二文本数据,通过第四实体集合和第四模型,基于第二文本数据确定第二意图数据。
其中,第一实体可以为服务器对第一文本数据进行识别得到的实体,或者说,第一实体可以为第二意图数据和第四实体集合包括的实体;和/或,第一实体可以为服务器对第一语音数据进行识别得到的实体,或者说,第一实体可以为第二文本数据和第五实体集合包括的实体。
终端设备通过将来自服务器的第一实体存储至该终端本端的第二实体集合和/或第三实体集合,从而对本端的第二实体集合和/或第三实体集合进行扩充,使得终端设备再次获取到可能包括第一实体的语音数据时,能够准确地对该语音数据进行识别, 进而不必再次请求服务器对该语音数据进行识别。
终端设备通过将来自服务器针对第一语音数据进行识别得到的第二文本数据和或第二意图数据,对该终端设备本端的第二模型和/或第三模型进行更新,使得第二模型和/或第三模型具有更准确地识别能力,再次获取到可能包括与第一语音数据相似的语音数据时,能够准确地对该语音数据进行识别,进而不必再次请求服务器对该语音数据进行识别。
在一些实施例中,所述第一识别结果包括与所述第一语音数据对应的第一意图数据,在所述若所述第一置信度大于或等于第一阈值,则基于所述第一识别结果生成第一机器指令之前,所述方法还包括:确定所述第一意图数据中包括第一意图。
也即是,终端设备可以在确定第一意图数据包括第一意图的情况下,继续进行后续步骤,而在确定第一意图数据不包括第一意图的情况下,不继续进行后续步骤,既减少了终端设备和服务器的负载压力,也减少了对用户的对话出现误应答的情况,进一步提高了处理语音数据的准确性和用户体验。
第二方面,本申请实施例提供一种处理语音数据的方法,其特征在于,应用于终端设备,所述方法包括:
获取第一语音数据;当确定所述第一语音数据为第一会话中的首轮次对话时,或者,确定所述第一语音数据为所述第一会话中的第N次对话且所述第一会话为免唤醒触发的会话时,对所述第一语音数据进行识别,得到第一识别结果和第一置信度,所述第一置信度用于指示所述第一识别结果的可信程度;若所述第一置信度大于或等于第一阈值,则基于所述第一识别结果生成第一机器指令。
在本申请实施例中,终端设备可以在获取到第一语音数据且确定第一语音数据为第一会话中的首轮次对话或者第一会话为免唤醒触发的会话时,对第一语音数据进行识别得到第一识别结果和第一置信度。由于第一置信度可以指示第一识别结果的置信度,因此,对于免唤醒触发的会话中的任一轮次会话,或者,对于非免唤醒触发的会话中的首轮次会话,终端设备可以在第一置信度大于或等于第一阈值,即第一识别结果的可信程度较高的情况下,在本端基于第一识别结果生成第一机器指令,节省了与服务器之间的带宽,降低了对服务器的负载压力,提高了处理第一语音数据的效率。
在一些实施例中,若检测到与第一语音数据对应的第一状态指示信息,则可以确定所述第一语音数据为第一会话中的首轮次对话时,或者,确定所述第一语音数据为所述第一会话中的第N次对话且所述第一会话为免唤醒触发的会话,其中,第一状态指示信息用于指示第一语音数据为第一会话中的首轮次对话或者第一会话为免唤醒触发的会话。
在一些实施例中,所述方法还包括:
若所述第一置信度小于所述第一阈值,则基于所述第一语音数据,从服务器获取第二机器指令。
第三方面,本申请实施例提供一种处理语音数据的方法,应用于第一设备,所述方法包括:
获取第一语音数据;对所述第一语音数据进行识别,得到第一识别结果和第一置信度,所述第一置信度用于指示所述第一识别结果的可信程度;若所述第一置信度大 于或等于第一阈值,则基于所述第一识别结果生成第一机器指令。
在本申请实施例中,终端设备可以在检测到第一语音数据时,对第一语音数据进行识别得到第一识别结果和第一置信度,由于第一置信度可以指示第一识别结果的置信度,因此,对于终端检测到的任意的第一语音数据,终端设备可以在第一置信度大于或等于第一阈值,即第一识别结果的可信程度较高的情况下,在本端基于第一识别结果生成第一机器指令,节省了与服务器之间的带宽,降低了对服务器的负载压力,提高了处理第一语音数据的效率。
在一些实施例中,所述方法还包括:
若所述第一置信度小于所述第一阈值,则基于所述第一语音数据,从第二设备获取第二机器指令。
在一些实施例中,第一设备可以包括终端设备,第二设备可以包括服务器。
第四方面,本申请实施例提供了一种处理语音数据的装置,该装置具有实现上述各方面及上述各方面的可能实现方式的终端设备或第一设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。例如,收发模块或单元、处理模块或单元、获取模块或单元等。
第五方面,本申请实施例提供一种电子设备,包括:存储器和处理器,存储器用于存储计算机程序;处理器用于在调用计算机程序时执行上述第一方面中任一项、第二方面任一项或第三方面任一项所述的方法。
第六方面,本申请实施例提供一种芯片系统,所述芯片系统包括处理器,所述处理器与存储器耦合,所述处理器执行存储器中存储的计算机程序,以实现上述第一方面中任一项、第二方面任一项或第三方面任一项所述的方法。
其中,所述芯片系统可以为单个芯片,或者多个芯片组成的芯片模组。
第七方面,本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述第一方面中任一项所述的方法。
第八方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述第一方面中任一项、第二方面任一项或第三方面任一项所述的方法。
可以理解的是,上述第四方面至第八方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。
附图说明
图1为本申请实施例所提供的一种电子设备的结构示意图;
图2为本申请实施例所提供的一种处理语音数据的系统的结构示意图;
图3为本申请实施例提供的一种处理语音数据的场景示意图;
图4为本申请实施例提供的一种处理语音数据的方法的流程图示意图;
图5为本申请实施例提供的另一种处理语音数据的方法的流程图示意图;
图6为本申请实施例提供的另一种处理语音数据的方法的流程图示意图;
图7为本申请实施例提供的另一种处理语音数据的方法的流程图示意图;
图8为本申请实施例提供的另一种处理语音数据的方法的流程图示意图;
图9为本申请实施例提供的一种显示界面的示意图;
图10为本申请实施例提供的另一种显示界面的示意图;
图11为本申请实施例提供的另一种处理语音数据的方法的流程图示意图。
具体实施方式
本申请实施例提供的处理语音数据的方法可以应用于手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等电子设备上,本申请实施例对电子设备的具体类型不作任何限制。
图1是本申请实施例提供的一例电子设备100的结构示意图。电子设备100可以包括处理器110、存储器120、通信模块130和麦克风140等。
其中,处理器110可以包括一个或多个处理单元,存储器120用于存储程序代码和数据。在本申请实施例中,处理器110可执行存储器120存储的计算机执行指令,用于对电子设备100的动作进行控制管理。
通信模块130可以用于电子设备100的各个内部模块之间的通信、或者电子设备100和其他外部电子设备之间的通信等。示例性的,如果电子设备100通过有线连接的方式和其他电子设备通信,通信模块130可以包括接口等,例如USB接口,USB接口可以是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
或者,通信模块130可以包括音频器件、射频电路、蓝牙芯片、无线保真(wireless fidelity,Wi-Fi)芯片、近距离无线通讯技术(near-field communication,NFC)模块等,可以通过多种不同的方式实现电子设备100与其他电子设备之间的交互。
麦克风140可以用于获取电子设备100周围环境中的声音信号。在一些实施例中,麦克风140可以用于获取用户的语音。
可选地,电子设备100还可以包括扬声器150,扬声器150可以用于发出声音信号。在一些实施例中,电子设备100可以通过麦克风140和扬声器150实现与用户对话的功能。
可选地,电子设备100还可以包括显示屏160,显示屏160可以显示人机交互界面中的图像或视频等。
应理解,除了图1中列举的各种部件或者模块之外,本申请实施例对电子设备100的结构不做具体限定。在本申请另一些实施例中,电子设备100还可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
为了便于理解本申请实施例中的技术方案,下面首先对本申请实施例的应用场景予以介绍。
用户可以通过触发与终端设备之间的会话,从而与终端设备进行交互,使得终端设备执行该用户所希望执行的操作,包括完成用户指示的任务、与用户进行聊天等。
在一些实施例中,用户可以通过特定事件、语音或者按键,触发与终端设备之间的会话。上述这三种触发会话的方式,可以理解为用户先通过特定事件、语音或者按键“唤醒”语音助手应用,使得终端设备确定即将开始该会话。之后,终端设备可以接收用户的语音数据,并将该语音数据发送给服务器进行处理,服务器对该语音数据进行处理,并向终端设备发送相应的机器指令。
但这种交互方式比较繁琐,用户体验也比较差,因此,在另一些实施例中,用户可以不必先“唤醒”语音助手应用,终端设备可以经常或者实时地获取用户的语音数据,并在确定需要基于该语音数据执行响应的操作时,对该语音数据进行处理,即终端设备可以在免唤醒场景下对用户的语音数据进行处理。
在免唤醒场景下,用户可以直接说出希望终端设备执行的操作,具有较高的交互效率和用户体验。终端设备可以将所获取到的语音数据都发送到服务器,进而由服务器对该语音数据进行处理并反馈相应的机器指令,但由于终端设备可能会获取到大量的语音数据,终端设备的数量也可能很大,这可能导致浪费终端设备与服务器之间的带宽,给服务器带来非常大的负载压力,同时降低了响应用户的速度,因此,为了解决上述至少部分技术问题,本申请实施例提供了一种处理语音数据的系统以及方法。
请参照图2,为本申请实施例提供的一种处理语音数据的系统。该系统包括设备A 210和设备B 220,设备A 210和设备B 220之间可以通过网络连接。设备A 210和设备B 220可以包括前述电子设备100中的至少部分结构。设备A 210和设备B 220都能够对语音数据进行处理,但设备B 220比设备A 210具有更强的设备能力,或者,至少在处理语音数据方面,设备B 220比设备A 210具有更强的处理能力,包括能够对语音数据进行更加准确地识别、得到可信程度更高的机器指令等。在一些实施例中,请参照图3,设备A 210可以包括移动终端310、智能手表320、智能音箱330、车载设备340等终端设备,设备B 220包括服务器350。
设备A 210中可以包括预处理模块211、唤醒词检测模块212、语音控制模块213、语音活性检测(voice activity detection,VAD)214、自动语音识别(automatic speech recognition,ASR)a 215、自然语言理解(Natural Language Understanding,NLU)a 216、决策模块217和对话管理(Dialogue Management,DM)a 218。在一些实施例中,预处理模块211和唤醒词检测模块212可以由设备A 210中安装的操作系统实现,语音控制模块213、VAD 214、ASRa 215、NLUa 216、决策模块217和DMa 218可以包括在语音助手应用中,设备A 210可以通过下载和安装语音助手应用,再通过这些模块中的至少部分模块来处理语音数据。在一些实施例中,语音助手应用可以是由终端设备的厂商、操作系统的厂商或者其他人员所提供的应用程序。
预处理模块211可以用于采集的原始语音数据进行预处理。在一些实施例中,预处理模块211可以减少或去除原始语音数据中的干扰信号,其中,干扰信号可以包括用户环境中其他物体发出的噪声、设备A 210的扬声器播放的声音以及有麦克风本身的物理结构在收音过程产生的噪声等等。在一些实施例中,预处理模块211可以确定处理语音数据的后续步骤所需的相关数据,比如与语音数据对应的声源位置、接收语音数据的麦克风等。
唤醒词检测模块212,也可称为关键词检测模块。唤醒词检测模块212可以在从 语音数据中检测到预设的唤醒词时,启动语音助手应用,从而通过语音助手应用对语音数据进行进一步处理。在一些实施例中,唤醒词检测模块212可以接收用户输入的与该预设唤醒词对应的音频特征,将语音数据的音频特征(比如频率)与该预设唤醒词对应的音频特征进行匹配,如果该语音数据的音频特征包括与该预设唤醒词对应的音频特征,则确定检测到该预设唤醒词,否则确定未检测到该预设唤醒词。
语音控制模块213,可以理解为语音助手应用中的控制中枢,用于调度和协调语音助手应用中VAD 214、ASRa 215、NLUa 216、决策模块217和DMa 218等其他模块运行。在一些实施例中,语音控制模块213可以包括一个或多个的数据接口,语音控制模块213可以通过这些数据接口,实现语音助手应用与诸如唤醒词检测模块212等设备A 210中的其他应用程序的交互。在一些实施例中,语音控制模块213可以包括第一数据接口、第二数据接口和第三数据接口,其中,第一数据接口可以用于获取终端设备提供的语音数据,第二数据接口可以用于向终端设备提供对语音数据进行处理所得到的至少部分数据,比如机器指令等。第三数据接口可以用于语音控制模块213与设备B 220进行通信。
VAD 214,也可称为语音端点检测模块或者语音边界模块。VAD 214可以用于从语音数据中识别出实际包括用户语音的部分,还可以删除不包括用户语音的部分,从而减少后续处理的数据量。在一些实施例中,如果VAD 214确定语音数据中不包括用户语音,则可以不对该语音数据进行后续处理,即丢弃该语音数据。
在一些实施例中,VAD 214来确定语音数据中包括用户语音时,还可以在该语音数据中添加会话标识,该会话标识可以用于指示该语音数据归属的会话。在一些实施例中,VAD 214来确定语音数据中包括用户语音时,还可以在该语音数据中添加轮次标识,该轮次标识可以用于指示该语音数据在该会话中的轮次。其中,会话可以指用户与设备A 210之间进行的连续对话,一个会话中可以包括至少一个轮次的对话。在一些实施例中,VAD 214来确定语音数据中包括用户语音时,还可以在该语音数据中添加触发类型标识,该触发类型标识可以用于指示该会话的触发方式。在一些实施例中,该会话的触发方式可以包括事件唤醒触发、语音唤醒触发、按键唤醒触发和免唤醒触发。其中,事件唤醒触发指设备A 210在检测到特定的事件时,唤醒语音助手应用处理语音数据;语音唤醒触发指用户通过说出预设的唤醒词唤醒语音助手应用处理语音数据;按键唤醒触发指用户通过点击特定的按键唤醒语音助手处理语音数据;免唤醒触发指设备A 210在不唤醒语音助手的情况下处理语音数据。
ASRa 215可以用于将语音数据转换为文本数据。在一些实施例中,ASRa 215可以将语音数据转换为字母序列,再将该字母序列包括的字母进行组合,得到单词或者对应的汉字。
在一些实施例中,设备A 210中还包括与ASRa 215对应的实体集合1,实体集合1中可以包括至少一个实体(也可称为语义实体)。其中,实体可以为表示确切对象的名词。比如,“人”、“汽车”、“城市”、“天气”和“餐厅”等均可以作为实体。在一些实施例中,实体集合1可以为一个包括至少一个实体项的数组,每个实体项中可以包括对应同一实体的标准名和同义名,其中,标准名可以为官方的、正式的或者广为人知的名称,同义名可以为通俗的名称、俚语或者私人订制的名称等。ASRa 215可以基于实 体集合1包括的实体,确定语音数据对应的文本数据,从而提高将语音数据转换为文本数据的准确性。比如,实体集合1包括“餐厅”,ASRa 215对语音数据转换的字母序列包括“c、a、n、t、i、n、g”,将该字母序列进行组合,得到拼音组合为“can、ting”,而拼音为“can”和“ting”的汉字包括很多个,如果只根据该拼音组合,ASRa 215很难确定实际对应的汉字是什么。但由于实体集合1包括“餐厅”,因此ASRa 215可以确定该拼音组合对应的汉字为“餐厅”。
在一些实施例中,ASRa 215还可以确定与所转换的文本数据对应的置信度1,该置信度1用于说明该文本数据的可信程度。在一些实施例中,ASRa 215还可以确定与所转换的文本数据对应的指示信息1,该指示信息1可以用于指示该文本数据中是否包括实体集合1中的实体。
NLUa 216可以用于基于文本数据确定相应的意图数据,该意图数据可以用于说明语音数据所请求的操作,即用户希望进行的操作。在一些实施例中,该意图数据可以包括意图和槽值中的至少一项参数。意图可以用于说明该操作的类型,在一些实施例中,意图可以理解为语音数据中包括的动词。槽值可以为该操作的具体参数。例如,文本数据为“导航去XX酒店”,NLUa 216对该文本数据进行识别,确定意图为“导航”、槽值为“XX酒店”。
在一些实施例中,设备A 210中还包括与NLUa 216对应的实体集合2,实体集合2中可以包括至少一个实体。NLUa 216可以基于实体集合2包括的实体,确定与文本数据对应的意图数据。在一些实施例中,实体集合2和实体集合1可以包括至少一个相同的实体。在一些实施例中,实体集合2和实体集合1可以是同一个实体集合。
在一些实施例中,NLUa 216还可以确定与该意图数据对应的置信度2,该置信度2可以用于指示该意图数据的可信程度。在一些实施例中,NLUa 216还可以确定与意图数据对应的指示信息2,该指示信息2可以用于指示该文本数据中是否包括意图。在一些实施例中,NLUa 216还可以确定与意图数据对应的指示信息3,该指示信息3可以用于指示该文本数据中是否包括槽值。
决策模块217可以用于判断在设备A 210本地处理语音数据,还是请求设备B 220处理语音数据。在一些实施例中,决策模块217可以基于ASRa 215所确定的文本数据或者意图数据对应的置信度判断继续在设备A 210本地处理语音数据,还是请求设备B 220处理语音数据。如果置信度较高,则可以继续在设备A 210本地处理语音数据,以节省设备A 210与设备B 220之间的带宽,降低设备B 220的负载压力,同时提高处理语音数据的速度;如果该置信度较低则可以请求设备B 220处理语音数据,以提高处理语音数据的准确性。
DMa 218可以控制人机对话的过程。在一些实施例中,DMa 218可以基于意图数据生成相应的机器指令。在一些实施例中,如果意图数据不完整,比如尚未明确槽值,DMa 218可以触发多轮次对话来进一步得到完整的意图数据。其中,意图数据虽然已经具有一定的结构性,但还是属于人类的语言,因此为了便于设备A 210具体执行用户所希望的操作,可以生成与意图数据对应的机器指令(即机器的语言),以便于电子设备执行该执行来实现用户所希望的操作。
设备B 220中可以包括ASRb 221、NLUb 222和DMb 223。其中,ASRb 221的功 能可以与前述中ASRa215的功能相似、NLUb 222的功能可以与前述中的NLUa 216的功能相似,DMb 223的功能可以与DMa 218的功能相似。在一些实施例中,ASRb 221可以比ASRa 215具有更强的处理能力,NLUb 222可以比NLUa 216具有更强的处理能力,DMb 223可以比DMa 218具有更强的处理能力。
在一些实施例中,设备B 220中还存储有与ASRb 221对应的实体集合3。其中,实体集合3中可以包括至少一个实体。在一些实施例中,实体集合3可以比实体集合1包括更多的实体。
在一些实施例中,设备B 220中还存储有与NLUb 222对应的实体集合4。其中,实体集合4中可以包括至少一个实体。其中,实体集合4中可以包括至少一个实体。在一些实施例中,实体集合4可以比实体集合2包括更多的实体。
在一些实施例中,实体集合4和实体集合3可以包括至少一个相同的实体。在一些实施例中,实体集合4和实体集合3可以是同一个实体集合。
在一些实施例中,VAD 214、ASRa 215、NLUa 216、决策模块217、DMa 218、ASRb 221、NLUb 222和DMb 223,可以通过机器学习模型实现。
在一些实施例中,设备A 210和设备B 220可以包括比图2所示更多或更少的模块。
在一些实施例中,设备A 210中还可以包括自然语言生成(natural language generator,NLG)模块和语音合成模块(text to speech,TTS)模块。NLG模块可以根据设备A 210所执行的机器指令或者状态变化,生成相应的文本数据。TTS模块可以与ASRa 215的功能相反,TTS模块可以用于根据文本数据生成相应的语音数据。NLG模块、TTS模块、NLUa 216、ASRa 215和DMa 218结合,可以实现设备A 210与用户对话的功能。
在一些实施例中,设备B 220也可以包括与设备A 210中其他模块相似或相同的模块。
在一些实施例中,设备A 210包括的多个模块可以聚合成更少的模块,或者,每个模块也可以进一步拆分成更多的模块;相似的,设备B 220包括的多个模块可以聚合成更少的模块,或者,每个模块也可以进一步拆分成更多的模块。
在一些实施例中,设备A 210中语音助手应用所包括的至少一个模块的功能,也可以由设备A 210的操作系统来实现,比如可以由语音助手应用可以对语音数据进行预处理。在一些实施例中,设备A 210中语音助手应用所包括的至少一个模块,也可以实现设备A 210的操作系统所实现的至少部分功能。
以下将结合具体的示例,对图2所示的系统中各设备各模块的功能。
设备A 210通过麦克风录音得到用户的语音数据1。设备A 210通过预处理模块211对该语音数据1进行预处理,比如降噪等。预处理后的语音数据1中可能包括预设的唤醒词和用户意图中的至少一个,唤醒词可以为语音助手的名称。
设备A 210通过唤醒词检测模块212检测该语音数据1中是否包括预设的唤醒词“小艺”,小艺为语音助手应用的名称。如果该语音数据1中不包括“小艺”,那么也就不唤醒语音助手应用。另外,设备A 210也没有检测到特定事件和特定的按键操作等任意其他唤醒触发语音助手应用的方式,则可以确定语音数据1是免唤醒触发的会话 中的对话。设备A可以通过语音助手应用,在设备A 210本端对语音数据1进行处理。
设备A 210通过语音助手应用中的语音控制模块213控制该语音助手中其他模块对该语音数据1进行处理。设备A 210可以先通过VAD 214检测语音数据1中是否包括用户语音,如果是则通过ASRa 215确定与语音数据1对应的文本数据1为:导航到XX酒店。设备A 210继续通过NLUa 216对该文本数据1进行处理,得到意图数据1包括:意图为“导航”、槽值为“XX酒店”,置信度为90%。设备A 210通过决策模块217基于该置信度判断是否请求设备B 220再次处理语音数据。如果该置信度较高,比如大于或等于70%,则设备A 210通过DMa 218生成与该意图数据1对应的机器指令1,并基于该机器指令1启动导航应用,开始导航至XX酒店。如果该置信度较低,比如小于70%,则设备A 210将语音数据1或文本数据1发送给设备B 220。设备B 220通过ASRb 221、NLUb 222和DMb 223再次对语音数据1或者文本数据1进行识别,并向设备A 210发送机器指令2。其中,机器指令2和机器指令1可以相似或相同。
下面以具体地实施例对本申请的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相似或相同的概念或过程可能在某些实施例不再赘述。
请参照图4,为本申请实施例所提供的一种处理语音数据的方法的流程图。其中,第一识别结果可以包括第一意图数据,还可以包括第一文本数据;第一模型可以包括第三模型,还可以包括第二模型;第一实体集合可以包括第三集合,还可以包括第二实体集合;第二实体可以包括第三实体集合中的实体,还可以包括第二实体集合中的实体;第一置信度可以基于第二置信度和第三置信度中的至少一个确定;第二识别结果可以包括第二意图数据;第一实体可以包括第四实体集合中的实体。需要说明的是,该方法并不以图4以及以下所述的具体顺序为限制,应当理解,在其它实施例中,该方法其中部分步骤的顺序可以根据实际需要相互交换,或者其中的部分步骤也可以省略或删除。该方法包括如下步骤:
S401,当设备A 210检测到第一语音数据时,判断第一语音数据中是否包括用户语音,如果是则执行S402,否则结束。
其中,设备A 210可以通过VAD 214执行S401。
如果第一语音数据中不包括用户语音,则可能第一语音数据并不是用户对设备A 210说的,比如第一语音数据可能是设备A 210周围环境中的噪声,因此可以不对第一语音数据进行处理。
在一些实施例中,第一语音数据可以为设备A 210可以通过麦克风获取到的语音数据。在一些实施例中,第一语音数据可以为设备A 210可以通过麦克风实时且持续获取到的语音数据。在一些实施例中,第一语音数据可以为设备A 210获取且预处理之后的语音数据,其中,预处理的方式可以包括降噪、增强人声等,当然,在实际应用中,预处理的方式还可以包括更多或更少的方式,本申请实施例不对预处理的方式进行限定。
在一些实施例中,设备A 210可以滤除第一语音数据中至少部分不包括人声的语音数据。
在一些实施例中,如果在第一语音数据之前,不存在未结束的第二会话,且设备A 210也并未检测到与事件唤醒触发对应的事件、未检测到与按键唤醒触发对应的按 键操作、未在第一语音数据中检测到任一预设唤醒词,则可以生成与第一语音数据对应的第一状态指示信息,第一状态指示信息可以用于指示第语音数据为第一会话中的首轮次对话且第一会话为免唤醒触发的会话。在一些实施例中,设备A 210可以在第一语音数据中添加第一状态指示信息,或者,设备A 210可以将第一语音数据和第一状态指示信息封装在同一个数据包中,或者,设备A 210可以将第一语音数据和第一状态指示信息对应存储。
在一些实施例中,第一状态指示信息可以包括第一会话标识、第一轮次标识和第一触发类型。其中,第一会话标识对应的会话为第一会话,第一轮次标识用于指示第一语音数据为第一轮次对话,第一触发类型标识用于指示第一会话的触发方式为免唤醒触发。
在一些实施例中,如果在第一语音数据之前存在未结束的第二会话,和/或,设备A 210检测到第一语音数据中包括预设唤醒词、与事件唤醒触发对应的事件和与按键唤醒触发对应的按键操作中的任一个,则生成与第一语音数据对应的第二状态指示信息,第二状态指示信息可以用于指示第一语音数据为第二会话中的第N轮次对话,和/或,第二会话的触发方式为语音唤醒触发、事件唤醒触发或按键唤醒触发,其中,N为大于1的整数。在一些实施例中,设备A 210可以在第一语音数据中添加第二状态指示信息,或者,设备A 210可以将第一语音数据和第二状态指示信息封装在同一个数据包中,或者,设备A 210可以将第一语音数据和第二状态指示信息对应存储。
在一些实施例中,第二状态指示信息可以包括第二会话标识和第二轮次标识,其中,第二会话标识与第二会话对应,第二轮次标识用于指示第一语音数据为第N轮次对话。在一些实施例中,第二状态指示信息可以包括第二触发类型标识,第二触发类型标识可以用于指示第二会话的触发方式为语音唤醒触发、事件唤醒触发或按键唤醒触发。
S402,设备A 210检测与第一语音数据对应的第一状态指示信息或第二状态指示信息。如果检测到第一状态指示信息则执行S403,如果检测到第二状态指示信息则执行S411。
其中,设备A 210可以通过决策模块217执行S402。
在一些实施例中,设备A 210可以检测第一语音数据中携带的是第一状态指示信息或第二状态指示信息;或者,设备A 210可以从第一语音数据中所在的数据包中获取第一状态指示信息或第二状态指示信息,或者,设备A 210可以获取与第一语音数据对应存储的第一状态指示信息或第二状态指示信息。
需要说明的是,S402的作用在判断第一语音数据是否为免唤醒触发的会话中的首轮对话,且可以理解是,在实际应用中,设备A 210也可以通过其他方式来判断第一语音数据是否为免唤醒触发的会话中的首轮对话,比如在另一些实施例中,设备A中可以包括第二状态指示信息或不包括第二状态指示信息,设备A 210可以在未检测到与第一语音数据对应的第二状态指示信息的情况下,确定第一语音数据为免唤醒触发的会话中的首轮对话。
S403,设备A 210确定与第一语音数据对应的第一文本数据和第二置信度。
其中,设备A 210可以通过ASRa 215执行S403。在一些实施例中,设备A 210 可以基于第二模型确定与第一语音数据对应的第一文本数据和第二置信度。设备A 210可以将第一语音数据输入至第二模型,得到第二模型输出的第一文本数据和第二置信度。在一些实施例中,第二模型可以等同于ASRa 215。
第二置信度可以用于指示第一文本数据的可信程度。
在一些实施例中,设备A 210中包括第二实体集合,第二实体集合中可以包括至少一个实体。设备A 210可以基于第一实体集合,确定与第一语音数据对应的第一文本数据和第二置信度。
在一些实施例中,设备A 210还可以确定与第一文本数据对应的第一过程指示信息,第一过程指示信息可以用于指示第一文本数据是否包括第二实体集合中的实体。在一些实施例中,第一过程指示信息可以为预设的第一数值或第二数值。其中,当第一过程指示信息为第一数值时,可以表示第一文本数据中包括第二实体集合中的实体,即命中了第二实体集合中的实体;当第一过程指示信息为第二数值时,可以表示第一文本数据中不包括第二实体集合中的实体,即未命中第二实体集合中的实体。在一些实施例中,第一数值可以为1,第二数值可以为0。
S404,设备A 210基于第一文本数据,确定与第一语音数据对应的第一意图数据和第三置信度。
其中,设备A 210可以通过NLUa 216执行S404。在一些实施例中,设备A 210可以通过第三模型来确定与第一语音数据对应的第一意图数据和第三置信度。设备A 210可以将第一文本数据输入至第三模型,得到第三模型输出的第一意图数据和第三置信度。在一些实施例中,第三模型可以等同于NLUa 216。
第一意图数据可以用于指示第一语音数据所请求的操作,第三置信度可以用于指示第一意图数据的可信程度。
在一些实施例中,第一意图数据可以包括第一意图和第一槽值中的至少一个。第一意图用于说明该操作的类型,第一槽值可以为与该操作对应的参数。
在一些实施例中,设备A 210中包括第三实体集合,第三实体集合中可以包括至少一个实体,设备A 210可以基于第三实体集合,确定与第一语音数据对应的第一意图数据和第三置信度。在一些实施例中,设备A 210可以确定与第一意图数据对应的第二过程指示信息和第三过程指示信息,第二过程指示信息可以用于指示第一意图数据中是否包括第一意图,第三过程指示信息可以用于指示第一意图数据中是否包括第一槽值。
在一些实施例中,第二实体集合和第三实体集合可以包括至少一个相同的实体。
在一些实施例中,第二过程指示信息可以为预设的第三数值或第四数值。当第二过程指示信息为第三数值时,可以表示第一意图数据包括第一意图;当第二过程指示信息为第四数值时,可以表示第一意图数据中包括第一意图。在一些实施例中,第三数值可以为1,第四数值可以为0。
在一些实施例中,第三过程指示信息可以为预设的第五数值或第六数值。当第三过程指示信息为第五数值时,可以表示第一意图数据包括第一槽值;当第二过程指示信息为第六数值时,可以表示第一意图数据中包括第一槽值。在一些实施例中,第五数值可以为1,第六数值可以为0。
在一些实施例中,由于S404是基于S403的处理结果进行处理,S403中的处理结果会传递到S404中的处理结果,因此第二置信度一定程度可以体现第三置信度,第三置信度一定程度上也可以体现第二置信度,所以第二置信度和第三置信度中的任一个可以省略。
S405,设备A 210判断第一置信度是否大于或等于第一阈值,如果是则执行S406,否则执行S407。
其中,设备A 210可以通过决策模块217执行S405。
在一些实施例中,设备A 210可以通过下述公式1来基于第二置信度和第三置信度中的至少一个确定第一置信度,或者,基于第二置信度和第三置信度中的至少一个以及第一过程指示信息、第二过程指示信息和第三过程指示信息中至少一个,确定第三置信度。
Z=a*X+b*Y+c*(O+P+Q)         (1)
其中,Z表示第一置信度;X表示第二置信度;a表示第一权重;Y表示第三置信度;b表示第二权重;O、P和Q分别表示第一过程指示信息、第二过程指示信息和第三过程指示信息,O、P和Q的值均为0或1,c表示第三权重。在一些实施例中,a和b可以大于c。在一些实施例中,b可以大于a。在一些实施例中,a+b=0.8,c=0.2。且可以理解的是,在实际应用中,第一权重、第二权重和第三权重也可以为其他数值。
在一些实施例中,设备A 210可以通过下述公式2来基于第二过程指示信息、第二过程指示信息和第三过程指示信息中至少一个以及第二置信度和第三置信度,确定第一置信度。
Z=a*X*Y+c*(O+P+Q)          (2)
其中,Z表示第一置信度;X表示第二置信度;Y表示第三置信度;a表示第一权重;O、P和Q分别表示第一过程指示信息、第二过程指示信息和第三过程指示信息,O、P和Q的值均为0或1,c表示第三权重。在一些实施例中,a可以大于c。在一些实施例中,a=0.8,c=0.2。且可以理解的是,在实际应用中,第一权重和第三权重也可以为其他数值。
在一些实施例中,第一阈值的数据类型可以与第一置信度的数据类型相同。在一些实施例中,第一置信度为0-100之间的数值,第一阈值可以为70-90之间的任意数值,比如,第一阈值可以为70、80或90等,当然,在实际应用中,第一阈值也可以为其他数值,本申请实施例不对第一阈值的数值大小进行限定。
在一些实施例中,设备A 210可以在确定第二过程指示信息为第三数值,即第一意图数据不包括第一意图时,不继续执行后续步骤,即丢弃第一语音数据。
在一些实施例中,设备A 210可以在确定第一置信度小于第二阈值时,不继续执行后续步骤,即丢弃第一语音数据;在确定第一置信度大于或等于第二阈值且小于第一阈值时,执行S407,在第一置信度大于或等于第一阈值时,执行S406。其中,第二阈值小于第一阈值。
需要说明的是,第二阈值的数据类型可以与第一阈值的数据类型相同。在一些实施例中,第二置信度为0-100之间的数值,第二阈值可以为0-50之间的任意数值,比如,第二阈值可以为30、40或50等。当然,在实际应用中,第二阈值也可以为其他 数值,本申请实施例不对第二阈值的数值大小进行限定。
S406,设备A 210基于第一意图数据,确定与第一语音数据对应的第一机器指令。
其中,设备A 210可以通过DMa 218执行S406。
由于第一置信度大于或等于第一阈值,即第一意图数据的可信程度较高,设备A 210能够较为准确地确定所希望进行的操作,因此继续由设备A 210本端基于第一意图数据确定第一机器指令,而不需要请求设备B 220处理语音数据,能够节省设备A 210和设备B 220之间的带宽、减少设备B 220的负载压力,同时也提高了人机交互的效率。
其中,第一机器指令可以用于指示设备A 210响应于第一语音数据时所执行的行为。
S407,设备A 210向设备B 220发送第二请求。
由于第一置信度较小,因此设备A 210可能难以准确地确定用户所希望的操作,因此可以请求设备B 220处理第一语音数据,以提高处理第一语音数据的准确性。
其中,第二请求用于请求对与第一语音数据对应的第一文本数据进行识别。
在一些实施例中,设备A 210可以在同时向设备B 220发送第二请求和第一文本数据。在一些实施例中,第二请求中携带第一文本数据。
在一些实施例中,设备A 210可以分别在不同的时机向设备B 220发送第二请求和第一文本数据。在一些实施例中,设备A 210可以在S403确定第一文本数据之后到S407向设备B 220发送第二请求之前的任意时机,向设备B 220发送第一文本数据,因此,第二请求中也可以不携带第一文本数据。其中,设备A 210在通过S407发送第二请求之前,就提前将第一文本数据发送给设备B 220,那么若通过S405确定需要通过设备B 220继续处理第一文本数据时,不必再次发送第一文本数据,提高了处理第一语音数据的效率。
在一些实施例中,设备A 210还可以向设备B 220发送第一意图数据。在一些实施例中,第二请求中还可以携带第一意图数据。
S408,设备B 220基于第一文本数据,确定与第一语音数据对应的第二意图数据。
其中,设备B可以通过NLUb 222执行S408。在一些实施例中,设备B 220可以通过第四模型确定与第一语音数据对应的第二意图数据。设备B 220可以将第一文本数据输入至第四模型,得到第四模型输出的第二意图数据。在一些实施例中,第四模型可以等同于NLUb 222。
在一些实施例中,设备B 220中可以包括第四实体集合,第四实体集合中可以包括至少一个实体。设备B 220可以基于第四实体集合,确定与第一语音数据对应的第二意图数据。
在一些实施例中,第四实体集合可以比第三实体集合包括更多的实体。在一些实施例中,第四实体集合中可以包括第三实体集合中的至少部分实体。
在一些实施例中,第二意图数据中可以包括第二意图和第二槽值中的至少一个。且需要说明的是,由于第二意图数据和第一意图数据都是对第一文本数据进行识别得到的,因此,第二意图数据和第一意图数据可以相似或相同。
S409,设备B 220基于第二意图数据,确定与第一语音数据对应的第二机器指令。
其中,设备B 220可以通过DMb 223执行S409。
需要说明的是,设备B 220执行S408-S409的方式,可以与设备A 210执行S404和S406的方式相似或相同,此处不再一一赘述。
还需要说明的是,由于第二意图数据和第一意图数据可以相似或相同,因此第二机器指令和第一机器指令可以相似或相同。
S410,设备B 220向设备A 210发送第二机器指令。
在一些实施例中,设备B 220可以向设备A 210发送第一实体。设备A 210可以将第一实体添加至第二实体集合和第三实体集合中的至少一个。其中,第一实体可以为设备B 220对第一文本数据进行识别得到的实体,或者说,第一实体可以为第二意图数据和第四实体集合包括的实体。
在一些实施例中,设备B 220可以向设备A 210发送第二意图数据。设备A 210可以基于第二意图数据,更新第三模型,以使得更新后的第三模型具有更加准确地识别能力。在一些实施例中,设备A 210可以将第一文本数据作为样本,将第二意图数据作为第一文本数据的标注,通过第一文本数据和第二意图数据对第三模型进行训练。
在一些实施例中,设备B 220也可以向设备A 210发送第二意图数据,但不发送第二机器指令,由设备A 210基于接收到的第二意图数据生成第二机器指令。
S411,设备A 210向设备B 220发送第一请求。
其中,第一请求中携带第一语音数据,第一请求可以用于请求对第一语音数据进行识别。
由于第一语音数据中携带第二状态指示信息,所以第一语音数据或者是第N轮次的对话,或者是由于语音唤醒触发、事件唤醒触发或按键唤醒触发等免唤醒触发方式之外其他方式触发的会话中的对话,因此设备A 210可以确定用户当前正在与设备A 210进行对话,那么可以请求设备B 220处理第一语音数据,以提高处理第一语音数据的准确性。
S412,设备B 220确定与第一语音数据对应的第二文本数据。
其中,设备B 220可以通过ASRb 221执行S412。在一些实施例中,设备B 220可以通过第五模型,确定与第一语音数据对应的第二文本数据。设备B 220可以将第一语音数据输入第五模型,得到第五模型输出的第二文本数据。在一些实施例中,第五模型可以等同于ASRb 221。
在一些实施例中,设备B 220中可以包括第五实体集合,第五实体集合中可以包括至少一个实体。设备B 220可以基于第五实体集合,确定与第一语音数据对应的第二文本数据。
在一些实施例中,第五实体集合可以比第二实体集合包括更多的实体。在一些实施例中,第五实体集合中可以包括第二实体集合中的至少部分实体。
S413,设备B 220基于第二文本数据,确定与第一语音数据对应的第二意图数据。
其中,设备B 220可以通过NLUb 222执行S413。
S414,设备B 220基于第二意图数据,确定与第一语音数据对应的第二机器指令。
其中,设备B 220可以通过DMb 223执行S414。
S415,设备B 220向设备A 210发送第二机器指令。
需要说明的是,设备B 220执行S412-S414的方式,可以与设备A 210执行S403-S404和S406的方式相似或相同,设备B 220执行S415的方式可以与设备B 220执行S410的方式相似或相同,此处不再一一赘述。
在本申请实施例中,设备A 210可以在对第一语音数据处理得到第一文本数据和第一意图数据之后,可以将第一文本数据发送给设备B 220,并基于第一意图数据的可信程度,判断是在设备A 210本端继续处理第一语音数据,还是请求设备B 220处理第一语音数据。由于能够在第一意图数据的可信程度较高的情况下,继续在设备A 210本端继续处理第一语音数据,在第一意图数据的可信程度较低的情况下,请求设备B 220再次对第一文本数据进行识别,因此节省了设备A 210与设备B 220之间的带宽,降低了对设备B 220的负载压力,提高了处理第一语音数据的效率。且可以理解是的,由于第一意图数据是对第一文本数据处理得到的,因此第一意图数据的可信程度,也可以理解为第一意图数据和第一文本数据整体的可信程度。
例如,设备A 210的用户对设备A 210说:“导航到A酒店正门”,设备A 210检测到相应的第一语音数据。VAD 214检测第一语音数据并确定其中包括用户语音,且第一语音数据为免唤醒触发的会话中的第一轮次的对话。ASRa 215对第一语音数据进行识别,得到第一文本数据为“导航到A酒店”、第二置信度为90%。NLUa 216对第一文本数据进行识别,得到第一意图数据为“意图:导航;槽值:A酒店”、第三置信度为90%。决策模块217将第二置信度和第三置信度相乘,得到第一置信度为81%。
假如第一阈值为80%,则由于81%大于80%,因此第一意图数据可信程度比较高,决策模块217确定继续由设备A 210处理后续步骤。DMa 218基于第一意图数据生成第一机器指令。语音控制模块213启动导航应用,该导航应用执行第一机器指令以开始导航,且导航的终点为A酒店。
假如第一阈值为90%,则由于81%小于90%,因此第一意图数据可信程度比较低,决策模块217确定由设备B 220再次进行识别。设备A 210向设备B 220发送第一文本数据。NLUb 222对第一文本数据进行识别,得到第二意图数据为“意图:导航;槽值:A酒店”。DMb 223基于第二意图数据生成第二机器指令。设备B 220向设备A 210发送第二机器指令。语音控制模块213启动导航应用,该导航应用执行第二机器指令以开始导航,且导航的终点为A酒店。
还需要说明的是,在另一些实施例中,第一状态指示信息也可以只包括第一触发类型标识,第二状态指示信息也可以只包括第二触发类型标识,也即是,对于用户通过特定事件、按键操作或者预设唤醒词等任一唤醒方式唤醒语音助手应用的情况下,无论第一语音数据是第几轮次的语音数据,设备A 210都通过S411直接请求设备B 220处理第一语音数据,对于免唤醒情况下的第一语音数据,无论第一语音数据是第几轮次的语音数据,设备A 210都先通过S403-S406来尝试在设备A 210本端处理第一语音数据,并在识别结果的可信程度不高的情况下,再执行S407请求设备B 220处理第一语音数据。
请参照图5,为本申请实施例所提供的一种处理语音数据的方法的流程图。其中,第一识别结果可以包括第一意图数据,还可以包括第一文本数据;第一模型可以包括第三模型,还可以包括第二模型;第一实体集合可以包括第三集合,还可以包括第二 实体集合;第二实体可以包括第三实体集合中的实体,还可以包括第二实体集合中的实体;第一置信度可以基于第二置信度和第三置信度中的至少一个确定;第二识别结果可以包括第二意图数据;第一实体可以包括第四实体集合中的实体。需要说明的是,该方法并不以图5以及以下所述的具体顺序为限制,应当理解,在其它实施例中,该方法其中部分步骤的顺序可以根据实际需要相互交换,或者其中的部分步骤也可以省略或删除。该方法包括如下步骤:
S501,当设备A 210检测到第一语音数据时,设备A 210确定与第一语音数据对应的第一文本数据和第二置信度。
其中,设备A 210可以通过ASRa 215执行S501。
S502,设备A 210基于第一文本数据,确定与第一语音数据对应的第一意图数据和第三置信度。
其中,设备A 210可以通过NLUa 216执行S502。
S503,设备A 210判断第一置信度是否大于或等于第一阈值,如果是则执行S504,否则执行S505。
其中,设备A 210可以通过决策模块217执行S503。
S504,设备A 210基于第一意图数据,确定与第一语音数据对应的第一机器指令。
其中,设备A 210可以通过DMa 218执行S504。
S505,设备A 210向设备B 220发送第二请求。
S506,设备B 220基于第一文本数据,确定与第一语音数据对应的第二意图数据。
其中,设备B可以通过NLUb 222执行S506。
S507,设备B 220基于第二意图数据,确定与第一语音数据对应的第二机器指令。
其中,设备B 220可以通过DMb 223执行S507。
S508,设备B 220向设备A 210发送第二机器指令。
需要说明的是,设备A 210执行S501-S505的方式,可以与前述中设备A 210执行S403-S407的方式相似或相同;设备B执行S506-S508的方式,可以与前述中设备B 220执行S408-S410的方式相似或相同,此处不再一一赘述。
在本申请实施例中,不再检测第一语音数据中是否包括用户语音,也不再判断第一语音数据中携带的是第一状态指示信息或第二状态指示信息,也即是,省略了S401和S402,第一语音数据可以是任意的语音数据,进一步增大了通过设备A 210本端处理语音数据的数据量,从而进一步节省了设备A 210与设备B 220之间的带宽,降低了对设备B 220的负载压力,提高了处理第一语音数据的效率。
需要说明的是,在实际应用中,也可以只省略S401和S402中的一个步骤。
请参照图6,为本申请实施例所提供的一种处理语音数据的方法的流程图。其中,第一识别结果可以包括第一文本数据;第一模型可以包括第二模型;第一实体集合可以包括第二实体集合;第二实体可以包括第二实体集合中的实体;第一置信度可以为第二置信度;第二识别结果可以包括第二文本数据;第一实体可以为第五实体集合和/或第四实体集合中的实体。需要说明的是,该方法并不以图6以及以下所述的具体顺序为限制,应当理解,在其它实施例中,该方法其中部分步骤的顺序可以根据实际需要相互交换,或者其中的部分步骤也可以省略或删除。该方法包括如下步骤:
S601,当设备A 210检测到第一语音数据时,判断第一语音数据中是否包括用户语音,如果是则执行S602,否则结束。
其中,设备A 210可以通过VAD 214执行S506。
在一些实施例中,如果在第一语音数据之前,不存在未结束的第二会话,则且设备A 210也并未检测到与事件唤醒触发对应的事件,未检测到与按键唤醒触发对应的按键操作、且未在第一语音数据中检测到任一预设唤醒词,则可以生成与第一语音数据对应的第一状态指示信息,第一状态指示信息可以用于指示第语音数据为第一会话中的首轮次对话且第一会话为免唤醒触发的会话。
在一些实施例中,如果在第一语音数据之前存在未结束的第二会话,和/或,设备A 210检测到第一语音数据中包括预设的唤醒词、与事件唤醒触发对应的事件和与按键唤醒触发对应的按键操作中的任一个,则生成与第一语音数据对应的第二状态指示信息,第二状态指示信息可以用于指示第一语音数据为第二会话中的第N轮次对话,和/或,第二会话的触发方式为语音唤醒触发、事件唤醒触发或按键唤醒触发,其中,N为大于1的整数。
S602,设备A 210检测与第一语音数据对应的第一状态指示信息或第二状态指示信息。如果检测到第一状态指示信息则执行S603,如果检测到第二状态指示信息则执行S607。
其中,设备A 210可以通过决策模块217执行S602。
S603,设备A 210确定与第一语音数据对应的第一文本数据和第二置信度。
其中,设备A 210可以通过ASRa 215执行S603。在一些实施例中,设备A 210可以基于第二模型确定与第一语音数据对应的第一文本数据和第二置信度。
在一些实施例中,设备A 210中包括第二实体集合,第二实体集合中可以包括至少一个实体。设备A 210可以基于第一实体集合,确定与第一语音数据对应的第一文本数据和第二置信度。
在一些实施例中,设备A 210还可以确定与第一文本数据对应的第一过程指示信息。
S604,设备A 210判断第二置信度是否大于或等于第一阈值,如果是则执行S605,否则执行S607。
其中,设备A 210可以通过决策模块217执行S604。
需要说明的是,设备A 210执行S604的方式,可以与执行S405的方式相似或相同。
S605,设备A 210基于第一文本数据,确定与第一语音数据对应的第一意图数据。
其中,设备A 210可以通过NLUa 216执行S605。在一些实施例中,设备A 210可以通过第三模型来确定与第一语音数据对应的第一意图数据。
在一些实施例中,设备A 210中包括第三实体集合,第三实体集合中可以包括至少一个实体,设备A 210可以基于第三实体集合,确定与第一语音数据对应的第一意图数据。在一些实施例中,设备A 210可以确定与第一意图数据对应的第二过程指示信息和第三过程指示信息。
在一些实施例中,第二实体集合和第三实体集合可以包括至少一个相同的实体。
在一些实施例中,设备A 210可以在确定第二过程指示信息为第三数值,即第一意图数据不包括第一意图时,不继续执行后续步骤,即丢弃第一语音数据。
S606,设备A 210基于第一意图数据,确定与第一语音数据对应的第一机器指令。
其中,设备A 210可以通过DMa 218执行S606。
S607,设备A 210向设备B 220发送第一请求。
在一些实施例中,第一请求中携带第一语音数据。
S608,设备B 220确定与第一语音数据对应的第二文本数据。
其中,设备B 220可以通过ASRb 221执行S608。在一些实施例中,设备B 220可以通过第五模型,确定与第一语音数据对应的第二文本数据。
在一些实施例中,设备B 220中可以包括第五实体集合,第五实体集合中可以包括至少一个实体。设备B 220可以基于第五实体集合,确定与第一语音数据对应的第二文本数据。
在一些实施例中,第五实体集合可以比第二实体集合包括更多的实体。在一些实施例中,第五实体集合中可以包括第二实体集合中的至少部分实体。
S609,设备B 220基于第二文本数据,确定与第一语音数据对应的第二意图数据。
其中,设备B 220可以通过NLUb 222执行S609。在一些实施例中,设备B 220可以通过第四模型确定与第一语音数据对应的第二意图数据。设备B 220可以将第二文本数据输入至第四模型,得到第四模型输出的第二意图数据。
在一些实施例中,设备B 220中可以包括第四实体集合,第四实体集合中可以包括至少一个实体。设备B 220可以基于第四实体集合,确定与第一语音数据对应的第二意图数据。
在一些实施例中,第四实体集合可以比第三实体集合包括更多的实体。在一些实施例中,第四实体集合中可以包括第三实体集合中的至少部分实体。
S610,设备B 220基于第二意图数据,确定与第一语音数据对应的第二机器指令。
其中,设备B 220可以通过DMb 223执行S610。
S611,设备B 220向设备A 210发送第二机器指令。
在一些实施例中,设备B 220可以向设备A 210发送第一实体。设备A 210可以将第一实体添加至第二实体集合和第三实体集合中的至少一个。其中,第一实体可以为设备B 220对第一文本数据进行识别得到的实体和/或对第一语音数据进行识别得到的实体,或者说,第一实体可以为第二文本数据和第五实体集合包括的实体,和/或,第一实体可以为第二意图数据和第四实体集合包括的实体。
在一些实施例中,设备B 220可以向设备A 210发送第二文本数据。设备A 210可以基于第二文本数据,更新第二模型,以使得更新后的第二模型具有更加准确地识别能力。在一些实施例中,设备A 210可以将第一语音数据作为样本,将第二文本数据作为第一文本数据的标注,通过第一语音数据和第二文本数据对第二模型进行训练。
需要说明的是,设备B 220执行S608-S611的方式,可以与设备B 220执行S412-S415的方式相似或相同,此处不再一一赘述。
还需要说明的是,基于与省略S401和S402相同的理由,S601和S602中的至少一个可以省略。
在本申请实施例中,设备A 210可以基于第一文本数据的可信程度,判断是在设备A 210本端继续处理第一语音数据,还是请求设备B 220处理第一语音数据,提前了判断由设备A 210继续处理或者由设备B 220再次识别的时机,从而更早地在难以准确对第一语音数据进行处理时,请求设备B 220处理第一语音数据,提高了处理第一语音数据的效率和准确性。
例如,设备A 210的用户对设备A 210说:“导航到A酒店正门”,设备A 210检测到相应的第一语音数据。VAD 214检测第一语音数据并确定其中包括用户语音,且第一语音数据为免唤醒触发的会话中的第一轮次的对话。ASRa 215对第一语音数据进行识别,得到第一文本数据为“导航到A景点”、第二置信度为60%。
假如第一阈值为50%,则由于60%大于50%,因此第一文本数据可信程度比较高,决策模块217确定继续由设备A 210处理后续步骤。NLUa 216对第一文本数据进行识别,得到第一意图数据为“意图:导航;槽值:A景点”。DMa 218基于第一意图数据生成第一机器指令。语音控制模块213启动导航应用,该导航应用执行第一机器指令以开始导航,且导航的终点为A景点。
假如第一阈值为90%,则由于60%小于90%,因此第一文本数据可信程度比较低,决策模块217确定由设备B 220再次进行识别。设备A 210向设备B 220发送第一语音数据。ASRb 221对第一语音数据进行识别,得到第二文本数据为“导航到A酒店正门”。NLUb 222对第二文本数据进行识别,得到第二意图数据为“意图:导航;槽值:A酒店正门”。DMb 223基于第二意图数据生成第二机器指令。设备B 220向设备A 210发送第二机器指令。语音控制模块213启动导航应用,该导航应用执行第二机器指令以开始导航,且导航的终点为A酒店正门。
其中,ASRa 215未能识别出“A酒店”,可能是因为设备A 210本端未存储“A酒店”这一实体,也可能是因为ASRa 215的识别能力较低,因此,设备B 220可以将“A酒店”这一实体和第二文本数据“导航到A酒店正门”发送给设备A 210。设备A 210可以将“A酒店”进行存储。设备A 210还可以将第一语音数据作为样本,将第二文本数据“导航到A酒店正门”作为该样本的标注,通过该样本对ASRa 215进行训练,提高ASRa 215的识别能力。
请参照图7,为本申请实施例所提供的一种处理语音数据的方法的流程图。其中,第一识别结果可以包括第一意图数据,还可以包括第一文本数据;第一模型可以包括第三模型,还可以包括第二模型;第一实体集合可以包括第三集合,还可以包括第二实体集合;第二实体可以包括第三实体集合中的实体,还可以包括第二实体集合中的实体;第一置信度可以基于第二置信度和第三置信度中的至少一个确定;第二识别结果可以包括第二意图数据,还可以包括第二文本数据;第一实体可以包括第四实体集合和/或第五实体集合中的实体。需要说明的是,该方法并不以图7以及以下所述的具体顺序为限制,应当理解,在其它实施例中,该方法其中部分步骤的顺序可以根据实际需要相互交换,或者其中的部分步骤也可以省略或删除。该方法包括如下步骤:
S701,当设备A 210检测到第一语音数据时,判断第一语音数据中是否包括用户语音,如果是则执行S702,否则结束。
其中,设备A 210可以通过VAD 214执行S701。
在一些实施例中,如果在第一语音数据之前,不存在未结束的第二会话,则且设备A 210也并未检测到与事件唤醒触发对应的事件,未检测到与按键唤醒触发对应的按键操作、且未在第一语音数据中检测到任一预设唤醒词,则可以生成与第一语音数据对应的第一状态指示信息,第一状态指示信息可以用于指示第语音数据为第一会话中的首轮次对话且第一会话为免唤醒触发的会话。
在一些实施例中,如果在第一语音数据之前存在未结束的第二会话,和/或,设备A 210检测到第一语音数据中包括预设的唤醒词、与事件唤醒触发对应的事件和与按键唤醒触发对应的按键操作中的任一个,则生成与第一语音数据对应的第二状态指示信息,第二状态指示信息可以用于指示第一语音数据为第二会话中的第N轮次对话,和/或,第二会话的触发方式为语音唤醒触发、事件唤醒触发或按键唤醒触发,其中,N为大于1的整数。
S702,设备A 210检测与第一语音数据对应的第一状态指示信息或第二状态指示信息。如果检测到第一状态指示信息则执行S703,如果检测到第二状态指示信息则执行S707。
其中,设备A 210可以通过决策模块217执行S702。
S703,设备A 210确定与第一语音数据对应的第一文本数据和第二置信度。
其中,设备A 210可以通过ASRa 215执行S703。在一些实施例中,设备A 210可以基于第二模型确定与第一语音数据对应的第一文本数据和第二置信度。
在一些实施例中,设备A 210中包括第二实体集合,第二实体集合中可以包括至少一个实体。设备A 210可以基于第一实体集合,确定与第一语音数据对应的第一文本数据和第二置信度。
在一些实施例中,设备A 210还可以确定与第一文本数据对应的第一过程指示信息。
S704,设备A 210基于第一文本数据,确定与第一语音数据对应的第一意图数据和第三置信度。
其中,设备A 210可以通过NLUa 216执行S704。在一些实施例中,设备A 210可以通过第三模型来确定与第一语音数据对应的第一意图数据和第三置信度。
在一些实施例中,设备A 210中包括第三实体集合,第三实体集合中可以包括至少一个实体,设备A 210可以基于第三实体集合,确定与第一语音数据对应的第一意图数据和第三置信度。
在一些实施例中,第二实体集合和第三实体集合可以包括至少一个相同的实体。
在一些实施例中,由于S704是基于S703的处理结果进行处理,S703中的处理结果会传递到S704中的处理结果,因此第二置信度一定程度可以体现第三置信度,第三置信度一定程度上也可以体现第二置信度,所以第二置信度和第三置信度中的任一个可以省略。
S705,设备A 210判断第一置信度是否大于或等于第一阈值,如果是则执行S706,否则执行S707。
其中,设备A 210可以通过决策模块217执行S705。
S706,设备A 210基于第一意图数据,确定与第一语音数据对应的第一机器指令。
其中,设备A 210可以通过DMa 218执行S706。
S707,设备A 210向设备B 220发送第一请求。
在一些实施例中,第一请求中携带第一语音数据。
在一些实施例中,设备A 210可以在S702确定第一语音数据中携带第一状态指示信息之后到S707向设备B 220发送第一请求之前的任意时机,向设备B 220发送第一语音数据,因此,第一请求中也可以不携带第一文本数据。其中,设备A 210在通过S707发送第一请求之前,就提前将第一语音数据发送给设备B 220,那么若通过S705确定需要通过设备B 220继续处理第一语音数据时,不必再次发送第一语音数据,提高了处理第一语音数据的效率。
S708,设备B 220确定与第一语音数据对应的第二文本数据。
其中,设备B 220可以通过ASRb 221执行S708。在一些实施例中,设备B 220可以通过第五模型,确定与第一语音数据对应的第二文本数据。设备B 220可以将第一语音数据输入第五模型,得到第五模型输出的第二文本数据。
在一些实施例中,设备B 220中可以包括第五实体集合,第五实体集合中可以包括至少一个实体。设备B 220可以基于第五实体集合,确定与第一语音数据对应的第二文本数据。
在一些实施例中,第五实体集合可以比第二实体集合包括更多的实体。在一些实施例中,第五实体集合中可以包括第二实体集合中的至少部分实体。
S709,设备B 220基于第二文本数据,确定与第一语音数据对应的第二意图数据。
其中,设备B可以通过NLUb 222执行S709。在一些实施例中,设备B 220可以通过第四模型确定与第一语音数据对应的第二意图数据。设备B 220可以将第二文本数据输入至第四模型,得到第四模型输出的第二意图数据。
在一些实施例中,设备B 220中可以包括第四实体集合,第四实体集合中可以包括至少一个实体。设备B 220可以基于第四实体集合,确定与第一语音数据对应的第二意图数据。
在一些实施例中,第四实体集合可以比第三实体集合包括更多的实体。在一些实施例中,第四实体集合中可以包括第三实体集合中的至少部分实体。
S710,设备B 220基于第二意图数据,确定与第一语音数据对应的第二机器指令。
其中,设备B 220可以通过DMb 223执行S710。
S711,设备B 220向设备A 210发送第二机器指令。
在一些实施例中,设备B 220可以向设备A 210发送第一实体。设备A 210可以将第一实体添加至第二实体集合和第三实体集合中的至少一个。其中,第一实体可以为设备B 220对第一语音数据和/或第一文本数据进行识别得到的实体,也即是,第一实体可以为第二文本数据和第五实体集合包括的实体,和/或,第一实体可以为第二意图数据和第四实体集合包括的实体。
在一些实施例中,设备B 220可以向设备A 210发送第二文本数据。设备A 210可以基于第二文本数据,更新第二模型,以使得更新后的第二模型具有更加准确地识别能力。在一些实施例中,设备A 210可以将第一语音数据作为样本,将第二文本数据作为第一语音数据的标注,通过第一语音数据和第二文本数据对第二模型进行训练。
在一些实施例中,设备B 220可以向设备A 210发送第二意图数据。设备A 210可以基于第二意图数据,更新第三模型,以使得更新后的第三模型具有更加准确地识别能力。在一些实施例中,设备A 210可以将第一文本数据作为样本,将第二意图数据作为第一文本数据的标注,通过第一文本数据和第二意图数据对第三模型进行训练。
需要说明的是,设备B 220执行S708-S711的方式,也可以与设备B 220执行S412-S415的方式相似或相同。
在本申请实施例中,设备A 210可以向设备B 220发送第一语音数据,从而确定第一意图数据的可信程度较低时,请求设备B 220对第一语音数据进行识别,由于第一语音数据比第一文本数据包括更多的数量,因此能够进一步提高处理第一语音数据的准确性。
需要说明的是,基于与省略S401和S402相同的理由,S701和S702中的至少一个可以省略。
例如,设备A 210的用户对设备A 210说:“导航到A酒店正门”,设备A 210检测到相应的第一语音数据。VAD 214检测第一语音数据并确定其中包括用户语音,且第一语音数据为免唤醒触发的会话中的第一轮次的对话。ASRa 215对第一语音数据进行识别,得到第一文本数据为“导航到A酒店”、第二置信度为90%。同时,设备A 210也将第一语音数据发送给设备B 220。NLUa 216对第一文本数据进行识别,得到第一意图数据为“意图:导航;槽值:A酒店”、第三置信度为90%。决策模块217将第二置信度和第三置信度相乘,得到第一置信度为81%。
假如第一阈值为80%,则由于81%大于80%,因此第一意图数据可信程度比较高,决策模块217确定继续由设备A 210处理后续步骤。DMa 218基于第一意图数据生成第一机器指令。语音控制模块213启动导航应用,该导航应用执行第一机器指令以开始导航,且导航的终点为A酒店。
假如第一阈值为90%,则由于81%小于90%,因此第一意图数据可信程度比较低,决策模块217确定由设备B 220再次进行识别。ASRb 221对第一语音数据进行识别,得到第二文本数据为“导航到A酒店正门”。NLUb 222对第二文本数据进行识别,得到第二意图数据为“意图:导航;槽值:A酒店正门”。DMb 223基于第二意图数据生成第二机器指令。设备B 220向设备A 210发送第二机器指令。语音控制模块213启动导航应用,该导航应用执行第二机器指令以开始导航,且导航的终点为A酒店正门。
请参照图8,为本申请实施例所提供的一种处理语音数据的方法的流程图。其中,第一识别结果可以包括第一意图数据,还可以包括第一文本数据;第一模型可以包括第三模型,还可以包括第二模型;第一实体集合可以包括第三集合,还可以包括第二实体集合;第二实体可以包括第三实体集合中的实体,还可以包括第二实体集合中的实体;第一置信度可以基于第二置信度和第三置信度中的至少一个确定;第二识别结果可以包括第二意图数据,还可以包括第二文本数据;第一实体可以包括第四实体集合和/或第五实体集合中的实体。需要说明的是,该方法并不以图8以及以下所述的具体顺序为限制,应当理解,在其它实施例中,该方法其中部分步骤的顺序可以根据实际需要相互交换,或者其中的部分步骤也可以省略或删除。该方法包括如下步骤:
S801,当设备A 210检测到第一语音数据时,判断第一语音数据中是否包括用户 语音,如果是则执行S802,否则结束。
其中,设备A 210可以通过VAD 214执行S801。
在一些实施例中,如果在第一语音数据之前,不存在未结束的第二会话,则且设备A 210也并未检测到与事件唤醒触发对应的事件,未检测到与按键唤醒触发对应的按键操作、且未在第一语音数据中检测到任一预设唤醒词,则可以生成与第一语音数据对应的第一状态指示信息,第一状态指示信息可以用于指示第语音数据为第一会话中的首轮次对话且第一会话为免唤醒触发的会话。
在一些实施例中,如果在第一语音数据之前存在未结束的第二会话,和/或,设备A 210检测到第一语音数据中包括预设的唤醒词、与事件唤醒触发对应的事件和与按键唤醒触发对应的按键操作中的任一个,则生成与第一语音数据对应的第二状态指示信息,第二状态指示信息可以用于指示第一语音数据为第二会话中的第N轮次对话,和/或,第二会话的触发方式为语音唤醒触发、事件唤醒触发或按键唤醒触发,其中,N为大于1的整数。
S802,设备A 210检测与第一语音数据对应的第一状态指示信息或第二状态指示信息。如果检测到第一状态指示信息则执行S803,如果检测到第二状态指示信息则执行S807。
其中,设备A 210可以通过决策模块217执行S802。
S803,设备A 210确定与第一语音数据对应的第一文本数据和第二置信度。
其中,设备A 210可以通过ASRa 215执行S803。在一些实施例中,设备A 210可以基于第二模型确定与第一语音数据对应的第一文本数据和第二置信度。
在一些实施例中,设备A 210中包括第二实体集合,第二实体集合中可以包括至少一个实体。设备A 210可以基于第一实体集合,确定与第一语音数据对应的第一文本数据和第二置信度。
在一些实施例中,设备A 210还可以确定与第一文本数据对应的第一过程指示信息。
S804,设备A 210基于第一文本数据,确定与第一语音数据对应的第一意图数据和第三置信度。
其中,设备A 210可以通过NLUa 216执行S804。在一些实施例中,设备A 210可以通过第三模型来确定与第一语音数据对应的第一意图数据和第三置信度。
在一些实施例中,设备A 210中包括第三实体集合,第三实体集合中可以包括至少一个实体,设备A 210可以基于第三实体集合,确定与第一语音数据对应的第一意图数据和第三置信度。
在一些实施例中,第二实体集合和第三实体集合可以包括至少一个相同的实体。
在一些实施例中,由于S804是基于S803的处理结果进行处理,S803中的处理结果会传递到S804中的处理结果,因此第二置信度一定程度可以体现第三置信度,第三置信度一定程度上也可以体现第二置信度,所以第二置信度和第三置信度中的任一个可以省略。
S805,设备A 210判断第一置信度是否大于或等于第一阈值,如果是则执行S806,否则执行S812。
其中,设备A 210可以通过决策模块217执行S805。
S806,设备A 210基于第一意图数据,确定与第一语音数据对应的第一机器指令。
其中,设备A 210可以通过DMa 218执行S806。
S807,设备A 210向设备B 220发送第一请求。
其中,第一请求中携带第一语音数据。
S808,设备B 220确定与第一语音数据对应的第二文本数据。
其中,设备B 220可以通过ASRb 221执行S808。在一些实施例中,设备B 220可以通过第五模型,确定与第一语音数据对应的第二文本数据。
在一些实施例中,设备B 220中可以包括第五实体集合,第五实体集合中可以包括至少一个实体。设备B 220可以基于第五实体集合,确定与第一语音数据对应的第二文本数据。
在一些实施例中,第五实体集合可以比第二实体集合包括更多的实体。在一些实施例中,第五实体集合中可以包括第二实体集合中的至少部分实体。
S809,设备B 220基于第二文本数据,确定与第一语音数据对应的第二意图数据。
其中,设备B可以通过NLUb 222执行S809。在一些实施例中,设备B 220可以通过第四模型确定与第一语音数据对应的第二意图数据。
在一些实施例中,设备B 220中可以包括第四实体集合,第四实体集合中可以包括至少一个实体。设备B 220可以基于第四实体集合,确定与第一语音数据对应的第二意图数据。
在一些实施例中,第四实体集合可以比第三实体集合包括更多的实体。在一些实施例中,第四实体集合中可以包括第三实体集合中的至少部分实体。
S810,设备B 220基于第二意图数据,确定与第一语音数据对应的第二机器指令。
其中,设备B 220可以通过DMb 223执行S810。
S811,设备B 220向设备A 210发送第二机器指令。
在一些实施例中,设备B 220可以向设备A 210发送第一实体。设备A 210可以将第一实体添加至第二实体集合和第三实体集合中的至少一个。其中,第一实体可以为设备B 220对第一语音数据和/或第一文本数据进行识别得到的实体,也即是,第一实体可以为第二文本数据和第五实体集合包括的实体,和/或,第一实体可以为第二意图数据和第四实体集合包括的实体。
在一些实施例中,设备B 220可以向设备A 210发送第二文本数据。设备A 210可以基于第二文本数据,更新第二模型,以使得更新后的第二模型具有更加准确地识别能力。在一些实施例中,设备A 210可以将第一语音数据作为样本,将第二文本数据作为第一语音数据的标注,通过第一语音数据和第二文本数据对第二模型进行训练。
在一些实施例中,设备B 220可以向设备A 210发送第二意图数据。设备A 210可以基于第二意图数据,更新第三模型,以使得更新后的第三模型具有更加准确地识别能力。在一些实施例中,设备A 210可以将第一文本数据作为样本,将第二意图数据作为第一文本数据的标注,通过第一文本数据和第二意图数据对第三模型进行训练。
需要说明的是,设备B 220执行S808-S811的方式,也可以与设备B 220执行S412-S415的方式相似或相同。
S812,设备A 210基于第一语音数据获取第二语音数据,基于第二语音数据从设备B 220获取第二机器指令。
其中,设备A 210可以基于第一语音数据,请求用户开始第N轮次对话,设备A 210通过与获取第一语音数据相似或相同的方式,获取到第二语音数据,第二语音数据可以为第一会话中的第N轮次对话,因此与第二语音数据对应的是第二状态指示信息。在一些实施例中,第二状态指示信息可以包括第一会话的第一会话标识、第二轮次标识和第一触发类型,其中,第二轮次标识可以用于指示第二语音数据为第N轮次的对话。
在一些实施例中,设备A 210可以基于第一语音数据生成第三机器指令,其中,第三机器指令生成对话提示信息,该对话提示信息可以用于提示用户开始第N轮次的对话。设备A 210基于第三机器指令发出该对话提示信息,用户在感知到该对话提示信息之后开始第N轮次的对话,设备A 210通过麦克风采集得到第二语音数据。
由于与第二语音数据对应的是第二状态指示信息,因此设备A 210在检测到第二语音数据,并基于第二语音数据执行与S801和S802相似或相同的步骤之后,可以执行与S807相似或相同步骤,向设备B 220发送第二语音数据,设备B 220可以执行与S808-S810相似或相同的步骤,对第二语音数据进行处理,并向设备A 210发送第二机器指令。
在本申请实施例中,设备A 210可以在对第一语音数据处理得到第一文本数据和第一意图数据之后,可以基于第一意图数据的可信程度,判断是在设备A 210本端继续处理第一语音数据,还是请求设备B 220处理第一语音数据。由于能够在第一意图数据的可信程度较高的情况下,继续在设备A 210本端继续处理第一语音数据,在第一意图数据的可信程度较低的情况下,基于第一语音数据获取第二语音数据,从而再次向用户确认用户所希望进行的操作,再请求设备B 220再次对第二语音数据进行识别,提高了第二机器指令的准确性。
需要说明的是,基于与省略S401相同的理由,S801可以省略。
例如,设备A 210的用户对设备A 210说:“导航到A酒店正门”,设备A 210检测到相应的第一语音数据。VAD 214检测第一语音数据并确定其中包括用户语音,且第一语音数据为免唤醒触发的会话中的第一轮次的对话。ASRa 215对第一语音数据进行识别,得到第一文本数据为“导航到A酒店”、第二置信度为90%。NLUa 216对第一文本数据进行识别,得到第一意图数据为“意图:导航;槽值:A酒店”、第三置信度为90%。决策模块217将第二置信度和第三置信度相乘,得到第一置信度为81%。
假如第一阈值为80%,则由于81%大于80%,因此第一意图数据可信程度比较高,决策模块217确定继续由设备A 210处理后续步骤。DMa 218基于第一意图数据生成第一机器指令。语音控制模块213启动导航应用,该导航应用执行第一机器指令以开始导航,且导航的终点为A酒店。
假如第一阈值为90%,则由于81%小于90%,因此第一意图数据可信程度比较低,决策模块217确定由设备B 220再次进行识别。设备A 210在显示屏显示第一界面如图9所示,第一界面中包括设备A 210基于第一语音数据显示的提示信息“你要去哪里……”,同时设备A 210可以播放与该提示信息对应的语音,即第三语音数据。用户 在看到该提示信息和/或听到第三语音数据时,对设备A 210说:“A酒店正门”,设备A 210检测到相应的第二语音数据。VAD 214检测第二语音数据并确定其中包括用户语音,且第二语音数据为免唤醒触发的会话中的第二轮次的对话。设备A 210向设备B 220发送第二语音数据。ASRb 221对第二语音数据和第一语音数据进行识别,得到第二文本数据为“导航到A酒店正门”。NLUb 222对第二文本数据进行识别,得到第二意图数据为“意图:导航;槽值:A酒店正门”。DMb 223基于第二意图数据生成第二机器指令。设备B 220向设备A 210发送第二机器指令。语音控制模块213启动导航应用,该导航应用执行第二机器指令以开始导航,且导航的终点为A酒店正门。设备B还可以显示第二界面如图10所示,该第二界面中包括“好的,开始为您导航”这一提示信息,同时设备A 210可以播放与该提示信息对应的语音,即第四语音数据,从而通知用户相应的处理结果。
请参照图11,为本申请实施例所提供的一种处理语音数据的方法的流程图。需要说明的是,该方法并不以图11以及以下所述的具体顺序为限制,应当理解,在其它实施例中,该方法其中部分步骤的顺序可以根据实际需要相互交换,或者其中的部分步骤也可以省略或删除。该方法包括如下步骤:
S1101,获取第一语音数据;
S1102,当确定第一语音数据为第一会话中的首轮次对话且第一会话为免唤醒触发的会话时,对第一语音数据进行识别,得到第一识别结果和第一置信度,第一置信度用于指示第一识别结果的可信程度。
S1103,设备A 210判断第一置信度是否大于或等于第一阈值,如果是则执行S1104,否则执行S1105。
S1104,设备A 210基于第一识别结果生成第一机器指令。
S1105,设备A 210基于第一语音数据,从服务器获取第二机器指令。
需要说明的是,设备A 210执行S1101-S1104的方式,可以参见前述实施例中的相关描述,此处不在一一赘述。
在本申请实施例中,设备A 210可以在获取到第一语音数据,且确定第一语音数据为免唤醒触发的第一会话中的首轮次对话时,对第一语音数据进行识别得到第一识别结果和第一置信度。由于第一置信度可以指示第一识别结果的置信度,因此,对于免唤醒触发的会话中的首轮次会话,设备A 210可以在第一置信度大于或等于第一阈值,即第一识别结果的可信程度较高的情况下,在本端基于第一识别结果生成第一机器指令,节省了与服务器之间的带宽,降低了对服务器的负载压力,提高了处理第一语音数据的效率。
在一些实施例中,S1102可以替换为:当确定第一语音数据为第一会话中的首轮次对话时,或者,确定第一语音数据为第一会话中的第N次对话且第一会话为免唤醒触发的会话时,对第一语音数据进行识别,得到第一识别结果和第一置信度,第一置信度用于指示第一识别结果的可信程度。
在一些实施例中,S1102可以替换为:对第一语音数据进行识别,得到第一识别结果和第一置信度,第一置信度用于指示第一识别结果的可信程度。
基于同一发明构思,本申请实施例还提供了一种电子设备。本实施例提供的电子 设备包括:存储器和处理器,存储器用于存储计算机程序;处理器用于在调用计算机程序时执行上述方法实施例所述的方法。
本实施例提供的电子设备可以执行上述方法实施例,其实现原理与技术效果类似,此处不再赘述。
基于同一发明构思,本申请实施例还提供了一种芯片系统。该所述芯片系统包括处理器,所述处理器与存储器耦合,所述处理器执行存储器中存储的计算机程序,以实现上述方法实施例所述的方法。
其中,该芯片系统可以为单个芯片,或者多个芯片组成的芯片模组。
本申请实施例还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述方法实施例所述的方法。
本申请实施例还提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行时实现上述方法实施例所述的方法。
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读存储介质至少可以包括:能够将计算机程序代码携带到拍照装置/终端设备的任何实体或装置、记录介质、计算机存储器、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的实施例中,应该理解到,所揭露的装置/设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。
应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联 列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
如在本申请说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。
另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (18)

  1. 一种处理语音数据的方法,其特征在于,应用于终端设备,所述方法包括:
    获取第一语音数据;
    当确定所述第一语音数据为第一会话中的首轮次对话且所述第一会话为免唤醒触发的会话时,对所述第一语音数据进行识别,得到第一识别结果和第一置信度,所述第一置信度用于指示所述第一识别结果的可信程度;
    若所述第一置信度大于或等于第一阈值,则基于所述第一识别结果生成第一机器指令。
  2. 根据权利要求1所述的方法,其特征在于,所述确定所述第一语音数据为第一会话中的首轮次对话且所述第一会话为免唤醒触发的会话,包括:
    若检测到与所述第一语音数据对应的第一状态指示信息,则确定所述第一语音数据为所述第一会话中的首轮次对话且所述第一会话为免唤醒触发的会话。
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:
    若所述第一置信度小于所述第一阈值,则基于所述第一语音数据,从服务器获取第二机器指令。
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    向所述服务器发送所述第一语音数据;
    所述基于所述第一语音数据,从服务器获取第二机器指令,包括:
    接收所述服务器基于所述第一语音数据发送的所述第二机器指令。
  5. 根据权利要求4所述的方法,其特征在于,所述向所述服务器发送所述第一语音数据,包括:
    当检测到第一语音数据时,向所述服务器发送所述第一语音数据;
    在所述接收所述服务器基于所述第一语音数据发送的所述第二机器指令之前,所述方法还包括:
    向所述服务器发送第一请求,所述第一请求用于请求所述服务器对所述第一语音数据进行识别。
  6. 根据权利要求4所述的方法,其特征在于,所述向所述服务器发送所述第一语音数据,包括:
    若所述第一置信度小于所述第一阈值,则向所述服务器发送第一请求和所述第一语音数据,所述第一请求用于请求所述服务器对所述第一语音数据进行识别。
  7. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    向所述服务器发送与所述第一语音数据对应的第一文本数据;
    所述基于所述第一语音数据,从服务器获取第二机器指令,包括:
    接收所述服务器基于所述第一文本数据发送的所述第二机器指令。
  8. 根据权利要求7所述的方法,其特征在于,所述向所述服务器发送与所述第一语音数据对应的第一文本数据,包括:
    若所述第一置信度小于所述第一阈值,则向所述服务器发送第二请求和所述第一文本数据,所述第二请求用于请求所述服务器对所述第一文本数据进行识别。
  9. 根据权利要求3所述的方法,其特征在于,所述基于所述第一语音数据,从服 务器获取第二机器指令,包括:
    基于所述第一语音数据,获取第二语音数据,所述第二语音数据为所述第一会话中的第N轮次对话,N为大于1的整数;
    接收所述服务器基于所述第二语音数据发送的所述第二机器指令。
  10. 根据权利要求1-9任一所述的方法,其特征在于,所述对所述第一语音数据进行识别,得到第一识别结果和第一置信度,包括:
    基于存储的第一实体集合和第一模型,对所述第一语音数据进行识别,得到所述第一识别结果和所述第一置信度。
  11. 根据权利要求10所述的方法,其特征在于,所述方法还包括:
    若所述第一置信度小于所述第一阈值,则基于所述第一语音数据从服务器获取第一实体,所述第一实体由所述服务器对所述第一语音数据进行识别得到;
    将所述第一实体添加至所述第一实体集合。
  12. 根据权利要求10或11所述的方法,其特征在于,所述方法还包括:
    若所述第一置信度小于所述第一阈值,则基于所述第一语音数据从服务器获取第二识别结果,所述第二识别结果由所述服务器对所述第一语音数据进行识别得到;
    基于所述第二识别结果更新所述第一模型。
  13. 根据权利要求12所述的方法,其特征在于,所述第一识别结果包括与所述第一语音数据对应的第一文本数据,所述第二识别结果包括与所述第一语音数据对应的第二文文本数据,所述基于所述第一语音数据从所述服务器获取第二识别结果,包括:
    向所述服务器发送所述第一语音数据;
    获取所述服务器基于所述第一语音数据发送的所述第二文本数据。
  14. 根据权利要求12所述的方法,其特征在于,所述第一识别结果包括与所述第一语音数据对应的第一意图数据,所述第二识别结果包括第二意图数据和第二文本数据中的至少一个,所述第二意图数据和所述第二文本数据均与所述第一语音数据对应,所述基于所述第一语音数据从所述服务器获取第二识别结果,包括:
    向所述服务器发送所述第一语音数据,获取所述服务器基于所述第一语音数据发送的所述第二意图数据和所述第二文本数据中的至少一个;或,
    向所述服务器发送与所述第一语音数据对应的第一文本数据,获取所述服务器基于所述第一文本数据发送的所述第二意图数据。
  15. 根据权利要求1-14任一所述的方法,其特征在于,所述第一识别结果包括与所述第一语音数据对应的第一意图数据,在所述若所述第一置信度大于或等于第一阈值,则基于所述第一识别结果生成第一机器指令之前,所述方法还包括:
    确定所述第一意图数据中包括第一意图。
  16. 一种终端设备,其特征在于,包括:存储器和处理器,所述存储器用于存储计算机程序;所述处理器用于在调用所述计算机程序时执行如权利要求1-15任一项所述的方法。
  17. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1-15任一项所述的方法。
  18. 一种计算机程序产品,其特征在于,当所述计算机程序产品在终端设备上运 行时,使得所述终端设备执行如权利要求1-15中任一项所述的方法。
PCT/CN2023/099358 2022-06-13 2023-06-09 处理语音数据的方法及终端设备 WO2023241473A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210667633.2 2022-06-13
CN202210667633.2A CN117275471A (zh) 2022-06-13 2022-06-13 处理语音数据的方法及终端设备

Publications (1)

Publication Number Publication Date
WO2023241473A1 true WO2023241473A1 (zh) 2023-12-21

Family

ID=89192165

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/099358 WO2023241473A1 (zh) 2022-06-13 2023-06-09 处理语音数据的方法及终端设备

Country Status (2)

Country Link
CN (1) CN117275471A (zh)
WO (1) WO2023241473A1 (zh)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150287413A1 (en) * 2014-04-07 2015-10-08 Samsung Electronics Co., Ltd. Speech recognition using electronic device and server
CN109410952A (zh) * 2018-10-26 2019-03-01 北京蓦然认知科技有限公司 一种语音唤醒方法、装置及系统
CN111177358A (zh) * 2019-12-31 2020-05-19 华为技术有限公司 意图识别方法、服务器及存储介质
CN111681647A (zh) * 2020-06-10 2020-09-18 北京百度网讯科技有限公司 用于识别词槽的方法、装置、设备以及存储介质
US20210166678A1 (en) * 2019-11-28 2021-06-03 Samsung Electronics Co., Ltd. Electronic device and controlling the electronic device
CN113571053A (zh) * 2020-04-28 2021-10-29 华为技术有限公司 语音唤醒方法和设备
CN114223029A (zh) * 2019-08-13 2022-03-22 三星电子株式会社 支持装置进行语音识别的服务器及服务器的操作方法
CN114299941A (zh) * 2021-11-12 2022-04-08 北京百度网讯科技有限公司 语音交互的方法、装置、电子设备及存储介质

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150287413A1 (en) * 2014-04-07 2015-10-08 Samsung Electronics Co., Ltd. Speech recognition using electronic device and server
CN109410952A (zh) * 2018-10-26 2019-03-01 北京蓦然认知科技有限公司 一种语音唤醒方法、装置及系统
CN114223029A (zh) * 2019-08-13 2022-03-22 三星电子株式会社 支持装置进行语音识别的服务器及服务器的操作方法
US20210166678A1 (en) * 2019-11-28 2021-06-03 Samsung Electronics Co., Ltd. Electronic device and controlling the electronic device
CN111177358A (zh) * 2019-12-31 2020-05-19 华为技术有限公司 意图识别方法、服务器及存储介质
CN113571053A (zh) * 2020-04-28 2021-10-29 华为技术有限公司 语音唤醒方法和设备
CN111681647A (zh) * 2020-06-10 2020-09-18 北京百度网讯科技有限公司 用于识别词槽的方法、装置、设备以及存储介质
CN114299941A (zh) * 2021-11-12 2022-04-08 北京百度网讯科技有限公司 语音交互的方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN117275471A (zh) 2023-12-22

Similar Documents

Publication Publication Date Title
KR101726945B1 (ko) 수동 시작/종료 포인팅 및 트리거 구문들에 대한 필요성의 저감
US9479911B2 (en) Method and system for supporting a translation-based communication service and terminal supporting the service
EP4064276A1 (en) Method and device for speech recognition, terminal and storage medium
JP7341171B2 (ja) 自動化アシスタントを呼び出すための動的および/またはコンテキスト固有のホットワード
KR20190022109A (ko) 음성 인식 서비스를 활성화하는 방법 및 이를 구현한 전자 장치
US20180013718A1 (en) Account adding method, terminal, server, and computer storage medium
KR101771071B1 (ko) 통신 방법, 클라이언트, 및 단말
CN110459222A (zh) 语音控制方法、语音控制装置及终端设备
KR102508677B1 (ko) 사용자 발화를 처리하는 시스템 및 그 시스템의 제어 방법
CN110263131B (zh) 回复信息生成方法、装置及存储介质
CN112466302B (zh) 语音交互的方法、装置、电子设备和存储介质
CN110047481A (zh) 用于语音识别的方法和装置
CN110992955A (zh) 一种智能设备的语音操作方法、装置、设备及存储介质
CN111968641B (zh) 语音助手唤醒控制方法及装置、存储介质和电子设备
CN111522592A (zh) 一种基于人工智能的智能终端唤醒方法和装置
JP2022101663A (ja) ヒューマンコンピュータインタラクション方法、装置、電子機器、記憶媒体およびコンピュータプログラム
KR20190115405A (ko) 검색 방법 및 이 방법을 적용하는 전자 장치
CN116745843A (zh) 用于减少自动化助理交互中的时延的方法和系统
CN114064943A (zh) 会议管理方法、装置、存储介质及电子设备
WO2019239659A1 (ja) 情報処理装置および情報処理方法
CN112652304B (zh) 智能设备的语音交互方法、装置和电子设备
CN114333774A (zh) 语音识别方法、装置、计算机设备及存储介质
JP2019175453A (ja) ユーザ音声入力の処理を含むシステム及びその動作方法並びに電子装置
WO2023241473A1 (zh) 处理语音数据的方法及终端设备
CN117253478A (zh) 一种语音交互方法和相关装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23823041

Country of ref document: EP

Kind code of ref document: A1