Speech processing method and apparatus, computer device, and computer-readable storage medium
Patent Information
- Application Number
- CN202310473219.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-27
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2043-04-27
AI Technical Summary
[0004]本发明的目的之一在于提供一种语音处理方法,以解决现有技术中的一个应用无法处理多个不同目标语音业务的问题;目的之二在于提供一种语音处理装置;目的之三在于提供一种计算机设备;目的之四在于提供一种计算机可读存储介质
[0030]利用监听参数将用户语音发送至目标应用,使得目标应用能够处理多个不同语音业务,进而提供用户需求的语音交互场景。
Smart Images

Figure CN116486795B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of speech processing technology, and specifically to a speech processing method, apparatus, computer device, and computer-readable storage medium. Background Technology
[0002] With the rapid development of voice recognition technology, more and more devices are being controlled via voice assistants. Taking in-vehicle voice assistants as an example, these assistants recognize and distribute user voice commands to target voice services such as navigation and communication, executing the actions corresponding to the user's voice commands to achieve intelligent vehicle control.
[0003] In real-world voice interaction scenarios, there are situations where a single application needs to handle multiple different target voice services. However, in-vehicle voice assistants only distribute user voice commands to the corresponding target voice service. Specifically, when the user requests navigation, the in-vehicle voice assistant distributes the user's voice to the navigation application, which then provides map navigation. When the user requests communication, the in-vehicle voice assistant distributes the user's voice to the communication application, not the navigation application. This distribution of user voice commands to specific target voice services prevents a single application from handling multiple different target voice services, resulting in the vehicle being unable to respond to user voice commands in voice interaction scenarios. Summary of the Invention
[0004] One objective of this invention is to provide a voice processing method to solve the problem that a single application in the prior art cannot handle multiple different target voice services; a second objective is to provide a voice processing device; a third objective is to provide a computer device; and a fourth objective is to provide a computer-readable storage medium.
[0005] To achieve the above objectives, firstly, this application provides a speech processing method, which includes:
[0006] Obtain the listening parameters of the target application, wherein the listening parameters include parameter information and callback interface of at least one target voice service;
[0007] Generate semantic information based on the acquired user speech;
[0008] Based on semantic information and parameter information of each target voice service, determine whether there are target voice services that need to be processed by the target application.
[0009] In cases where there is a target voice service that requires processing by the target application, semantic information is sent to the target application using a callback interface.
[0010] In embodiments of this application, the voice processing method further includes:
[0011] In the absence of a target voice service that requires processing by the target application, other applications that respond to the user's voice are identified based on semantic information, and the semantic information is sent to these other applications.
[0012] In the embodiments of this application, the parameter information includes the service name and service action of the target voice service. Based on the semantic information and the parameter information of each target voice service, it is determined whether there is a target voice service that needs to be processed by the target application, including:
[0013] The semantic information is matched with the service name and service action of each target voice service to determine whether there is a target voice service that needs to be processed by the target application.
[0014] In the embodiments of this application, the service name and service action of the target voice service constitute key-value pair data.
[0015] In embodiments of this application, the voice processing method further includes:
[0016] Respond to new voice service requests and obtain parameter information and callback interfaces for the new voice service;
[0017] Based on the parameter information and callback interface of the newly added voice service, update the listening parameters of the target application.
[0018] In the embodiments of this application, obtaining the listening parameters of the target application includes:
[0019] If the target application is detected to be running, obtain the target application's listening parameters.
[0020] In embodiments of this application, the voice processing method further includes:
[0021] If the target application is detected to be not running, release the target application's listening parameters.
[0022] Secondly, this application provides a voice processing apparatus, the apparatus comprising:
[0023] The parameter acquisition module is used to acquire the listening parameters of the target application, wherein the listening parameters include parameter information and callback interface of at least one target voice service;
[0024] The semantic information generation module is used to generate semantic information based on the acquired user speech;
[0025] The voice service determination module is used to determine whether there is a target voice service that needs to be processed by the target application, based on semantic information and parameter information of each target voice service.
[0026] The semantic information sending module is used to send semantic information to the target application using a callback interface when there is a target voice service that needs to be processed by the target application.
[0027] Thirdly, this application provides a computer device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the speech processing method of the first aspect.
[0028] Fourthly, this application provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the speech processing method as described in the first aspect.
[0029] The beneficial effects of this invention are:
[0030] By using monitoring parameters, user voice is sent to the target application, enabling the target application to handle multiple different voice services and thus provide the voice interaction scenarios required by the user. Attached Figure Description
[0031] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings:
[0032] Figure 1 A first flowchart of the speech processing method provided in this application embodiment is shown;
[0033] Figure 2 An application example diagram of the target application provided in the embodiments of this application is shown;
[0034] Figure 3 A second flowchart of the speech processing method provided in an embodiment of this application is shown;
[0035] Figure 4 A schematic diagram of the structure of the voice processing device provided in an embodiment of this application is shown. Detailed Implementation
[0036] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustrative and explanatory purposes only and are not intended to limit the scope of the present invention.
[0037] The components of the embodiments of the invention described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0038] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of the invention, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.
[0039] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0040] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of the invention pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be interpreted as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of the invention.
[0041] Existing technologies often fail to handle multiple distinct target voice services. For example, if the target application is a navigation app and provides contact information for a target device, a user might request communication with the target device via voice. The voice assistant obtains the semantic information corresponding to the communication voice service. Typically, the voice assistant sends the semantic information for the navigation voice service to the target application, but not the semantic information for the communication voice service. Instead, it sends the semantic information for the communication voice service to the communication app. Due to the information isolation between the communication app and the target application, the communication app cannot access the contact information provided by the target application. Consequently, the communication app cannot perform the action of communicating with the target device, making it unable to process the user's voice and thus unable to provide the voice interaction scenario the user requires.
[0042] Example 1
[0043] Please see Figure 1 , Figure 1A first flowchart of the speech processing method provided in an embodiment of this application is shown. Figure 1 The speech processing methods in the text include:
[0044] S110, obtain the listening parameters of the target application.
[0045] When a target application needs to handle multiple different voice services, the listening parameters of the target application are obtained. These listening parameters include parameter information and callback interfaces for at least one target voice service. It's important to understand that the type of target application is set according to actual needs and can be a navigation application, audio application, or communication application, etc., without limitation here. The type of target voice service is also set according to actual needs and can be a navigation voice service, audio voice service, or communication voice service, etc., without limitation here.
[0046] For ease of understanding, in the embodiments of this application, the target application is a navigation application, and the monitoring parameters include parameter information and callback interfaces for navigation voice services, as well as parameter information and callback interfaces for communication voice services. Typically, a voice assistant only sends the user's voice corresponding to the navigation voice service to the target application. By obtaining the monitoring parameters of the target application, the voice assistant can also send the user's voice corresponding to the communication voice service to the target application, enabling the target application to handle multiple different voice services and provide the voice interaction scenarios required by the user.
[0047] In the embodiments of this application, obtaining the listening parameters of the target application includes:
[0048] If the target application is detected to be running, obtain the target application's listening parameters.
[0049] If the target application is detected as running, it is determined that the target application needs to handle multiple different voice services. The monitoring parameters of the target application are obtained to further determine the target voice services that the target application needs to handle.
[0050] In embodiments of this application, the voice processing method further includes:
[0051] If the target application is detected to be not running, release the target application's listening parameters.
[0052] If the target application is detected as running, it is determined that the target application does not need to handle multiple different voice services, and the target application's listening parameters are released. It's important to understand that after releasing the target application's listening parameters, the application responding to the user's voice is determined based on semantic information, avoiding the mis-sending of semantic information to the target application and thus preventing the provision of incorrect voice interaction scenarios.
[0053] S120 generates semantic information based on the acquired user voice.
[0054] Please see Figure 2 , Figure 2 An application example diagram of the target application provided in the embodiments of this application is shown.
[0055] When a user needs the target application 210 to handle voice services, the user sends their voice to the voice assistant 220 via a microphone or other interactive device. The voice assistant 220 then sends the user's voice to the voice engine 230. The voice engine 230 generates semantic information based on the user's voice and sends the semantic information to the voice assistant 220. The voice assistant 220 then sends the semantic information to the target application 210. The target application 210 responds to the semantic information, executes the action corresponding to the user's voice, and thus provides the voice interaction scenario requested by the user.
[0056] S130, based on semantic information and parameter information of each target voice service, determines whether there is a target voice service that needs to be processed by the target application.
[0057] Semantic information is information that can be recognized and processed by computer devices. Based on the semantic information and the parameter information of each target voice service, it is determined whether there is a target voice service that needs to be processed by the target application. Specifically, if the parameter information of a target voice service that matches the semantic information exists, it is determined that there is a target voice service that needs to be processed by the target application. If the parameter information of a target voice service that does not match the semantic information does not exist, it is determined that there is no target voice service that needs to be processed by the target application.
[0058] In the embodiments of this application, the parameter information includes the service name and service action of the target voice service. Based on the semantic information and the parameter information of each target voice service, it is determined whether there is a target voice service that needs to be processed by the target application, including:
[0059] The semantic information is matched with the service name and service action of each target voice service to determine whether there is a target voice service that needs to be processed by the target application.
[0060] Based on semantic information, the requested voice service is determined. The requested voice service is compared with each target voice service by name, and the requested voice service is also compared with each target voice service by action, to determine if a matching target voice service exists. If a matching target voice service exists, then a target voice service requiring processing by the target application exists. If no matching target voice service exists, then no target voice service requiring processing by the target application exists.
[0061] In the embodiments of this application, the service name and service action of the target voice service constitute key-value pair data.
[0062] Taking an audio voice service as an example, the service action could be playing audio, meaning there's a relationship between the service name and the service action. We obtain the service name and service action for each target voice service, using the service name as the key and the service action as the value, creating key-value pairs. Based on the service name of the target voice service, we can quickly determine its service action, and thus quickly determine if a target voice service exists that requires processing by the target application.
[0063] S140: In the case of a target voice service that needs to be processed by the target application, the semantic information is sent to the target application using the callback interface.
[0064] When a target application needs to handle a specific voice service, the system intercepts the user's voice and sends semantic information to the target application via a callback interface. The target application then processes the user's voice. Because the user's voice is intercepted, the voice assistant is prevented from using semantic information to determine which other applications should respond to the user's voice and distribute the semantic information to those applications. This allows the target application to handle multiple different voice services. It's important to understand that after sending the semantic information to the target application via the callback interface, the distribution of the user's voice is stopped to prevent other applications from mistakenly responding to the user's voice, thus ensuring the voice interaction scenario that the user requires is provided.
[0065] In the embodiments of this application, when the target application is a navigation application, after the voice assistant obtains the user's voice corresponding to the communication voice service, it does not directly send the user's voice corresponding to the communication voice service to the communication application. Instead, it intercepts the user's voice and determines whether there is a target voice service that needs to be processed by the target application. If there is a target voice service that needs to be processed by the target application, it uses a callback interface to send semantic information to the target application, and then the target application processes the communication voice service and performs actions to communicate with the target device.
[0066] Please see Figure 3 , Figure 3 A second flowchart of the speech processing method provided in an embodiment of this application is shown.
[0067] In embodiments of this application, the voice processing method further includes:
[0068] S150: In the absence of a target voice service that requires processing by the target application, based on semantic information, determine other applications that respond to the user's voice and send the semantic information to the other applications.
[0069] If no target voice service requires processing by the target application, it is determined that the target application is not needed for the current user voice interaction. Based on semantic information, other applications responding to the user voice are identified, and the semantic information is sent to these other applications. Taking a user voice requesting audio playback as an example, the requested voice service is determined to be an audio voice service based on semantic information. The audio application corresponding to the audio voice service is obtained, and the semantic information is sent to the audio application. If no target voice service requires processing by the target application, the semantic information is sent to other applications to ensure the normal distribution of the user's voice, thereby providing the voice interaction scenario required by the user.
[0070] In embodiments of this application, the voice processing method further includes:
[0071] Respond to new voice service requests and obtain parameter information and callback interfaces for the new voice service;
[0072] Based on the parameter information and callback interface of the newly added voice service, update the listening parameters of the target application.
[0073] A listener is registered based on the listening parameters of the target application. After generating semantic information based on the user's voice, the listener is used to determine whether the semantic information needs to be sent to the target application. In the embodiments of this application, the listening parameters include parameter information and callback interface for navigation voice service, as well as parameter information and callback interface for communication voice service. When the target application is running, the semantic information of navigation voice service and the semantic information of communication voice service are sent to the target application.
[0074] Semantic information for audio voice services is not sent to the target application. For ease of understanding, in this embodiment, the newly added voice service is referred to as an audio voice service. In response to a request to add a voice service, the parameter information and callback interface of the new voice service are obtained. Based on the parameter information and callback interface of the new voice service, the listening parameters of the target application are updated, enabling the target application to handle navigation voice services, communication voice services, and audio voice services. Typically, voice assistants determine the voice services handled by the target application based on a preset data table. When the voice services handled by the target application change, the voice assistant needs to be updated again. In this embodiment, by updating the listening parameters, the voice services that the target application can handle are expanded without updating the voice assistant, facilitating the expansion of the target application.
[0075] This application provides a voice processing method, comprising: acquiring monitoring parameters of a target application, wherein the monitoring parameters include parameter information and a callback interface for at least one target voice service; generating semantic information based on the acquired user voice; determining, based on the semantic information and the parameter information of each target voice service, whether there is a target voice service that needs to be processed by the target application; and, if there is a target voice service that needs to be processed by the target application, sending the semantic information to the target application using the callback interface. By using the monitoring parameters to send the user voice to the target application, the target application can process multiple different voice services, thereby providing the voice interaction scenarios required by the user.
[0076] Example 2
[0077] Please see Figure 4 , Figure 4 A schematic diagram of the structure of the voice processing device provided in an embodiment of this application is shown. Figure 4 The voice processing device 300 includes:
[0078] The parameter acquisition module 310 is used to acquire the listening parameters of the target application, wherein the listening parameters include parameter information and callback interface of at least one target voice service.
[0079] The semantic information generation module 320 is used to generate semantic information based on the acquired user speech;
[0080] The voice service determination module 330 is used to determine whether there is a target voice service that needs to be processed by the target application based on semantic information and parameter information of each target voice service.
[0081] The semantic information sending module 340 is used to send semantic information to the target application using a callback interface when there is a target voice service that needs to be processed by the target application.
[0082] In embodiments of this application, the voice processing device 300 further includes:
[0083] The Other Application Sending Module is used to determine other applications that respond to user voice based on semantic information when there is no target voice service that requires the target application to process, and to send the semantic information to the other applications.
[0084] In the embodiments of this application, the parameter information includes the service name and service action of the target voice service. The voice service determination module 330 is also used to match the semantic information with the service name and service action of each target voice service to determine whether there is a target voice service that needs to be processed by the target application.
[0085] In the embodiments of this application, the service name and service action of the target voice service constitute key-value pair data.
[0086] In embodiments of this application, the voice processing device 300 further includes:
[0087] A new request and response module has been added to respond to new requests for voice services and obtain parameter information and callback interfaces for the new voice services.
[0088] The monitoring parameter update module is used to update the monitoring parameters of the target application based on the parameter information and callback interface of the newly added voice service.
[0089] In the embodiments of this application, the parameter acquisition module 310 includes:
[0090] If the target application is detected to be running, obtain the target application's listening parameters.
[0091] In embodiments of this application, the voice processing device 300 further includes:
[0092] If the target application is detected to be not running, release the target application's listening parameters.
[0093] The voice processing device 300 is used to execute the corresponding steps in the above-described voice processing method. The specific implementation of each function will not be described in detail here. In addition, the optional examples in Embodiment 1 are also applicable to the voice processing device 300 in Embodiment 2.
[0094] This application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the voice processing method as described in Embodiment 1.
[0095] In this embodiment, the parameter acquisition module 310, semantic information generation module 320, voice service determination module 330, and semantic information sending module 340 are all stored as program units in the memory, and the processor executes the above program units stored in the memory to realize the corresponding functions.
[0096] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters can address the problem that an application in existing technologies cannot handle multiple different target voice services.
[0097] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0098] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the speech processing method as described in Embodiment 1.
[0099] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0100] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0101] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0102] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0103] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0104] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0105] Computer-readable storage media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0106] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0107] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A speech processing method, characterized in that, The method includes: If the target application being monitored is detected to be running, obtain the service names and service actions of multiple target voice services included in the target application, as well as the callback interface of the target application. Based on the acquired user voice, semantic information is generated, and based on the semantic information, the voice service requested by the user is determined. The user-requested voice service is matched with the service name and service action of each target voice service to determine whether there are multiple target voice services that match the user-requested voice service. If there are multiple target voice services that match the voice service requested by the user, it is determined that there are multiple target voice services that need to be processed by the target application. In the case where there are multiple target voice services that the target application needs to process, the semantic information is sent to the target application using the callback interface so that the target application can process multiple different target voice services.
2. The speech processing method according to claim 1, characterized in that, The method further includes: In the absence of a target voice service that requires the target application to process, other applications that respond to the user's voice are determined based on the semantic information, and the semantic information is sent to the other applications.
3. The speech processing method according to claim 1, characterized in that, The service name and the service action of the target voice service constitute key-value pair data.
4. The speech processing method according to claim 1, characterized in that, The method further includes: In response to a request to add a voice service, obtain the parameter information and callback interface of the new voice service; the parameter information of the new voice service includes the service name and service action of the new voice service; Based on the parameter information and callback interface of the newly added voice service, update the service name and service action of the multiple target voice services included in the target application, as well as the callback interface of the target application.
5. The speech processing method according to claim 1, characterized in that, The method further includes: If the target application is detected to be not running, release the service names and service actions of multiple target voice services included in the target application, as well as the callback interface of the target application.
6. A voice processing device, characterized in that, The device includes: The parameter acquisition module is used to acquire the service names and service actions of multiple target voice services included in the target application, as well as the callback interface of the target application, when the target application being monitored is detected to be running. The semantic information generation module is used to generate semantic information based on the acquired user voice, and to determine the voice service requested by the user based on the semantic information. The voice service determination module is used to match the voice service requested by the user with the service name and service action of each target voice service to determine whether there are multiple target voice services that match the voice service requested by the user; if there are multiple target voice services that match the voice service requested by the user, it is determined that there are multiple target voice services that need to be processed by the target application. The semantic information sending module is used to send the semantic information to the target application using the callback interface when there are multiple target voice services that the target application needs to process, so that the target application can process multiple different target voice services.
7. A computer device, characterized in that, The computer device includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements the speech processing method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the speech processing method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Voice understanding method and device
CN112740323A