Method for adjusting robot voice tone, character and speech rate based on natural language patterns

By constructing sub-databases of emotion, text, and timbre, and combining them with natural language processing models and knowledge graphs, the timbre and speech rate of the voice robot can be adjusted in real time. This solves the problems of voice robots being unable to simulate real communication and being insensitive to feedback, and achieves more natural user interaction.

CN116778938BActive Publication Date: 2026-04-24北京微呼科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
北京微呼科技有限公司
Filing Date
2023-05-10
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing voice robots cannot simulate real telephone communication contexts, their feedback is not sensitive, leading to communication gaps, and they lack a good voice library, resulting in poor communication with users.

Method used

A voice database is constructed, including an emotion data sub-database, a text data sub-database, and a timbre data sub-database. It is trained using natural language processing models and knowledge graphs to adjust the timbre, role, and speech rate of voice information in real time to simulate emotional states and enhance the user interaction experience.

Benefits of technology

It enhances the interactive experience between voice robots and users by reducing communication gaps and strengthening natural communication through emotion regulation and feedback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116778938B_ABST
    Figure CN116778938B_ABST
Patent Text Reader

Abstract

The application provides a method for adjusting robot tone, role and speech speed based on natural language mode, comprising the following steps: S1, confirming a first call event and confirming a calling role, and defining a tone from a tone data sub-library according to the calling role; S2, calling a phone; S3, confirming first text information according to the first call event, and disassembling the first text information according to word meaning, and then audioizing the disassembled first text information to form gap output type first voice information; S4, binding the first voice information with an emotional state in an emotional data sub-library, and adding a mood adverbial segment type to the first voice information according to the emotional state to form second voice information; S5, segment type broadcasting the second voice information, and judging whether feedback information is received in real time; if yes, adjusting the first call event according to the feedback information to form a second call event and re-executing steps S3-S5.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of voice robot technology, and in particular to a method for adjusting the timbre, role, and speech rate of a robot based on natural language patterns. Background Technology

[0002] Current voice calls include traditional telephone communication and WeChat communication, but at their core, they are all about the output and reception of user voice. In the field of voice robots, user voice output can be pre-recorded and entered into the voice robot. When a call is made outward, multiple response branches are created to provide corresponding answers and communication based on the received voice feedback. While there are various voice robots on the market, solutions to the following problems are relatively few:

[0003] (1) It cannot simulate the real telephone communication context, and the feedback of outgoing and incoming calls is too stiff.

[0004] (2) The response to user feedback voice information is not sensitive, which leads to gaps in the voice call and thus communication accidents.

[0005] (3) The lack of a good voice library construction leads to poor voice information construction and communication with users is irrelevant.

[0006] To address the aforementioned technical issues, a patent search was conducted, and patent number 201910125823, "A Method for Correcting Telephone Robot Speech Recognition Results Based on Deep Learning," was proposed. This method uses historical speech datasets to obtain a Pinyin sentence text dataset (Sp) and a correct sentence text sample set (Sc). A deep learning-based correction model is then established. This model includes an encoder based on a multi-head attention model and a feedforward neural network, and a decoder based on stacked multi-head attention models and a feedforward neural network. The correction model is trained using the correct sentence text sample set (Sc). The speech recognition result requiring correction is processed through a vectorization process and then input into the trained correction model to obtain the corrected text. This invention fully utilizes historical recording data resources to train the speech recognition result correction model, enabling efficient speech recognition correction even in noisy environments and under conditions of low speech recognition accuracy due to variations in speaking styles, pronunciation accuracy, and reception capabilities.

[0007] This patented technology is designed to build a voice database. By training the voice recognition results, the model is corrected, thereby solving the problem of inconsistent communication between users and robots and improving accuracy.

[0008] However, in reality, there is a fundamental problem between robots and real users, namely "emotions." If emotional nuances can be applied to voice robots, the problems mentioned in points (1) and (2) above can certainly be solved. This is also a real aspect of existing patented technologies.

[0009] Based on this, the present invention proposes a method for adjusting the timbre, role, and speech rate of a robot based on natural language patterns, so as to give the voice robot "emotional" value, increase the interactive experience with users, and make the communication between people and voice robots more natural. Summary of the Invention

[0010] The purpose of this application is to provide a method for adjusting the timbre, role, and speech rate of a robot based on natural language patterns, aiming to give the voice robot "emotional" value, increase the interactive experience with users, and make communication between humans and voice robots more natural.

[0011] To achieve the above objectives, this application provides the following technical solution:

[0012] This application provides a method for adjusting the timbre, role, and speech rate of a robot based on natural language patterns, including:

[0013] A speech database is constructed, which consists of an emotion data sub-database, a text data sub-database, and a timbre data sub-database linked by a knowledge graph.

[0014] A natural language processing model is constructed, which is trained and used by calling data from a speech database through a knowledge graph.

[0015] An information collection and feedback port is constructed, which is connected to a natural language processing model as an output and collection port for voice information. The voice information includes the first voice information that is called out and the second voice information that is received.

[0016] The steps for conducting a user's voice call are as follows:

[0017] S1. Before making a call, confirm the first call event and confirm the caller role based on the first call event. Based on the caller role, the natural language processing model defines the timbre from the timbre data sub-library.

[0018] S2, make an outgoing call;

[0019] S3. Based on the first call event, the first text information is identified from the text data sub-database through the natural language processing model using the knowledge graph linking method, and the first text information is decomposed according to word meaning. Then, the decomposed first text information is converted into audio to form intermittent output first speech information.

[0020] S4. The first speech information is bound to an emotional state in the emotion data sub-library by the turn-matching mechanism preset in the natural language processing model, and the first speech information is embedded and added in a segmented manner by retrieving the modal particles from the text data sub-library according to the emotional state to form the second speech information.

[0021] S5. The second voice information is broadcast in segments through the information collection feedback port, and it is determined in real time whether feedback information is received. The feedback information is the voice information output by another voice output terminal.

[0022] If so, the first call event is adjusted according to the feedback information to form the second call event, and steps S3 to S5 are re-executed.

[0023] Further, the step of broadcasting the second voice information in segments through the information acquisition feedback port and determining in real time whether feedback information is received, wherein the feedback information is voice information output by another voice output terminal, includes:

[0024] The second voice information is played, with the interval between segments of the second voice information being 0.5 seconds to 1 second, and the interjections are added and played during the intervals between segments;

[0025] Real-time detection of whether feedback information has been received;

[0026] If so, the unplayed audio portion of the second voice message is paused based on the timestamp of the received feedback information.

[0027] Furthermore, the process of constructing a natural language processing model, wherein the natural language processing model is trained and used by calling data from a speech database through a knowledge graph, includes the following steps:

[0028] The natural language processing model is trained, and the training steps include:

[0029] The natural language processing model is designed with an input layer, a projection layer, a hidden layer, and an output layer, wherein the input layer, projection layer, hidden layer, and output layer are linked sequentially, the input layer is connected to a speech database, and the output layer is connected to an information collection and feedback port.

[0030] S11. Retrieve the historical dialogue dataset to train the input layer, so that the input layer connects the emotion data sub-database, the text data sub-database, and the timbre data sub-database in the form of a knowledge graph.

[0031] S12. Keep the input layer connected to the emotion data sub-library and the text data sub-library at all times, and call the timbre data sub-library to obtain timbre data once during a training session;

[0032] S13. In the projection layer, based on the historical dialogue dataset and using knowledge graph linking, the corresponding emotion data, text data and timbre data in the emotion data sub-library, text data sub-library and timbre data sub-library connected to the input layer are mapped to the projection layer for confirmation.

[0033] S14. In the hidden layer, the timbre data is locked, the text data is processed into text information, and the emotional data is used to segment the text data and add modal particles to obtain text information. The logical formula is as follows:

[0034]

[0035] Where tanh is the activation function after receiving emotion data, text data, and timbre data, and p is the text data, combined with... The timbre data w in the text forms text information z with timbre and vector format x. w Furthermore, by combining sentiment data U with textual information z w After performing gap segmentation and adding the modal particle 'q', the resulting speech information 'y' is output. w ;

[0036] S15. The voice information y is transmitted through the information acquisition feedback port connected to the output layer. w Broadcast training was conducted according to the pre-set intervals.

[0037] The natural language processing model is trained using steps S11 to S15, and the natural language processing model executes steps S11 to S15 during use.

[0038] Furthermore, in the step of binding the first speech information with an emotional state in the emotion data sub-database through a turn-matching mechanism preset in the natural language processing model, and embedding and adding the first speech information in a segmented manner by retrieving modal particles from the text data sub-database according to the emotional state to form the second speech information, the preset turn-matching mechanism is as follows:

[0039] The first voice information is evaluated to determine whether the first voice information has changed due to feedback information.

[0040] If so, the first voice information will be bound and changed to an emotional state in the emotional data sub-database according to the second call event;

[0041] If not, the first voice information is bound to an emotional state in the emotion data sub-library, and the first voice information is embedded and added in a segmented manner by retrieving modal particles from the text data sub-library according to the emotional state to form the second voice information.

[0042] This invention also proposes a device for adjusting the timbre, role, and speech rate of a robot based on natural language patterns, comprising:

[0043] The first construction unit is used to construct a speech database, which is composed of an emotion data sub-database, a text data sub-database, and a timbre data sub-database linked by a knowledge graph.

[0044] The second building unit is used to build a natural language processing model, which is trained and used by calling data from a speech database through a knowledge graph.

[0045] The third building unit is used to build an information collection and feedback port. The information collection and feedback port is connected to the natural language processing model as the output and collection port of voice information. The voice information includes the first voice information that is called out and the second voice information that is received.

[0046] The steps for conducting a user's voice call are as follows:

[0047] The preprocessing module is used to confirm the first call event before the call is made and to confirm the caller role based on the first call event. Based on the caller role, the natural language processing model defines the timbre from the timbre data sub-library.

[0048] Outgoing call module, used for making outgoing phone calls;

[0049] The first processing module is used to identify the first text information from the text data sub-database through the natural language processing model using the knowledge graph linking form based on the first call event, and to decompose the first text information according to word meaning, and then to convert the decomposed first text information into audio to form intermittent output first speech information.

[0050] The second processing module is used to bind the first speech information to an emotional state in the emotion data sub-library through a turn-matching mechanism preset in the natural language processing model, and to retrieve the first speech information from the text data sub-library in a segmented manner according to the emotional state to form the second speech information;

[0051] The acquisition and feedback module is used to broadcast the second voice information in segments through the information acquisition and feedback port, and to determine in real time whether feedback information is received. The feedback information is voice information output by another voice output terminal.

[0052] The response module is used to adjust the first call event according to the feedback information if the condition is met, form a second call event, and re-execute the processes of the preprocessing module, the outgoing call module, the first processing module, the second processing module, and the feedback acquisition module.

[0053] Furthermore, the data acquisition and feedback module includes:

[0054] The data collection and judgment submodule is used to determine in real time whether feedback information has been received;

[0055] The feedback pause submodule is used to pause the unplayed audio of the second voice information according to the timestamp of the received feedback information if the condition is met.

[0056] Furthermore, the second building unit includes:

[0057] The input layer is trained by retrieving a historical dialogue dataset, which enables the input layer to connect the emotion data sub-database, the text data sub-database, and the timbre data sub-database in the form of a knowledge graph.

[0058] The timbre preservation subunit is used to keep the input layer connected to the emotion data sub-library and the text data sub-library at all times, and the input layer calls the timbre data sub-library to obtain timbre data once during a training session;

[0059] The projection layer subunit is used to map the corresponding emotion data, text data and timbre data in the emotion data sub-library, text data sub-library and timbre data sub-library connected in the input layer to the projection layer for confirmation, based on the historical dialogue dataset and using knowledge graph linking.

[0060] The hidden layer subunit is used to lock the timbre data in the hidden layer, perform text digitization on the text data, and use the emotion data to segment the text data and add modal particles to obtain text information. The logical formula is as follows:

[0061]

[0062] Where tanh is the activation function after receiving emotion data, text data, and timbre data, and p is the text data, combined with... The timbre data w in the text forms text information z with timbre and vector format x. w Furthermore, by combining sentiment data U with textual information z w After performing gap segmentation and adding the modal particle 'q', the resulting speech information 'y' is output. w ;

[0063] Feedback single-port subunit, used to connect the information acquisition feedback port through the output layer to transmit voice information y w Training was conducted according to the pre-set intervals between segments.

[0064] Furthermore, the second processing module includes:

[0065] The judgment subunit is used to judge the first voice information and determine whether the first voice information has changed due to feedback information.

[0066] The emotional state binding subunit is used to bind and change the first voice information with an emotional state in the emotional data sub-database according to the second call event if the condition is met.

[0067] The particle embedding subunit is used to bind the first speech information with an emotional state in the emotion data sub-library if no, and to retrieve the modal particles from the text data sub-library according to the emotional state to embed and add the first speech information in a segmented manner to form the second speech information.

[0068] This invention proposes a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the above-described method for adjusting the timbre, role, and speech rate of a robot based on natural language patterns.

[0069] This invention proposes a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the above-described method for adjusting the timbre, role, and speech rate of a robot based on natural language patterns.

[0070] This application provides a method for adjusting the timbre, role, and speech rate of a robot based on natural language patterns, which has the following beneficial effects:

[0071] (1) By constructing an emotion data sub-library, a text data sub-library, and a timbre data sub-library, the voice robot is equipped with the ability to adjust timbre, role, and speech rate, thereby generating emotional value and enhancing user interaction to improve the experience.

[0072] (2) By making steps in the process of making a user's voice call, the voice robot can pause during the communication with the user, and the feedback port can facilitate the user to interrupt and stop, saving the user communication time.

[0073] (3) Through natural language processing models and knowledge graphs, the language call response is made faster and more convenient, and finally the voice output is carried out through the collection feedback port. Attached Figure Description

[0074] Figure 1 This is a flowchart illustrating one embodiment of a method for adjusting the timbre, role, and speech rate of a robot based on a natural language pattern, according to an embodiment of this application.

[0075] Figure 2 This is a flowchart illustrating another embodiment of a method for adjusting robot timbre, role, and speech rate based on natural language patterns, which is an embodiment of this application.

[0076] Figure 3 This is a schematic diagram of a natural language processing model, representing an embodiment of a method for adjusting robot timbre, role, and speech rate based on natural language patterns according to an embodiment of this application.

[0077] Figure 4 This is a structural block diagram of one embodiment of a device for adjusting the timbre, role, and speech rate of a robot based on a natural language pattern, according to an embodiment of this application.

[0078] Figure 5 This is a structural block diagram of another embodiment of a device for adjusting the timbre, role, and speech rate of a robot based on a natural language pattern, which is an embodiment of this application.

[0079] Figure 6 This is a structural block diagram of yet another embodiment of a device for adjusting robot timbre, role, and speech rate based on natural language patterns, which is an embodiment of this application.

[0080] Figure 7 This is a schematic block diagram of the structure of a computer device according to an embodiment of this application.

[0081] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0082] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0083] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0084] Reference Appendix Figure 1-3 This is a flowchart illustrating the method for adjusting robot timbre, role, and speech rate based on natural language patterns proposed in this application.

[0085] This invention proposes a method for adjusting the timbre, role, and speech rate of a robot based on natural language patterns, comprising:

[0086] A speech database is constructed, which consists of an emotion data sub-database, a text data sub-database, and a timbre data sub-database linked by a knowledge graph.

[0087] A natural language processing model is constructed, which is trained and used by calling data from a speech database through a knowledge graph.

[0088] An information collection and feedback port is constructed, which is connected to a natural language processing model as an output and collection port for voice information. The voice information includes the first voice information that is called out and the second voice information that is received.

[0089] The steps for conducting a user's voice call are as follows:

[0090] S1. Before making a call, confirm the first call event and confirm the caller role based on the first call event. Based on the caller role, the natural language processing model defines the timbre from the timbre data sub-library.

[0091] In this step, the first call event mentioned above is preset by the main operator of the voice robot. The main operator will make the preset settings before making the call, and the subsequent voice broadcast of the voice robot is dominated by the first call event.

[0092] S2, make an outgoing call;

[0093] S3. Based on the first call event, the first text information is identified from the text data sub-database through the natural language processing model using the knowledge graph linking method, and the first text information is decomposed according to word meaning. Then, the decomposed first text information is converted into audio to form intermittent output first speech information.

[0094] S4. The first speech information is bound to an emotional state in the emotion data sub-library by the turn-matching mechanism preset in the natural language processing model, and the first speech information is embedded and added in a segmented manner by retrieving the modal particles from the text data sub-library according to the emotional state to form the second speech information.

[0095] In this step, for example, emotional states include excitement, speed, calmness, and slowness. Among them, the modal particles for a calm emotional state are such as "en," "uh," and "hao." If the first voice message is "Hello, I am from the XX department, mainly to help you with XX things," then by embedding and adding modal particles in segments, the first voice message becomes "Uh, hello, I am from the XX department, en, mainly to help you with XX things," thereby making the voice robot more expressive and preventing the problem of a rigid voice robot.

[0096] S5. The second voice information is broadcast in segments through the information collection feedback port, and it is determined in real time whether feedback information is received. The feedback information is the voice information output by another voice output terminal.

[0097] If so, the first call event is adjusted according to the feedback information to form the second call event, and steps S3 to S5 are re-executed.

[0098] In one embodiment, the step of broadcasting the second voice information in segments through the information acquisition feedback port and determining in real time whether feedback information is received, wherein the feedback information is voice information output by another voice output terminal, includes:

[0099] The second voice information is played, with the interval between segments of the second voice information being 0.5 seconds to 1 second, and the interjections are added and played during the intervals between segments;

[0100] Real-time detection of whether feedback information has been received;

[0101] If so, the unplayed audio portion of the second voice message is paused based on the timestamp of the received feedback information.

[0102] In one embodiment, the step of constructing a natural language processing model, which is trained and used by calling data from a speech database through a knowledge graph, includes:

[0103] The natural language processing model is trained, and this natural language processing model can be an N-gram language model or a GPT model. The training steps include:

[0104] The natural language processing model is designed with an input layer, a projection layer, a hidden layer, and an output layer, wherein the input layer, projection layer, hidden layer, and output layer are linked sequentially, the input layer is connected to a speech database, and the output layer is connected to an information collection and feedback port.

[0105] S11. Retrieve the historical dialogue dataset to train the input layer, so that the input layer connects the emotion data sub-database, the text data sub-database, and the timbre data sub-database in the form of a knowledge graph.

[0106] In this step, the historical dialogue dataset is data pre-stored in the voice database by the main operator of the voice robot, and each time the voice robot communicates with the user, it will be saved using the historical dialogue dataset for training.

[0107] S12. Keep the input layer connected to the emotion data sub-library and the text data sub-library at all times, and call the timbre data sub-library to obtain timbre data once during a training session;

[0108] S13. In the projection layer, based on the historical dialogue dataset and using knowledge graph linking, the corresponding emotion data, text data and timbre data in the emotion data sub-library, text data sub-library and timbre data sub-library connected to the input layer are mapped to the projection layer for confirmation.

[0109] S14. In the hidden layer, the timbre data is locked, the text data is processed into text information, and the emotional data is used to segment the text data and add modal particles to obtain text information. The logical formula is as follows:

[0110]

[0111] Where tanh is the activation function after receiving emotion data, text data, and timbre data, and p is the text data, combined with... The timbre data w in the text forms text information z with timbre and vector format x. w Furthermore, by combining sentiment data U with textual information z w After performing gap segmentation and adding the modal particle 'q', the resulting speech information 'y' is output. w ;

[0112] S15. The voice information y is transmitted through the information acquisition feedback port connected to the output layer. w Broadcast training was conducted according to the pre-set intervals.

[0113] The natural language processing model is trained using steps S11 to S15, and the natural language processing model executes steps S11 to S15 during use.

[0114] In one embodiment, in the step of binding the first speech information with an emotional state in an emotion data sub-database through a turn-matching mechanism preset in the natural language processing model, and embedding and adding the first speech information in a segmented manner by retrieving modal particles from a text data sub-database according to the emotional state to form the second speech information, the preset turn-matching mechanism is as follows:

[0115] The first voice information is evaluated to determine whether the first voice information has changed due to feedback information.

[0116] If so, the first voice information will be bound and changed to an emotional state in the emotional data sub-database according to the second call event;

[0117] If not, the first voice information is bound to an emotional state in the emotion data sub-library, and the first voice information is embedded and added in a segmented manner by retrieving modal particles from the text data sub-library according to the emotional state to form the second voice information.

[0118] Reference Appendix Figure 4-6 This invention proposes a device for adjusting the timbre, role, and speech rate of a robot based on natural language patterns, comprising:

[0119] The first construction unit 1 is used to construct a speech database, which is composed of an emotion data sub-database, a text data sub-database, and a timbre data sub-database linked by a knowledge graph.

[0120] The second building unit 2 is used to build a natural language processing model, which is trained and used by calling data from a speech database through a knowledge graph.

[0121] The third building unit 3 is used to build an information collection feedback port. The information collection feedback port is connected to the natural language processing model as the output and collection port of voice information. The voice information includes the first voice information that is called out and the second voice information that is received.

[0122] The steps for conducting a user's voice call are as follows:

[0123] Preprocessing module 4 is used to confirm the first call event before the call is made and to confirm the caller role based on the first call event. Based on the caller role, the natural language processing model defines the timbre from the timbre data sub-library.

[0124] Outgoing call module 5, used for making outgoing phone calls;

[0125] The first processing module 6 is used to identify the first text information from the text data sub-database through the natural language processing model using the knowledge graph linking form based on the first call event, and to decompose the first text information according to word meaning, and then to convert the decomposed first text information into audio to form intermittent output first speech information.

[0126] The second processing module 7 is used to bind the first speech information to an emotional state in the emotion data sub-library through a turn-matching mechanism preset in the natural language processing model, and to retrieve the first speech information from the text data sub-library in a segmented manner according to the emotional state to form the second speech information;

[0127] The acquisition feedback module 8 is used to broadcast the second voice information in segments through the information acquisition feedback port and to determine in real time whether feedback information is received. The feedback information is voice information output by another voice output terminal.

[0128] The response module 9 is used to adjust the first call event according to the feedback information if the condition is met, form a second call event, and re-execute the processes of the preprocessing module, the outgoing call module, the first processing module, the second processing module, and the feedback acquisition module.

[0129] In one embodiment, the data acquisition and feedback module includes:

[0130] The data collection and judgment submodule is used to determine in real time whether feedback information has been received;

[0131] The feedback pause submodule is used to pause the unplayed audio of the second voice information according to the timestamp of the received feedback information if the condition is met.

[0132] In one embodiment, the second building unit includes:

[0133] Subunit 11 is used to retrieve historical dialogue datasets to train the input layer, so that the input layer connects the emotion data sub-database, the text data sub-database, and the timbre data sub-database in the form of a knowledge graph.

[0134] The timbre preservation subunit 12 is used to keep the input layer connected to the emotion data sub-library and the text data sub-library at all times, and to call the timbre data sub-library to obtain timbre data once during a training session;

[0135] Projection layer subunit 13 is used to map the corresponding emotion data, text data and timbre data in the emotion data sub-library, text data sub-library and timbre data sub-library connected in the input layer to the projection layer for confirmation, based on the historical dialogue dataset and using knowledge graph linking.

[0136] Hidden layer subunit 14 is used to lock the timbre data in the hidden layer, perform text digitization on the text data, and use the emotion data to segment the text data and add modal particles to obtain text information. The logical formula is as follows:

[0137]

[0138] Where tanh is the activation function after receiving emotion data, text data, and timbre data, and p is the text data, combined with... The timbre data w in the text forms text information z with timbre and vector format x. w Furthermore, by combining sentiment data U with textual information z w After performing gap segmentation and adding the modal particle 'q', the resulting speech information 'y' is output. w ;

[0139] Feedback single-port subunit 15 is used to connect the information acquisition feedback port through the output layer to transmit voice information y w Training was conducted according to the pre-set intervals between segments.

[0140] In one embodiment, the second processing module includes:

[0141] The judgment subunit is used to judge the first voice information and determine whether the first voice information has changed due to feedback information.

[0142] The emotional state binding subunit is used to bind and change the first voice information with an emotional state in the emotional data sub-database according to the second call event if the condition is met.

[0143] The particle embedding subunit is used to bind the first speech information with an emotional state in the emotion data sub-library if no, and to retrieve the modal particles from the text data sub-library according to the emotional state to embed and add the first speech information in a segmented manner to form the second speech information.

[0144] Reference Figure 7 This application also provides a computer device, which may be a server, and its internal structure may be as follows: Figure 7 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data such as first-person speech information. The network interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a method for adjusting the robot's timbre, role, and speech rate based on natural language patterns.

[0145] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer equipment on which the present application is applied.

[0146] One embodiment of this application also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the steps of a method for adjusting the timbre, role, and speech rate of a robot based on a natural language pattern, specifically:

[0147] A speech database is constructed, which consists of an emotion data sub-database, a text data sub-database, and a timbre data sub-database linked by a knowledge graph.

[0148] A natural language processing model is constructed, which is trained and used by calling data from a speech database through a knowledge graph.

[0149] An information collection and feedback port is constructed, which is connected to a natural language processing model as an output and collection port for voice information. The voice information includes the first voice information that is called out and the second voice information that is received.

[0150] The steps for conducting a user's voice call are as follows:

[0151] S1. Before making a call, confirm the first call event and confirm the caller role based on the first call event. Based on the caller role, the natural language processing model defines the timbre from the timbre data sub-library.

[0152] S2, make an outgoing call;

[0153] S3. Based on the first call event, the first text information is identified from the text data sub-database through the natural language processing model using the knowledge graph linking method, and the first text information is decomposed according to word meaning. Then, the decomposed first text information is converted into audio to form intermittent output first speech information.

[0154] S4. The first speech information is bound to an emotional state in the emotion data sub-library by the turn-matching mechanism preset in the natural language processing model, and the first speech information is embedded and added in a segmented manner by retrieving the modal particles from the text data sub-library according to the emotional state to form the second speech information.

[0155] S5. The second voice information is broadcast in segments through the information collection feedback port, and it is determined in real time whether feedback information is received. The feedback information is the voice information output by another voice output terminal.

[0156] If so, the first call event is adjusted according to the feedback information to form the second call event, and steps S3 to S5 are re-executed.

[0157] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media provided in this application and in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0158] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0159] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

[0160] Although embodiments of this application have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for adjusting the timbre, role, and speech rate of a robot based on natural language patterns, characterized in that, include: A speech database is constructed, which consists of an emotion data sub-database, a text data sub-database, and a timbre data sub-database linked by a knowledge graph. A natural language processing (NLP) model is constructed. This NLP model is trained and used by calling data from a speech database via a knowledge graph. The training steps for the NLP model include: designing an input layer, projection layer, hidden layer, and output layer for the NLP model, wherein the input layer, projection layer, hidden layer, and output layer are sequentially linked; the input layer is connected to the speech database, and the output layer is connected to an information collection and feedback port; S11, retrieving a historical dialogue dataset to train the input layer, enabling the input layer to connect to an emotion data sub-database, a text data sub-database, and a timbre data sub-database using a knowledge graph; S12, preserving... The input layer is always connected to the emotion data sub-library and the text data sub-library, and the input layer calls the timbre data sub-library once to obtain timbre data during each training session; S13, in the projection layer, based on the historical dialogue dataset and using knowledge graph linking, the corresponding emotion data, text data, and timbre data in the emotion data sub-library, text data sub-library, and timbre data sub-library connected to the input layer are mapped to the projection layer for confirmation; S14, in the hidden layer, the timbre data is locked, the text data is processed for text digitization, and the emotion data is used to segment the text data and add modal particles to obtain text information. The logical formula is as follows: ; Where tanh is the activation function after receiving emotion data, text data, and timbre data, and p is the text data, combined with... The timbre data w in the text is used to form text information with timbre and vector format x. Furthermore, by combining sentiment data U with textual information... After performing gap segmentation and adding the modal particle 'q', the speech information to be output is formed. S15. The voice information is transmitted through the information acquisition feedback port connected to the output layer. Training is conducted according to the preset segment intervals; the natural language processing model is trained using steps S11 to S15, and the natural language processing model executes steps S11 to S15 during use. An information collection and feedback port is constructed, which is connected to a natural language processing model as the output and collection port of voice information. The voice information includes the first voice information that is called out and the second voice information that is received. The steps for conducting a user's voice call are as follows: S1. Before making a call, confirm the first call event and confirm the caller role based on the first call event. Based on the caller role, the natural language processing model defines the timbre from the timbre data sub-library. S2, make an outgoing call; S3. Based on the first call event, the first text information is identified from the text data sub-database through the natural language processing model using the knowledge graph linking method, and the first text information is decomposed according to word meaning. Then, the decomposed first text information is converted into audio to form intermittent output first speech information. S4. The first speech information is bound to an emotional state in the emotion data sub-database by the turn-matching mechanism preset in the natural language processing model, and the first speech information is embedded and added in a segmented manner by retrieving the modal particles from the text data sub-database according to the emotional state to form the second speech information. S5. Play the second voice information in segments through the information acquisition feedback port, and determine in real time whether feedback information is received. The feedback information is voice information output by another voice output terminal, including: playing the second voice information, the segment interval of the second voice information is 0.5 seconds to 1 second, and the segment interval includes the addition of interjections; determine in real time whether feedback information is received; if so, pause the unplayed audio of the second voice information according to the timestamp of the received feedback information; If so, the first call event is adjusted according to the feedback information to form the second call event, and steps S3 to S5 are re-executed.

2. The method for adjusting robot timbre, role, and speech rate based on natural language patterns according to claim 1, characterized in that, In the step of binding the first speech information with an emotional state in the emotion data sub-database through a pre-set turn-matching mechanism in the natural language processing model, and embedding and adding the first speech information in a segmented manner by retrieving modal particles from the text data sub-database according to the emotional state to form the second speech information, the pre-set turn-matching mechanism is as follows: The first voice information is evaluated to determine whether the first voice information has changed due to feedback information. If so, the first voice information will be bound and changed to an emotional state in the emotional data sub-database according to the second call event; If not, the first voice information is bound to an emotion state in the emotion data sub-library, and the first voice information is embedded and added in a segmented manner by retrieving modal particles from the text data sub-library according to the emotion state to form the second voice information.

3. A device for adjusting the timbre, role, and speech rate of a robot based on natural language patterns, characterized in that, include: The first construction unit is used to construct a speech database, which is composed of an emotion data sub-database, a text data sub-database, and a timbre data sub-database linked by a knowledge graph. The second building unit is used to construct a natural language processing (NLP) model. This NLP model is trained and used by calling data from a speech database via a knowledge graph. The training steps for the NLP model include: designing an input layer, projection layer, hidden layer, and output layer for the NLP model, wherein the input layer, projection layer, hidden layer, and output layer are sequentially linked; the input layer is connected to the speech database, and the output layer is connected to an information collection and feedback port; S11, retrieving a historical dialogue dataset to train the input layer, enabling the input layer to connect to an emotion data sub-database, a text data sub-database, and a timbre data sub-database using a knowledge graph; S...

12. Maintain constant connectivity between the input layer and the emotion data sub-library and the text data sub-library, and during each training iteration, the input layer calls the timbre data sub-library once to obtain timbre data; S13. In the projection layer, based on the historical dialogue dataset and using knowledge graph linking, map the corresponding emotion data, text data, and timbre data in the emotion data sub-library, text data sub-library, and timbre data sub-library connected to the input layer onto the projection layer for confirmation; S14. In the hidden layer, lock the timbre data, perform text digitization on the text data, and use the emotion data to perform segmentation and add modal particles to the text data to obtain text information. The logical formula is as follows: ; Where tanh is the activation function after receiving emotion data, text data, and timbre data, and p is the text data, combined with... The timbre data w in the text is used to form text information with timbre and vector format x. Furthermore, by combining sentiment data U with textual information... After performing gap segmentation and adding the modal particle 'q', the speech information to be output is formed. S15. The voice information is transmitted through the information acquisition feedback port connected to the output layer. Training is conducted according to the preset segment intervals; the natural language processing model is trained using steps S11 to S15, and the natural language processing model executes steps S11 to S15 during use. The third building unit is used to build an information collection and feedback port. The information collection and feedback port is connected to the natural language processing model as the output and collection port of voice information. The voice information includes the first voice information that is called out and the second voice information that is received. The steps for conducting a user's voice call are as follows: The preprocessing module is used to confirm the first call event before the call is made and to confirm the caller role based on the first call event. Based on the caller role, the natural language processing model defines the timbre from the timbre data sub-library. Outgoing call module, used for making outgoing phone calls; The first processing module is used to identify the first text information from the text data sub-database through the natural language processing model using the knowledge graph linking form based on the first call event, and to decompose the first text information according to word meaning, and then to convert the decomposed first text information into audio to form intermittent output first speech information. The second processing module is used to bind the first speech information to an emotional state in the emotion data sub-library through a turn-matching mechanism preset in the natural language processing model, and to retrieve the first speech information from the text data sub-library in a segmented manner according to the emotional state to form the second speech information; The acquisition and feedback module is used to broadcast the second voice information in segments through the information acquisition and feedback port, and to determine in real time whether feedback information is received. The feedback information is voice information output by another voice output terminal, including: broadcasting the second voice information, wherein the segment interval of the second voice information is 0.5 seconds to 1 second, and the segment interval includes the addition of interjections; determining in real time whether feedback information is received; if so, pausing the unbroadcast audio of the second voice information according to the timestamp of the received feedback information; The response module is used to adjust the first call event according to the feedback information if the condition is met, form a second call event, and re-execute the processes of the preprocessing module, the outgoing call module, the first processing module, the second processing module, and the feedback acquisition module.

4. The device for adjusting robot timbre, role, and speech rate based on natural language patterns according to claim 3, wherein the second processing module comprises: The judgment subunit is used to judge the first voice information and determine whether the first voice information has changed due to feedback information. The emotional state binding subunit is used to bind and change the first voice information with an emotional state in the emotional data sub-database according to the second call event if the condition is met. The particle embedding subunit is used to bind the first speech information with an emotional state in the emotion data sub-library if no, and to retrieve the mood particles from the text data sub-library in a segmented manner to embed and add the first speech information to form the second speech information according to the emotional state.

5. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method for adjusting robot timbre, role, and speech rate based on natural language patterns as described in any one of claims 1 to 2.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for adjusting the robot's timbre, role, and speech rate based on natural language patterns as described in any one of claims 1 to 2.

Citation Information

Patent Citations

  • Voice emotion feedback method and device, electronic equipment and storage medium

    CN111863034A

  • Multi-role voice interaction method, electronic equipment and storage medium

    CN114283820A