WO2023246609A1 - 语音交互的方法、电子设备和语音助手开发平台 - Google Patents

语音交互的方法、电子设备和语音助手开发平台 Download PDF

Info

Publication number
WO2023246609A1
WO2023246609A1 PCT/CN2023/100373 CN2023100373W WO2023246609A1 WO 2023246609 A1 WO2023246609 A1 WO 2023246609A1 CN 2023100373 W CN2023100373 W CN 2023100373W WO 2023246609 A1 WO2023246609 A1 WO 2023246609A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
intention
voice
application
voice assistant
Prior art date
Application number
PCT/CN2023/100373
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 WO2023246609A1 publication Critical patent/WO2023246609A1/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
    • G10L15/02Feature extraction for speech recognition; Selection of recognition unit
    • 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/08Speech classification or search
    • 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

Definitions

  • the embodiments of the present application relate to the field of voice technology, and more specifically, to a voice interaction method, electronic device and voice assistant development platform
  • voice technology it is very common for users to interact with applications (applications, Apps) through voice.
  • applications applications, Apps
  • the voice assistant needs to recognize the user's intention and call the corresponding application service to provide the user with a good human-computer interaction experience.
  • Embodiments of the present application provide a voice interaction method, electronic device, and voice assistant development platform. This technical solution can provide a standard specification for voice access for applications, thereby reducing the complexity of docking voice assistants with different applications. .
  • a voice interaction method is provided.
  • the method is applied to a voice interaction system.
  • the method includes: obtaining a first sentence input by a user; obtaining the user's first intention according to the first sentence; determining and The target interface for application interaction corresponding to the first intention.
  • the target interface is one or more of a synchronous interface, an asynchronous interface or an interface interface; the target interface is called to perform operations related to the first intention. .
  • target interface may be a system interface or a custom interface, which is not limited in the embodiments of this application.
  • the voice interaction system may include an electronic device and a server, and the electronic device and server may be used to perform corresponding steps in the above voice interaction method.
  • the voice interaction system may also include an electronic device configured to perform corresponding steps in the above voice interaction method.
  • the voice interaction system may also include a server, which is used to execute corresponding steps in the above voice interaction method.
  • the user's first intention can be obtained according to the user's first statement, and the interface for interacting with the application program can be determined according to the configuration file, and then the interface can be called to perform operations related to the user's first intention.
  • the interface for interacting with the application can be determined based on the configuration file, and the interface can be called to perform operations related to the user's intention. This can reduce the complexity of connecting voice assistants with different applications in the voice interaction system.
  • this method can also be applied to vehicles, robots, etc., which is not limited by the embodiments of this application.
  • the voice interaction system further includes a configuration file
  • the configuration file may be predefined.
  • the configuration file can be written by the developer of the target application, and the target interface and interactive content used by the target application can be defined in the configuration file.
  • the configuration file may be pre-stored in the voice interaction system.
  • the configuration file may include a mapping relationship between the first intention and the target interface, so that the target interface for interaction with the application program corresponding to the first intention may be determined.
  • the target interface is a synchronous interface or an asynchronous interface
  • calling the target interface to perform operations related to the first intention includes: calling the The synchronous interface or the asynchronous interface transfers the first intention and the slot information corresponding to the first intention to the application program; determines the first way of output according to the configuration file and the first result returned by the application program. ; Output the execution result of the first intention according to the first manner.
  • the first mode may be one or more of text display, voice broadcast, or card display.
  • the first result may be a return result code, a return result code and corresponding content, etc., or a placeholder, etc.
  • the content included in the first result may be defined in the configuration file.
  • the target interface is a synchronous interface or an asynchronous interface
  • the synchronous interface or asynchronous interface can be called to transfer the user's first intention and the slot information corresponding to the first intention to the application program, and according to the application program's
  • the returned result determines the first mode of output, and the execution result of the first intention is presented to the user in the first mode, so that the user can be provided with corresponding services.
  • the method when the target interface is a synchronous interface, in the first way of determining the output based on the configuration file and the first result returned by the application program Previously, the method further included: refusing to call the target interface to perform operations related to the second intention, wherein the second intention is determined according to the second statement input by the user.
  • the voice system when the target interface is a synchronous interface, the voice system cannot synchronously execute the user's second intention before the execution of the operation corresponding to the first intention is completed, thereby preventing the voice interaction from being out of order and affecting the user experience.
  • the method when the target interface is an asynchronous interface, in the first way of determining the output based on the configuration file and the first result returned by the application program , the method further includes: calling the target interface to perform operations related to the second intention, wherein the second intention is determined according to the second statement input by the user.
  • the asynchronous interface when the user's first intention is to control the device, for example, to set the air conditioner temperature, open or close the car window, control the curtains, etc., the asynchronous interface will generally be called to execute the first intention.
  • the target interface is an asynchronous interface
  • the user can continue to issue voice instructions before the operation corresponding to the first intention is completed, and the voice system can synchronously execute the user's second intention, thereby improving the efficiency of voice interaction.
  • the first result includes first information
  • the first information is used to indicate the execution result of the first intention by the application program, so
  • Outputting the execution result of the first intention according to the first manner includes: determining the execution result according to the configuration file and the first information; and outputting the execution result in the first manner.
  • the first information may be a return result code, for example, 0 corresponds to execution success; 1 corresponds to execution failure. wait.
  • This first information can be defined in the configuration file.
  • the voice interaction system can determine the execution result according to the configuration file and the first information, and present the execution result to the user, so that corresponding services can be provided to the user.
  • the first result includes placeholder information
  • the outputting the execution result of the first intention according to the first manner includes: The execution result is determined according to the configuration file and the placeholder information; and the execution result is output in a first manner.
  • the first result returned by the application program may include placeholder information
  • the voice interaction system can jointly determine the complete execution result based on the content set in the configuration file and the placeholder information, and present it to the user.
  • the execution results can provide corresponding services to users.
  • the first result includes the content of the first manner
  • the execution result of the first intention is output according to the first manner, including : Output the execution result in the first way.
  • the content corresponding to the user's intention changes in real time (such as weather)
  • the first result returned by the target application program can also execute the specific content of the result (such as real-time weather conditions)
  • the voice interaction system can present the first result to the user, thereby providing corresponding services to the user.
  • the first manner includes at least one of the following: text display; voice broadcast; and card display.
  • the target interface is an interface interface
  • calling the target interface to perform an operation related to the first intention includes: calling the interface interface to The first intention and the slot information corresponding to the first intention are transferred to the application program; a target display interface of the application program is displayed, and the target display interface is the first intention and the first intention The display interface corresponding to the corresponding slot information.
  • the first intention and the slot information corresponding to the first intention can be an access address of a display interface, so that the electronic device can open the corresponding display according to the access address. interface.
  • the device obtains the user's first intention according to the first statement, including: sending the first statement to the cloud server; receiving the cloud server according to the first statement.
  • the first intention obtained by parsing the first statement.
  • the electronic device after obtaining the first statement, can send the first statement to the cloud server, and the cloud server analyzes it to obtain the first intention and sends it to the electronic device, thereby reducing the processing time of the electronic device.
  • the complexity of a statement is a statement.
  • the configuration file is predefined.
  • the developer of the application program can write a configuration file according to the services that the application program can provide to access the voice assistant.
  • This technical solution can provide convenience for the application program to access voice.
  • a voice assistant development platform including: the voice assistant development platform, configured to receive a first file, where the first file includes an application program and a configuration file, wherein the configuration file includes a first The mapping relationship between the intent and the target interface.
  • the target interface is the interface for the voice assistant to interact with the application program.
  • the target interface is one or more of a synchronous interface, an asynchronous interface or an interface interface; the development of the voice assistant
  • the platform is also configured to send the first file or the configuration file to the voice assistant cloud server for voice interaction service when it is determined that the first file meets the preset condition.
  • the preset condition can be whether the words or language expressions in the configuration file are legal and compliant, and the preset condition can also be whether the application is an application that has been reviewed by a formal platform, etc.
  • the user or developer can upload the first file containing the application program and configuration file to the voice assistant development platform, and the voice assistant development platform can test the first file to determine whether it meets the requirements. This completes the review of the first document to ensure the compliance of the services provided by the application.
  • the first file may only include an application program, and the configuration file may be included in the application program.
  • the configuration file is used by the voice assistant to determine a target interface that interacts with the application corresponding to the first intention, so that the voice assistant calls the target The interface performs operations related to the first intent.
  • the voice assistant can determine the target interface for interacting with the application program corresponding to the first intention according to the configuration file, so that the voice assistant can call the target interface to perform operations related to the first intention.
  • the voice assistant development platform can also perform offline processing on the released first file.
  • the voice assistant development platform is further configured to: edit the configuration file in response to the user's first operation.
  • the user can modify the configuration file in the voice assistant development platform, so that the configuration file can be updated without re-uploading the configuration file, which improves efficiency.
  • the voice assistant development platform is specifically configured to: add a mapping relationship between the second intention and the target interface in the configuration file; or, in the configuration file Modify the mapping relationship between the first intention and the target interface.
  • the user can modify the configuration file in the development platform, such as adding a new mapping relationship between the intention and the target interface, or changing the mapping relationship between the original intention and the target interface, etc., thereby improving the flexibility of development. sex.
  • users can also customize applications and corresponding intentions, interfaces used, or interactive content, etc. in the development platform.
  • the voice assistant development platform is further configured to: delete the first file in response to the user's second operation.
  • the voice assistant development platform can also delete the first file according to the operation of the user or administrator.
  • an electronic device including one or more processors; one or more memories; the one or more memories store one or more computer programs, and the one or more computer programs include Instructions, when executed by the one or more processors, cause the voice interaction method as described in the first aspect and any possible implementation thereof to be executed.
  • a fourth aspect provides an electronic device, including a module for implementing the voice interaction method as described in the first aspect and any possible implementation thereof.
  • a chip in a fifth aspect, includes a processor and a communication interface.
  • the communication interface is used to receive signals and transmit the signals to the processor.
  • the processor processes the signals, The voice interaction method as described in the first aspect and any possible implementation thereof is executed.
  • a computer-readable storage medium is provided.
  • Computer instructions are stored in the computer-readable storage medium.
  • the methods of the first aspect and any of the possible methods thereof are achieved.
  • the voice interaction method described in the implementation manner is executed.
  • a computer program product is provided.
  • the voice interaction method as described in the first aspect and any possible implementation thereof is executed.
  • An eighth aspect provides a voice interaction system, which is used to perform the voice interaction method as described in the first aspect and any possible implementation thereof.
  • Figure 1 is a framework diagram of an application program provided by an embodiment of the present application.
  • Figure 2 is a schematic diagram of a set of GUIs provided by an embodiment of this application.
  • Figure 3 is a schematic diagram of another set of GUIs provided by an embodiment of the present application.
  • Figure 4 is a schematic diagram of voice interaction between a user and a vehicle according to an embodiment of the present application.
  • Figure 5 is a schematic flow chart of a voice interaction method provided by an embodiment of the present application.
  • Figure 6 is a schematic flow chart of another voice interaction method provided by an embodiment of the present application.
  • Figure 7 is a schematic diagram of a set of GUIs provided by an embodiment of the present application.
  • Figure 8 is a schematic flow chart of a voice interaction method provided by an embodiment of the present application.
  • the technical solutions of the embodiments of this application can be applied to electronic devices such as mobile phones, tablets, and wearable devices, and can also be applied to automobiles and other equipment.
  • Synchronous interface System interface for blocking calls. The next call cannot be executed while the execution of the current call has not ended.
  • Asynchronous interface System interface for non-blocking calls. The next call can be executed while the execution of the current call has not ended.
  • Interface interface A system interface used to access the display interface corresponding to the access address based on the access address.
  • SDK Software development kit
  • Deep link Through this deeplink, you can directly link to the internal page of the application. For example, through a deeplink, a fixed page of the application can be opened.
  • Intention and slot In the voice assistant, it is necessary to understand the user's intention in a sentence and extract the key words (i.e. slot). For example: the user says to the voice assistant "Will it rain today?" In this sentence The intent is: weather query; the slot is: time: today; weather type: raining.
  • voice assistant needs to recognize the user's intention and call the corresponding application service to provide the user with a good human-computer interaction experience.
  • Figure 1 provides a technical solution for accessing voice by integrating the voice assistant SDK into the application.
  • Figure 1 is a framework diagram of an application program provided by an embodiment of the present application. As shown in Figure 1, the App100 can include Including the code part 110 of the App itself and the voice assistant SDK part 120.
  • the voice assistant provider can provide a voice assistant SDK for the application, so that the application can support the voice function, so that the user can interact with the application through voice.
  • the developer of the App100 can integrate the voice assistant SDK120 when developing the App100.
  • the application integrates the voice assistant SDK
  • the application and the voice assistant are coupled, and when the voice assistant SDK is updated, the application needs to be resynchronized for updates.
  • the application uses the voice assistant, there is a lack of review of the services provided by the application, and the quality of the application service cannot be guaranteed.
  • the application can provide some deeplinks for the voice assistant and support opening the display interface corresponding to the deeplink through the voice assistant.
  • the voice assistant can only open a fixed page, and cannot obtain information from the application and display it in the voice assistant.
  • there is a lack of review for the pages corresponding to the deeplinks provided by the application and the quality of the application service cannot be guaranteed.
  • embodiments of the present application provide a voice interaction method, electronic device, and voice assistant development platform.
  • the voice assistant can implement different interactive contents by calling different system interfaces, and can provide applications with Services are reviewed to ensure the quality of application services.
  • FIG. 2 is a schematic diagram of a set of graphical user interfaces (graphical user interface, GUI) provided by an embodiment of the present application. Among them, the process of voice interaction between the user and the electronic device is shown from (a) to (c) in FIG. 2 .
  • GUI graphical user interface
  • the GUI is the desktop 510 of the electronic device.
  • the desktop 510 may include multiple applications installed on the electronic device.
  • the electronic device detects that the user clicks on the icon 511 of the voice assistant, it may display The GUI shown in (b) in Figure 2.
  • the user can also cause the electronic device to display the GUI shown in (b) in Figure 2 through voice instructions.
  • the user can say "Xiaoyi Xiaoyi" to the electronic device, and the electronic device can also display the GUI shown in (b) in Figure 2 .
  • the user can also cause the electronic device to display the GUI shown in (b) in Figure 2 by long pressing the power key.
  • the GUI may be a display interface 520 of the voice assistant.
  • the display interface 520 may include a voice input control 522 and may also include other function controls 523 and 524 .
  • the display interface 520 may also include multiple recommendation inputs 521.
  • the electronic device may display a GUI as shown in (c) of FIG. 2 .
  • the GUI allows the user to input a voice command "How is the weather in Xi'an today?" and the query result returned by the electronic device displays the interface 530.
  • the display interface 530 may include a dialog box 531 for user input.
  • the dialog box 531 displays the text "How is the weather in Xi'an today?"
  • the dialog box 531 may also include an editing control 532.
  • the user clicks the editing control 532 the text in the dialog box can be edited;
  • the display interface 530 can also include a voice assistant dialog box 533 and a weather card 534.
  • the dialog box 533 can display the query result "It's cloudy in Xi'an today" returned by the weather application. , 14°C to 27°C.”
  • the weather card 534 can display the current temperature, today's highest temperature and lowest temperature, as well as weather conditions and temperatures in the next few hours and other information.
  • the electronic device can voice broadcast the queried weather conditions, and the broadcast content can be "It's cloudy in Xi'an today, 14°C to 27°C.”
  • the voice assistant when the user issues a voice command to the voice assistant "What is the weather in Xi'an today?", the voice assistant can obtain that the user's intention is “query the weather” and the slot is the location: “Xi'an”; Time: “Today”. Then the voice assistant can call the system interface (such as the synchronization interface) to integrate the user's intention and voice command.
  • the slot information is passed to the weather application (such as Huawei Weather), and the query results are presented to the user in the form of voice playback and/or text display, card display, etc. based on the information returned by the weather application.
  • FIG. 3 is a schematic diagram of another set of GUIs provided by an embodiment of the present application. Among them, the process of voice interaction between the user and the electronic device is shown from (a) to (c) in FIG. 3 .
  • the GUI is a display interface 540 in which the electronic device recognizes that the user's voice command is "Open Huawei Music".
  • the display interface 540 may display a dialog box 541 of the recognized user's voice command "Open Huawei Music", and then the electronic device may display the GUI shown in (d) of Figure 3 .
  • the GUI is the display interface 550 of the homepage of Huawei Music.
  • the voice assistant when the user issues the voice command "Open Huawei Music" to the voice assistant, the voice assistant can obtain that the user's intention is to open the application and the slot is to open the Huawei Music application, then the voice command The assistant can call the interface interface to pass the slot to the Huawei Music application, so that the electronic device starts Huawei Music and displays the Huawei Music display interface.
  • Figure 4 is a schematic diagram of voice interaction between a user and a vehicle according to an embodiment of the present application. Among them, the process of voice interaction between the user and the car machine is shown from (a) to (b) in Figure 4 .
  • the vehicle machine 600 may be driving, and the user wants to open the passenger window. At this time, the user can wake up the in-vehicle voice assistant.
  • the display interface 610 of the central control screen of the car 600 can display a dialog box 611, and the dialog box 611 can display the voice command " Open the passenger window.”
  • the vehicle-mounted voice assistant can call the vehicle-mounted control system to execute the user's voice command.
  • the central control screen of the vehicle machine 600 can display the display interface 620.
  • a dialog box 611 and a dialog box 612 can be displayed in the display interface 620 of the car machine 600 .
  • the dialog box 612 can display the content "The passenger window has been opened for you.”
  • the in-car voice assistant can also announce "The passenger window has been opened for you”.
  • the on-board voice assistant can obtain the user's intention to open the car window and the slot is for the passenger car window. location, then the vehicle-mounted voice assistant can call the asynchronous interface to transfer the intention and slot information to the vehicle-mounted control system.
  • the vehicle-mounted control system executes the action of opening the passenger window. When the execution is successful, the vehicle-mounted voice assistant can return the corresponding information.
  • the in-vehicle voice assistant plays "The passenger window has been opened for you” and/or the text displays "The passenger window has been opened for you” to the user based on the corresponding information returned by the vehicle control system.
  • the process may take several seconds.
  • the user can continue to issue other voice instructions to the vehicle voice assistant. For example, users continue to issue voice commands such as "Adjust the air conditioner to 25 degrees".
  • Figure 5 is a schematic flow chart of a voice interaction method provided by an embodiment of the present application. As shown in FIG. 5 , the method 200 may include steps 201 to 211 .
  • the methods provided in the embodiments of this application can be applied to applications under multiple operating systems, such as Android applications under the Android operating system, or Hongmeng applications under the Hongmeng operating system, or applications under other operating systems. , the embodiments of this application are not limited.
  • the method 200 may not include step 201, that is, step 202 may be performed after the application program has been developed.
  • the configuration file may be a voiceabilities.json file.
  • the voice assistant development platform can provide an integrated development environment (IDE) plug-in for application developers, and the application developers can write configuration files in the IDE plug-in.
  • IDE integrated development environment
  • the configuration file may be a mapping relationship between voice capabilities and application services.
  • the mapping of intents and slots to application services can be defined in this configuration file.
  • This configuration file can also define the content returned by the application to the voice assistant when the system interface is called by voice, and the actions performed by the content returned by the voice assistant application.
  • the user can define the system interface used to open the interface in the configuration file, and by calling the system interface of the open interface, the application interface can be opened.
  • users can define the synchronization interface and interaction content in the configuration file, and can interact with the application by calling the synchronization interface.
  • the voice assistant calls the synchronization interface to interact with the application, after the voice assistant inputs a voice command to the application, it needs to wait for the feedback result from the application before it can execute the user's next voice command.
  • the voice assistant can interact with the weather app to query the weather by calling the synchronization interface.
  • the voice assistant can call the synchronization interface to send the weather query command to the weather app, receive the return result from the weather app, and feed the result back to the user. It should be understood that the above process of querying the weather may take a short time. After the user sends the "query weather” command, the voice assistant will wait for the return result of the weather app.
  • the user can define the asynchronous interface and interaction content in the configuration file, and can interact with the application by calling the asynchronous interface.
  • the voice assistant calls the asynchronous interface to interact with the application, the application provides corresponding functions according to the voice instructions, which may be time-consuming. At this time, the voice assistant does not need to wait for feedback from the application after inputting voice instructions to the application. As a result, the next voice command can be entered.
  • the voice assistant can be a car-mounted voice assistant, and the user can control the vehicle, such as the car air conditioner, car windows, etc., by calling the asynchronous interface through the car-mounted voice assistant.
  • the vehicle voice assistant can call the asynchronous interface to send the voice command to the vehicle control system.
  • the vehicle control system opens the car sunroof according to the command. Since the process of opening the car sunroof is time-consuming, it may It takes a few seconds for the vehicle control system to return the result to the vehicle voice assistant when the execution is successful or failed, and the vehicle voice assistant can broadcast the corresponding result to the user.
  • the basic configuration of the configuration file can be seen in Table 1.
  • the basic configuration of the configuration file can be seen in Table 2.
  • the synchronization interface service configuration of this configuration file can be seen in Table 3.
  • the specific content when developers configure displayText and speakText in the configuration file, the specific content can choose the standard speech provided by the voice assistant, thus ensuring the quality of the speech.
  • the specific content of the displayText and speakText can also be edited by the developer, but it needs to be reviewed by the voice assistant development platform to ensure the quality of the speech.
  • the specific contents of displayText and speakText can no longer be configured in the configuration file, but are returned by the application in real time when calling the system interface to interact with the application.
  • the voice assistant performs text display and processing based on the content returned by the application. /or voice broadcast.
  • the asynchronous interface service configuration of this configuration file can be seen in Table 4.
  • Developers can compile and package the developed applications and written configuration files to form an application package.
  • developers can register and log in to the voice assistant development platform, and then upload their own application packages and written configuration files to the voice assistant development platform, so that the application can be developed in the voice assistant development platform. Services provided are reviewed.
  • the voice assistant development platform provides a testing function.
  • the application and configuration files can be automatically tested, and a corresponding test report can be generated.
  • the application and configuration file can be published on the voice assistant development platform, or the application can be published only to inform the user that the application and configuration file have passed the test. .
  • published applications and configuration files may also be taken offline.
  • the user can also delete the uploaded application and configuration file, or the manager of the voice assistant development platform determines that the application and configuration file do not comply with the regulations, and can also delete the application and configuration file.
  • the user sends a voice command to the voice assistant.
  • the voice assistant receives the voice command.
  • the user wants to check the weather, he can send a voice command to check the weather to the voice assistant, such as this
  • the voice command can be "How is the weather in Xi'an today?"
  • the voice assistant obtains the user's intention and the slot information in the voice command based on the voice command.
  • the voice assistant in step 208, can send the voice command to the voice assistant cloud server, and the cloud server identifies the user's intention and the slot information in the voice command, and then sends the intention and slot information. to voice assistant.
  • the voice command is "How is the weather in Xi'an today?" and the voice assistant sends the voice command to the voice assistant cloud server.
  • the cloud server recognizes that the user's intention is “query the weather” and the slot information in the voice command is Location: “Xi'an”; Time: “Today”, and the intention and slot information are sent to the voice assistant.
  • the voice assistant calls the synchronous interface or the asynchronous interface to send the obtained slot information to the application program.
  • the voice assistant can pass application-defined processing functions and slot information to the application through parameters.
  • the voice assistant can interact with the application by calling the following synchronization interface.
  • Bundle result DataAbilityHelper.call(Uri uri, String method, String arg, PacMap extras);
  • Bundle result context.getContentResolver.call(Uri uri, String method, String arg, Bundle extras);
  • Uri is provided by the application.
  • the voice assistant passes the processing function and slot information to the application through the extras parameter of the Bundle structure.
  • the parameter name of the above extras parameter is defined by the developer in the configuration file, and the corresponding value is recognized by the voice assistant from the voice command.
  • the extras parameters can be defined as shown in Table 5.
  • the parameters passed by the voice assistant to the application are as follows:
  • the function name is: Set air conditioner; the parameter name is: temperature; the temperature value is: 25; the language is: Simplified Chinese.
  • the voice assistant can interact with the Hongmeng application by calling the asynchronous interface (service capability).
  • the parameters passed by the voice assistant to the Hongmeng application can be seen in Table 1-4.
  • the voice assistant can interact with the Android application by calling an asynchronous interface (service).
  • the parameters passed by the voice assistant to the Android application can be seen in Table 1-4.
  • the application returns corresponding information to the voice assistant.
  • the application program when the execution is successful, can return 0 to the voice assistant; when the execution fails, the application program can return 1 to the voice assistant; when the type is not supported, the application program can return 3 to the voice assistant;
  • the application can return execution results to the voice assistant, for example, send the queried weather information to the voice assistant, and agree that the voice assistant will display the weather information in text form; or, send the queried weather information to the voice assistant.
  • the return value and corresponding meaning can be defined by the developer in the configuration file.
  • the way the voice assistant presents results to the user can also be defined by the developer in a configuration file.
  • Example 1 the return result code returned by the application to the voice assistant is "0", and the voice assistant can report successful execution to the user.
  • Example 2 In the scenario of setting the air conditioner temperature, the voice broadcast and text display content are configured by the developer. defined in the file. The application sets the temperature successfully and needs to return the placeholder defined in the configuration file to the voice assistant.
  • Example 2 assume that the user wants to increase the air conditioner temperature to 35 degrees.
  • the application determines that the temperature of 35 degrees is too high and may cause discomfort to the user.
  • the application can adjust the actual effective temperature temp1 of the air conditioner to 25 degrees.
  • the result code 0 and the placeholder 25 can be returned to the voice assistant.
  • the voice assistant adds the placeholder 25 to the phrase "The air conditioner temperature has been adjusted to ⁇ temp1 ⁇ degrees for you" and broadcasts it to the user.
  • Example 3 In the scenario of setting the air conditioner temperature, the voice broadcast words and text display content are not defined in the configuration file, but are returned in real time when the application executes the voice command.
  • Example 4 In the scenario of setting the air conditioner temperature, the voice broadcast words and text display content are defined by the developer in the configuration file. The application fails to set the temperature and only needs to return the return result code defined in the configuration file to the voice assistant.
  • Example 5 In the scenario of setting the air conditioner temperature, if the application fails to set the temperature, and the error type exceeds the officially defined voice of the voice assistant, the broadcasting skills and text display content are freely defined by the developer in the configuration file.
  • Example 5 the user can define in the configuration file that when the returned result code "retCode” is "18", the content displayed by the voice assistant text is “The air conditioning filter element needs to be replaced” and the content of the voice broadcast is “The air conditioning filter element needs to be replaced” .
  • the voice assistant can display the text “Air conditioning filter element needs to be replaced” and/or the voice broadcast "The air conditioning filter element needs to be replaced” based on the content configured in the configuration file.
  • the voice assistant provides corresponding services.
  • the voice assistant transmits the user's intention and the slot information in the voice command to the weather application through the synchronization interface. program, and can display the text "Xi'an is cloudy today, 14°C to 27°C” to the user based on the results returned by the weather application, and display the weather card 534, and can also voice broadcast "Xi'an is cloudy today, 14°C to 27°C", etc. .
  • the voice assistant will The application returns the placeholder value "25”. Then the voice assistant fills the "25” into the phrase "The air conditioner has been adjusted to ⁇ degrees for you", and can display the text "The air conditioner has been adjusted to 25 degrees for you” on the screen of the electronic device, or the voice assistant can Play a voice to the user "The air conditioner has been adjusted to 25 degrees for you", or the voice assistant can display a card on the screen of the electronic device. The content on the card can include the above information of "The air conditioner has been adjusted to 25 degrees for you”.
  • the way in which the voice assistant feeds back the results to the user may be predefined, for example, it may be defined by the developer in the configuration file.
  • steps 201 to 211 are not limited. Certain steps in steps 201 to 211 may be deleted, not executed, replaced or swapped, etc., and this is not limited by the embodiments of the present application.
  • developers can write a configuration file, which can define the correspondence between intents and slots and application services.
  • the configuration file can also define the voice call system interface. , the content returned by the application to the voice assistant, and the actions performed by the voice assistant based on the content returned by the application.
  • a voice assistant development platform is provided for developers, so that applications and configuration files developed by developers can be reviewed, thereby ensuring the quality of voice services.
  • developers can define in the configuration file three different system interfaces called by the voice assistant to interact with the application program, as well as the content of the interaction, thereby providing a standard specification for the application program to access voice. This can reduce the complexity of connecting voice assistants with different applications.
  • Figure 6 is a schematic flow chart of another voice interaction method provided by an embodiment of the present application. As shown in Figure 6, the method 300 may include steps 301 to 310.
  • step 301 reference can be made to the relevant description of step 201, and for the sake of brevity, details will not be described again.
  • the configuration file may be a voiceabilities.json file.
  • the voice assistant development platform can provide an IDE plug-in for application developers, and the application developers can write configuration files in the IDE plug-in.
  • the configuration file can include a user-defined interface, as well as content for the voice assistant to interact with the application through the interface.
  • the voice assistant can open the display interface of an application by calling the interface.
  • the user sends a voice command to the voice assistant.
  • the voice assistant receives the voice command.
  • the voice assistant obtains the user's intention and the slot information in the voice command based on the voice command.
  • steps 303-308 reference can be made to the relevant description of steps 203-208, which will not be described again for the sake of brevity.
  • the voice assistant sends the obtained slot information to the application program by calling the interface interface.
  • the voice assistant can obtain that the user's intention is “Open Huawei Video”, and the slot information in the voice command is to open the application: "Huawei Video”. Then the voice The assistant can call the interface interface to pass the slot information to Huawei Video.
  • the voice assistant can open the interface of the Hongmeng application by calling the following interface.
  • the Uri is provided by the application.
  • the Uri can be the access address of a certain display interface of the application.
  • the voice assistant can pass the recognized slot information to the application through the Uri.
  • the voice assistant can open the interface of the Android application by calling the following interface.
  • the Uri is provided by the application.
  • the Uri can be the access address of a certain display interface of the application.
  • the voice assistant can pass the recognized slot information to the application through the Uri.
  • this interface can be called to pass the access address of the Huawei Video home page display interface to Huawei Video in order to open Huawei Video.
  • the application displays the target interface according to the slot information.
  • the application opens the target interface based on the slot information sent by the voice assistant.
  • the application determines based on the slot information that the voice assistant sends the access address of the Huawei Music homepage display interface, and then starts Huawei Music to display the homepage display interface.
  • steps 301 to 310 is not limited. Certain steps in steps 301 to 310 may be deleted, not executed, replaced or swapped, etc., and this is not limited by the embodiments of the present application.
  • the method 300 can be combined with the method 200, that is, the developer can define the interface interface, the synchronous interface and the asynchronous interface in the configuration file, and call the interface interface, the synchronous interface and the asynchronous interface to interact with the application program
  • the voice assistant can obtain the corresponding intention and slot information according to the user's voice instructions, and call the corresponding system interface to interact with the application.
  • a voice assistant development platform is provided for developers, so that applications and configuration files developed by developers can be reviewed, thereby ensuring the quality of voice services.
  • developers can define in the configuration file the system interface that the voice assistant calls to open the application interface to interact with the application, thereby providing a standard specification for the application to access voice, thereby reducing the cost of the voice assistant.
  • Figure 7 is a schematic diagram of a set of graphical user interfaces (graphical user interface, GUI) provided by an embodiment of the present application. Among them, the process of developers uploading applications and writing configuration files on the voice assistant development platform is shown from (a) to (b) in Figure 7 .
  • GUI graphical user interface
  • the GUI may be the display interface 410 of the configuration file management module of the voice assistant development platform.
  • the display interface 410 may include the configuration content of the configuration file. For example, the developer may fill in the corresponding application name, intent name, etc. under the platform threshold skill service.
  • the display interface 410 may also include the system interface used to interact with the application program as described above, as well as returned content, and so on.
  • the voice assistant development platform also supports developers to perform customized skill services. For example, when a developer clicks on the custom skill service in the display interface 410, he or she can edit on the jumped page, such as the application name, intent, access address transmitted using the calling interface interface, etc. of an application.
  • the display interface 420 can include three types of uploaded files for developers to choose, namely: Hongmeng application HAP, Hongmeng application + configuration file and Android application APK + configuration file. For example, user choose Hongmeng to apply HAP.
  • the display interface 420 also includes the application types uploaded by the user, which are Android (android), Harmony (Harmony), and open-source Harmony (openHarmony). For example, the user selects Android.
  • the display interface 420 may also include an upload icon and the text "Drag the file here, or click to upload" for uploading files.
  • the display interface 420 may also include a cancel function control 421 and a confirm function control 422. When the developer clicks the cancel function control 421, the upload can be canceled; when the developer clicks the confirm function control 422, the uploaded file can be saved and the page will jump. Go to the next interface.
  • the voice assistant development platform can also test applications and configuration files uploaded by developers, and can generate test reports.
  • the voice assistant development platform can also publish, take offline, and delete applications.
  • the voice assistant development platform can review and test applications uploaded by developers and configuration files written. When the review or test fails, the application can be offline and refused to use voice. Assistant, which can provide a supervision mechanism for voice interaction, thereby ensuring the quality of voice services and avoiding non-compliance and illegality.
  • Figure 8 is a schematic flow chart of a voice interaction method provided by an embodiment of the present application. As shown in Figure 8, the method 800 can be applied in a voice interaction system, and the method 800 can include steps 810 to 840.
  • the first sentence may be input by the user's voice, may be input by text, or may be input through pictures or other methods, which are not specifically limited in the embodiments of this application.
  • the first sentence may be "What is the weather like today in Xi'an" input by the user's voice.
  • the voice interaction system includes an electronic device. After acquiring the first sentence, the electronic device can parse the first sentence to obtain the user's first intention.
  • the voice interaction system includes an electronic device and a server. After obtaining the first sentence, the electronic device can send the first sentence to a cloud server (such as a voice assistant cloud server), and the cloud server Perform analysis to obtain the first intention, and then send the first intention to the electronic device.
  • a cloud server such as a voice assistant cloud server
  • the voice interaction system may also be a server.
  • the target interface may include one or more of an interface interface, a synchronous interface, and an asynchronous interface.
  • the target interface may be an interface interface
  • the electronic device may call the interface interface to open a certain display interface of the application program.
  • the electronic device can be installed in the car machine, or the method can be directly applied to the car machine.
  • the application can be a control application or a vehicle system application.
  • you can use this asynchronous interface to perform the operation of opening the passenger window, and output the execution result to the user after execution.
  • the voice interaction system in response to the user's voice operation, can determine the interface for interacting with the application program corresponding to the user's first intention, and then interact with the corresponding application program by calling the interface to execute the user's first intention. Intent-related operations.
  • This technical solution can enable the voice interaction system to interact with different applications through different interfaces when the user interacts with the voice interaction system through voice, thereby reducing the complexity of the interaction between the voice interaction system and different applications.
  • the voice interaction system further includes a configuration file.
  • the configuration file includes a mapping relationship between the first intention and the target interface. Determining the target interface for interaction with the application corresponding to the first intention includes: determining according to the configuration file. The target interface for application interaction corresponding to the first intent.
  • the configuration file may be pre-stored in the voice interaction system.
  • the configuration file may include a mapping relationship between the first intention and the target interface, so that the target system interface that interacts with the application program corresponding to the first intention may be determined.
  • the electronic device can call the synchronization interface to transmit the first intention and slot information to the weather application.
  • the weather application After receiving the first intention and slot information, the weather application performs a weather query and then sends a request to the electronic device.
  • the device returns the query result, and accordingly, the electronic device presents the query result to the user.
  • the query results can be presented to the user in the form of voice broadcast, text display or card display.
  • the first statement may be "open the passenger window", then it can be determined that the user's first intention is “open the window”, and the corresponding slot information is location: passenger window. Then the vehicle-mounted electronic device can call the asynchronous interface to transmit the first intention and slot information to the control application program. After receiving the first intention and slot information, the control application program After receiving the information, perform the operation of opening the passenger window. After the execution is completed, the execution result is returned to the vehicle-mounted electronic device, and the vehicle-mounted electronic device presents the execution result to the user.
  • the voice system when the target interface is a synchronous interface, the voice system cannot synchronously execute the user's second intention before the operation corresponding to the first intention is completed, thereby avoiding the disorder of voice interaction and affecting the user experience.
  • the method may further include: calling the target interface to perform execution related to the second intention. The operation, wherein the second intention is determined based on the second statement input by the user.
  • the target interface is an asynchronous interface
  • the user can continue to issue voice instructions before the operation corresponding to the first intention is completed, and the voice system can synchronously execute the user's second intention, thereby improving the efficiency of voice interaction.
  • the first result includes first information
  • the first information is used to indicate the execution result of the application program
  • outputting the execution result of the first intention according to the first manner includes: the electronic device according to the configuration file and the first information to determine the execution result; and output the execution result in the first manner.
  • the voice interaction system can determine the execution result according to the configuration file and the first information, and present the execution result to the user, so that corresponding services can be provided to the user.
  • the first result includes placeholders
  • outputting the execution result of the first intention according to the first manner includes: determining the execution result according to the configuration file and the placeholder; and outputting the execution result in the first manner.
  • the video application can adjust the actual value of the progress bar to 19, Then the result code 0 and placeholder 19 are returned to the voice assistant.
  • the voice assistant adds the placeholder 19 to the phrase "The video progress bar has been adjusted to ⁇ jindu ⁇ for you" and broadcasts it to the user.
  • users want the query results to change in real time, for example, when querying the weather,
  • the weather changes in real time, so the weather application can return the results of the weather query to the electronic device in real time when executing the weather query, such as "It is sunny in Xi'an today, 15 degrees to 25 degrees.”
  • the query results are presented to the user in the form of text display, voice broadcast, or card display.
  • the content corresponding to the user's intention changes in real time (such as weather)
  • the first result returned by the target application program can also execute the specific content of the result (such as real-time weather conditions), Then the first result can be directly presented to the user, so that the corresponding service can be provided to the user.
  • the first intention and the slot information corresponding to the first intention can be an access address of a display interface, so that the corresponding display interface can be opened according to the access address.
  • the voice assistant development platform can also perform offline processing on the released first file.
  • the user can also edit the configuration file in the voice assistant development platform. This will help improve the efficiency of modifying configuration files.
  • An embodiment of the present application also provides a chip.
  • the chip includes a processor and a communication interface.
  • the communication interface is used to receive signals and transmit the signals to the processor.
  • the processor processes the signals.
  • the voice interaction method as described in any of the previous possible implementations is executed.
  • This embodiment also provides a computer-readable storage medium.
  • Computer instructions are stored in the computer-readable storage medium. When the computer instructions are run on the computer, the voice interaction method in the above embodiment is executed.

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)
  • Computer Vision & Pattern Recognition (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种语音交互的方法(800)、电子设备和语音助手开发平台。方法(800)应用于语音交互系统,方法(800)包括:获取用户输入的第一语句(810);根据第一语句获取用户的第一意图(820);确定与第一意图对应的应用程序交互的目标接口(830),目标接口为同步接口、异步接口或界面接口中的一种或多种;调用目标接口执行与第一意图相关的操作(840)。为应用程序提供一种接入语音的标准规范,从而可以降低语音交互系统中语音助手与不同应用程序对接的复杂性。

Description

语音交互的方法、电子设备和语音助手开发平台
本申请要求于2022年06月24日提交中国专利局、申请号为202210730938.3、申请名称为“语音交互的方法、电子设备和语音助手开发平台”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及语音技术领域,并且更具体地,涉及一种语音交互的方法、电子设备和语音助手开发平台
背景技术
随着语音技术的发展,用户通过语音和应用程序(application,App)进行交互的场景非常普遍。在用户通过语音和应用程序进行交互时,需要语音助手识别到用户的意图,并调用相应的应用服务,为用户提供良好的人机交互体验。
然而,不同的语音助手提供商可能会提供不同的方案与应用程序对接,增加了语音助手与不同应用程序对接的复杂性。
发明内容
本申请实施例提供一种语音交互的方法、电子设备和语音助手开发平台,该技术方案可以为应用程序提供一种接入语音的标准规范,从而可以降低语音助手与不同应用程序对接的复杂性。
第一方面,提供了一种语音交互的方法,所述方法应用于语音交互系统,所述方法包括:获取用户输入的第一语句;根据所述第一语句获取用户的第一意图;确定与所述第一意图对应的应用程序交互的目标接口,所述目标接口为同步接口、异步接口或界面接口中的一种或多种;调用所述目标接口执行与所述第一意图相关的操作。
应理解,该目标接口可以是系统接口,也可以是自定义接口,本申请实施例不予限定。
应理解,该语音交互系统可以包括电子设备和服务器,该电子设备和服务器可以用于执行上述语音交互的方法中相应的步骤。该语音交互系统还可以包括电子设备,该电子设备用于执行上述语音交互的方法中相应的步骤。该语音交互系统还可以包括服务器,该服务器用于执行上述语音交互的方法中相应的步骤。
本申请实施例中,可以根据用户的第一语句获取用户的第一意图,并根据配置文件确定与应用程序交互的接口,之后调用该接口执行与用户的第一意图相关的操作。该技术方案中,当用户希望应用程序提供服务时,可以根据配置文件确定与应用程序交互的接口,从而调用该接口执行与用户的意图相关的操作。从而可以降低语音交互系统中语音助手与不同应用程序对接的复杂性。
在一些实施例中,该方法也可以应用于车机、机器人等,本申请实施例不予限定。
结合第一方面,在第一方面的某些实现方式中,所述语音交互系统还包括配置文件, 所述配置文件中包括所述第一意图与所述目标接口的映射关系,所述确定与所述第一意图对应的应用程序交互的目标接口,包括:根据所述配置文件确定与所述第一意图对应的应用程序交互的目标接口。
应理解,该配置文件可以是预定义的。该配置文件可以是目标应用程序的开发人员编写的,该配置文件中可以定义目标应用程序使用的目标接口和交互的内容。
本申请实施例中,配置文件中可以预存储在语音交互系统中,该配置文件可以包括第一意图与目标接口的映射关系,从而可以确定与第一意图对应的应用程序交互的目标接口。
结合第一方面,在第一方面的某些实现方式中,所述目标接口为同步接口或异步接口,所述调用所述目标接口执行与所述第一意图相关的操作,包括:调用所述同步接口或异步接口将所述第一意图和所述第一意图对应的槽位信息传递给所述应用程序;根据所述配置文件和所述应用程序返回的第一结果确定输出的第一方式;根据所述第一方式输出所述第一意图的执行结果。
示例性地,该第一方式可以是文本显示,语音播报或者卡片显示中的一种或多种。
该第一结果可以是返回结果码,还可以是返回结果码和对应的内容等,还可以是占位符等,该第一结果中包括的内容可以在配置文件中定义。
本申请实施例中,当目标接口为同步接口或异步接口时,可以调用该同步接口或异步接口将用户的第一意图和第一意图对应的槽位信息传递给应用程序,并根据应用程序的返回结果确定输出的第一方式,并以第一方式向用户呈现该第一意图的执行结果,从而可以为用户提供相应服务。
结合第一方面,在第一方面的某些实现方式中,当所述目标接口为同步接口时,在所述根据所述配置文件和所述应用程序返回的第一结果确定输出的第一方式之前,所述方法还包括:拒绝调用目标接口执行与第二意图相关的操作,其中,所述第二意图为根据用户输入的第二语句确定的。
本申请实施例中,当目标接口为同步接口时,在第一意图对应的操作执行结束之前,语音系统不能够同步执行用户的第二意图,从而可以避免语音交互出现顺序错乱,影响用户体验。
结合第一方面,在第一方面的某些实现方式中,当所述目标接口为异步接口时,在所述根据所述配置文件和所述应用程序返回的第一结果确定输出的第一方式,所述方法还包括:调用目标接口执行与第二意图相关的操作,其中,所述第二意图为根据用户输入的第二语句确定的。
在一些实施例中,当用户的第一意图为控制设备的相关意图时,例如,设置空调温度,打开或关闭车窗,控制窗帘等,一般情况下会调用异步接口执行该第一意图。
本申请实施例中,当目标接口为异步接口时,在第一意图对应的操作执行结束之前,用户可以继续发布语音指令,语音系统可以同步执行用户的第二意图,从而提升语音交互的效率。
结合第一方面,在第一方面的某些实现方式中,所述第一结果中包括第一信息,所述第一信息用于指示所述应用程序对所述第一意图的执行结果,所述根据所述第一方式输出所述第一意图的执行结果,包括:根据所述配置文件和所述第一信息确定所述执行结果;以第一方式输出所述执行结果。
示例性地,该第一信息可以是返回结果码,例如,0对应执行成功;1对应执行失败 等。该第一信息可以在配置文件中定义。
本申请实施例中,语音交互系统可以根据配置文件和第一信息确定执行结果,并向用户呈现所述执行结果,从而可以向用户提供相应服务。
结合第一方面,在第一方面的某些实现方式中,所述第一结果中包括占位符信息,所述根据所述第一方式输出所述第一意图的执行结果,包括:所述根据所述配置文件和所述占位符信息确定所述执行结果;所述以第一方式输出所述执行结果。
本申请实施例中,应用程序返回的第一结果中可以包括占位符信息,则语音交互系统可以根据配置文件中设置的内容和该占位符信息共同确定完整的执行结果,并向用户呈现该执行结果,从而可以向用户提供相应服务。
结合第一方面,在第一方面的某些实现方式中,所述第一结果中包括所述第一方式的内容,所述根据所述第一方式输出所述第一意图的执行结果,包括:以第一方式输出所述执行结果。
本申请实施例中,在一些情况下,用户的意图对应的内容是实时变化的(如天气),则目标应用程序返回的第一结果中还可以执行结果的具体内容(如实时天气情况),则语音交互系统可以向用户呈现该第一结果,从而可以向用户提供相应服务。
结合第一方面,在第一方面的某些实现方式中,所述第一方式包括如下中的至少一项:文本显示;语音播报;卡片显示。
结合第一方面,在第一方面的某些实现方式中,所述目标接口为界面接口,所述调用所述目标接口执行与所述第一意图相关的操作,包括:调用所述界面接口将所述第一意图和所述第一意图对应的槽位信息传递给所述应用程序;显示所述应用程序的目标显示界面,所述目标显示界面为所述第一意图和所述第一意图对应的槽位信息对应的显示界面。
本申请实施例中,当目标接口为界面接口时,该第一意图和第一意图对应的槽位信息可以是一个显示界面的接入地址,从而电子设备可以根据该接入地址打开相应的显示界面。
结合第一方面,在第一方面的某些实现方式中,所述备根据所述第一语句获取用户的第一意图,包括:向云服务器发送所述第一语句;接收所述云服务器根据所述第一语句解析得到的所述第一意图。
本申请实施例中,电子设备在获取到第一语句后可以向云服务器发送该第一语句,由云服务器进行解析,得到第一意图,并发送给电子设备,从而可以降低电子设备的处理第一语句的复杂度。
结合第一方面,在第一方面的某些实现方式中,所述配置文件为预定义的。
本申请实施例中,应用程序的开发人员可以根据应用程序能够提供的服务编写配置文件,以接入语音助手中,该技术方案可以为应用程序接入语音提供便利。
第二方面,提供了一种语音助手开发平台,包括:所述语音助手开发平台,用于接收第一文件,所述第一文件包括应用程序和配置文件,其中,所述配置文件包括第一意图与目标接口的映射关系,所述目标接口为语音助手与所述应用程序交互的接口,所述目标接口为同步接口、异步接口或界面接口中的一种或多种;所述语音助手开发平台,还用于当确定所述第一文件满足预设条件时,向语音助手云服务器发送所述第一文件或所述配置文件,用于语音交互服务。
该预设条件可以是配置文件中的话术或语言表达方式是否合法合规,该预设条件还可以是应用程序是否是经过正规平台审核的应用程序等。
本申请实施例中,用户或开发人员可以将包含应用程序和配置文件的第一文件上传至语音助手开发平台中,语音助手开发平台可以对该第一文件进行测试,以确定其是否满足要求,从而完成对第一文件的审核,以保证应用程序提供服务的合规性。
在一些实施例中,该第一文件也可以仅包括应用程序,该配置文件可以包括在应用程序中。
结合第二方面,在第二方面的某些实现方式中,所述配置文件用于语音助手确定与所述第一意图对应的应用程序交互的目标接口,以使得所述语音助手调用所述目标接口执行与所述第一意图相关的操作。
本申请实施例中,语音助手可以根据配置文件来确定与第一意图对应的应用程序交互的目标接口,以使得语音助手可以调用目标接口执行与第一意图相关的操作。
在一些实施例中,语音助手开发平台还可以对发布的第一文件进行下线处理。
结合第二方面,在第二方面的某些实现方式中,所述语音助手开发平台还用于:响应于用户的第一操作,编辑所述配置文件。
本申请实施例中,用户可以在语音助手开发平台中对配置文件进行修改,以使得可以对配置文件进行更新,无需重新上传配置文件,提升了效率。
结合第二方面,在第二方面的某些实现方式中,所述语音助手开发平台具体用于:在所述配置文件中添加第二意图与目标接口的映射关系;或者,在所述配置文件中修改所述第一意图与所述目标接口的映射关系。
本申请实施例中,用户可以开发平台中对配置文件进行修改,例如增加新的意图和目标接口的映射关系,或者,改变原有意图与目标接口的映射关系等等,从而可以提升开发的灵活性。
在一些实施例中,用户还可以在开发平台中自定义应用程序以及对应意图、使用的接口,或者交互的内容等等。
结合第二方面,在第二方面的某些实现方式中,所述语音助手开发平台还用于:响应于用户的第二操作,删除所述第一文件。
本申请实施例中,例如,当第一文件不满足平台要求时,根据用户或管理者的操作,语音助手开发平台还可以删除第一文件。
第三方面,提供了一种电子设备,包括一个或多个处理器;一个或多个存储器;所述一个或多个存储器存储有一个或多个计算机程序,所述一个或多个计算机程序包括指令,当所述指令被所述一个或多个处理器执行时,使得如第一方面及其任一种可能的实现方式中所述的语音交互的方法被执行。
第四方面,提供了一种电子设备,包括用于实现如第一方面及其任一种可能的实现方式中所述的语音交互的方法的模块。
第五方面,提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口用于接收信号,并将所述信号传输至所述处理器,所述处理器处理所述信号,使得如第一方面及其任一种可能的实现方式中所述的语音交互的方法被执行。
第六方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机指令,当所述计算机指令在计算机上运行时,使得如第一方面及其任一种可能的实现方式中所述的语音交互的方法被执行。
第七方面,提供了一种计算机程序产品,当所述计算机程序产品在计算机上运行时, 使得如第一方面及其任一种可能的实现方式中所述的语音交互的方法被执行。
第八方面,提供可一种语音交互系统,所述语音交互系统用于执行如第一方面及其任一种可能的实现方式中所述的语音交互的方法。
附图说明
图1是本申请实施例提供的一种应用程序的框架图。
图2本申请实施例提供的一组GUI的示意图。
图3是本申请实施例提供的另一组GUI的示意图。
图4是本申请实施例提供的一种用户与车机语音交互的示意图。
图5是本申请实施例提供的一种语音交互的方法的示意性流程图。
图6是本申请实施例提供的另一种语音交互的方法的示意性流程图。
图7是本申请实施例提供的一组GUI的示意图。
图8是本申请实施例提供的一种语音交互的方法的示意性流程图。
具体实施方式
下面将结合附图,对本申请实施例中的技术方案进行描述。
本申请实施例的技术方案可以应用于手机、平板、可穿戴设备等电子设备中,还可以应用于车机中等。
在介绍本申请实施例提供的转换文件格式的方法的技术方案之前,首先简单介绍一下本申请可能涉及的一些技术术语。
同步接口:用于阻塞式调用的系统接口。在当前调用执行未结束时,不能够执行下一个调用。
异步接口:用于非阻塞式调用的系统接口。在当前调用执行未结束时,可以执行下一个调用。
界面接口:用于根据接入地址访问接入地址对应的显示界面的系统接口。
软件开发工具包(software development kit,SDK):是一些被软件工程师用于为特定的软件包、软件框架、硬件平台、操作系统等创建应用软件的开发工具的集合。SDK还经常包括示例代码、支持性的技术注解或者其他的为基本参考资料澄清疑点的支持文档。
深度链接(deeplink):通过该deeplink,可以直接链接到应用程序内部页面。例如,通过一个deeplink,可以打开应用程序某个固定的页面。
意图和槽位:在语音助手中,需要理解一句话中用户的意图,并且提取其中的关键词(即槽位),比如:用户对语音助手说“今天会下雨吗”,这句话中意图为:天气查询;槽位为:时间:今天;天气类型:下雨。
随着语音技术的发展,用户通过语音和应用程序进行交互的场景非常普遍。在用户通过语音和应用程序进行交互时,需要语音助手识别到用户的意图,并调用相应的应用服务,为用户提供良好的人机交互体验。
然而,不同的语音助手提供商可能会提供不同的方案与应用程序对接,增加了语音助手与不同应用程序对接的复杂性。
图1提供了一种应用程序集成语音助手SDK的方式接入语音的技术方案。
图1是本申请实施例提供的一种应用程序的框架图。如图1所示,该App100可以包 括该App本身的代码110部分和语音助手SDK120部分。
应理解,该语音助手提供商可以为应用程序提供语音助手SDK,从而应用可以支持语音功能,使得用户可以通过语音与应用程序进行交互。
那么,该App100的开发人员在开发该App100时,可以集成该语音助手SDK120。
在应用程序集成了语音助手SDK的情况下,应用程序和语音助手耦合,当语音助手SDK更新时,该应用程序需要重新同步进行更新。此外,应用程序在使用语音助手时,对于应用程序提供的服务,缺少审核,无法保证应用服务的质量。
在另一些方案中,应用程序可以为语音助手提供一些deeplink,支持通过语音助手打开该deeplink对应的显示界面。然而,该技术方案中,语音助手只能打开固定的页面,无法实现从应用程序获取信息在语音助手内展示。同样的,对于应用程序提供的deeplink对应的页面,缺少审核,无法保证应用服务的质量。
有鉴于此,本申请实施例提供一种语音交互的方法、电子设备和语音助手开发平台,该技术方案中语音助手可以通过调用不同的系统接口实现不同的交互内容,且可以对应用程序提供的服务进行审核,保证应用服务的质量。
图2是本申请实施例提供的一组图形用户界面(graphical user interface,GUI)的示意图。其中,从图2中的(a)至(c)示出了用户和电子设备语音交互的过程。
参见图2中的(a),该GUI为电子设备的桌面510,该桌面510中可以包括电子设备上安装的多个应用程序,当电子设备检测到用户点击语音助手的图标511时,可以显示如图2中的(b)所示的GUI。
在一些实施例中,用户也可以通过语音指令使电子设备显示图2中的(b)所示的GUI。例如,用户可以对着电子设备说“小艺小艺”,电子设备也可以显示图2中的(b)所示的GUI。
在一些实施例中,用户还可以通过长按电源键使电子设备显示图2中的(b)所示的GUI。
参见图2中的(b),该GUI可以为语音助手的显示界面520,该显示界面520中可以包括语音输入控件522,还可以包括其他功能控件523、524。该显示界面520中还可以包括多个推荐输入521。当电子设备检测到用户点击语音输入控件522时,电子设备可以显示如图2中的(c)所示的GUI。
参见图2中的(c),该GUI为用户输入语音指令“西安今天的天气怎么样”,电子设备返回的查询结果显示界面530。该显示界面530中可以包括用户输入的对话框531,该对话框中531显示文字“西安今天的天气怎么样”,该对话框531中还可以包括编辑控件532,当用户点击该编辑控件532时,可以对该对话框中的文字进行编辑;该显示界面530中还可以包括语音助手的对话框533和天气卡片534,该对话框533中可以显示天气类应用程序返回的查询结果“西安今天阴,14℃到27℃”,该天气卡片534中可以显示当前的温度、今天的最高温度和最低温度,以及未来几个小时的天气情况和温度等等信息。
应理解,该电子设备在显示显示界面530的同时,可以语音播报查询到的天气情况,播报内容可以是“西安今天阴,14℃到27℃”。
应理解,本申请实施例中,当用户向语音助手发布语音指令“西安今天的天气怎么样”时,该语音助手可以获取到用户的意图为“查询天气”,槽位为地点:“西安”;时间:“今天”。则该语音助手可以调用系统接口(如同步接口)将该用户的意图和语音指令中 的槽位信息传递给天气类应用程序(如华为天气),并根据天气类应用程序返回的信息将查询结果以语音播放和/或文本显示、卡片展示等方式呈现给用户。
图3是本申请实施例提供的另一组GUI的示意图。其中,从图3中的(a)至(c)示出了用户和电子设备语音交互的过程。
其中,图3中的(a)至(b)可以参见图2中的(a)至(b)的相关描述,为了简洁不再赘述。
参见图3中的(c),该GUI为电子设备识别用户的语音指令为“打开华为音乐”的显示界面540。其中,该显示界面540中可以显示识别到的用户的语音指令“打开华为音乐”的对话框541,之后,电子设备可以显示图3中的(d)所示的GUI。
参见图3中的(d),该GUI为华为音乐的首页的显示界面550。
应理解,本申请实施例中,当用户向语音助手发布语音指令“打开华为音乐”时,该语音助手可以获取到用户的意图为打开应用程序,槽位为打开华为音乐应用程序,则该语音助手可以调用界面接口将该槽位传递给华为音乐应用程序,从而电子设备启动华为音乐,显示华为音乐的显示界面。
图4是本申请实施例提供的一种用户与车机语音交互的示意图。其中,从图4中的(a)至(b)示出了用户与车机进行语音交互的过程。
参见图4中的(a),车机600可以正处在行驶过程中,用户希望打开副驾车窗。此时,用户可以唤醒车载语音助手,当用户输入语音指令“打开副驾车窗”时,车机600的中控屏的显示界面610中可以显示对话框611,该对话框611可以显示语音指令“打开副驾车窗”。
此时,车载语音助手可以调用车载控制系统去执行用户的语音指令,当执行成功后,车机600的中控屏可以显示显示界面620。
参见图4中的(b),车机600的显示界面620中可以显示对话框611和对话框612,该对话框612中可以显示内容“已为您打开副驾车窗”。同时,车载语音助手还可以语音播报“已为您打开副驾车窗”。
应理解,上述用户通过语音指令打开车窗的过程中,当用户向车载语音助手发布语音指令“打开副驾车窗”时,车载语音助手可以获取到用户的意图为打开车窗,槽位为副驾位置,则该车载语音助手可以调用异步接口将该意图和槽位信息传递给车载控制系统,车载控制系统去执行打开副驾车窗的动作,当执行成功后,可以向车载语音助手返回相应信息,车载语音助手根据车载控制系统返回的相应信息向用户语音播放“已为您打开副驾车窗”和/或文本显示“已为您打开副驾车窗”。
还应理解,车载控制系统在执行用户的指令打开车窗时,其过程可能会耗费几秒钟的时间,在这个过程中,用户还可以继续向车载语音助手发布其他语音指令。例如,用户继续发布语音指令“将空调调节到25度”等。
图5是本申请实施例提供的一种语音交互的方法的示意性流程图。如图5所示,该方法200可以包括步骤201至步骤211。
本申请实施例中提供的方法可以适用于多种操作系统下的应用程序中,如安卓操作系统下的安卓应用程序,或者,鸿蒙操作系统下的鸿蒙应用程序,或者其他操作系统下的应用程序中,本申请实施例不予限定。
201,开发应用程序。
在一些实施例中,该方法200也可以不包括步骤201,即可以在应用程序已经开发完成的情况下执行步骤202。
202,编写配置文件。
示例性地,该配置文件可以是voiceabilities.json文件。
在一些实施例中,语音助手开发平台可以为应用程序开发人员提供集成开发环境(Integrated development environment,IDE)插件,应用程序开发人员可以在该IDE插件中编写配置文件。
应理解,该配置文件可以是语音能力与应用服务之间的映射关系。该配置文件中可以定义意图和槽位到应用程序服务的对应关系。该配置文件中还可以定义语音调用系统接口时,应用程序返回给语音助手的内容,以及语音助手应用程序的返回的内容所执行的动作。
在一个示例中,用户可以在配置文件中定义打开界面使用的系统接口,通过调用该打开界面的系统接口,可以打开应用程序的界面。
在另一个示例中,用户可以在配置文件中定义同步接口和交互的内容,通过调用该同步接口可以与应用程序进行交互。
应理解,在语音助手调用该同步接口与应用交互时,语音助手向应用程序输入语音指令后,需要等待应用程序的反馈结果,才能执行用户的下一条语音指令。
例如,语音助手通过调用该同步接口可以与天气类App进行交互,以查询天气。当用户输入语音指令“查询天气”时,语音助手可以调用同步接口向天气类App发送查询天气的指令,并接收天气类App的返回结果,并将该结果反馈给用户。应理解,上述查询天气的过程可能耗时较短,当用户发送“查询天气”指令后,语音助手会一直等待天气类App的返回结果。
在另一个示例中,用户可以在配置文件中定义异步接口和交互的内容,通过调用该异步接口可以与应用程序进行交互。
应理解,在语音助手调用该异步接口与应用交互时,应用程序根据语音指令提供相应功能,可能是比较耗时的,此时语音助手向应用程序输入语音指令后,可以不用等待应用程序的反馈结果,即可输入下一条语音指令。
例如,该语音助手可以是车载语音助手,用户通过该车载语音助手调用该异步接口可以控制车辆,如车内空调,汽车车窗等。当用户输入语音指令“打开天窗”时,车载语音助手可以调用异步接口将该语音指令发送给车载控制系统,车载控制系统根据该指令打开汽车天窗,由于打开汽车天窗的过程比较耗时,可能会花费几秒钟的时间,车载控制系统在执行成功或失败时,可以返回结果给车载语音助手,车载语音助手可以将相应的结果语音播报给用户。
在一些实施例中,当鸿蒙应用程序接入语音时,该配置文件的基础配置可以参见表1。
表1

示例性地:
在一些实施例中,当安卓应用程序接入语音时,该配置文件的基础配置可以参见表2。
表2
示例性地:
在一些实施例中,该配置文件的同步接口服务配置可以参见表3。
表3
示例性地,{

在一个示例中,开发人员在配置文件中配置displayText和speakText时,其具体的内容可以选择语音助手官方提供的标准话术,从而可以保证话术的质量。该displayText和speakText的具体内容也可以由开发人员自行进行编辑,但需要语音助手开发平台进行审核,以保证话术的质量。
在另一个示例中,displayText和speakText的具体内容可以不再配置文件中配置,而是在调用系统接口与应用程序交互时,由应用程序实时返回,语音助手根据应用程序返回的内容进行文本显示和/或语音播报。
在一些实施例中,该配置文件的异步接口服务配置可以参见表4。
表4
示例性地:

203,编译打包。
开发人员可以将开发好的应用程序和编写好的配置文件进行编译打包,形成应用程序包。
204,将应用程序包和配置文件上传至语音助手开发平台。
示例性地,开发人员可以在语音助手开发平台进行注册并登录,然后可以将自己的应用程序包和编写好的配置文件上传至语音助手开发平台中,从而可以在语音助手开发平台中对应用程序提供的服务进行审核。
205,对应用程序和配置文件进行测试。
示例性地,该语音助手开发平台提供测试功能,当用户点击测试时,可以自动对应用程序和配置文件进行测试,并可以生成相应的测试报告。
206,对应用程序和配置文件进行发布。
应理解,在应用程序和配置文件测试通过后,可以在语音助手开发平台对该应用程序和配置文件进行发布,或者,可以只发布该应用程序,用于告知用户该应用程序和配置文件测试通过。
在另一些实施例中,也可以对发布的应用程序和配置文件进行下线。
在另一些实施例中,用户还可以删除上传的应用程序和配置文件,或者,语音助手开发平台的管理人员确定该应用程序和配置文件不符合规定,也可以删除该应用程序和配置文件。
通过该语音助手开发平台可以对开发人员开发的应用程序和编写的配置文件进行审核,从而可以为应用程序接入语音提供一种监管机制,进而保证语音服务的质量,避免出现不合规不合法的现象。
207,用户向语音助手发送语音指令。相应的,语音助手接收该语音指令。
示例性地,用户希望查询天气,则可以向语音助手发送查询天气的语音指令,例如该 语音指令可以是“西安今天的天气怎么样”。
208,语音助手根据该语音指令,获取用户的意图和语音指令中的槽位信息。
示例性地,该语音指令为“西安今天的天气怎么样”,则语音助手可以识别出用户的意图为“查询天气”,该语音指令中的槽位信息为地点:“西安”;时间:“今天”。
在另一些实施例中,该步骤208中,语音助手可以将语音指令发送至语音助手云服务器,由云服务器识别用户的意图和语音指令中的槽位信息,然后将该意图和槽位信息发送至语音助手。
例如,该语音指令为“西安今天的天气怎么样”,语音助手将该语音指令发送至语音助手云服务器,云服务器识别出用户的意图为“查询天气”,该语音指令中的槽位信息为地点:“西安”;时间:“今天”,并将该意图和槽位信息发送至语音助手。
209,语音助手调用同步接口或异步接口将获取到的槽位信息发送给应用程序。
示例性地,当语音指令为“西安今天的天气怎么样”,可以确定用户的意图为“查询天气”,该语音指令中的槽位信息为地点:“西安”;时间:“今天”。则语音助手可以调用同步接口将识别到的槽位信息发送给天气类应用程序(如华为天气)。
应理解,应用程序可以向语音助手提供其支持的服务,例如,天气类应用程序可以向语音助手提供其支持查询天气的服务,当语音助手识别到用户的意图为查询天气时,可以与该天气类应用程序进行交互。
示例性地,当语音指令为“打开副驾的车窗”,可以确定用户的意图为“打开车窗”,该语音指令中的槽位信息为位置:“副驾驶”。则语音助手可以调用异步接口将识别到的槽位信息发送给车载控制系统。
在一些实施例中,语音助手可以通过参数将应用程序定义的处理函数和槽位信息传递给应用程序。
例如,语音助手可以通过调用如下同步接口和应用程序进行交互。
与鸿蒙应用程序交互的同步接口:Bundle result=DataAbilityHelper.call(Uri uri,String method,String arg,PacMap extras);
其中,Uri由应用程序提供。语音助手将处理函数和槽位信息通过成对控制流形逼近(pairwise controlled manifold approximation,pacMap)结构的extras参数传递给应用程序。
与安卓应用程序交互的同步接口:Bundle result=context.getContentResolver.call(Uri uri,String method,String arg,Bundle extras);
其中,Uri由应用程序提供。语音助手将处理函数和槽位信息通过Bundle结构的extras参数传递给应用程序。
需要说明的是,上述extras参数的参数名由开发人员在配置文件中定义,对应的值由语音助手从语音指令中识别。该extras参数可以定义如表5。
表5

示例性地,语音助手向应用程序传递的参数如下:
在上述示例中,可以确定函数名为:设置空调;参数名为:温度;温度值为:25;语言为:简体中文。
语音助手将上述参数传递给应用程序,则应用程序可以确定用户希望将空调调整到25度,从而可以根据上述参数调整空调的温度。
在一些示例中,语音助手可以通过调用异步接口(service ability)和鸿蒙应用程序进行交互,语音助手向鸿蒙应用程序传递的参数可以参见表1-4。
在一些示例中,语音助手可以通过调用异步接口(service)和安卓应用程序进行交互,语音助手向安卓应用程序传递的参数可以参见表1-4。
210,应用程序向语音助手返回相应信息。
在一些实施例中,在执行成功时,应用程序可以向语音助手返回0;在执行失败时,应用程序可以向语音助手返回1;在类型不支持时,应用程序可以向语音助手返回3;
在另一些实施例中,应用程序可以向语音助手返回执行的结果,例如,将查询到的天气的信息发送给语音助手,约定语音助手以文本方式展示该天气信息;或者,将查询到的天气的信息发送给语音助手,约定语音助手以语音播报方式播报该天气信息;或者,将查询到的天气的信息发送给语音助手,约定语音助手以卡片形式展示该天气信息。
应理解,该返回值和对应的含义可以是开发人员在配置文件中定义的。该语音助手向用户呈现结果的方式也可以是开发人员在配置文件中定义的。
在一些实施例中,鸿蒙或安卓应用程序通过同步接口或异步接口向语音助手的返回值可以参见表6。
表6

示例1:在设置空调温度的场景中,语音播报话术和文本显示内容由开发人员在配置文件中已定义。应用程序设置温度成功,只需要向语音助手返回配置文件中定义的返回结果码。
当应用程序为鸿蒙应用程序时,示例1的部分代码示例如下:
当应用程序为安卓应用程序时,示例1的部分代码示例如下:
该示例1中,应用程序向语音助手返回的返回结果码为“0”,则语音助手可以向用户播报执行成功。
示例2:在设置空调温度的场景中,语音播报话术和文本显示内容由开发人员在配置 文件中已定义。应用程序设置温度成功,需要向语音助手返回配置文件中定义的占位符。
当应用程序为鸿蒙应用程序时,示例2的部分代码示例如下:
当应用程序为安卓应用程序时,示例2的部分代码示例如下:
该示例2中,假设用户希望将空调温度调高至35度,应用程序判断35度的温度过高,可能会对用户带来不适,则应用程序可以将空调实际生效温度temp1调整到25度,然后可以向语音助手返回结果码0和占位符25,语音助手将该占位符25补充到话术“空调温度已为您调到{temp1}度”,并播报给用户。
在另一些示例中,假设用户希望将正在播放的视频的进度条调整到19.5,而视频类应用程序支持的进度条最小调整单位为1,则应用程序可以将进度条的实际值调整到19,然后向语音助手返回结果码0和占位符19,语音助手将该占位符19补充到话术“视频进度条已为您调到{jindu}”,并播报给用户。
示例3:在设置空调温度的场景中,语音播报话术和文本显示内容在配置文件中未定义,而是在应用程序执行语音指令时实时返回。
当应用程序为鸿蒙应用程序时,示例3的部分代码示例如下:
当应用程序为安卓应用程序时,示例3的部分代码示例如下:
该示例3中,假如用户的语音指令为“将空调调节至25度”。应用程序设置空调温度成功后,将播报话术“空调已为您调节到25度”或者文本显示内容“空调已为您调节到25度”或者卡片显示的内容返回给语音助手。语音助手根据应用程序返回的结果,在需要语音播报时,向用户播报“空调已为您调节到25度”;在需要显示文本内容时,在显示屏中显示文本内容“空调已为您调节到25度”;在需要展示卡片时,展示相关内容。
示例4:在设置空调温度的场景中,语音播报话术和文本显示内容由开发人员在配置文件中已定义。应用程序设置温度失败,只需要向语音助手返回配置文件中定义的返回结果码。
当应用程序为鸿蒙应用程序时,示例4的部分代码示例如下:
当应用程序为安卓应用程序时,示例4的部分代码示例如下:
该示例4中,应用程序向语音助手返回的返回结果码为“1”,则语音助手可以向用户播报执行失败。
示例5:在设置空调温度的场景中,应用程序设置温度失败,且错误类型超出了语音助手官方的定义语音,则播报话术和文本显示内容由开发人员在配置文件中自由定义。
当应用程序为鸿蒙应用程序时,示例5的部分代码示例如下:
当应用程序为安卓应用程序时,示例5的部分代码示例如下:
该示例5中,用户在配置文件中可以定义当返回结果码"retCode"为“18”时,语音助手文本显示的内容为“空调滤芯需要更换”,语音播报的内容为“空调滤芯需要更换”。当应用程序向语音助手返回结果码“18”时,语音助手可以根据配置文件配置的内容,文本显示“空调滤芯需要更换”和/或语音播报“空调滤芯需要更换”。
211,语音助手提供相应服务。
示例性地,语音助手将应用程序返回的信息反馈给用户。例如,用户的语音指令为“西安今天的天气怎么样”,则语音助手根据天气类应用程序返回的信息“西安今天多云、气温15-20度”。则语音助手可以向用户语音播放“西安今天多云、气温15-20度”,或者语音助手可以在电子设备的屏幕上显示文字“西安今天多云、气温15-20度”,或者语音助手可以在电子设备的屏幕上显示天气卡片,可以包括上述“西安今天多云、气温15-20度”的信息。
示例性地,参见图2中的(c),当用户输入语音指令“西安今天的天气怎么样”时,语音助手将用户的意图和语音指令中的槽位信息通过同步接口传递给天气类应用程序,并可以根据天气类应用程序返回的结果向用户文本显示“西安今天阴,14℃到27℃”,并显示天气卡片534,还可以语音播报“西安今天阴,14℃到27℃”等。
在另一个示例中,用户的语音指令为“将空调调节至25度”,则语音助手根据控制类 应用程序返回的占位符的值“25”。则语音助手将该“25”填充到话术“空调已为您调节到{}度”,并可以在电子设备的屏幕上显示文字“空调已为您调节到25度”,或者,语音助手可以向用户语音播放“空调已为您调节到25度”,或者语音助手可以在电子设备的屏幕上显示卡片,卡片上的内容可以包括上述“空调已为您调节到25度”的信息。
应理解,语音助手向用户反馈结果的方式可以是预先定义好的,例如,可以是开发人员在配置文件中定义的。
在一些实施例中,对于该步骤201至步骤211的执行顺序不予限定。该步骤201至步骤211中的某些步骤可以被删除、不执行、替换或者对调等,本申请实施例对此不予限制。
本申请实施例中,在语音交互的技术方案中,开发人员可以编写配置文件,该文件中可以定义意图和槽位到应用程序服务的对应关系,该配置文件中还可以定义语音调用系统接口时,应用程序返回给语音助手的内容,以及语音助手根据应用程序返回的内容所执行的动作。
本申请实施例中,为开发人员提供了语音助手开发平台,从而可以对开发人员开发的应用程序和配置文件进行审核,从而可以保证语音服务的质量。
本申请实施例中,开发人员可以在配置文件中可以定义语音助手调用的三种不同的系统接口与应用程序进行交互,以及交互的内容,从而为应用程序提供一种接入语音的标准规范,从而可以降低语音助手与不同应用程序对接的复杂性。
上文结合图5介绍了语音交互时,语音助手调用同步接口和异步接口与应用进行交互的技术方案。下文将结合图6介绍语音交互时,语音助手调用系统打开应用程序的界面的技术方案。
图6是本申请实施例提供的另一种语音交互的方法的示意性流程图。如图6所示,该方法300可以包括步骤301至步骤310。
301,开发应用程序。
应理解,该步骤301可以参见步骤201的相关描述,为了简洁,不再赘述。
302,编写配置文件。
示例性地,该配置文件可以是voiceabilities.json文件。
在一些实施例中,语音助手开发平台可以为应用程序开发人员提供IDE插件,应用程序开发人员可以在该IDE插件中编写配置文件。
该配置文件中可以包括用户定义的界面接口,以及语音助手通过该界面接口与应用程序交互的内容,例如,可以语音助手通过调用该界面接口打开某个应用程序的显示界面。
303,编译打包。
304,将应用程序包和配置文件上传至语音助手开发平台。
305,对应用程序和配置文件进行测试。
306,对应用程序和配置文件进行发布。
307,用户向语音助手发送语音指令。相应的,语音助手接收该语音指令。
308,语音助手根据该语音指令,获取用户的意图和语音指令中的槽位信息。
应理解,该步骤303-308可以参见步骤203-208的相关描述,为了简洁,不再赘述。
309,语音助手通过调用界面接口将获取到的槽位信息发送给应用程序。
示例性地,当用户的语音指令为“打开华为视频”时,语音助手可以获取到用户的意图为“打开华为视频”,该语音指令中的槽位信息为打开应用程序:“华为视频”。则语音 助手可以调用界面接口将该槽位信息传递给华为视频。
在一些实施例中,语音助手可以通过调用如下接口打开鸿蒙应用程序的界面。
startAbility(new Intent(String,Uri));
其中,Uri由应用程序提供,例如,该Uri可以是应用程序的某个显示界面的接入地址。语音助手可以将识别到的槽位信息通过该Uri传递给应用程序。
部分代码示例如下:
在一些实施例中,语音助手可以通过调用如下接口打开安卓应用程序的界面。
startActivity(new Intent(String,Uri));
其中,Uri由应用程序提供,例如,该Uri可以是应用程序的某个显示界面的接入地址。语音助手可以将识别到的槽位信息通过该Uri传递给应用程序。
示例性地,当语音助手识别到语音指令中的槽位信息为打开华为视频时,可以调用该接口将华为视频首页显示界面的接入地址传递给华为视频,以期打开华为视频。
部分代码示例如下:

310,应用程序根据槽位信息显示目标界面。
应用程序根据语音助手发送的槽位信息,打开目标界面。
示例性地,应用程序根据该槽位信息确定语音助手发的是华为音乐首页显示界面的接入地址,则启动华为音乐显示其首页的显示界面。
示例性地,参见图3中的(c)、(d),当用户输入语音指令“打开华为音乐”时,电子设备启动华为音乐,显示华为音乐的首页显示界面。
在一些实施例中,对于该步骤301至步骤310的执行顺序不予限定。该步骤301至步骤310中的某些步骤可以被删除、不执行、替换或者对调等,本申请实施例对此不予限制。
在另一些实施例中,该方法300可以与方法200相结合,即开发人员可以在配置文件中定义界面接口、同步接口和异步接口,以及调用该界面接口、同步接口和异步接口与应用程序交互的内容,语音助手可以根据用户的语音指令获取到相应的意图、槽位信息,并调用相应的系统接口与应用程序进行交互。
本申请实施例中,为开发人员提供了语音助手开发平台,从而可以对开发人员开发的应用程序和配置文件进行审核,从而可以保证语音服务的质量。
本申请实施例中,开发人员可以在配置文件中可以定义语音助手调用的打开应用界面的系统接口与应用程序进行交互,从而为应用程序提供一种接入语音的标准规范,从而可以降低语音助手与不同应用程序对接的复杂性。
图7是本申请实施例提供的一组图形用户界面(graphical user interface,GUI)的示意图。其中,从图7中的(a)至(b)示出了开发人员在语音助手开发平台上传应用程序和编写配置文件的过程。
参见图7中的(a),该GUI可以是语音助手开发平台的配置文件管理模块的显示界面410。该显示界面410中可以包括配置文件的配置内容,例如,开发人员可以在平台阈值技能服务下填写相应的应用名、意图名等等。
在一些实施例中,该显示界面410还可以包括前文中所述的与应用程序交互使用的系统接口,以及返回的内容等等。
在一些实施例中,语音助手开发平台也支持开发人员进行自定义技能服务。例如,当 开发人员点击显示界面410中的自定义技能服务时,可以在跳转的页面中进行编辑,如某个应用的应用名、意图、使用调用界面接口传输的接入地址等等。
当开发人员使用鼠标点击控件411的操作后,可以显示图7中的(b)所示的GUI。
参见图7中的(b),在显示界面420中,可以包括三种上传文件的类型供开发人员选择,分别为:鸿蒙应用HAP、鸿蒙应用+配置文件和安卓应用APK+配置文件,例如,用户选择鸿蒙应用HAP。该显示界面420中还包括用户上传的应用类型,分别为安卓(android)、鸿蒙(Harmony)、开源鸿蒙(openHarmony),例如,用户选择安卓。该显示界面420中还可以包括用于上传文件的上传图标和文字“将文件拖到此处,或点击上传”。该显示界面420中还可以包括取消功能控件421和确定功能控件422,当开发人员点击取消功能控件421时,可以取消上传;当开发人员点击确定功能控件422时,可以保存上传的文件,并跳转到下一界面。
在一些实施例中,该语音助手发开平台还可以对开发人员上传的应用程序和配置文件进行测试,并可以生成测试报告。该语音助手开发平台还可以对应用程序进行发布和下线,以及删除等操作。
本申请实施例中,该语音助手开发平台可以对开发人员上传的应用程序和编写的配置文件进行审核和测试,当审核或测试不通过时,可以对该应用程序进行下线,拒绝其使用语音助手,从而可以为语音交互提供一种监管机制,进而保证语音服务的质量,避免出现不合规、不合法的现象。
图8是本申请实施例提供的一种语音交互的方法的示意性流程图。如图8所示,该方法800可以应用于语音交互系统中,该方法800可以包括步骤810至840。
810,获取用户输入的第一语句。
在一些实施例中,该第一语句可以是用户语音输入的,也可以是文字输入的,还可以是通过图片等方式输入的,本申请实施例不做具体限定。
示例性地,参见图2,该第一语句可以是用户语音输入的“西安今天的天气怎么样”。
820,根据第一语句获取用户的第一意图。
在一些实施例中,语音交互系统包括电子设备,该电子设备可以在获取到该第一语句之后,解析该第一语句,得到用户的第一意图。
在另一些实施例中,语音交互系统包括电子设备和服务器,则电子设备可以在获取到该第一语句之后,将该第一语句发送至云服务器(如语音助手云服务器),由该云服务器进行解析,得到该第一意图,然后将该第一意图发送至电子设备中。
在另一些实施例中,该语音交互系统还可以是服务器。
830,确定与第一意图对应的应用程序交互的目标接口。
在一些实施例中,该目标接口可以包括界面接口、同步接口和异步接口中的一种或多种。
应理解,该目标接口可以是系统接口,还可以是自定义接口。例如,该目标接口可以是电子设备的系统接口;或者,语音助手以SDK的形式集成在应用程序中,则该目标接口可以是于SDK交互的自定义接口,本申请实施例不予限定。
840,调用目标接口执行与第一意图相关的操作。
在一个示例中,该目标接口可以是界面接口,则电子设备可以调用该界面接口打开应用程序的某个显示界面。
参见图3,用户的第一语句可以为打开华为音乐,则电子设备可以调用该界面接口打开华为音乐应用程序的显示界面550。
在另一个示例中,该目标接口可以是同步接口,则电子设备可以通过该同步接口与相应的应用程序进行交互。
参见图2,用户的第一语句可以为“西安今天的天气怎么样”,则电子设备可以调用同步接口与天气类应用程序进行交互,并向用户输出执行结果。
在另一个示例中,该目标接口可以是异步接口,则电子设备可以通过该异步接口与相应的应用程序进行交互。
参见图4,该电子设备可以安装在车机中,或者,该方法可以直接应用于车机中,该应用程序可以是控制类应用程序或车载系统应用程序,则当用户输入语句“打开副驾车窗”时,可以通过该异步接口去执行打开副驾车窗的操作,并在执行后向用户输出执行结果。
本申请实施例中,响应于用户的语音操作,语音交互系统可以确定与用户的第一意图对应的应用程序交互的接口,然后通过调用该接口与相应的应用程序进行交互以执行用户的第一意图相关的操作。该技术方案可以在用户通过语音与语音交互系统进行交互时,语音交互系统可以通过不同的接口与不同的应用程序进行交互,从而可以降低语音交互系统与不同应用程序交互的复杂性。
本申请实施例中,应用程序在使用语音功能时,无需集成语音助手SDK,可以进一步降低了应用程序的开发复杂度。
在一些实施例中,该语音交互系统还包括配置文件,配置文件中包括第一意图与目标接口的映射关系,确定与第一意图对应的应用程序交互的目标接口,包括:根据配置文件确定与第一意图对应的应用程序交互的目标接口。
在一些实施例中,该配置文件可以是预定义的。例如,该配置文件可以是应用程序的开发人员为了方便接入语音而编写的,该配置文件中可以设置该应用程序与语音助手交互所使用的接口和交互的内容,从而电子设备可以确定与应用程序交互的目标接口。
本申请实施例中,配置文件中可以预存储在语音交互系统中,该配置文件可以包括第一意图与目标接口的映射关系,从而可以确定与第一意图对应的应用程序交互的目标系统接口。
在一些实施例中,该目标接口为同步接口或异步接口,调用目标接口执行与第一意图相关的操作,包括:调用同步接口或异步接口将第一意图和第一意图对应的槽位信息传递给应用程序;根据配置文件和应用程序返回的第一结果确定输出的第一方式;根据第一方式输出第一意图的执行结果。
示例性地,参见图2,该第一语句为“西安今天的天气怎么样”,则可以确定该第一意图为“查询天气”,该第一意图对应的槽位信息为时间:今天;地点;西安,则电子设备可以调用同步接口将该第一意图和槽位信息传输给天气类应用程序,天气类应用程序在接收到该第一意图和槽位信息后,进行天气查询,然后向电子设备返回查询结果,相应的,电子设备向用户呈现该查询结果。该查询结果可以是以语音播报、文本显示或卡片显示等方式呈现给用户。
示例性地,参见图4,该第一语句可以为“打开副驾车窗”,则可以确定用户的第一意图为“打开车窗”,对应的槽位信息为位置:副驾。则车载电子设备可以调用异步接口将该第一意图和槽位信息传输给控制类应用程序,控制类应用程序在接收到该第一意图和槽位 信息后,去执行打开副驾车窗的操作,在执行结束后,向车载电子设备返回执行结果,车载电子设备向用户呈现该执行结果。
本申请实施例中,当目标接口为同步接口或异步接口时,语音交互系统可以调用该同步接口或异步接口将用户的第一意图和第一意图对应的槽位信息传递给应用程序,并根据应用程序的返回结果确定向用户呈现的第一方式,并以第一方式向用户呈现该第一意图的执行结果,从而可以为用户提供相应服务。
在一些实施例中,当所述目标接口为同步接口时,在根据所述配置文件和应用程序返回的第一结果确定输出的第一方式之前,该方法还可以包括:拒绝调用目标接口执行与第二意图相关的操作,其中,第二意图为根据用户输入的第二语句确定的。
本申请实施例中,当目标接口为同步接口时,在第一意图对应的操作执行结束之前,语音系统不能够同步执行用户的第二意图,从而可以避免语音交互出现顺序错乱,影响用户体验
在一些实施例中,当目标接口为异步接口时,在根据所述配置文件和应用程序返回的第一结果确定输出的第一方式,该方法还可以包括:调用目标接口执行与第二意图相关的操作,其中,第二意图为根据用户输入的第二语句确定的。
在一些实施例中,当用户的第一意图为控制设备的相关意图时,例如,设置空调温度,打开或关闭车窗,控制窗帘等,一般情况下会调用异步接口执行该第一意图。
本申请实施例中,当目标接口为异步接口时,在第一意图对应的操作执行结束之前,用户可以继续发布语音指令,语音系统可以同步执行用户的第二意图,从而提升语音交互的效率。
在一些实施例中,该第一结果中包括第一信息,该第一信息用于指示所述应用程序的执行结果,根据第一方式输出第一意图的执行结果,包括:电子设备根据配置文件和第一信息确定执行结果;以第一方式输出该执行结果。
示例性地,该第一信息可以是返回结果码,例如,返回结果码0对应执行成功;返回结果码1对应执行失败等;或者,该第一信息还可以是用于指示执行成功或执行失败的指示信息,本申请实施例不予限定。该第一信息可以在配置文件中进行定义。
本申请实施例中,语音交互系统可以根据配置文件和第一信息确定执行结果,并向用户呈现所述执行结果,从而可以向用户提供相应服务。
在一些实施例中,该第一结果中包括占位符,根据第一方式输出第一意图的执行结果,包括:根据配置文件和占位符确定执行结果;以第一方式输出执行结果。
示例性地,假设用户希望将正在播放的视频的进度条调整到19.5,而视频类应用程序支持的进度条最小调整单位为1,则视频类应用程序可以将进度条的实际值调整到19,然后向语音助手返回结果码0和占位符19,语音助手将该占位符19补充到话术“视频进度条已为您调到{jindu}”,并播报给用户。
本申请实施例中,应用程序返回的第一结果中可以包括占位符信息,则可以根据配置文件中设置的内容和该占位符信息共同确定完整的执行结果,并向用户呈现该执行结果,从而可以向用户提供相应服务。
在一些实施例中,该第一结果中包括第一方式的内容,该根据第一方式输出第一意图的执行结果,包括:以第一方式输出执行结果。
示例性地,在一些场景下,用户希望查询的结果是实时变化的,例如,查询天气时, 天气是实时变化的,则天气类应用程序可以在执行天气查询时,将天气查询的结果实时返回给电子设备,如“西安今天晴,15度-25度”,电子设备在接收到信息时,以文本显示或语音播报或卡片显示等方式向用户呈现该查询结果。
本申请实施例中,在一些情况下,用户的意图对应的内容是实时变化的(如天气),则目标应用程序返回的第一结果中还可以执行结果的具体内容(如实时天气情况),则可以直接向用户呈现该第一结果,从而可以向用户提供相应服务。
在一些实施例中,第一方式包括如下中的至少一项:文本显示;语音播报;卡片显示。
在一些实施例中,该目标接口为界面接口,调用目标接口执行与第一意图相关的操作,包括:调用界面接口将第一意图和第一意图对应的槽位信息传递给应用程序;显示应用程序的目标显示界面,该目标显示界面为第一意图和第一意图对应的槽位信息对应的显示界面。
示例性地,参见图3,当该第一语句为“打开华为音乐”时,则可以确定第一意图为打开应用程序,对应的槽位信息为应用程序:华为音乐。则电子设备可以调用界面接口将该第一意图和槽位信息传递给华为音乐,并显示华为音乐的首页显示界面。
本申请实施例中,当目标接口为界面接口时,该第一意图和第一意图对应的槽位信息可以是一个显示界面的接入地址,从而可以根据该接入地址打开相应的显示界面。
在一些实施例中,根据第一语句获取用户的第一意图,包括:向云服务器发送第一语句;接收云服务器根据第一语句解析得到的第一意图。
本申请实施例中,电子设备在获取到第一语句后可以向云服务器发送该第一语句,由云服务器进行解析,得到第一意图,并发送给电子设备,从而可以降低电子设备的处理第一语句的复杂度。
在一些实施例中,该配置文件为预定义的。
示例性地,该配置文件可以是应用程序的开发人员可以根据应用程序能够提供的服务编写的文件,例如,该配置文件可以存储在语音助手的云服务器中,该配置文件还可以与应用程序集成在一起等。
本申请实施例中,应用程序的开发人员可以根据应用程序能够提供的服务编写配置文件,以接入电子设备的语音助手中,该技术方案可以为应用程序接入语音提供便利。
本申请实施例还提供一种语音助手开发平台,该语音助手开发平台可以用于接收第一文件,第一文件包括应用程序和配置文件,其中,配置文件包括第一意图与目标接口的映射关系,目标接口为语音助手与所述应用程序交互的接口,目标接口为同步接口、异步接口或界面接口中的一种或多种;语音助手开发平台,还用于当确定第一文件满足预设条件时,向语音助手云服务器发送第一文件或配置文件,用于语音交互服务。
应理解,该目标接口可以是系统接口,还可以是自定义接口。例如,该目标接口可以是电子设备的系统接口;或者,语音助手以SDK的形式集成在应用程序中,则该目标接口可以是于SDK交互的自定义接口,本申请实施例不予限定。
在一些实施例中,该第一文件也可以仅包括应用程序,该配置文件可以包括在应用程序中。
示例性地,参见图5,该第一文件可以包括应用程序和配置文件,开发人员可以对该第一文件进行编译打包,然后上传至语音助手开发平台,语音助手开发平台可以对其进行测试。当确定该第一文件满足预设条件时,可以向语音助手云服务器发送该第一文件或配 置文件,以用于语音交互服务。
应理解,该预设条件可以是配置文件中的话术或语言表达方式是否合法合规,该预设条件还可以是应用程序是否是经过正规平台审核的应用程序等。
本申请实施例中,用户或开发人员可以将包含应用程序和配置文件的第一文件上传至语音助手开发平台中,语音助手开发平台可以对该第一文件进行测试,以确定其是否满足要求,从而完成对第一文件的审核,以保证应用程序提供服务的合规性。
在一些实施例中,该配置文件用于语音助手确定与第一意图对应的应用程序交互的目标接口,以使得语音助手调用目标接口执行与第一意图相关的操作。
本申请实施例中,语音助手可以根据配置文件来确定与第一意图对应的应用程序交互的目标接口,以使得语音助手可以调用目标接口执行与第一意图相关的操作。
在一些实施例中,语音助手开发平台还可以对发布的第一文件进行下线处理。
在一些实施例中,语音助手开发平台还用于:响应于用户的第一操作,编辑配置文件。
本申请实施例中,用户可以在语音助手开发平台中对配置文件进行修改,以使得可以对配置文件进行更新,无需重新上传配置文件,提升了效率。
在一些实施例中,语音助手开发平台具体用于:在配置文件中添加第二意图与目标接口的映射关系;或者,在配置文件中修改第一意图与目标接口的映射关系。
本申请实施例中,用户可以开发平台中对配置文件进行修改,例如增加新的意图和目标接口的映射关系,或者,改变原有意图与目标接口的映射关系等等,从而可以提升开发的灵活性。
在一些实施例中,用户还可以在开发平台中自定义应用程序以及对应意图、使用的接口,或者交互的内容等等。从而进一步增加了开发的灵活性。
在一些实施例中,语音助手开发平台还用于:响应于用户的第二操作,删除第一文件。
本申请实施例中,例如,当第一文件不满足平台要求时,根据用户或管理者的操作,语音助手开发平台还可以删除第一文件,以完成对应用程序提供服务的审核。
在一些实施例中,用户还可以在语音助手开发平台中编辑该配置文件。从而有利于提升配置文件的修改效率。
本申请实施例还提供一种电子设备,包括用于实现如前文中任一种可能的实现方式中所述的语音交互的方法的模块。
本申请实施例还提供一种电子设备,包括一个或多个处理器;一个或多个存储器;该一个或多个存储器存储有一个或多个计算机程序,该一个或多个计算机程序包括指令,当该指令被一个或多个处理器执行时,使得如前文中任一种可能的实现方式中所述的语音交互的方法被执行。
本申请实施例还提供一种芯片,所述芯片包括处理器和通信接口,所述通信接口用于接收信号,并将所述信号传输至所述处理器,所述处理器处理所述信号,使得如前文中任一种可能的实现方式中所述的语音交互的方法被执行。
本实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机指令,当该计算机指令在计算机上运行时,使得上述实施例中的语音交互的方法被执行。
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,使得上述实施例中的语音交互的方法被执行。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及 算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (22)

  1. 一种语音交互的方法,其特征在于,所述方法应用于语音交互系统,所述方法包括:
    获取用户输入的第一语句;
    根据所述第一语句获取用户的第一意图;
    确定与所述第一意图对应的应用程序交互的目标接口,所述目标接口为同步接口、异步接口或界面接口中的一种或多种;
    调用所述目标接口执行与所述第一意图相关的操作。
  2. 根据权利要求1所述的方法,其特征在于,所述语音交互系统还包括配置文件,所述配置文件中包括所述第一意图与所述目标接口的映射关系,所述确定与所述第一意图对应的应用程序交互的目标接口,包括:
    根据所述配置文件确定与所述第一意图对应的应用程序交互的目标接口。
  3. 根据权利要求1所述的方法,其特征在于,所述目标接口为同步接口或异步接口,所述调用所述目标接口执行与所述第一意图相关的操作,包括:
    调用所述同步接口或异步接口将所述第一意图和所述第一意图对应的槽位信息传递给所述应用程序;
    根据所述配置文件和所述应用程序返回的第一结果确定输出的第一方式;
    根据所述第一方式输出所述第一意图的执行结果。
  4. 根据权利要求3所述的方法,其特征在于,当所述目标接口为同步接口时,在所述根据所述配置文件和所述应用程序返回的第一结果确定输出的第一方式之前,所述方法还包括:
    拒绝调用目标接口执行与第二意图相关的操作,其中,所述第二意图为根据用户输入的第二语句确定的。
  5. 根据权利要求3所述的方法,其特征在于,当所述目标接口为异步接口时,在所述根据所述配置文件和所述应用程序返回的第一结果确定输出的第一方式,所述方法还包括:
    调用目标接口执行与第二意图相关的操作,其中,所述第二意图为根据用户输入的第二语句确定的。
  6. 根据权利要求3-5中任一项所述的方法,其特征在于,所述第一结果中包括第一信息,所述第一信息用于指示所述应用程序的执行结果,所述根据所述第一方式输出所述第一意图的执行结果,包括:
    根据所述配置文件和所述第一信息确定所述执行结果;
    以所述第一方式输出所述执行结果。
  7. 根据权利要求3-5中任一项所述的方法,其特征在于,所述第一结果中包括占位符信息,所述根据所述第一方式输出所述第一意图的执行结果,包括:
    根据所述配置文件和所述占位符信息确定所述执行结果;
    以所述第一方式输出所述执行结果。
  8. 根据权利要求3-5中任一项所述的方法,其特征在于,所述第一结果中包括所述 第一方式的内容,所述根据所述第一方式输出所述第一意图的执行结果,包括:
    以所述第一方式输出所述执行结果。
  9. 根据权利要求3-8中任一项所述的方法,其特征在于,所述第一方式包括如下中的至少一项:
    文本显示;语音播报;卡片显示。
  10. 根据权利要求1所述的方法,其特征在于,所述目标接口为界面接口,所述调用所述目标接口执行与所述第一意图相关的操作,包括:
    调用所述界面接口将所述第一意图和所述第一意图对应的槽位信息传递给所述应用程序;
    显示所述应用程序的目标显示界面,所述目标显示界面为所述第一意图和所述第一意图对应的槽位信息对应的显示界面。
  11. 根据权利要求1-10中任一项所述的方法,其特征在于,所述根据所述第一语句获取用户的第一意图,包括:
    向云服务器发送所述第一语句;
    接收所述云服务器根据所述第一语句解析得到的所述第一意图。
  12. 根据权利要求2-11中任一项所述的方法,其特征在于,所述配置文件为预定义的。
  13. 一种语音助手开发平台,其特征在于,包括:
    所述语音助手开发平台,用于接收第一文件,所述第一文件包括应用程序和配置文件,其中,所述配置文件包括第一意图与目标接口的映射关系,所述目标接口为语音助手与所述应用程序交互的接口,所述目标接口为同步接口、异步接口或界面接口中的一种或多种;
    所述语音助手开发平台,还用于当确定所述第一文件满足预设条件时,向语音助手云服务器发送所述第一文件或所述配置文件,用于语音交互服务。
  14. 根据权利要求13所述的语音助手开发平台,其特征在于,所述配置文件用于语音助手确定与所述第一意图对应的应用程序交互的目标接口,以使得所述语音助手调用所述目标接口执行与所述第一意图相关的操作。
  15. 根据权利要求13或14所述的语音助手开发平台,其特征在于,所述语音助手开发平台还用于:
    响应于用户的第一操作,编辑所述配置文件。
  16. 根据权利要求15所述的语音助手开发平台,其特征在于,所述语音助手开发平台具体用于:
    在所述配置文件中添加第二意图与目标接口的映射关系;或者,在所述配置文件中修改所述第一意图与所述目标接口的映射关系。
  17. 根据权利要求13-16中任一项所述的语音助手开发平台,其特征在于,所述语音助手开发平台还用于:
    响应于用户的第二操作,删除所述第一文件。
  18. 一种电子设备,其特征在于,包括一个或多个处理器;一个或多个存储器;所述一个或多个存储器存储有一个或多个计算机程序,所述一个或多个计算机程序包括指令,当所述指令被所述一个或多个处理器执行时,使得如权利要求1-12中任一项所述的语音交互的方法被执行。
  19. 一种电子设备,其特征在于,包括用于实现如权利要求1-12中任一项所述的语音交互的方法的模块。
  20. 一种芯片,其特征在于,所述芯片包括处理器和通信接口,所述通信接口用于接收信号,并将所述信号传输至所述处理器,所述处理器处理所述信号,使得如权利要求1-12中任一项所述的语音交互的方法被执行。
  21. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机指令,当所述计算机指令在计算机上运行时,使得如权利要求1-12中任一项所述的语音交互的方法被执行。
  22. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得如权利要求1-12中任一项所述的语音交互的方法被执行。
PCT/CN2023/100373 2022-06-24 2023-06-15 语音交互的方法、电子设备和语音助手开发平台 WO2023246609A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210730938.3A CN117334183A (zh) 2022-06-24 2022-06-24 语音交互的方法、电子设备和语音助手开发平台
CN202210730938.3 2022-06-24

Publications (1)

Publication Number Publication Date
WO2023246609A1 true WO2023246609A1 (zh) 2023-12-28

Family

ID=89292090

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/100373 WO2023246609A1 (zh) 2022-06-24 2023-06-15 语音交互的方法、电子设备和语音助手开发平台

Country Status (2)

Country Link
CN (1) CN117334183A (zh)
WO (1) WO2023246609A1 (zh)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160042748A1 (en) * 2014-08-11 2016-02-11 Rawles Llc Voice application architecture
US20160062604A1 (en) * 2014-08-29 2016-03-03 Nuance Communications, Inc. Virtual assistant development system
CN108563669A (zh) * 2018-01-09 2018-09-21 高徐睿 一种自动实现app操作的智能系统
CN110377722A (zh) * 2019-07-29 2019-10-25 中国工商银行股份有限公司 响应方法及装置、电子设备和可读存储介质
CN111223485A (zh) * 2019-12-19 2020-06-02 深圳壹账通智能科技有限公司 智能交互方法、装置、电子设备及存储介质
CN111916082A (zh) * 2020-08-14 2020-11-10 腾讯科技(深圳)有限公司 语音交互方法、装置、计算机设备和存储介质
CN112346695A (zh) * 2019-08-09 2021-02-09 华为技术有限公司 语音控制设备的方法及电子设备
CN112740323A (zh) * 2020-12-26 2021-04-30 华为技术有限公司 一种语音理解方法及装置

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160042748A1 (en) * 2014-08-11 2016-02-11 Rawles Llc Voice application architecture
US20160062604A1 (en) * 2014-08-29 2016-03-03 Nuance Communications, Inc. Virtual assistant development system
CN108563669A (zh) * 2018-01-09 2018-09-21 高徐睿 一种自动实现app操作的智能系统
CN110377722A (zh) * 2019-07-29 2019-10-25 中国工商银行股份有限公司 响应方法及装置、电子设备和可读存储介质
CN112346695A (zh) * 2019-08-09 2021-02-09 华为技术有限公司 语音控制设备的方法及电子设备
CN111223485A (zh) * 2019-12-19 2020-06-02 深圳壹账通智能科技有限公司 智能交互方法、装置、电子设备及存储介质
CN111916082A (zh) * 2020-08-14 2020-11-10 腾讯科技(深圳)有限公司 语音交互方法、装置、计算机设备和存储介质
CN112740323A (zh) * 2020-12-26 2021-04-30 华为技术有限公司 一种语音理解方法及装置

Also Published As

Publication number Publication date
CN117334183A (zh) 2024-01-02

Similar Documents

Publication Publication Date Title
EP1774755B1 (en) Method and apparatus for enabling discovery and use of a service by a client device
JP4439920B2 (ja) 同時マルチモーダル通信セッションパーシスタンスのためのシステムおよび方法
EP1410171B1 (en) System and method for providing dialog management and arbitration in a multi-modal environment
US7137126B1 (en) Conversational computing via conversational virtual machine
WO2021135604A1 (zh) 语音控制方法、装置、服务器、终端设备及存储介质
WO2022247594A1 (zh) 一种页面呈现方法、装置、电子设备、计算机可读存储介质、及计算机程序产品
US9384073B2 (en) Cross-extension messaging using a browser as an intermediary
JP2005519363A (ja) 同時マルチモーダル通信システムおよび方法
US9680963B2 (en) In-vehicle web presentation
JP2005527020A (ja) 同時マルチモーダル・タグを使用する同時マルチモーダル通信システムおよび方法
CN109391676A (zh) 终端设备控制方法、终端设备及计算机可读存储介质
JP2020184298A (ja) 音声スキル作成方法及びシステム
WO2022134110A1 (zh) 一种语音理解方法及装置
WO2015085953A1 (zh) 启动智能电视中的浏览器的方法和装置
WO2023246609A1 (zh) 语音交互的方法、电子设备和语音助手开发平台
CN114827704A (zh) 与车辆的车载系统交互方法、存储介质和移动终端
KR101154717B1 (ko) 데이터 언어로 다수 언어들을 관리하기 위한 방법 및 장치
US20190213003A1 (en) Method, system and software application for developing mobile applications
JPH11203226A (ja) ハイパーテキスト保存装置及びハイパーテキスト保存装置制御プログラムを記憶した媒体
CN114816385B (zh) 一种异构系统的集成方法、装置和设备以及存储介质
CN113207042B (zh) 一种媒资播放方法及显示设备
JP7187017B2 (ja) 音声レビュー・ログデータ収集・分析システム
CN117524209A (zh) 车机语音交互方法、系统和存储介质
Chernomordov et al. Development of the Module «Version the Visually Impaired» for the Websites of Organizations
CN118233493A (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: 23826258

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2023826258

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2023826258

Country of ref document: EP

Effective date: 20240524