Voice interaction method and device, medium, equipment and computer program product

By introducing output nodes to independently configure speech and timbre in the intelligent agent operation chain, speech synthesis tasks are generated and added to the task queue, solving the problems of inflexible timbre switching and inaccurate speech output in the existing technology. This enables flexible adaptation to multi-role dialogue and emotional expression, and improves the diversity and accuracy of voice interaction.

CN120977282APending Publication Date: 2025-11-18BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511295030.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-10
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

In existing intelligent agent voice interaction systems, switching voice timbre requires updating the global configuration, which lacks flexibility, cannot adapt to multi-role dialogue and emotional expression, and the voice output is not diverse or accurate enough.

Method used

By introducing an output node into the agent's operational chain, and independently configuring whether to generate speech and timbre, speech synthesis tasks are generated and added to the task queue, ensuring the order and accuracy of speech output.

Benefits of technology

It improves the flexibility of voice switching configuration, broadens the scope of application, enhances the immersiveness and diversity of interaction, and ensures the accuracy and timely response of voice output.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120977282A_ABST
    Figure CN120977282A_ABST
Patent Text Reader

Abstract

A voice interaction method, apparatus, medium, device and computer program product, the method comprising: in response to an intelligent agent running to an output node, determining a text corresponding to the output node; if voice is determined to be generated based on the configuration information of the output node, determining a tone corresponding to the output node; determining a speech synthesis task corresponding to the text based on the tone, and adding the speech synthesis task to a task queue; and outputting target voice corresponding to the voice synthesis tasks according to the sequence of the voice synthesis tasks in the task queue. Therefore, the content needing to be output is output through the output node in the operation link of the intelligent agent, so that different output nodes can independently configure whether voice needs to be generated or not and the timbre required when the voice is generated, and the flexibility of timbre switching configuration is improved; and moreover, the accuracy of the text sequence when the intelligent body switches the output texts with different timbres can be ensured, and the accuracy of the output voice is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more specifically, to a voice interaction method, apparatus, medium, device, and computer program product. Background Technology

[0002] With the development of artificial intelligence technology, intelligent agents have been widely applied in various fields such as customer service, intelligent assistants, and content generation. In human-computer interaction scenarios, voice dialogue, with its natural and efficient characteristics, has become an increasingly mainstream interaction method. Currently, intelligent agent voice interaction systems typically use a unified text-to-speech (TTS) service for voice interaction. Specifically, after completing its internal logic (such as information querying and business processing), the intelligent agent sends the text content to be read to a speech synthesis engine. The speech synthesis engine then uses the system's preset speech synthesis configuration information to convert the text into speech and output it to the user, resulting in a single tone for the output voice interaction. Summary of the Invention

[0003] This summary section is provided to briefly introduce the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, this disclosure provides a voice interaction method, the method comprising: In response to the agent reaching an output node, the text corresponding to the output node is determined, and the agent's execution chain includes at least one output node; If the generation of speech is determined based on the configuration information of the output node, then the timbre corresponding to the output node is determined; Based on the timbre, determine the speech synthesis task corresponding to the text, and add the speech synthesis task to the task queue; Output the target speech corresponding to the speech synthesis task according to the order of the speech synthesis tasks in the task queue.

[0005] Secondly, this disclosure provides a voice interaction device, the device comprising: The first determining module is used to determine the text corresponding to the output node in response to the agent running to the output node, wherein the agent's running chain includes at least one output node; The second determining module is used to determine the timbre corresponding to the output node if it is determined that speech will be generated based on the configuration information of the output node. The first processing module is used to determine the speech synthesis task corresponding to the text based on the timbre, and add the speech synthesis task to the task queue; The second processing module is used to output the target speech corresponding to the speech synthesis task according to the order of the speech synthesis tasks in the task queue.

[0006] Thirdly, this disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect.

[0007] Fourthly, this disclosure provides an electronic device, comprising: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the method described in the first aspect.

[0008] Fifthly, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in the first aspect.

[0009] In the above technical solution, by outputting the required content through output nodes in the agent's operational chain, different output nodes can be independently configured to determine whether to generate speech and the required timbre for speech generation. This improves the flexibility of timbre switching configuration and avoids the problem in related technologies where the agent's global configuration needs to be updated to switch output timbres. Furthermore, it enables the agent to output speech with multiple timbres, broadening the applicability of this method. For example, it can be adapted to complex scenarios simulating multi-role dialogue, expressing different emotions, or distinguishing different information types (such as system prompt timbre and business content timbre), enhancing the immersiveness of the interaction and increasing the diversity of the agent's voice interaction. Moreover, by adding the text-to-speech synthesis task from the output nodes to the task queue, the accuracy of the text order when the agent switches between different timbres for text output can be guaranteed, improving the accuracy of the output speech.

[0010] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description

[0011] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 This is a flowchart of a voice interaction method provided according to one embodiment of the present disclosure.

[0012] Figure 2 This is a schematic diagram of the operational chain of an intelligent agent provided according to one embodiment of the present disclosure.

[0013] Figure 3 This is a schematic diagram of a task queue provided according to one embodiment of the present disclosure.

[0014] Figure 4 This is a flowchart of a voice interaction method provided according to one embodiment of the present disclosure.

[0015] Figure 5 This is a block diagram of a voice interaction device provided according to one embodiment of the present disclosure.

[0016] Figure 6 A schematic diagram of the structure of an electronic device suitable for implementing embodiments of the present disclosure is shown. Detailed Implementation

[0017] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0018] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0019] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0020] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0021] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0022] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0023] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0024] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0025] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0026] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0027] Meanwhile, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0028] Figure 1 The diagram shown is a flowchart of a voice interaction method provided according to an embodiment of this disclosure. Figure 1 As shown, the method may include: In step 11, in response to the agent running to an output node, the text of the output node is determined, wherein the agent's running chain includes at least one output node.

[0029] The internal processing logic of the intelligent agent for data processing can be pre-programmed by relevant personnel to obtain the agent's operational chain. In practical applications, some nodes in the operational chain may need to output content, or the output of corresponding content may be configured when running to a certain node in the chain, or the output of corresponding content may be required after a certain node completes its operation. Therefore, for the content that needs to be output in the intelligent agent's operational chain, the programmator can configure output nodes in the operational chain to enable the intelligent agent to output the corresponding content during the operation of the chain.

[0030] In step 12, if it is determined that speech will be generated based on the configuration information of the output node, then the timbre corresponding to the output node is determined.

[0031] In practical applications, the output of an output node can be either text or speech, and can be pre-configured based on actual usage requirements. Accordingly, in this embodiment, the configuration information of the output node can determine whether speech generation is needed. If speech generation is not required, the text can be output directly. If speech generation is required, the corresponding timbre of the output node can be further determined. In this embodiment, the editor can configure the type and timbre of the output node's content output when configuring the output node.

[0032] As an example, the configuration information of the output node may include a synthesized speech identifier and a timbre identifier. The synthesized speech identifier is used to indicate whether the output node generates speech, and the timbre identifier is used to indicate the timbre of the speech synthesis performed by the output node.

[0033] For example, when configuring output node A1, if it is configured to generate speech and the timbre selection is set to Y1, then the synthesized speech identifier in its configuration information can be represented as 1 and the timbre identifier as Y1. Based on this configuration information, it can be determined that output node A1 needs to generate speech and the timbre is the timbre indicated by Y1.

[0034] For output node A2, when configuring it, if it is configured not to generate speech, then the synthesized speech identifier in its configuration information can be represented as 0, and the timbre identifier can be an empty value. Based on this configuration information, it can be determined that output node A2 does not need to generate speech, and text can be directly output at output node A2.

[0035] It should be noted that the values ​​of the identifiers in the above configuration information are merely illustrative examples and do not limit this disclosure. For example, the synthesized speech identifier can be empty when no speech generation is required, or the value of the synthesized speech identifier is used to indicate whether speech is synthesized. If the configuration information also includes a text identifier for whether to directly output text, then when it is determined that speech generation is required, the synthesized speech identifier is 1 and the text identifier is 0.

[0036] In step 13, the speech synthesis task corresponding to the text is determined based on the timbre, and the speech synthesis task is added to the task queue.

[0037] As an example, a speech synthesis task can be generated based on the timbre and text corresponding to the output node, and added to the end of the task queue to ensure the accuracy of the text order for each speech synthesis task in the task queue. This speech synthesis task contains the text to be synthesized and the timbre to be used.

[0038] In step 14, the target speech corresponding to the speech synthesis task is output according to the order of the speech synthesis tasks in the task queue.

[0039] In this step, speech synthesis tasks can be retrieved from the task queue in real time. For example, speech synthesis tasks can be retrieved in the order of first-in-first-out in the task queue and speech synthesis can be performed to obtain the target speech corresponding to the speech synthesis task and output it, so that the agent can output speech with multiple timbres during operation.

[0040] In the above technical solution, by outputting the required content through output nodes in the agent's operational chain, different output nodes can be independently configured to determine whether to generate speech and the required timbre for speech generation. This improves the flexibility of timbre switching configuration and avoids the problem in related technologies where the agent's global configuration needs to be updated to switch output timbres. Furthermore, it enables the agent to output speech with multiple timbres, broadening the applicability of this method. For example, it can be adapted to complex scenarios simulating multi-role dialogue, expressing different emotions, or distinguishing different information types (such as system prompt timbre and business content timbre), enhancing the immersiveness of the interaction and increasing the diversity of the agent's voice interaction. Moreover, by adding the text-to-speech synthesis task from the output nodes to the task queue, the accuracy of the text order when the agent switches between different timbres for text output can be guaranteed, improving the accuracy of the output speech.

[0041] In some possible embodiments, determining the timbre corresponding to the output node may include: If the output node is associated with a timbre identifier, then the timbre indicated by the timbre identifier is used as the timbre corresponding to the output node.

[0042] When configuring an output node, if the user configures the required timbre for that output node, the configuration information of that output node will contain a corresponding timbre identifier, such as timbre Y1. In this case, the specified timbre Y1 can be directly used as the timbre corresponding to that output node.

[0043] If the output node is not associated with a timbre identifier, then the default timbre corresponding to the agent will be used as the timbre corresponding to the output node.

[0044] As an example, when configuring an output node, if the user configures the output node to generate speech but does not configure the required timbre, the timbre identifier in the configuration information of the output node will be empty. In this case, it is considered that the output node is not associated with a timbre identifier, and the default timbre configured by the agent can be used as the timbre corresponding to the output node.

[0045] Therefore, the required timbre of the output node can be determined through the configuration information of the output node to ensure the correspondence between the text and timbre of the output node. The output node is configured independently, thereby avoiding the problem of content and timbre mismatch that may occur when the timbre is dynamically switched, and ensuring the accuracy of subsequent speech synthesis.

[0046] In some possible embodiments, the speech synthesis task of determining the text based on the timbre may include: If the output node is the first output node executed, then a speech synthesis task is generated based on the text, and the speech synthesis task is added to the task queue.

[0047] like Figure 2 As shown, the agent's execution chain contains multiple output nodes S1-S4. The agent can execute each node sequentially based on its execution order. If it first executes output node S1, and the timbre of output node S1 is Y1 and the text is T1, then it can generate a speech synthesis task X1 based on the timbre Y1 and the text T1, and add it to the task queue, as shown. Figure 3 As shown.

[0048] If the output node is not the first output node, then determine whether the timbre is the same as the timbre of the target task, where the target task is the last speech synthesis task in the task queue; If the timbre is the same as the timbre corresponding to the target task, then the text is added to the text of the target task; If the timbre is different from the timbre corresponding to the target task, then a speech synthesis task is generated based on the text, and the speech synthesis task is added to the task queue.

[0049] Afterwards, the agent continues to run along the execution path, reaching output node S2. The voice of output node S2 is Y1, and the text is T2. At this point, the last speech synthesis task in the task queue is X1, with the voice Y1, the same as that of output node S2. At this stage, there's no need to generate a new speech synthesis task; instead, the text T2 from output node S2 can be directly added to speech synthesis task X1, such as by concatenating text T2 after text T1 in speech synthesis task X1. Then, it runs to output node S3, with the voice Y2 and the text T3. The last speech synthesis task in the task queue is X1, with the voice Y1, which is different from that of output node S3. At this point, a new speech synthesis task needs to be generated. Speech synthesis task X2 can be generated based on the voice Y2 and the text T3 and added to the task queue, such as... Figure 3 As shown. Next, the process runs to output node S4, where the timbre is Y1 and the text is T4. At this point, the last speech synthesis task in the task queue is X2, with the timbre Y2, which is different from that of output node S4. Therefore, a new speech synthesis task needs to be generated. This task can be X3, based on the timbre Y1 and the text T4, and added to the task queue, as shown. Figure 3 As shown.

[0050] Therefore, through the above technical solution, text from output nodes with the same timbre can be synthesized into speech through the same speech synthesis task. When a timbre is switched, a new speech synthesis task is generated and added to the task queue so that speech is output in the order of the task queue. This avoids the problems that occur when text with different timbres is sent to the speech synthesis service in sequence, such as network latency and service processing speed, resulting in the later synthesized speech segment returning before the earlier synthesized segment, or speech confusion, disorder, or interruption at the switching boundary. It also avoids the problem of out-of-order speech synthesis results due to timbre switching during speech task synthesis, ensuring that all speech segments are synthesized and played strictly in the order of business logic and with the specified timbre, thus improving the accuracy of speech synthesis.

[0051] In some possible embodiments, the target task is the task indicated by a task pointer, which is initially null and used to quickly determine the target task in the task queue. Accordingly, the method further includes: In response to the addition of a new speech synthesis task to the task queue, the task pointer is updated to indicate the newly added speech synthesis task.

[0052] Initially, this task pointer is null. Once speech synthesis task X1 is added to the task queue, the task pointer is updated to point to speech synthesis task X1, as shown below. Figure 3As shown in P1. When speech synthesis task X2 is added to the task queue, the task pointer is updated to point to speech synthesis task X2, as follows. Figure 3 As shown in P2, when the process reaches output node S4, the target task can be directly determined as speech synthesis task X2 based on the task pointer. Therefore, by comparing the timbre of output node S4 with the timbre of speech synthesis task X2, it can be determined whether a new speech synthesis task needs to be generated. When speech synthesis task X3 is added to the task queue, the task pointer is updated to point to speech synthesis task X3, as shown in P2. Figure 3 As shown on page 3.

[0053] Therefore, the task pointer can record the last speech synthesis task in the task queue in real time, providing a reference for determining whether a new speech synthesis task needs to be generated, and ensuring the orderliness and accuracy of speech synthesis tasks in the task queue.

[0054] In some possible embodiments, outputting the target speech corresponding to the speech synthesis task according to the order of the speech synthesis tasks in the task queue may include: Based on the task queue, speech synthesis tasks are obtained sequentially in a first-in-first-out order; Based on the timbre corresponding to the speech synthesis task, the text in the speech synthesis task is synthesized into speech to obtain the target speech. Output the target speech.

[0055] like Figure 3 The task queue shown can retrieve speech synthesis tasks sequentially in a first-in-first-out (FIFO) order for speech synthesis. Figure 3 The arrows shown in the middle (L) follow the order of inputting text (T1+T2) and voice (Y1) from speech synthesis task X1 into the speech synthesis model to obtain and output the target speech of task X1. Next, text (T3) and voice (Y2) from task X2 are input into the speech synthesis model to obtain and output the target speech of task X2. Finally, text (T4) and voice (Y1) from task X3 are input into the speech synthesis model to obtain and output the target speech of task X3.

[0056] Therefore, speech synthesis can be performed sequentially based on the order of speech synthesis tasks in the task queue, and the target speech can be output. While outputting multi-tone speech dialogue, the accuracy of the order between the output multi-tone speech segments can be guaranteed.

[0057] In some possible embodiments, outputting the target speech corresponding to the speech synthesis task according to the order of the speech synthesis tasks in the task queue may include: The timbre of each speech synthesis task in the task queue is determined, and the target speech corresponding to the speech synthesis task is obtained through the speech synthesis model corresponding to the timbre.

[0058] In this embodiment, such as Figure 3 As shown, speech synthesis tasks X1, X2, and X3 can be obtained from the task queue. The timbre of speech synthesis tasks X1 and X3 is Y1, and the timbre of speech synthesis task X2 is Y2. Then, speech synthesis tasks X1 and X3 are sent to the speech synthesis model corresponding to timbre Y1, and speech synthesis task X2 is sent to the speech synthesis model corresponding to timbre Y2, so as to perform speech synthesis processing respectively and obtain the target speech corresponding to each speech synthesis task.

[0059] Based on the task queue, the target speech corresponding to the speech synthesis task is output sequentially in a first-in-first-out order.

[0060] In this step, you can follow Figure 3 The task queue shown outputs the target speech for speech synthesis tasks X1, X2, and X3 in sequence, ensuring the ordered nature of the output target speech. Furthermore, speech synthesis tasks with different timbres can be processed in parallel, further improving the efficiency of speech synthesis, enhancing the timeliness of voice interaction, and improving the user experience.

[0061] like Figure 4 The diagram shows a flowchart of a voice interaction method based on another embodiment of this disclosure. This voice interaction method can be implemented based on the execution operations of an execution layer, a voice processing layer, and a voice synthesis layer. In the execution layer, the agent runs according to its execution chain. When it reaches an output node, it determines the text and configuration information of the output node and sends them to the voice processing layer for processing. Accordingly, the voice processing layer determines whether the output node generates speech, and if it determines that speech needs to be generated, it determines the required timbre. Then, it further determines whether the timbre of the output node is the same as the timbre of the target task. If they are the same, the text of the output node is merged into the target task; if they are different, a new voice synthesis task is created and added to the task queue, while the task pointer is updated. The voice synthesis layer can pull voice synthesis tasks from the task queue in real time. If the task queue is not empty, it pulls a voice synthesis task from the head of the task queue and performs voice synthesis based on the timbre and text of the voice synthesis task to obtain the target speech and output it. It should be noted that the speech processing layer can add or update speech synthesis tasks to the task queue in real time, and the speech synthesis layer can pull speech synthesis tasks from the task queue in real time to ensure the real-time execution of speech synthesis tasks. The specific implementation methods of the above steps have been described in detail above and will not be repeated here.

[0062] Based on the same inventive concept, this disclosure also provides a voice interaction device, such as... Figure 5 As shown, the device 10 includes: The first determining module 100 is used to determine the text corresponding to the output node in response to the intelligent agent running to the output node, wherein the intelligent agent's running chain includes at least one output node; The second determining module 200 is used to determine the timbre corresponding to the output node if it is determined that speech will be generated based on the configuration information of the output node. The first processing module 300 is used to determine the speech synthesis task corresponding to the text based on the timbre, and add the speech synthesis task to the task queue; The second processing module 400 is used to output the target speech corresponding to the speech synthesis task according to the order of the speech synthesis tasks in the task queue.

[0063] Optionally, the first processing module includes: The first generation submodule is used to generate a speech synthesis task based on the text if the output node is the first output node executed, and add the speech synthesis task to the task queue. The first determining submodule is used to determine whether the timbre is the same as the timbre of the target task if the output node is not the first output node, wherein the target task is the last speech synthesis task in the task queue; A processing submodule is used to add the text to the text of the target task if the timbre is the same as the timbre corresponding to the target task. The second generation module is used to generate a speech synthesis task based on the text if the timbre is different from the timbre corresponding to the target task, and add the speech synthesis task to the task queue.

[0064] Optionally, the target task is the task indicated by the task pointer, which is initially empty; The device further includes: An update module is used to update the task pointer to indicate the newly added speech synthesis task in response to the addition of a new speech synthesis task to the task queue.

[0065] Optionally, the second processing module includes: The acquisition submodule is used to acquire speech synthesis tasks sequentially in a first-in-first-out order based on the task queue. The first synthesis submodule is used to perform speech synthesis on the text in the speech synthesis task based on the timbre corresponding to the speech synthesis task, so as to obtain the target speech. The first output submodule is used to output the target speech.

[0066] Optionally, the second processing module includes: The second synthesis submodule is used to determine the timbre of the speech synthesis tasks in the task queue, and obtain the target speech corresponding to the speech synthesis task through the speech synthesis model corresponding to the timbre. The second output submodule is used to output the target speech corresponding to the speech synthesis task in a first-in-first-out order based on the task queue.

[0067] Optionally, the configuration information of the output node includes a synthesized speech identifier and a timbre identifier. The synthesized speech identifier is used to indicate whether the output node generates speech, and the timbre identifier is used to indicate the timbre of the output node for speech synthesis.

[0068] Optionally, the second determining module includes: The second determining submodule is used to take the timbre indicated by the timbre identifier as the timbre corresponding to the output node if the output node is associated with a timbre identifier. The third determining submodule is used to use the default timbre corresponding to the agent as the timbre corresponding to the output node if the output node is not associated with a timbre identifier.

[0069] The following is for reference. Figure 6 The diagram illustrates a structural schematic of an electronic device (e.g., a terminal device or a server) 600 suitable for implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0070] like Figure 6 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0071] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0072] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.

[0073] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0074] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0075] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0076] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: determine the text corresponding to the output node in response to the agent running to an output node, wherein the agent's execution chain includes at least one output node; if speech generation is determined based on the configuration information of the output node, determine the timbre corresponding to the output node; determine the speech synthesis task corresponding to the text based on the timbre, and add the speech synthesis task to a task queue; and output the target speech corresponding to the speech synthesis task in the order of the speech synthesis tasks in the task queue.

[0077] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0078] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0079] The modules described in the embodiments of this disclosure can be implemented in software or in hardware. The names of the modules do not necessarily limit the module itself; for example, the first determining module can also be described as "a module that determines the text corresponding to the output node in response to the agent running to the output node".

[0080] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.

[0081] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0082] According to one or more embodiments of this disclosure, Example 1 provides a voice interaction method, the method comprising: In response to the agent reaching an output node, the text corresponding to the output node is determined, and the agent's execution chain includes at least one output node; If the generation of speech is determined based on the configuration information of the output node, then the timbre corresponding to the output node is determined; Based on the timbre, determine the speech synthesis task corresponding to the text, and add the speech synthesis task to the task queue; Output the target speech corresponding to the speech synthesis task according to the order of the speech synthesis tasks in the task queue.

[0083] According to one or more embodiments of this disclosure, Example 2 provides the method of Example 1, wherein the speech synthesis task corresponding to the text based on the timbre includes: If the output node is the first output node executed, then a speech synthesis task is generated based on the text, and the speech synthesis task is added to the task queue; If the output node is not the first output node, then determine whether the timbre is the same as the timbre of the target task, where the target task is the last speech synthesis task in the task queue; If the timbre is the same as the timbre corresponding to the target task, then the text is added to the text of the target task; If the timbre is different from the timbre corresponding to the target task, then a speech synthesis task is generated based on the text, and the speech synthesis task is added to the task queue.

[0084] According to one or more embodiments of this disclosure, Example 3 provides the method of Example 2, wherein the target task is a task indicated by a task pointer, and the task pointer is initially empty; The method further includes: In response to the addition of a new speech synthesis task to the task queue, the task pointer is updated to indicate the newly added speech synthesis task.

[0085] According to one or more embodiments of this disclosure, Example 4 provides the method of Example 1, wherein outputting the target speech corresponding to the speech synthesis task according to the order of the speech synthesis tasks in the task queue includes: Based on the task queue, speech synthesis tasks are obtained sequentially in a first-in-first-out order; Based on the timbre corresponding to the speech synthesis task, the text in the speech synthesis task is synthesized into speech to obtain the target speech. Output the target speech.

[0086] According to one or more embodiments of this disclosure, Example 5 provides the method of Example 1, wherein outputting the target speech corresponding to the speech synthesis task according to the order of the speech synthesis tasks in the task queue includes: The timbre of each speech synthesis task in the task queue is determined, and the target speech corresponding to the speech synthesis task is obtained through the speech synthesis model corresponding to the timbre. Based on the task queue, the target speech corresponding to the speech synthesis task is output sequentially in a first-in-first-out order.

[0087] According to one or more embodiments of this disclosure, Example 6 provides the method of Example 1, wherein the configuration information of the output node includes a synthesized speech identifier and a timbre identifier, the synthesized speech identifier being used to indicate whether the output node generates speech, and the timbre identifier being used to indicate the timbre of the output node for speech synthesis.

[0088] According to one or more embodiments of this disclosure, Example 7 provides the method of Example 6, wherein determining the timbre corresponding to the output node includes: If the output node is associated with a timbre identifier, then the timbre indicated by the timbre identifier is used as the timbre corresponding to the output node; If the output node is not associated with a timbre identifier, then the default timbre corresponding to the agent will be used as the timbre corresponding to the output node.

[0089] According to one or more embodiments of this disclosure, Example 8 provides a voice interaction device, the device comprising: The first determining module is used to determine the text corresponding to the output node in response to the agent running to the output node, wherein the agent's running chain includes at least one output node; The second determining module is used to determine the timbre corresponding to the output node if it is determined that speech will be generated based on the configuration information of the output node. The first processing module is used to determine the speech synthesis task corresponding to the text based on the timbre, and add the speech synthesis task to the task queue; The second processing module is used to output the target speech corresponding to the speech synthesis task according to the order of the speech synthesis tasks in the task queue.

[0090] According to one or more embodiments of the present disclosure, Example 9 provides a computer-readable medium having a computer program stored thereon that, when executed by a processing device, implements the steps of the method described in any one of Examples 1-7.

[0091] According to one or more embodiments of this disclosure, Example 10 provides an electronic device, including: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of any one of the methods in Examples 1-7.

[0092] According to one or more embodiments of the present disclosure, Example 11 provides a computer program product including a computer program that, when executed by a processor, implements the steps of the method described in any one of Examples 1-7.

[0093] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0094] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0095] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative forms of implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which the various modules perform their operations has been described in detail in the embodiments relating to the method, and will not be elaborated upon here.

Claims

1. A voice interaction method, characterized in that, The method includes: In response to the agent reaching an output node, the text corresponding to the output node is determined, and the agent's execution chain includes at least one output node; If the generation of speech is determined based on the configuration information of the output node, then the timbre corresponding to the output node is determined; Based on the timbre, determine the speech synthesis task corresponding to the text, and add the speech synthesis task to the task queue; Output the target speech corresponding to the speech synthesis task according to the order of the speech synthesis tasks in the task queue.

2. The method according to claim 1, characterized in that, The speech synthesis task based on the timbre to determine the corresponding text includes: If the output node is the first output node executed, then a speech synthesis task is generated based on the text, and the speech synthesis task is added to the task queue; If the output node is not the first output node, then determine whether the timbre is the same as the timbre of the target task, where the target task is the last speech synthesis task in the task queue; If the timbre is the same as the timbre corresponding to the target task, then the text is added to the text of the target task; If the timbre is different from the timbre corresponding to the target task, then a speech synthesis task is generated based on the text, and the speech synthesis task is added to the task queue.

3. The method according to claim 2, characterized in that, The target task is the task indicated by the task pointer, which is initially empty; The method further includes: In response to the addition of a new speech synthesis task to the task queue, the task pointer is updated to indicate the newly added speech synthesis task.

4. The method according to claim 1, characterized in that, The step of outputting the target speech corresponding to the speech synthesis task according to the order of the speech synthesis tasks in the task queue includes: Based on the task queue, speech synthesis tasks are obtained sequentially in a first-in-first-out order; Based on the timbre corresponding to the speech synthesis task, the text in the speech synthesis task is synthesized into speech to obtain the target speech. Output the target speech.

5. The method according to claim 1, characterized in that, The step of outputting the target speech corresponding to the speech synthesis task according to the order of the speech synthesis tasks in the task queue includes: The timbre of each speech synthesis task in the task queue is determined, and the target speech corresponding to the speech synthesis task is obtained through the speech synthesis model corresponding to the timbre. Based on the task queue, the target speech corresponding to the speech synthesis task is output sequentially in a first-in-first-out order.

6. The method according to claim 1, characterized in that, The configuration information of the output node includes a synthesized speech identifier and a timbre identifier. The synthesized speech identifier is used to indicate whether the output node generates speech, and the timbre identifier is used to indicate the timbre of the output node for speech synthesis.

7. The method according to claim 6, characterized in that, Determining the timbre corresponding to the output node includes: If the output node is associated with a timbre identifier, then the timbre indicated by the timbre identifier is used as the timbre corresponding to the output node; If the output node is not associated with a timbre identifier, then the default timbre corresponding to the agent will be used as the timbre corresponding to the output node.

8. A voice interaction device, characterized in that, The device includes: The first determining module is used to determine the text corresponding to the output node in response to the agent running to the output node, wherein the agent's running chain includes at least one output node; The second determining module is used to determine the timbre corresponding to the output node if it is determined that speech will be generated based on the configuration information of the output node. The first processing module is used to determine the speech synthesis task corresponding to the text based on the timbre, and add the speech synthesis task to the task queue; The second processing module is used to output the target speech corresponding to the speech synthesis task according to the order of the speech synthesis tasks in the task queue.

9. A computer-readable medium having a computer program stored thereon, characterized in that, When executed by a processing device, the computer program performs the steps of the method according to any one of claims 1-7.

10. An electronic device, characterized in that, include: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the method according to any one of claims 1-7.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Voice prompt method and device, electronic equipment and storage medium

    CN116631370A

  • Singing synthesis method and device and computer readable storage medium

    CN118918912A

  • Text-to-Speech Synthesis with Dynamically-Created Virtual Voices

    US20180330713A1