system
The system addresses the challenge of accurately mimicking character tones by collecting, preprocessing, and post-processing dialogue data to generate character-specific text, improving user experience in entertainment and creativity.
Patent Information
- Application Number
- JP2024138257
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2026-03-04
AI Technical Summary
Current natural language generation technologies struggle to accurately mimic the tone and speaking style of specific characters, leading to reduced satisfaction in entertainment and personal creative activities due to the lack of character-specific phrases and emotional expressions.
A system that collects dialogue data from works featuring characters, preprocesses the data, trains a natural language generation model, preprocesses user input, and post-processes the generated text to add character-specific expressions.
Enables users to generate text in the tone and speaking style of their favorite characters, enhancing immersion and satisfaction in entertainment and creative activities.
Smart Images

Figure 2026035414000001_ABST
Abstract
Description
[Technical Field]
[0001] The technology of the present disclosure relates to a system. [Background technology]
[0002] Patent document 1 discloses a persona chatbot control method performed by at least one processor, the method including the steps of receiving a user utterance, adding the user utterance to a prompt including an instruction sentence related to a description of the chatbot character, encoding the prompt, and inputting the encoded prompt into a language model to generate a chatbot utterance in response to the user utterance. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Publication No. 2022-180282 Summary of the Invention [Problem to be solved by the invention]
[0004] Current natural language generation technologies struggle to accurately mimic the tone and speaking style of specific characters, preventing fans and creative users from achieving the character-like interaction experiences they desire. This reduces satisfaction in entertainment and personal creative activities. Furthermore, the lack of a way to naturally incorporate character-specific phrases and emotional expressions prevents a more immersive interaction experience. Therefore, there is a need to provide a generative AI system that can accurately mimic the tone and speaking style of specific characters. [Means for solving the problem]
[0005] To solve the above problems, the present invention proposes a system that includes the following means: collecting dialogue data from works in which characters appear, preprocessing the collected dialogue data, training a natural language generation model based on the preprocessed data, preprocessing user input and generating text using the natural language generation model based on the preprocessed data, and postprocessing the generated text to add character-specific expressions. This allows users to use a text generation system that imitates the tone and speaking style of their favorite character, resulting in high satisfaction in entertainment and creative activities.
[0006] A "character" is a fictional person or entity that appears in a particular work and has its own way of speaking and expressing itself.
[0007] "Works" are content that includes stories and scenes depicted in media such as movies, anime, manga, and games.
[0008] "Dialogue data" is data that records in text format the words and lines that characters speak within a work.
[0009] "Preprocessing" is the process of analyzing collected text data and performing preparatory tasks such as filtering and tokenizing.
[0010] A "natural language generation model" is a machine learning model that generates new text based on given text data.
[0011] A "user" is an individual or organization using the system who wishes to generate text in the voice of a particular character.
[0012] "Tokenizing" is the process of dividing text into smaller units such as words or phrases.
[0013] "Preprocessed data" refers to dialogue data that has been preprocessed and converted into a format that can be used for training a natural language generation model or for generating text.
[0014] "Post-processing" refers to the process of making additional edits and corrections to the generated text to emphasize the specific character characteristics.
[0015] A "means" is a method or device for achieving a specific function or purpose. [Brief explanation of the drawings]
[0016] [Figure 1] 1 is a conceptual diagram showing an example of the configuration of a data processing system according to a first embodiment. [Figure 2] 1 is a conceptual diagram showing an example of main functions of a data processing device and a smart device according to a first embodiment. [Figure 3] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a second embodiment. [Figure 4] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and smart glasses according to a second embodiment. [Figure 5] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a third embodiment. [Figure 6] FIG. 11 is a conceptual diagram showing an example of main functions of a data processing device and a headset-type terminal according to a third embodiment. [Figure 7] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a fourth embodiment. [Figure 8] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and a robot according to a fourth embodiment. [Figure 9] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 10] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 11] FIG. 3 is a sequence diagram showing a processing flow of the data processing system according to the first embodiment. [Figure 12]FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 1. [Figure 13] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system according to the second embodiment when an emotion engine is combined. [Figure 14] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 2 when an emotion engine is combined. DETAILED DESCRIPTION OF THE INVENTION
[0017] An example of an embodiment of a system according to the technology of the present disclosure will be described below with reference to the accompanying drawings.
[0018] First, the terms used in the following description will be explained.
[0019] In the following embodiments, a coded processor (hereinafter simply referred to as a "processor") may be a single arithmetic device or a combination of multiple arithmetic devices. Furthermore, a processor may be a single type of arithmetic device or a combination of multiple types of arithmetic devices. Examples of arithmetic devices include a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a GPGPU (General-Purpose computing on Graphics Processing Units), and an APU (Accelerated Processing Unit).
[0020] In the following embodiments, a coded RAM (Random Access Memory) is a memory in which information is temporarily stored and is used as a working memory by a processor.
[0021] In the following embodiments, the coded storage is one or more non-volatile storage devices that store various programs, various parameters, etc. Examples of non-volatile storage devices include flash memory (SSD (Solid State Drive)), magnetic disks (e.g., hard disks), and magnetic tapes.
[0022] In the following embodiments, a communication I / F (Interface) with a symbol is an interface including a communication processor, an antenna, etc. The communication I / F controls communication between multiple computers. Examples of communication standards applied to the communication I / F include wireless communication standards including 5G (5th Generation Mobile Communication System), Wi-Fi (registered trademark), Bluetooth (registered trademark), etc.
[0023] In the following embodiments, "A and / or B" is synonymous with "at least one of A and B." In other words, "A and / or B" means that it may be only A, only B, or a combination of A and B. Furthermore, in this specification, the same concept as "A and / or B" is also applied when three or more things are expressed connected by "and / or."
[0024] [First embodiment]
[0025] FIG. 1 shows an example of the configuration of a data processing system 10 according to the first embodiment.
[0026] 1, a data processing system 10 includes a data processing device 12 and a smart device 14. An example of the data processing device 12 is a server.
[0027] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0028] The smart device 14 includes a computer 36, a reception device 38, an output device 40, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The reception device 38, the output device 40, and the camera 42 are also connected to the bus 52.
[0029] The reception device 38 includes a touch panel 38A, a microphone 38B, and the like, and receives user input. The touch panel 38A detects contact with an indicator (for example, a pen or a finger) to receive user input by the touch of the indicator. The microphone 38B detects the user's voice to receive user input by voice. The control unit 46A transmits data indicating the user input received by the touch panel 38A and the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the data indicating the user input.
[0030] The output device 40 includes a display 40A and a speaker 40B, and presents data to the user 20 by outputting the data in a form of expression that the user 20 can perceive (for example, audio and / or text). The display 40A displays visible information such as text and images in accordance with instructions from the processor 46. The speaker 40B outputs audio in accordance with instructions from the processor 46. The camera 42 is a compact digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor.
[0031] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 control the exchange of various information between the processor 46 and the processor 28 via the network 54.
[0032] FIG. 2 shows an example of the main functions of the data processing device 12 and the smart device 14.
[0033] 2, in the data processing device 12, a specific process is performed by the processor 28. A specific processing program 56 is stored in the storage 32. The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific process is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0034] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0035] In the smart device 14, the processor 46 performs the reception output process. The storage 50 stores a reception output program 60. The reception output program 60 is used in conjunction with the specific processing program 56 by the data processing system 10. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0036] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0037] Specific embodiments for carrying out the present invention will be described below.
[0038] The system of the present invention realizes a natural language generation AI that imitates the tone and speaking style of a specific character. This system is composed of the following elements: a means for collecting dialogue data from works in which the character appears, a means for preprocessing the collected dialogue data, a means for training a natural language generation model based on the preprocessed data, a means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, and a means for post-processing the generated text and adding character-specific expressions.
[0039] The specific program processing flow is as follows:
[0040] Collection of dialogue data
[0041] 1. Character Selection and Data Collection
[0042] The system begins operation when the user selects their favorite character.
[0043] The server collects dialogue data from works (e.g., movies, anime, manga, games, etc.) in which the specified character appears. This is done by obtaining text data via API, analyzing official scripts, referencing online databases, etc.
[0044] Preprocessing of dialogue data
[0045] 2. Data Cleansing and Tokenization
[0046] The server cleanses the collected dialogue data, removing unnecessary information (e.g., narration and other characters' lines), using regular expressions and fuzzy matching algorithms.
[0047] The server then tokenizes the cleansed data and splits each line into words and phrases using a natural language processing library (e.g., NLTK, Spacy).
[0048] Training a natural language generation model
[0049] 3. Training the model
[0050] The server trains a natural language generation model based on the preprocessed tokenized data using a deep learning framework (e.g., TENSORFLOW (registered trademark), PyTorch) to learn the characteristics of the characters.
[0051] The training dataset also includes contextual information for each line (e.g., previous and following lines, situation descriptions) to generate more natural and character-like responses.
[0052] User input processing and text generation
[0053] 4. Accepting and Preprocessing User Input
[0054] The user sends a request to the system by entering the text content they want to generate (e.g., "What's the weather like today?").
[0055] The server parses user input and pre-processes it for the generative AI model, including grammar correction and the transformation of certain words.
[0056] 5. Text Generation
[0057] The server uses the preprocessed input data to generate text in the voice of the specified character using a natural language generation model.
[0058] Post-processing and returning results
[0059] 6. Post-processing and returning results
[0060] The server then performs post-processing on the generated text, adding character-specific phrases and emotional expressions, making the generated text more character-like.
[0061] The final adjusted text is returned from the server to the user via the terminal (e.g., "I'm curious about today's weather!").
[0062] Specific example explanation
[0063] For example, if a user wants to generate text in the tone of "Character A," they first collect lines from anime or manga in which Character A appears. The collected lines are preprocessed and converted into an appropriate format. A natural language generation model is then trained based on this to generate text that responds to the user's input in Character A's tone. The generated text then undergoes post-processing to be adjusted to more closely resemble Character A and provided to the user.
[0064] Through the above process, this system realizes a generative AI that accurately imitates the tone and speaking style of a specific character. Users can generate text in the tone of their favorite character, enjoying a more immersive dialogue experience.
[0065] The processing flow will be explained below.
[0066] Step 1:
[0067] The user accesses the system and selects their favorite character (e.g., Character A).
[0068] The terminal transmits the character information received from the user to the server.
[0069] Step 2:
[0070] The server collects dialogue data from works (e.g., anime or manga) in which the specified character A appears.
[0071] The server calls the API to retrieve the dialogue data from an online database.
[0072] The server analyzes text from official scripts, script files, etc. and extracts the necessary lines.
[0073] Step 3:
[0074] The server cleanses the collected dialogue data.
[0075] The server uses regular expressions to remove unnecessary information (e.g., lines from other characters or narration).
[0076] The server uses a fuzzy matching algorithm to correct the incomplete text.
[0077] Step 4:
[0078] The server tokenizes the cleansed dialogue data.
[0079] The server uses a natural language processing library (e.g., NLTK, Spacy) to split the dialogue into words and phrases.
[0080] Classify each line by context and assign appropriate tags.
[0081] Step 5:
[0082] The server trains a natural language generation model based on the preprocessed tokenized data.
[0083] The server configures the deep learning framework (e.g., TensorFlow, PyTorch) and tunes the model architecture and hyperparameters.
[0084] The training dataset includes contextual information for each line.
[0085] Step 6:
[0086] The user enters the text they want to generate (e.g., "What's the weather like today?").
[0087] The terminal sends the user input to the server.
[0088] Step 7:
[0089] The server parses user input and pre-processes it for the generative AI model.
[0090] The server will make grammar corrections and convert certain words to suit Character A's style.
[0091] Step 8:
[0092] The server uses the preprocessed input data to generate text using a natural language generation model.
[0093] The server generates text that reflects the tone of voice of character A.
[0094] Step 9:
[0095] The server performs post-processing on the generated text.
[0096] The server adds phrases and emotes specific to Character A and makes further fine-tuning adjustments (e.g., "I'm curious about the weather today!").
[0097] Step 10:
[0098] The server sends the final adjusted text to the terminal.
[0099] The terminal displays the generated text to the user.
[0100] Through these steps, users can receive text generated in the tone of their favorite character, allowing them to enjoy a more immersive conversational experience.
[0101] Example 1
[0102] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0103] Conventional natural language generation systems have struggled to accurately mimic the tone and speaking style of a specific character. Obtaining output appropriate for a user-specified character requires a great deal of manual effort and adjustment, making it inefficient. Furthermore, they were unable to generate natural text that incorporates the character's expressiveness and context, limiting the user experience. Therefore, an efficient method for automatically generating natural language with the tone and speaking style of a specific character is needed.
[0104] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0105] In this invention, the server includes means for collecting dialogue data of a character designated by a user, means for cleansing the collected dialogue data and removing unnecessary information, means for tokenizing the cleansed data, means for training a natural language generation model based on the preprocessed data and contextual information, means for preprocessing user input and converting the input data for the generation AI model, means for generating text using the natural language generation model based on the preprocessed input data, means for post-processing the generated text and adding character-specific expressions, and means for returning the final text to the user. This enables the generation of natural text that has the tone and expressiveness of the designated character.
[0106] "Characters" are people, animals, robots, and other characters that appear in a particular work, and their speech patterns and expressions are imitated.
[0107] "Dialogue data" refers to the text information spoken by characters within a work, and is data used to train natural language generation models.
[0108] "Cleansing" is the process of removing unnecessary information and noise from collected dialogue data to turn it into pure text data.
[0109] "Tokenization" is the process of dividing cleansed text data into words and phrases, and is performed as an initial step in natural language processing.
[0110] "Contextual information" includes information about the context of the dialogue and a description of the situation, and is used by the natural language generation model to generate more appropriate responses.
[0111] A "natural language generation model" is an AI model that generates natural-sounding sentences based on input text data, and is trained using deep learning technology.
[0112] "Preprocessing" is the process of analyzing user-entered text data and converting it into a format that can be properly processed by the generative AI model.
[0113] "Post-processing" is the process of making final adjustments to the generated text, adding character-specific expressions and emotions to make the text more natural.
[0114] "Return" is the process of sending the final generated text to the user's terminal and displaying it to the user.
[0115] A "generative AI model" is an artificial intelligence model that generates natural language and has the ability to generate text based on the tone and expressions of a specified character.
[0116] The present invention relates to a natural language generation AI system that imitates the tone and speaking style of a specific character. Specific embodiments of the present invention will be described in detail below.
[0117] When a user uses the system, they first specify the character they want to generate. In order to imitate the character's speaking style, they must first collect relevant dialogue data. The server uses an API publicly available on the Internet to collect dialogue data from works (e.g., movies, anime, manga, games, etc.) in which the specified character appears. At this time, the server also references official scripts and online databases to obtain as much dialogue information as possible.
[0118] The collected dialogue data cannot be used as is, so the server performs data cleansing. Specifically, regular expressions and fuzzy matching algorithms are used to remove unnecessary information and noise (e.g., narration and lines from other characters) and extract only the characters' lines. This cleansed data is then tokenized using a natural language processing library (e.g., NLTK, Spacy). Tokenization divides the dialogue into words and phrases.
[0119] The server then trains a natural language generation model based on the preprocessed data and contextual information (e.g., surrounding dialogue and situation descriptions). The model is trained using a deep learning framework (e.g., TensorFlow, PyTorch) to learn the character's characteristics and speaking style.
[0120] When a user inputs the text they want to generate, the server receives the input and performs some preprocessing, which may include grammatical corrections and the conversion of certain words. The preprocessed data is then fed back into the natural language generation model, which generates text in the tone and expressions of the specified character.
[0121] The generated text is then post-processed to further emphasize the character's likeness. The server adds character-specific phrases and emotional expressions to the generated text, completing the final text. The completed text is then returned to the user via the terminal.
[0122] As a concrete example, if a user wants to generate the text "What's the weather like today?" in the voice of "Character A," the system will operate as follows:
[0123] 1. The user uses the system interface to specify "Character A" and enter "What's the weather like today?"
[0124] 2. The server collects dialogue data related to the specified character A through APIs on the Internet, script analysis, and database references.
[0125] 3. The server cleanses unnecessary information from the dialogue data and tokenizes it.
[0126] 4. The server trains a natural language generation model using a deep learning framework based on the preprocessed data.
[0127] 5. The server analyzes the user input "What's the weather like today?" and performs preprocessing.
[0128] 6. The server feeds the preprocessed input data into the natural language generation model and generates the text "It's a sunny day today!" in the voice of "Character A."
[0129] 7. The server adds phrases and expressions that are typical of Character A to the generated text, generating the final text: "I know the weather is sunny today!"
[0130] 8. The server sends the final text to the user's terminal for display.
[0131] This system allows users to generate natural-sounding text in the tone and manner of speech of a specified character, providing a more immersive dialogue experience.
[0132] Examples of prompts using generative AI models include:
[0133] "Say the following line in the voice of Character A: 'What's the weather like today?'"
[0134] "In the voice of Character B, answer the following question: 'What is your favorite food?'"
[0135] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0136] Step 1:
[0137] Character selection and data collection
[0138] Input: Characters specified by the user
[0139] Specific behavior:
[0140] The user uses the system's interface to specify the character they wish to generate.
[0141] The server identifies the works in which the specified character appears (e.g., movies, anime, manga, games, etc.) and collects dialogue data using APIs publicly available on the Internet.
[0142] The server also retrieves relevant dialogue data from official scripts and online databases.
[0143] Output: Character dialogue data
[0144] Step 2:
[0145] Data Cleansing and Tokenization
[0146] Input: Collected character dialogue data
[0147] Specific behavior:
[0148] The server cleanses the collected dialogue data, removing unnecessary information (e.g., narration and other character lines) using regular expressions and fuzzy matching algorithms.
[0149] The server tokenizes this cleansed data using a natural language processing library (e.g., NLTK, Spacy), specifically by dividing the dialogue into words and phrases.
[0150] Output: Preprocessed, tokenized dialogue data
[0151] Step 3:
[0152] Training the model
[0153] Input: Preprocessed tokenized dialogue data and context information
[0154] Specific behavior:
[0155] The server uses the preprocessed data and contextual information (e.g., surrounding dialogue and situation descriptions) to train a natural language generation model (e.g., built with TensorFlow or PyTorch).
[0156] The model is trained iteratively on huge amounts of data to learn the character's characteristics and speaking style.
[0157] Output: A trained natural language generation model
[0158] Step 4:
[0159] Accepting and Preprocessing User Input
[0160] Input: Text entered by the user
[0161] Specific behavior:
[0162] The user enters the text content they want to generate into an input field in the system (e.g., "What's the weather like today?").
[0163] The server receives this user input and performs pre-processing, including grammar correction and conversion of certain words.
[0164] Output: Preprocessed user input data
[0165] Step 5:
[0166] Text Generation
[0167] Input: Preprocessed user input data
[0168] Specific behavior:
[0169] The server inputs the preprocessed user input data into a natural language generation model and uses the model to generate text in the voice and expressions of the specified character.
[0170] Output: The generated text
[0171] Step 6:
[0172] Post-processing and returning results
[0173] Input: Generated text
[0174] Specific behavior:
[0175] The server then performs post-processing on the generated text, adding character-specific phrases and emotional expressions, making the generated text more character-like.
[0176] The server sends the final text to the user's terminal for display.
[0177] Output: Final adjusted text, text returned to user
[0178] (Application example 1)
[0179] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0180] Conventional natural language generation systems have difficulty accurately imitating the tone and manner of speech of a specific character, making it difficult to generate responses that are characteristic of the character desired by the user. Furthermore, the experience from the time the generated text is returned to the user lacks consistency, preventing a sense of immersion for the user.
[0181] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0182] In this invention, the server includes means for collecting dialogue data from media data in which a character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, means for postprocessing the generated text and adding character-specific expressions, and means including a terminal on which the generated text is displayed and returned to the user, thereby enabling the character's unique tone and expressions to be accurately imitated, providing a consistent user experience.
[0183] "Media data featuring characters" refers to digital or analog data that includes scenes in which a specific character speaks lines in anime, manga, movies, games, etc.
[0184] "Dialogue data" refers to text information including the content of a character's speech, obtained from media data in which the character appears.
[0185] "Preprocessing" refers to processes such as removing unnecessary information and splitting words and phrases from dialogue data or user input in order to convert it into a format suitable for training and generating natural language generation models.
[0186] A "natural language generation model" is a machine learning model that generates new text based on input text data, and is specifically trained to imitate a character's unique speaking style and expressions.
[0187] "Post-processing" refers to the process of adding character-specific expressions or adjusting grammar to text generated by a natural language generation model.
[0188] "Device" refers to the user's device on which the generated text will ultimately be displayed, including smartphones, tablets, and personal computers.
[0189] "User input" refers to text information that a user writes and transmits to a natural language generation model the text content that the user desires to generate.
[0190] Specific embodiments for carrying out the present invention will be described below.
[0191] A system that realizes this application example imitates the tone and speaking style of a character and returns generated text to a user. The system consists of the following elements: means for collecting dialogue data from media data in which the character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, means for postprocessing the generated text and adding character-specific expressions, and means including a terminal on which the generated text to be returned to the user is displayed.
[0192] The system works as follows: First, the server collects dialogue data from media sources (anime, manga, movies, games, etc.) in which the characters appear. This process involves using methods such as APIs to obtain text data, analyzing official scripts, and referencing online databases. The hardware used includes cloud servers with high processing power. The software also utilizes APIs suitable for data acquisition.
[0193] Next, the server preprocesses the collected dialogue data. Specifically, it removes unnecessary information using regular expressions and fuzzy matching algorithms, and tokenizes the data using a natural language processing library (e.g., NLTK, Spacy). This process splits the dialogue data into individual words and phrases, and converts it into a format that can be used as training data for natural language generation models.
[0194] The server then trains a natural language generation model using a deep learning framework (e.g., TensorFlow, PyTorch) based on the preprocessed tokenized data. The training dataset also includes contextual information for each line (e.g., surrounding lines and situation descriptions) to generate more natural and character-like responses.
[0195] When a user wants to generate text, they input the text through the smartphone UI. This input data is preprocessed by the server and converted into a format suitable for the generative AI model. The server then uses the preprocessed input data to utilize a natural language generation model to generate text in the voice of the specified character.
[0196] The server performs post-processing on the generated text, adding phrases and emotional expressions specific to the character. This makes the generated text more character-like. The final adjusted text is returned from the server to the user via a device (such as a smartphone). The user can then view the generated text on their device.
[0197] As a concrete example, if a user wants to ask the question "What's the weather like today?" in the voice of "Character A," the system will send the following prompt sentence to the generative AI model:
[0198] Example prompt sentence:
[0199] User: How was your day?
[0200] Character A: Hey, today was awesome! How was it for you?
[0201] User: What's the weather like today?
[0202] Based on this prompt, the generative AI model generates a response in Character A's tone of voice, returning text such as, "I'm curious about today's weather!"
[0203] As described above, the present invention can accurately mimic the character's unique tone and expressions, providing a consistent user experience.
[0204] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0205] Step 1:
[0206] The server collects dialogue data from the media data in which the characters appear. Specifically, it uses methods such as obtaining text data via an API, analyzing official scripts, and referencing online databases. The input for this step is the media data in which the characters appear, and the output is the collected dialogue data.
[0207] Step 2:
[0208] The server preprocesses the collected dialogue data. It uses regular expressions and fuzzy matching algorithms to remove unnecessary information (narration and lines from other characters) from the dialogue data. It then uses tokenization to split the dialogue data into words and phrases. The input is the collected dialogue data, and the output is the preprocessed tokenized data.
[0209] Step 3:
[0210] The server trains a natural language generation model using the preprocessed tokenized data. It uses a deep learning framework (e.g., TensorFlow, PyTorch) to learn the character's features. The input is the preprocessed tokenized data, and the output is a trained generative AI model.
[0211] Step 4:
[0212] The user inputs the text content they want to generate through their device. Specifically, the user inputs text through the smartphone's UI. The input for this step is the text entered by the user, and the output is that text data.
[0213] Step 5:
[0214] The server preprocesses the user input. It analyzes the user's text input and performs grammar corrections and specific word conversions for the generative AI model. The input is the text data of the user input sent from the terminal, and the output is the preprocessed input data.
[0215] Step 6:
[0216] The server uses the preprocessed input data to generate text using a natural language generation model. The text is generated in the tone of a specified character. The input is the preprocessed input data, and the output is the generated text.
[0217] Step 7:
[0218] The server performs post-processing on the generated text. By adding character-specific phrases and emotional expressions, the generated text becomes more character-like. Specifically, it adjusts grammar and adds named entities. The input is the generated text, and the output is the post-processed text.
[0219] Step 8:
[0220] The server returns the final adjusted text to the device. The input of this step is the post-processed text, and the output is text generated in the voice of the character that is displayed on the user's device, such as a smartphone.
[0221] The above process makes it possible to generate natural text that mimics the unique expressions of characters, allowing users to enjoy the experience of interacting with their favorite characters.
[0222] Furthermore, an emotion engine that estimates the user's emotion may be combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59 and perform identification processing using the user's emotion.
[0223] A specific embodiment for implementing the present invention in combination with an emotion engine will be described below.
[0224] The system of the present invention realizes a natural language generation AI that mimics the tone and speaking style of a specific character, and further has the ability to recognize user emotions and adjust the generated text accordingly. This system is composed of the following elements: means for collecting dialogue data from works in which the character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, means for post-processing the generated text and adding character-specific expressions, and an emotion engine that recognizes emotions contained in the user input.
[0225] The specific program processing flow is as follows:
[0226] Collection of dialogue data
[0227] 1. Character Selection and Data Collection
[0228] The user accesses the system and selects their favorite character (e.g., Character A).
[0229] The terminal transmits the character information received from the user to the server.
[0230] The server collects dialogue data from works (e.g., anime or manga) in which the specified character A appears. This process includes calling APIs, parsing official scripts, and referencing online databases.
[0231] Preprocessing of dialogue data
[0232] 2. Data Cleansing and Tokenization
[0233] The server cleanses the collected dialogue data, removing unnecessary information (e.g., lines from other characters or narration), using regular expressions and fuzzy matching algorithms.
[0234] The server then tokenizes the cleansed data and splits each line into words and phrases using a natural language processing library (e.g., NLTK, Spacy).
[0235] Training a natural language generation model
[0236] 3. Training the model
[0237] The server trains a natural language generation model based on the preprocessed tokenized data, configures a deep learning framework (e.g., TensorFlow, PyTorch), and tunes the model's architecture and hyperparameters.
[0238] The training dataset includes contextual information for each line, allowing for more natural and character-like responses.
[0239] User Input Processing and Emotion Recognition
[0240] 4. Accepting and Preprocessing User Input
[0241] The user enters the text they want to generate (e.g., "What's the weather like today?").
[0242] The terminal sends the user input to the server.
[0243] The server analyzes the user input and uses an emotion engine to recognize the emotions contained in the input, using emotion recognition algorithms.
[0244] 5. Preprocessing of input data
[0245] The server assigns emotion labels based on the output of the emotion engine and performs preprocessing for the generative AI model, correcting grammar and converting specific words to adapt to Character A's style and the user's emotions.
[0246] Text Generation and Post-Processing
[0247] 6. Text Generation
[0248] The server uses the preprocessed input data to generate text using a natural language generation model, which generates text that reflects the tone of voice of Character A and the user's emotions.
[0249] 7. Post-processing
[0250] The server performs post-processing on the generated text, adding phrases and emotional expressions specific to Character A. Furthermore, it makes appropriate adjustments based on the user's emotions recognized by the emotion engine (e.g., "I'm curious about the weather today!").
[0251] Returning the results
[0252] 8. Submitting the final results
[0253] The server sends the final adjusted text to the terminal.
[0254] The device displays the generated text to the user, allowing the user to receive text in real time in the tone of their favorite character's voice and enjoy responses that correspond to their emotions.
[0255] For example, if a user inputs "I'm sad today" in the tone of "Character A," the emotion engine recognizes the emotion of "sad." The generative AI model reflects this emotional information and generates a response such as "I'm sad too," in the style of Character A. After that, it undergoes post-processing to further adjust the expression to suit the character and return it to the user.
[0256] Through the above process, the system accurately imitates the tone and manner of speech of a specific character and generates text that reflects the user's emotions. Users can converse in real time in the tone of their favorite character's voice and enjoy personalized responses based on their emotions.
[0257] The processing flow will be explained below.
[0258] Step 1:
[0259] The user accesses the system and selects their favorite character (e.g., Character A).
[0260] The terminal transmits the character information received from the user to the server.
[0261] Step 2:
[0262] The server collects dialogue data from works (e.g., anime or manga) in which the specified character A appears.
[0263] The server calls the API to retrieve the dialogue data from an online database.
[0264] The server analyzes text from official scripts, script files, etc. and extracts the necessary lines.
[0265] Step 3:
[0266] The server cleanses the collected dialogue data.
[0267] The server uses regular expressions to remove unnecessary information (e.g., lines from other characters or narration).
[0268] The server uses a fuzzy matching algorithm to correct the incomplete text.
[0269] Step 4:
[0270] The server tokenizes the cleansed dialogue data.
[0271] The server uses a natural language processing library (e.g., NLTK, Spacy) to split the dialogue into words and phrases.
[0272] The server classifies each line by context and assigns appropriate tags.
[0273] Step 5:
[0274] The server trains a natural language generation model based on the preprocessed tokenized data.
[0275] The server configures the deep learning framework (e.g., TensorFlow, PyTorch) and tunes the model architecture and hyperparameters.
[0276] The server adds contextual information to each line in the training dataset, allowing for more natural, character-like responses to be generated.
[0277] Step 6:
[0278] The user enters the text they want to generate (e.g., "What's the weather like today?").
[0279] The terminal sends the user input to the server.
[0280] Step 7:
[0281] The server analyzes the user input and uses an emotion engine to recognize the emotion contained in the input.
[0282] The server uses an emotion recognition algorithm to extract emotions from the input text.
[0283] The server assigns emotion labels to the input data based on the output of the emotion engine.
[0284] Step 8:
[0285] The server generates text using a natural language generation model based on the preprocessed input data.
[0286] The server generates text that reflects the emotion label and character A's style.
[0287] Step 9:
[0288] The server performs post-processing on the generated text.
[0289] The server adds phrases and emotes specific to Character A and makes further fine-tuning adjustments (e.g., "I'm curious about the weather today!").
[0290] The server adjusts the generated text based on the user's emotions recognized by the emotion engine.
[0291] Step 10:
[0292] The server sends the final adjusted text to the terminal.
[0293] The terminal displays the generated text to the user.
[0294] Through these steps, users can receive text generated in the tone of their favorite character and enjoy personalized responses based on their emotions.
[0295] Example 2
[0296] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0297] Currently, there are natural language generation AI systems that can mimic the tone and speaking style of specific characters. However, systems that take user emotions into account and generate appropriate responses in real time are still lacking. Existing systems have struggled to enrich the user experience by incorporating emotion recognition into text generation.
[0298] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[0299] In this invention, the server includes means for collecting dialogue data from works in which the character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for recognizing a user's emotion and preprocessing a user input including the emotion information, means for generating text using the natural language generation model based on the preprocessed input data, and means for post-processing the generated text to add character-specific expressions and adjust the text according to the user's emotion. This makes it possible to provide natural responses in real time that take the user's emotion into consideration while imitating the tone and speaking style of a specific character.
[0300] "Character" refers to a person, creature, or fictional being that appears in a story or work.
[0301] "Works" refers to content such as anime, manga, novels, movies, and games, as well as the stories and depictions contained within them.
[0302] "Dialogue data" refers to information collected as data on the words and dialogue that characters utter within a work.
[0303] "Collection" refers to the process of gathering the necessary data and information in various ways.
[0304] "Preprocessing" refers to the preparation process used in data analysis and machine learning to prepare data for use.
[0305] A "natural language generation model" is a machine learning model or algorithm for generating sentences in human language.
[0306] "User input" means the act of a system user inputting text, commands, etc., and the content of such input.
[0307] "Emotion recognition" refers to the technology and process of analyzing and identifying emotions from user input and expressions.
[0308] "Post-processing" refers to the process of making final adjustments or processing to the generated data or results.
[0309] "Unique expressions" refer to expressions or phrases that are specific to a particular character or context.
[0310] "Adjust" means changing data, results, or settings to suit a purpose.
[0311] This invention provides a natural language generation AI system that mimics the tone and speaking style of a specific character, and also has the ability to recognize the user's emotions and adjust the generated text accordingly. The system consists of the following components:
[0312] Collection of dialogue data
[0313] 1. The user accesses the system and selects their favorite character. For example, the user selects "Character A."
[0314] 2. The device sends the character information received from the user to the server.
[0315] 3. The server collects dialogue data from works (e.g., anime or manga) in which the specified character A appears. This process involves calling APIs and referencing online databases.
[0316] Preprocessing of dialogue data
[0317] 1. The server cleanses the collected data, using regular expressions to remove lines and narration from other characters.
[0318] 2. The server then tokenizes the data using a natural language processing library (e.g., Spacy) to split each line into words and phrases.
[0319] Training a natural language generation model
[0320] 1. The server trains a natural language generation model based on the preprocessed tokenized data, configures a deep learning framework (e.g., PyTorch), and tunes the model architecture and hyperparameters.
[0321] 2. The training dataset is enriched with contextual information to enable Character A to have natural conversations.
[0322] User Input Processing and Emotion Recognition
[0323] 1. The user enters the text they want to generate (e.g., "What's the weather like today?").
[0324] 2. The terminal sends the user's input to the server.
[0325] 3. The server uses an emotion engine to recognize the emotion (e.g., joy, sadness, anger) of the input data. Using an emotion recognition algorithm, it assigns an "emotion label" to the input data.
[0326] Preprocessing of input data
[0327] 1. The server adds emotion labels based on the output of the emotion engine and performs preprocessing for the generative AI model, correcting grammar and converting specific words to make it more suitable for Character A's style and the user's emotions.
[0328] Text Generation and Post-Processing
[0329] 1. The server uses the preprocessed input data to generate text that reflects Character A's tone of voice and the user's emotions using a natural language generation model.
[0330] 2. The server performs post-processing on the generated text, adding phrases and emotional expressions specific to Character A. It also makes further appropriate adjustments depending on the user's emotions recognized by the emotion engine.
[0331] Sending the final results
[0332] 1. The server sends the final adjusted text to the terminal.
[0333] 2. The device displays the generated text to the user, allowing the user to receive text generated in Character A's tone in real time and enjoy responses that correspond to their emotions.
[0334] Specific examples
[0335] For example, if a user inputs "I'm sad today" in the tone of "Character A," the server's emotion engine will recognize the emotion of "sad." The generative AI model then applies this emotional information along with Character A's speaking style to generate a response such as "I'm sad too." Post-processing further adjusts the expression to be more character-like, and the final result is returned to the user.
[0336] Prompt Sentence Examples
[0337] "Write the following sentence in the voice of Character A: 'I feel sad today.'"
[0338] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0339] Step 1:
[0340] Character selection and data collection
[0341] A user accesses the system and specifies their favorite character (e.g., "Character A"). This is the input. The device sends the character information received from the user to the server. The server collects dialogue data from works (e.g., anime or manga) in which the specified Character A appears. This process involves calling an API or referencing an online database. Specifically, the server queries the database to retrieve dialogue and contextual information related to Character A and saves this as the output.
[0342] Step 2:
[0343] Data Cleansing and Tokenization
[0344] The server performs data cleansing on the collected dialogue data, using regular expressions to remove unnecessary information such as lines from other characters and narration. The specific input is the collected dialogue data, and the server uses regular expression pattern matching to filter out unnecessary information and outputs the cleansed data. The server then uses a natural language processing library (e.g., Spacy) to tokenize the cleansed data and split each line into words and phrases. This split data is the output.
[0345] Step 3:
[0346] Training a natural language generation model
[0347] The server trains a natural language generation model based on the preprocessed tokenized data. It configures a deep learning framework (e.g., PyTorch) and adjusts the model architecture and hyperparameters. The input is the tokenized data, and the server trains the model using the deep learning framework. As a result of the training, the model parameters and weights are adjusted so that Character A can have natural conversations. This trained model is the output.
[0348] Step 4:
[0349] Accepting and Preprocessing User Input
[0350] The user enters the text content they want to generate (e.g., "What's the weather like today?"). This is the input. The device sends the user's input to the server. The server uses an emotion engine to recognize the emotion of the entered text. Specifically, the server applies an emotion recognition algorithm to extract an emotion label from the input. This emotion label is the output.
[0351] Step 5:
[0352] Preprocessing of input data
[0353] The server adds emotion labels based on the output of the emotion engine and performs preprocessing for the generative AI model. The input is the text entered by the user and the emotion labels. The server corrects grammar and converts specific words to format it to suit Character A's style and the user's emotion. This preprocessed data is the output.
[0354] Step 6:
[0355] Text generation
[0356] The server uses the preprocessed input data to generate text that reflects Character A's tone of voice and the user's emotions using a natural language generation model. The input is the preprocessed data and a trained generative AI model. The server applies a natural language generation algorithm based on these to generate text. The generated text is the output.
[0357] Step 7:
[0358] Post-Processing
[0359] The server performs post-processing on the generated text, adding phrases and emotional expressions specific to Character A. It also makes appropriate adjustments based on the user's emotions recognized by the emotion engine. The input is the generated text, and the server applies the post-processing algorithm to output text supplemented with expressions specific to Character A.
[0360] Step 8:
[0361] Returning the results
[0362] The server sends the final adjusted text to the terminal. The input is the post-processed text. The terminal displays the generated text to the user. This displayed text becomes the output, and the user can receive the text generated in the tone of Character A in real time and enjoy responses according to their emotions.
[0363] (Application example 2)
[0364] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0365] Conventional natural language generation systems have difficulty not only imitating the tone and speaking style of a specific character, but also generating real-time responses that reflect the user's emotions. Furthermore, they lack the ability to recognize the user's emotions and generate text accordingly, limiting the user experience.
[0366] The identification processing by the identification processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for collecting dialogue data from works in which the character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, means for postprocessing the generated text and adding character-specific expressions, and means for recognizing the user's emotions and adjusting the generated text according to the emotions. This makes it possible to not only imitate the tone and speaking style of a specific character, but also to generate responses in real time that reflect the user's emotions.
[0367] A "means for collecting dialogue data from works in which a character appears" is a method or device for obtaining dialogue spoken by a particular character from a movie, anime, TV program, manga, etc. in which that character appears.
[0368] "Means for preprocessing collected dialogue data" refers to a method or device for performing processes such as cleansing and filtering on the acquired dialogue data to remove noise and prepare the data in a format suitable for analysis and model training.
[0369] A "means for training a natural language generation model on preprocessed data" is a method or apparatus for training a natural language generation model (e.g., a generative AI model) using preprocessed data.
[0370] "Means for preprocessing user input and generating text using a natural language generation model based on the preprocessed data" means a method or device for analyzing and formatting input text received from a user and generating new text based on that data using a pre-trained natural language generation model.
[0371] "Means for post-processing the generated text to add character-specific expressions" refers to a method or device for performing additional processing on the generated text to add expressions or phrases that are characteristic of a particular character.
[0372] "Means for recognizing user emotions and adjusting generated text accordingly" refers to a method or device for analyzing emotions from user input and appropriately modifying or adjusting generated text according to the user's emotional state.
[0373] A system for implementing this invention comprises the following elements: collecting dialogue data from works in which the character appears, preprocessing the data, and then training a natural language generation model; preprocessing text entered by a user, generating text based on the emotion using the model, and finally returning the text to the user with character-specific expressions;
[0374] System implementation
[0375] Hardware and software used
[0376] Hardware: Smartphone (iOS / ANDROID (registered trademark)), server
[0377] Software: Python environment, natural language processing library (SpaCy), deep learning framework (PyTorch or TensorFlow), tokenizer (for GPT-2), generative AI model (GPT-2)
[0378] Data collection and preprocessing
[0379] The server collects dialogue data for characters specified by the user. This data is automatically retrieved from online databases and official scripts. The collected data is then cleansed and tokenized to remove unnecessary information. This process uses regular expressions and a natural language processing library (SpaCy).
[0380] Model training
[0381] A natural language generation model is trained based on the preprocessed data. In this process, a deep learning framework (PyTorch or TensorFlow) is used to set the model's architecture and hyperparameters, and the model is trained to generate text that reflects the character's characteristics.
[0382] User Input Processing and Emotion Recognition
[0383] The text entered by the user through the smartphone is sent to the server, which analyzes the input and uses an emotion engine to recognize the user's emotions. This process uses emotion recognition algorithms.
[0384] Text Generation and Post-Processing
[0385] The user input with the emotion labels is fed into a generative AI model (GPT-2) to generate text that reflects the character's style and the user's emotion. The server then performs post-processing on the generated text, adding character-specific expressions and phrases. The final response is then returned to the user.
[0386] Specific examples
[0387] When a user types "What's the weather like today?", the system first preprocesses the user input and recognizes emotions using an emotion engine. It then uses a generative AI model to generate text and a response in Character A's voice style: "I'm curious about the weather today!" This response undergoes further post-processing before finally being returned to the user.
[0388] Prompt Sentence Examples
[0389] Example input: Write "I'm sad today" and have Character A respond.
[0390] Expected response: "I'm sad too."
[0391] Through this process, the system can mimic the tone and speaking style of a specific character and provide real-time response generation that recognizes the user's emotions.
[0392] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0393] Step 1:
[0394] The server collects dialogue data from works in which the characters appear. It receives character information specified by the user via smartphone and retrieves the corresponding dialogue data from online databases and official scripts. This is done by calling APIs and web scraping. The input is character information and the output is dialogue data.
[0395] Step 2:
[0396] The server preprocesses the collected dialogue data. Specifically, it uses regular expressions to remove unnecessary information and tokenizes it. During this process, the dialogue data is divided into words and phrases, and unnecessary parts are removed. The input is dialogue data, and the output is preprocessed tokenized data.
[0397] Step 3:
[0398] The server trains a natural language generation model (generative AI model) based on the preprocessed data. This process uses a deep learning framework (PyTorch or TensorFlow) to configure the model architecture and tune hyperparameters. The input is the preprocessed tokenized data, and the output is a trained natural language generation model.
[0399] Step 4:
[0400] The user inputs the text content they want to generate using their smartphone. The device sends this user input to the server. The input is the text entered by the user.
[0401] Step 5:
[0402] The server preprocesses user input. Specifically, it tokenizes the text and corrects grammar. It also uses an emotion engine to recognize the user's emotion from the input text and assigns an emotion label. The input is the user's text, and the output is the preprocessed text and emotion label.
[0403] Step 6:
[0404] The server uses the preprocessed input data to generate text using a natural language generation model. This generates text that reflects the character's tone of voice and the user's emotions. Post-processing is then performed on the generated text to add character-specific phrases and emotional expressions. The input is the preprocessed text and emotion labels, and the output is the generated text.
[0405] Step 7:
[0406] The server sends the final adjusted text to the terminal, which then displays the generated text to the user. This allows the user to receive text generated in the voice of their favorite character in real time and enjoy responses based on their emotions. The input is the adjusted text, and the output is the final text presented to the user.
[0407] Through the above processing steps, the system imitates the tone of a specific character and generates text that reflects the user's emotions.
[0408] The specific processing unit 290 transmits the result of the specific processing to the smart device 14. In the smart device 14, the control unit 46A causes the output device 40 to output the result of the specific processing. The microphone 38B acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[0409] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (registered trademark) (Internet search engine).<URL: https: / / openai.com / blog / chatgpt> ), Gemini (registered trademark) (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[0410] In the above embodiment, an example in which the specific process is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific process may be performed by the smart device 14.
[0411] [Second embodiment]
[0412] FIG. 3 shows an example of the configuration of a data processing system 210 according to the second embodiment.
[0413] 3, the data processing system 210 includes the data processing device 12 and smart glasses 214. An example of the data processing device 12 is a server.
[0414] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0415] The smart glasses 214 include a computer 36, a microphone 238, a speaker 240, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, and the camera 42 are also connected to the bus 52.
[0416] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[0417] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[0418] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[0419] Fig. 4 shows an example of the main functions of the data processing device 12 and the smart glasses 214. As shown in Fig. 4, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[0420] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0421] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0422] In the smart glasses 214, the reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0423] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the smart glasses 214 will be referred to as the "terminal."
[0424] Specific embodiments for carrying out the present invention will be described below.
[0425] The system of the present invention realizes a natural language generation AI that imitates the tone and speaking style of a specific character. This system is composed of the following elements: a means for collecting dialogue data from works in which the character appears, a means for preprocessing the collected dialogue data, a means for training a natural language generation model based on the preprocessed data, a means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, and a means for post-processing the generated text and adding character-specific expressions.
[0426] The specific program processing flow is as follows:
[0427] Collection of dialogue data
[0428] 1. Character Selection and Data Collection
[0429] The system begins operation when the user selects their favorite character.
[0430] The server collects dialogue data from works (e.g., movies, anime, manga, games, etc.) in which the specified character appears. This is done by obtaining text data via API, analyzing official scripts, referencing online databases, etc.
[0431] Preprocessing of dialogue data
[0432] 2. Data Cleansing and Tokenization
[0433] The server cleanses the collected dialogue data, removing unnecessary information (e.g., narration and other characters' lines), using regular expressions and fuzzy matching algorithms.
[0434] The server then tokenizes the cleansed data and splits each line into words and phrases using a natural language processing library (e.g., NLTK, Spacy).
[0435] Training a natural language generation model
[0436] 3. Training the model
[0437] The server trains a natural language generation model based on the preprocessed tokenized data using a deep learning framework (e.g., TensorFlow, PyTorch) to learn the character's characteristics.
[0438] The training dataset also includes contextual information for each line (e.g., previous and following lines, situation descriptions) to generate more natural and character-like responses.
[0439] User input processing and text generation
[0440] 4. Accepting and Preprocessing User Input
[0441] The user sends a request to the system by entering the text content they want to generate (e.g., "What's the weather like today?").
[0442] The server parses user input and pre-processes it for the generative AI model, including grammar correction and the transformation of certain words.
[0443] 5. Text Generation
[0444] The server uses the preprocessed input data to generate text in the voice of the specified character using a natural language generation model.
[0445] Post-processing and returning results
[0446] 6. Post-processing and returning results
[0447] The server then performs post-processing on the generated text, adding character-specific phrases and emotional expressions, making the generated text more character-like.
[0448] The final adjusted text is returned from the server to the user via the terminal (e.g., "I'm curious about today's weather!").
[0449] Specific example explanation
[0450] For example, if a user wants to generate text in the tone of "Character A," they first collect lines from anime or manga in which Character A appears. The collected lines are preprocessed and converted into an appropriate format. A natural language generation model is then trained based on this to generate text that responds to the user's input in Character A's tone. The generated text then undergoes post-processing to be adjusted to more closely resemble Character A and provided to the user.
[0451] Through the above process, this system realizes a generative AI that accurately imitates the tone and speaking style of a specific character. Users can generate text in the tone of their favorite character, enjoying a more immersive dialogue experience.
[0452] The processing flow will be explained below.
[0453] Step 1:
[0454] The user accesses the system and selects their favorite character (e.g., Character A).
[0455] The terminal transmits the character information received from the user to the server.
[0456] Step 2:
[0457] The server collects dialogue data from works (e.g., anime or manga) in which the specified character A appears.
[0458] The server calls the API to retrieve the dialogue data from an online database.
[0459] The server analyzes text from official scripts, script files, etc. and extracts the necessary lines.
[0460] Step 3:
[0461] The server cleanses the collected dialogue data.
[0462] The server uses regular expressions to remove unnecessary information (e.g., lines from other characters or narration).
[0463] The server uses a fuzzy matching algorithm to correct the incomplete text.
[0464] Step 4:
[0465] The server tokenizes the cleansed dialogue data.
[0466] The server uses a natural language processing library (e.g., NLTK, Spacy) to split the dialogue into words and phrases.
[0467] Classify each line by context and assign appropriate tags.
[0468] Step 5:
[0469] The server trains a natural language generation model based on the preprocessed tokenized data.
[0470] The server configures the deep learning framework (e.g., TensorFlow, PyTorch) and tunes the model architecture and hyperparameters.
[0471] The training dataset includes contextual information for each line.
[0472] Step 6:
[0473] The user enters the text they want to generate (e.g., "What's the weather like today?").
[0474] The terminal sends the user input to the server.
[0475] Step 7:
[0476] The server parses user input and pre-processes it for the generative AI model.
[0477] The server will make grammar corrections and convert certain words to suit Character A's style.
[0478] Step 8:
[0479] The server uses the preprocessed input data to generate text using a natural language generation model.
[0480] The server generates text that reflects the tone of voice of character A.
[0481] Step 9:
[0482] The server performs post-processing on the generated text.
[0483] The server adds phrases and emotes specific to Character A and makes further fine-tuning adjustments (e.g., "I'm curious about the weather today!").
[0484] Step 10:
[0485] The server sends the final adjusted text to the terminal.
[0486] The terminal displays the generated text to the user.
[0487] Through these steps, users can receive text generated in the tone of their favorite character, allowing them to enjoy a more immersive conversational experience.
[0488] Example 1
[0489] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0490] Conventional natural language generation systems have struggled to accurately mimic the tone and speaking style of a specific character. Obtaining output appropriate for a user-specified character requires a great deal of manual effort and adjustment, making it inefficient. Furthermore, they were unable to generate natural text that incorporates the character's expressiveness and context, limiting the user experience. Therefore, an efficient method for automatically generating natural language with the tone and speaking style of a specific character is needed.
[0491] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0492] In this invention, the server includes means for collecting dialogue data of a character designated by a user, means for cleansing the collected dialogue data and removing unnecessary information, means for tokenizing the cleansed data, means for training a natural language generation model based on the preprocessed data and contextual information, means for preprocessing user input and converting the input data for the generation AI model, means for generating text using the natural language generation model based on the preprocessed input data, means for post-processing the generated text and adding character-specific expressions, and means for returning the final text to the user. This enables the generation of natural text that has the tone and expressiveness of the designated character.
[0493] "Characters" are people, animals, robots, and other characters that appear in a particular work, and their speech patterns and expressions are imitated.
[0494] "Dialogue data" refers to the text information spoken by characters within a work, and is data used to train natural language generation models.
[0495] "Cleansing" is the process of removing unnecessary information and noise from collected dialogue data to turn it into pure text data.
[0496] "Tokenization" is the process of dividing cleansed text data into words and phrases, and is performed as an initial step in natural language processing.
[0497] "Contextual information" includes information about the context of the dialogue and a description of the situation, and is used by the natural language generation model to generate more appropriate responses.
[0498] A "natural language generation model" is an AI model that generates natural-sounding sentences based on input text data, and is trained using deep learning technology.
[0499] "Preprocessing" is the process of analyzing user-entered text data and converting it into a format that can be properly processed by the generative AI model.
[0500] "Post-processing" is the process of making final adjustments to the generated text, adding character-specific expressions and emotions to make the text more natural.
[0501] "Return" is the process of sending the final generated text to the user's terminal and displaying it to the user.
[0502] A "generative AI model" is an artificial intelligence model that generates natural language and has the ability to generate text based on the tone and expressions of a specified character.
[0503] The present invention relates to a natural language generation AI system that imitates the tone and speaking style of a specific character. Specific embodiments of the present invention will be described in detail below.
[0504] When a user uses the system, they first specify the character they want to generate. In order to imitate the character's speaking style, they must first collect relevant dialogue data. The server uses an API publicly available on the Internet to collect dialogue data from works (e.g., movies, anime, manga, games, etc.) in which the specified character appears. At this time, the server also references official scripts and online databases to obtain as much dialogue information as possible.
[0505] The collected dialogue data cannot be used as is, so the server performs data cleansing. Specifically, regular expressions and fuzzy matching algorithms are used to remove unnecessary information and noise (e.g., narration and lines from other characters) and extract only the characters' lines. This cleansed data is then tokenized using a natural language processing library (e.g., NLTK, Spacy). Tokenization divides the dialogue into words and phrases.
[0506] The server then trains a natural language generation model based on the preprocessed data and contextual information (e.g., surrounding dialogue and situation descriptions). The model is trained using a deep learning framework (e.g., TensorFlow, PyTorch) to learn the character's characteristics and speaking style.
[0507] When a user inputs the text they want to generate, the server receives the input and performs some preprocessing, which may include grammatical corrections and the conversion of certain words. The preprocessed data is then fed back into the natural language generation model, which generates text in the tone and expressions of the specified character.
[0508] The generated text is then post-processed to further emphasize the character's likeness. The server adds character-specific phrases and emotional expressions to the generated text, completing the final text. The completed text is then returned to the user via the terminal.
[0509] As a concrete example, if a user wants to generate the text "What's the weather like today?" in the voice of "Character A," the system will operate as follows:
[0510] 1. The user uses the system interface to specify "Character A" and enter "What's the weather like today?"
[0511] 2. The server collects dialogue data related to the specified character A through APIs on the Internet, script analysis, and database references.
[0512] 3. The server cleanses unnecessary information from the dialogue data and tokenizes it.
[0513] 4. The server trains a natural language generation model using a deep learning framework based on the preprocessed data.
[0514] 5. The server analyzes the user input "What's the weather like today?" and performs preprocessing.
[0515] 6. The server feeds the preprocessed input data into the natural language generation model and generates the text "It's a sunny day today!" in the voice of "Character A."
[0516] 7. The server adds phrases and expressions that are typical of Character A to the generated text, generating the final text: "I know the weather is sunny today!"
[0517] 8. The server sends the final text to the user's terminal for display.
[0518] This system allows users to generate natural-sounding text in the tone and manner of speech of a specified character, providing a more immersive dialogue experience.
[0519] Examples of prompts using generative AI models include:
[0520] "Say the following line in the voice of Character A: 'What's the weather like today?'"
[0521] "In the voice of Character B, answer the following question: 'What is your favorite food?'"
[0522] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0523] Step 1:
[0524] Character selection and data collection
[0525] Input: Characters specified by the user
[0526] Specific behavior:
[0527] The user uses the system's interface to specify the character they wish to generate.
[0528] The server identifies the works in which the specified character appears (e.g., movies, anime, manga, games, etc.) and collects dialogue data using APIs publicly available on the Internet.
[0529] The server also retrieves relevant dialogue data from official scripts and online databases.
[0530] Output: Character dialogue data
[0531] Step 2:
[0532] Data Cleansing and Tokenization
[0533] Input: Collected character dialogue data
[0534] Specific behavior:
[0535] The server cleanses the collected dialogue data, removing unnecessary information (e.g., narration and other character lines) using regular expressions and fuzzy matching algorithms.
[0536] The server tokenizes this cleansed data using a natural language processing library (e.g., NLTK, Spacy), specifically by dividing the dialogue into words and phrases.
[0537] Output: Preprocessed, tokenized dialogue data
[0538] Step 3:
[0539] Training the model
[0540] Input: Preprocessed tokenized dialogue data and context information
[0541] Specific behavior:
[0542] The server uses the preprocessed data and contextual information (e.g., surrounding dialogue and situation descriptions) to train a natural language generation model (e.g., built with TensorFlow or PyTorch).
[0543] The model is trained iteratively on huge amounts of data to learn the character's characteristics and speaking style.
[0544] Output: A trained natural language generation model
[0545] Step 4:
[0546] Accepting and Preprocessing User Input
[0547] Input: Text entered by the user
[0548] Specific behavior:
[0549] The user enters the text content they want to generate into an input field in the system (e.g., "What's the weather like today?").
[0550] The server receives this user input and performs pre-processing, including grammar correction and conversion of certain words.
[0551] Output: Preprocessed user input data
[0552] Step 5:
[0553] Text Generation
[0554] Input: Preprocessed user input data
[0555] Specific behavior:
[0556] The server inputs the preprocessed user input data into a natural language generation model and uses the model to generate text in the voice and expressions of the specified character.
[0557] Output: The generated text
[0558] Step 6:
[0559] Post-processing and returning results
[0560] Input: Generated text
[0561] Specific behavior:
[0562] The server then performs post-processing on the generated text, adding character-specific phrases and emotional expressions, making the generated text more character-like.
[0563] The server sends the final text to the user's terminal for display.
[0564] Output: Final adjusted text, text returned to user
[0565] (Application example 1)
[0566] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0567] Conventional natural language generation systems have difficulty accurately imitating the tone and manner of speech of a specific character, making it difficult to generate responses that are characteristic of the character desired by the user. Furthermore, the experience from the time the generated text is returned to the user lacks consistency, preventing a sense of immersion for the user.
[0568] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0569] In this invention, the server includes means for collecting dialogue data from media data in which a character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, means for postprocessing the generated text and adding character-specific expressions, and means including a terminal on which the generated text is displayed and returned to the user, thereby enabling the character's unique tone and expressions to be accurately imitated, providing a consistent user experience.
[0570] "Media data featuring characters" refers to digital or analog data that includes scenes in which a specific character speaks lines in anime, manga, movies, games, etc.
[0571] "Dialogue data" refers to text information including the content of a character's speech, obtained from media data in which the character appears.
[0572] "Preprocessing" refers to processes such as removing unnecessary information and splitting words and phrases from dialogue data or user input in order to convert it into a format suitable for training and generating natural language generation models.
[0573] A "natural language generation model" is a machine learning model that generates new text based on input text data, and is specifically trained to imitate a character's unique speaking style and expressions.
[0574] "Post-processing" refers to the process of adding character-specific expressions or adjusting grammar to text generated by a natural language generation model.
[0575] "Device" refers to the user's device on which the generated text will ultimately be displayed, including smartphones, tablets, and personal computers.
[0576] "User input" refers to text information that a user writes and transmits to a natural language generation model the text content that the user desires to generate.
[0577] Specific embodiments for carrying out the present invention will be described below.
[0578] A system that realizes this application example imitates the tone and speaking style of a character and returns generated text to a user. The system consists of the following elements: means for collecting dialogue data from media data in which the character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, means for postprocessing the generated text and adding character-specific expressions, and means including a terminal on which the generated text to be returned to the user is displayed.
[0579] The system works as follows: First, the server collects dialogue data from media sources (anime, manga, movies, games, etc.) in which the characters appear. This process involves using methods such as APIs to obtain text data, analyzing official scripts, and referencing online databases. The hardware used includes cloud servers with high processing power. The software also utilizes APIs suitable for data acquisition.
[0580] Next, the server preprocesses the collected dialogue data. Specifically, it removes unnecessary information using regular expressions and fuzzy matching algorithms, and tokenizes the data using a natural language processing library (e.g., NLTK, Spacy). This process splits the dialogue data into individual words and phrases, and converts it into a format that can be used as training data for natural language generation models.
[0581] The server then trains a natural language generation model using a deep learning framework (e.g., TensorFlow, PyTorch) based on the preprocessed tokenized data. The training dataset also includes contextual information for each line (e.g., surrounding lines and situation descriptions) to generate more natural and character-like responses.
[0582] When a user wants to generate text, they input the text through the smartphone UI. This input data is preprocessed by the server and converted into a format suitable for the generative AI model. The server then uses the preprocessed input data to utilize a natural language generation model to generate text in the voice of the specified character.
[0583] The server performs post-processing on the generated text, adding phrases and emotional expressions specific to the character. This makes the generated text more character-like. The final adjusted text is returned from the server to the user via a device (such as a smartphone). The user can then view the generated text on their device.
[0584] As a concrete example, if a user wants to ask the question "What's the weather like today?" in the voice of "Character A," the system will send the following prompt sentence to the generative AI model:
[0585] Example prompt sentence:
[0586] User: How was your day?
[0587] Character A: Hey, today was awesome! How was it for you?
[0588] User: What's the weather like today?
[0589] Based on this prompt, the generative AI model generates a response in Character A's tone of voice, returning text such as, "I'm curious about today's weather!"
[0590] As described above, the present invention can accurately mimic the character's unique tone and expressions, providing a consistent user experience.
[0591] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0592] Step 1:
[0593] The server collects dialogue data from the media data in which the characters appear. Specifically, it uses methods such as obtaining text data via an API, analyzing official scripts, and referencing online databases. The input for this step is the media data in which the characters appear, and the output is the collected dialogue data.
[0594] Step 2:
[0595] The server preprocesses the collected dialogue data. It uses regular expressions and fuzzy matching algorithms to remove unnecessary information (narration and lines from other characters) from the dialogue data. It then uses tokenization to split the dialogue data into words and phrases. The input is the collected dialogue data, and the output is the preprocessed tokenized data.
[0596] Step 3:
[0597] The server trains a natural language generation model using the preprocessed tokenized data. It uses a deep learning framework (e.g., TensorFlow, PyTorch) to learn the character's features. The input is the preprocessed tokenized data, and the output is a trained generative AI model.
[0598] Step 4:
[0599] The user inputs the text content they want to generate through their device. Specifically, the user inputs text through the smartphone's UI. The input for this step is the text entered by the user, and the output is that text data.
[0600] Step 5:
[0601] The server preprocesses the user input. It analyzes the user's text input and performs grammar corrections and specific word conversions for the generative AI model. The input is the text data of the user input sent from the terminal, and the output is the preprocessed input data.
[0602] Step 6:
[0603] The server uses the preprocessed input data to generate text using a natural language generation model. The text is generated in the tone of a specified character. The input is the preprocessed input data, and the output is the generated text.
[0604] Step 7:
[0605] The server performs post-processing on the generated text. By adding character-specific phrases and emotional expressions, the generated text becomes more character-like. Specifically, it adjusts grammar and adds named entities. The input is the generated text, and the output is the post-processed text.
[0606] Step 8:
[0607] The server returns the final adjusted text to the device. The input of this step is the post-processed text, and the output is text generated in the voice of the character that is displayed on the user's device, such as a smartphone.
[0608] The above process makes it possible to generate natural text that mimics the unique expressions of characters, allowing users to enjoy the experience of interacting with their favorite characters.
[0609] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[0610] A specific embodiment for implementing the present invention in combination with an emotion engine will be described below.
[0611] The system of the present invention realizes a natural language generation AI that mimics the tone and speaking style of a specific character, and further has the ability to recognize user emotions and adjust the generated text accordingly. This system is composed of the following elements: means for collecting dialogue data from works in which the character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, means for post-processing the generated text and adding character-specific expressions, and an emotion engine that recognizes emotions contained in the user input.
[0612] The specific program processing flow is as follows:
[0613] Collection of dialogue data
[0614] 1. Character Selection and Data Collection
[0615] The user accesses the system and selects their favorite character (e.g., Character A).
[0616] The terminal transmits the character information received from the user to the server.
[0617] The server collects dialogue data from works (e.g., anime or manga) in which the specified character A appears. This process includes calling APIs, parsing official scripts, and referencing online databases.
[0618] Preprocessing of dialogue data
[0619] 2. Data Cleansing and Tokenization
[0620] The server cleanses the collected dialogue data, removing unnecessary information (e.g., lines from other characters or narration), using regular expressions and fuzzy matching algorithms.
[0621] The server then tokenizes the cleansed data and splits each line into words and phrases using a natural language processing library (e.g., NLTK, Spacy).
[0622] Training a natural language generation model
[0623] 3. Training the model
[0624] The server trains a natural language generation model based on the preprocessed tokenized data, configures a deep learning framework (e.g., TensorFlow, PyTorch), and tunes the model's architecture and hyperparameters.
[0625] The training dataset includes contextual information for each line, allowing for more natural and character-like responses.
[0626] User Input Processing and Emotion Recognition
[0627] 4. Accepting and Preprocessing User Input
[0628] The user enters the text they want to generate (e.g., "What's the weather like today?").
[0629] The terminal sends the user input to the server.
[0630] The server analyzes the user input and uses an emotion engine to recognize the emotions contained in the input, using emotion recognition algorithms.
[0631] 5. Preprocessing of input data
[0632] The server assigns emotion labels based on the output of the emotion engine and performs preprocessing for the generative AI model, correcting grammar and converting specific words to adapt to Character A's style and the user's emotions.
[0633] Text Generation and Post-Processing
[0634] 6. Text Generation
[0635] The server uses the preprocessed input data to generate text using a natural language generation model, which generates text that reflects the tone of voice of Character A and the user's emotions.
[0636] 7. Post-processing
[0637] The server performs post-processing on the generated text, adding phrases and emotional expressions specific to Character A. Furthermore, it makes appropriate adjustments based on the user's emotions recognized by the emotion engine (e.g., "I'm curious about the weather today!").
[0638] Returning the results
[0639] 8. Submitting the final results
[0640] The server sends the final adjusted text to the terminal.
[0641] The device displays the generated text to the user, allowing the user to receive text in real time in the tone of their favorite character's voice and enjoy responses that correspond to their emotions.
[0642] For example, if a user inputs "I'm sad today" in the tone of "Character A," the emotion engine recognizes the emotion of "sad." The generative AI model reflects this emotional information and generates a response such as "I'm sad too," in the style of Character A. After that, it undergoes post-processing to further adjust the expression to suit the character and return it to the user.
[0643] Through the above process, the system accurately imitates the tone and manner of speech of a specific character and generates text that reflects the user's emotions. Users can converse in real time in the tone of their favorite character's voice and enjoy personalized responses based on their emotions.
[0644] The processing flow will be explained below.
[0645] Step 1:
[0646] The user accesses the system and selects their favorite character (e.g., Character A).
[0647] The terminal transmits the character information received from the user to the server.
[0648] Step 2:
[0649] The server collects dialogue data from works (e.g., anime or manga) in which the specified character A appears.
[0650] The server calls the API to retrieve the dialogue data from an online database.
[0651] The server analyzes text from official scripts, script files, etc. and extracts the necessary lines.
[0652] Step 3:
[0653] The server cleanses the collected dialogue data.
[0654] The server uses regular expressions to remove unnecessary information (e.g., lines from other characters or narration).
[0655] The server uses a fuzzy matching algorithm to correct the incomplete text.
[0656] Step 4:
[0657] The server tokenizes the cleansed dialogue data.
[0658] The server uses a natural language processing library (e.g., NLTK, Spacy) to split the dialogue into words and phrases.
[0659] The server classifies each line by context and assigns appropriate tags.
[0660] Step 5:
[0661] The server trains a natural language generation model based on the preprocessed tokenized data.
[0662] The server configures the deep learning framework (e.g., TensorFlow, PyTorch) and tunes the model architecture and hyperparameters.
[0663] The server adds contextual information to each line in the training dataset, allowing for more natural, character-like responses to be generated.
[0664] Step 6:
[0665] The user enters the text they want to generate (e.g., "What's the weather like today?").
[0666] The terminal sends the user input to the server.
[0667] Step 7:
[0668] The server analyzes the user input and uses an emotion engine to recognize the emotion contained in the input.
[0669] The server uses an emotion recognition algorithm to extract emotions from the input text.
[0670] The server assigns emotion labels to the input data based on the output of the emotion engine.
[0671] Step 8:
[0672] The server generates text using a natural language generation model based on the preprocessed input data.
[0673] The server generates text that reflects the emotion label and character A's style.
[0674] Step 9:
[0675] The server performs post-processing on the generated text.
[0676] The server adds phrases and emotes specific to Character A and makes further fine-tuning adjustments (e.g., "I'm curious about the weather today!").
[0677] The server adjusts the generated text based on the user's emotions recognized by the emotion engine.
[0678] Step 10:
[0679] The server sends the final adjusted text to the terminal.
[0680] The terminal displays the generated text to the user.
[0681] Through these steps, users can receive text generated in the tone of their favorite character and enjoy personalized responses based on their emotions.
[0682] Example 2
[0683] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0684] Currently, there are natural language generation AI systems that can mimic the tone and speaking style of specific characters. However, systems that take user emotions into account and generate appropriate responses in real time are still lacking. Existing systems have struggled to enrich the user experience by incorporating emotion recognition into text generation.
[0685] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[0686] In this invention, the server includes means for collecting dialogue data from works in which the character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for recognizing a user's emotion and preprocessing a user input including the emotion information, means for generating text using the natural language generation model based on the preprocessed input data, and means for post-processing the generated text to add character-specific expressions and adjust the text according to the user's emotion. This makes it possible to provide natural responses in real time that take the user's emotion into consideration while imitating the tone and speaking style of a specific character.
[0687] "Character" refers to a person, creature, or fictional being that appears in a story or work.
[0688] "Works" refers to content such as anime, manga, novels, movies, and games, as well as the stories and depictions contained within them.
[0689] "Dialogue data" refers to information collected as data on the words and dialogue that characters utter within a work.
[0690] "Collection" refers to the process of gathering the necessary data and information in various ways.
[0691] "Preprocessing" refers to the preparation process used in data analysis and machine learning to prepare data for use.
[0692] A "natural language generation model" is a machine learning model or algorithm for generating sentences in human language.
[0693] "User input" means the act of a system user inputting text, commands, etc., and the content of such input.
[0694] "Emotion recognition" refers to the technology and process of analyzing and identifying emotions from user input and expressions.
[0695] "Post-processing" refers to the process of making final adjustments or processing to the generated data or results.
[0696] "Unique expressions" refer to expressions or phrases that are specific to a particular character or context.
[0697] "Adjust" means changing data, results, or settings to suit a purpose.
[0698] This invention provides a natural language generation AI system that mimics the tone and speaking style of a specific character, and also has the ability to recognize the user's emotions and adjust the generated text accordingly. The system consists of the following components:
[0699] Collection of dialogue data
[0700] 1. The user accesses the system and selects their favorite character. For example, the user selects "Character A."
[0701] 2. The device sends the character information received from the user to the server.
[0702] 3. The server collects dialogue data from works (e.g., anime or manga) in which the specified character A appears. This process involves calling APIs and referencing online databases.
[0703] Preprocessing of dialogue data
[0704] 1. The server cleanses the collected data, using regular expressions to remove lines and narration from other characters.
[0705] 2. The server then tokenizes the data using a natural language processing library (e.g., Spacy) to split each line into words and phrases.
[0706] Training a natural language generation model
[0707] 1. The server trains a natural language generation model based on the preprocessed tokenized data, configures a deep learning framework (e.g., PyTorch), and tunes the model architecture and hyperparameters.
[0708] 2. The training dataset is enriched with contextual information to enable Character A to have natural conversations.
[0709] User Input Processing and Emotion Recognition
[0710] 1. The user enters the text they want to generate (e.g., "What's the weather like today?").
[0711] 2. The terminal sends the user's input to the server.
[0712] 3. The server uses an emotion engine to recognize the emotion (e.g., joy, sadness, anger) of the input data. Using an emotion recognition algorithm, it assigns an "emotion label" to the input data.
[0713] Preprocessing of input data
[0714] 1. The server adds emotion labels based on the output of the emotion engine and performs preprocessing for the generative AI model, correcting grammar and converting specific words to make it more suitable for Character A's style and the user's emotions.
[0715] Text Generation and Post-Processing
[0716] 1. The server uses the preprocessed input data to generate text that reflects Character A's tone of voice and the user's emotions using a natural language generation model.
[0717] 2. The server performs post-processing on the generated text, adding phrases and emotional expressions specific to Character A. It also makes further appropriate adjustments depending on the user's emotions recognized by the emotion engine.
[0718] Sending the final results
[0719] 1. The server sends the final adjusted text to the terminal.
[0720] 2. The device displays the generated text to the user, allowing the user to receive text generated in Character A's tone in real time and enjoy responses that correspond to their emotions.
[0721] Specific examples
[0722] For example, if a user inputs "I'm sad today" in the tone of "Character A," the server's emotion engine will recognize the emotion of "sad." The generative AI model then applies this emotional information along with Character A's speaking style to generate a response such as "I'm sad too." Post-processing further adjusts the expression to be more character-like, and the final result is returned to the user.
[0723] Prompt Sentence Examples
[0724] "Write the following sentence in the voice of Character A: 'I feel sad today.'"
[0725] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0726] Step 1:
[0727] Character selection and data collection
[0728] A user accesses the system and specifies their favorite character (e.g., "Character A"). This is the input. The device sends the character information received from the user to the server. The server collects dialogue data from works (e.g., anime or manga) in which the specified Character A appears. This process involves calling an API or referencing an online database. Specifically, the server queries the database to retrieve dialogue and contextual information related to Character A and saves this as the output.
[0729] Step 2:
[0730] Data Cleansing and Tokenization
[0731] The server performs data cleansing on the collected dialogue data, using regular expressions to remove unnecessary information such as lines from other characters and narration. The specific input is the collected dialogue data, and the server uses regular expression pattern matching to filter out unnecessary information and outputs the cleansed data. The server then uses a natural language processing library (e.g., Spacy) to tokenize the cleansed data and split each line into words and phrases. This split data is the output.
[0732] Step 3:
[0733] Training a natural language generation model
[0734] The server trains a natural language generation model based on the preprocessed tokenized data. It configures a deep learning framework (e.g., PyTorch) and adjusts the model architecture and hyperparameters. The input is the tokenized data, and the server trains the model using the deep learning framework. As a result of the training, the model parameters and weights are adjusted so that Character A can have natural conversations. This trained model is the output.
[0735] Step 4:
[0736] Accepting and Preprocessing User Input
[0737] The user enters the text content they want to generate (e.g., "What's the weather like today?"). This is the input. The device sends the user's input to the server. The server uses an emotion engine to recognize the emotion of the entered text. Specifically, the server applies an emotion recognition algorithm to extract an emotion label from the input. This emotion label is the output.
[0738] Step 5:
[0739] Preprocessing of input data
[0740] The server adds emotion labels based on the output of the emotion engine and performs preprocessing for the generative AI model. The input is the text entered by the user and the emotion labels. The server corrects grammar and converts specific words to format it to suit Character A's style and the user's emotion. This preprocessed data is the output.
[0741] Step 6:
[0742] Text generation
[0743] The server uses the preprocessed input data to generate text that reflects Character A's tone of voice and the user's emotions using a natural language generation model. The input is the preprocessed data and a trained generative AI model. The server applies a natural language generation algorithm based on these to generate text. The generated text is the output.
[0744] Step 7:
[0745] Post-Processing
[0746] The server performs post-processing on the generated text, adding phrases and emotional expressions specific to Character A. It also makes appropriate adjustments based on the user's emotions recognized by the emotion engine. The input is the generated text, and the server applies the post-processing algorithm to output text supplemented with expressions specific to Character A.
[0747] Step 8:
[0748] Returning the results
[0749] The server sends the final adjusted text to the terminal. The input is the post-processed text. The terminal displays the generated text to the user. This displayed text becomes the output, and the user can receive the text generated in the tone of Character A in real time and enjoy responses according to their emotions.
[0750] (Application example 2)
[0751] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0752] Conventional natural language generation systems have difficulty not only imitating the tone and speaking style of a specific character, but also generating real-time responses that reflect the user's emotions. Furthermore, they lack the ability to recognize the user's emotions and generate text accordingly, limiting the user experience.
[0753] The identification processing by the identification processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for collecting dialogue data from works in which the character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, means for postprocessing the generated text and adding character-specific expressions, and means for recognizing the user's emotions and adjusting the generated text according to the emotions. This makes it possible to not only imitate the tone and speaking style of a specific character, but also to generate responses in real time that reflect the user's emotions.
[0754] A "means for collecting dialogue data from works in which a character appears" is a method or device for obtaining dialogue spoken by a particular character from a movie, anime, TV program, manga, etc. in which that character appears.
[0755] "Means for preprocessing collected dialogue data" refers to a method or device for performing processes such as cleansing and filtering on the acquired dialogue data to remove noise and prepare the data in a format suitable for analysis and model training.
[0756] A "means for training a natural language generation model on preprocessed data" is a method or apparatus for training a natural language generation model (e.g., a generative AI model) using preprocessed data.
[0757] "Means for preprocessing user input and generating text using a natural language generation model based on the preprocessed data" means a method or device for analyzing and formatting input text received from a user and generating new text based on that data using a pre-trained natural language generation model.
[0758] "Means for post-processing the generated text to add character-specific expressions" refers to a method or device for performing additional processing on the generated text to add expressions or phrases that are characteristic of a particular character.
[0759] "Means for recognizing user emotions and adjusting generated text accordingly" refers to a method or device for analyzing emotions from user input and appropriately modifying or adjusting generated text according to the user's emotional state.
[0760] A system for implementing this invention comprises the following elements: collecting dialogue data from works in which the character appears, preprocessing the data, and then training a natural language generation model; preprocessing text entered by a user, generating text based on the emotion using the model, and finally returning the text to the user with character-specific expressions;
[0761] System implementation
[0762] Hardware and software used
[0763] Hardware: Smartphone (iOS / Android), server
[0764] Software: Python environment, natural language processing library (SpaCy), deep learning framework (PyTorch or TensorFlow), tokenizer (for GPT-2), generative AI model (GPT-2)
[0765] Data collection and preprocessing
[0766] The server collects dialogue data for characters specified by the user. This data is automatically retrieved from online databases and official scripts. The collected data is then cleansed and tokenized to remove unnecessary information. This process uses regular expressions and a natural language processing library (SpaCy).
[0767] Model training
[0768] A natural language generation model is trained based on the preprocessed data. In this process, a deep learning framework (PyTorch or TensorFlow) is used to set the model's architecture and hyperparameters, and the model is trained to generate text that reflects the character's characteristics.
[0769] User Input Processing and Emotion Recognition
[0770] The text entered by the user through the smartphone is sent to the server, which analyzes the input and uses an emotion engine to recognize the user's emotions. This process uses emotion recognition algorithms.
[0771] Text Generation and Post-Processing
[0772] The user input with the emotion labels is fed into a generative AI model (GPT-2) to generate text that reflects the character's style and the user's emotion. The server then performs post-processing on the generated text, adding character-specific expressions and phrases. The final response is then returned to the user.
[0773] Specific examples
[0774] When a user types "What's the weather like today?", the system first preprocesses the user input and recognizes emotions using an emotion engine. It then uses a generative AI model to generate text and a response in Character A's voice style: "I'm curious about the weather today!" This response undergoes further post-processing before finally being returned to the user.
[0775] Prompt Sentence Examples
[0776] Example input: Write "I'm sad today" and have Character A respond.
[0777] Expected response: "I'm sad too."
[0778] Through this process, the system can mimic the tone and speaking style of a specific character and provide real-time response generation that recognizes the user's emotions.
[0779] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0780] Step 1:
[0781] The server collects dialogue data from works in which the characters appear. It receives character information specified by the user via smartphone and retrieves the corresponding dialogue data from online databases and official scripts. This is done by calling APIs and web scraping. The input is character information and the output is dialogue data.
[0782] Step 2:
[0783] The server preprocesses the collected dialogue data. Specifically, it uses regular expressions to remove unnecessary information and tokenizes it. During this process, the dialogue data is divided into words and phrases, and unnecessary parts are removed. The input is dialogue data, and the output is preprocessed tokenized data.
[0784] Step 3:
[0785] The server trains a natural language generation model (generative AI model) based on the preprocessed data. This process uses a deep learning framework (PyTorch or TensorFlow) to configure the model architecture and tune hyperparameters. The input is the preprocessed tokenized data, and the output is a trained natural language generation model.
[0786] Step 4:
[0787] The user inputs the text content they want to generate using their smartphone. The device sends this user input to the server. The input is the text entered by the user.
[0788] Step 5:
[0789] The server preprocesses user input. Specifically, it tokenizes the text and corrects grammar. It also uses an emotion engine to recognize the user's emotion from the input text and assigns an emotion label. The input is the user's text, and the output is the preprocessed text and emotion label.
[0790] Step 6:
[0791] The server uses the preprocessed input data to generate text using a natural language generation model. This generates text that reflects the character's tone of voice and the user's emotions. Post-processing is then performed on the generated text to add character-specific phrases and emotional expressions. The input is the preprocessed text and emotion labels, and the output is the generated text.
[0792] Step 7:
[0793] The server sends the final adjusted text to the terminal, which then displays the generated text to the user. This allows the user to receive text generated in the voice of their favorite character in real time and enjoy responses based on their emotions. The input is the adjusted text, and the output is the final text presented to the user.
[0794] Through the above processing steps, the system imitates the tone of a specific character and generates text that reflects the user's emotions.
[0795] The specific processing unit 290 transmits the result of the specific processing to the smart glasses 214. In the smart glasses 214, the control unit 46A causes the speaker 240 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[0796] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[0797] In the above embodiment, an example in which the specific processing is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the smart glasses 214.
[0798] [Third embodiment]
[0799] FIG. 5 shows an example of the configuration of a data processing system 310 according to the third embodiment.
[0800] 5, the data processing system 310 includes the data processing device 12 and a headset terminal 314. An example of the data processing device 12 is a server.
[0801] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0802] The headset type terminal 314 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a display 343. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the display 343 are also connected to the bus 52.
[0803] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[0804] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[0805] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[0806] Fig. 6 shows an example of the main functions of the data processing device 12 and the headset type terminal 314. As shown in Fig. 6, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[0807] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0808] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0809] In the headset type terminal 314, a reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0810] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the headset type terminal 314 will be referred to as the "terminal."
[0811] Specific embodiments for carrying out the present invention will be described below.
[0812] The system of the present invention realizes a natural language generation AI that imitates the tone and speaking style of a specific character. This system is composed of the following elements: a means for collecting dialogue data from works in which the character appears, a means for preprocessing the collected dialogue data, a means for training a natural language generation model based on the preprocessed data, a means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, and a means for post-processing the generated text and adding character-specific expressions.
[0813] The specific program processing flow is as follows:
[0814] Collection of dialogue data
[0815] 1. Character Selection and Data Collection
[0816] The system begins operation when the user selects their favorite character.
[0817] The server collects dialogue data from works (e.g., movies, anime, manga, games, etc.) in which the specified character appears. This is done by obtaining text data via API, analyzing official scripts, referencing online databases, etc.
[0818] Preprocessing of dialogue data
[0819] 2. Data Cleansing and Tokenization
[0820] The server cleanses the collected dialogue data, removing unnecessary information (e.g., narration and other characters' lines), using regular expressions and fuzzy matching algorithms.
[0821] The server then tokenizes the cleansed data and splits each line into words and phrases using a natural language processing library (e.g., NLTK, Spacy).
[0822] Training a natural language generation model
[0823] 3. Training the model
[0824] The server trains a natural language generation model based on the preprocessed tokenized data using a deep learning framework (e.g., TensorFlow, PyTorch) to learn the character's characteristics.
[0825] The training dataset also includes contextual information for each line (e.g., previous and following lines, situation descriptions) to generate more natural and character-like responses.
[0826] User input processing and text generation
[0827] 4. Accepting and Preprocessing User Input
[0828] The user sends a request to the system by entering the text content they want to generate (e.g., "What's the weather like today?").
[0829] The server parses user input and pre-processes it for the generative AI model, including grammar correction and the transformation of certain words.
[0830] 5. Text Generation
[0831] The server uses the preprocessed input data to generate text in the voice of the specified character using a natural language generation model.
[0832] Post-processing and returning results
[0833] 6. Post-processing and returning results
[0834] The server then performs post-processing on the generated text, adding character-specific phrases and emotional expressions, making the generated text more character-like.
[0835] The final adjusted text is returned from the server to the user via the terminal (e.g., "I'm curious about today's weather!").
[0836] Specific example explanation
[0837] For example, if a user wants to generate text in the tone of "Character A," they first collect lines from anime or manga in which Character A appears. The collected lines are preprocessed and converted into an appropriate format. A natural language generation model is then trained based on this to generate text that responds to the user's input in Character A's tone. The generated text then undergoes post-processing to be adjusted to more closely resemble Character A and provided to the user.
[0838] Through the above process, this system realizes a generative AI that accurately imitates the tone and speaking style of a specific character. Users can generate text in the tone of their favorite character, enjoying a more immersive dialogue experience.
[0839] The processing flow will be explained below.
[0840] Step 1:
[0841] The user accesses the system and selects their favorite character (e.g., Character A).
[0842] The terminal transmits the character information received from the user to the server.
[0843] Step 2:
[0844] The server collects dialogue data from works (e.g., anime or manga) in which the specified character A appears.
[0845] The server calls the API to retrieve the dialogue data from an online database.
[0846] The server analyzes text from official scripts, script files, etc. and extracts the necessary lines.
[0847] Step 3:
[0848] The server cleanses the collected dialogue data.
[0849] The server uses regular expressions to remove unnecessary information (e.g., lines from other characters or narration).
[0850] The server uses a fuzzy matching algorithm to correct the incomplete text.
[0851] Step 4:
[0852] The server tokenizes the cleansed dialogue data.
[0853] The server uses a natural language processing library (e.g., NLTK, Spacy) to split the dialogue into words and phrases.
[0854] Classify each line by context and assign appropriate tags.
[0855] Step 5:
[0856] The server trains a natural language generation model based on the preprocessed tokenized data.
[0857] The server configures the deep learning framework (e.g., TensorFlow, PyTorch) and tunes the model architecture and hyperparameters.
[0858] The training dataset includes contextual information for each line.
[0859] Step 6:
[0860] The user enters the text they want to generate (e.g., "What's the weather like today?").
[0861] The terminal sends the user input to the server.
[0862] Step 7:
[0863] The server parses user input and pre-processes it for the generative AI model.
[0864] The server will make grammar corrections and convert certain words to suit Character A's style.
[0865] Step 8:
[0866] The server uses the preprocessed input data to generate text using a natural language generation model.
[0867] The server generates text that reflects the tone of voice of character A.
[0868] Step 9:
[0869] The server performs post-processing on the generated text.
[0870] The server adds phrases and emotes specific to Character A and makes further fine-tuning adjustments (e.g., "I'm curious about the weather today!").
[0871] Step 10:
[0872] The server sends the final adjusted text to the terminal.
[0873] The terminal displays the generated text to the user.
[0874] Through these steps, users can receive text generated in the tone of their favorite character, allowing them to enjoy a more immersive conversational experience.
[0875] Example 1
[0876] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[0877] Conventional natural language generation systems have struggled to accurately mimic the tone and speaking style of a specific character. Obtaining output appropriate for a user-specified character requires a great deal of manual effort and adjustment, making it inefficient. Furthermore, they were unable to generate natural text that incorporates the character's expressiveness and context, limiting the user experience. Therefore, an efficient method for automatically generating natural language with the tone and speaking style of a specific character is needed.
[0878] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0879] In this invention, the server includes means for collecting dialogue data of a character designated by a user, means for cleansing the collected dialogue data and removing unnecessary information, means for tokenizing the cleansed data, means for training a natural language generation model based on the preprocessed data and contextual information, means for preprocessing user input and converting the input data for the generation AI model, means for generating text using the natural language generation model based on the preprocessed input data, means for post-processing the generated text and adding character-specific expressions, and means for returning the final text to the user. This enables the generation of natural text that has the tone and expressiveness of the designated character.
[0880] "Characters" are people, animals, robots, and other characters that appear in a particular work, and their speech patterns and expressions are imitated.
[0881] "Dialogue data" refers to the text information spoken by characters within a work, and is data used to train natural language generation models.
[0882] "Cleansing" is the process of removing unnecessary information and noise from collected dialogue data to turn it into pure text data.
[0883] "Tokenization" is the process of dividing cleansed text data into words and phrases, and is performed as an initial step in natural language processing.
[0884] "Contextual information" includes information about the context of the dialogue and a description of the situation, and is used by the natural language generation model to generate more appropriate responses.
[0885] A "natural language generation model" is an AI model that generates natural-sounding sentences based on input text data, and is trained using deep learning technology.
[0886] "Preprocessing" is the process of analyzing user-entered text data and converting it into a format that can be properly processed by the generative AI model.
[0887] "Post-processing" is the process of making final adjustments to the generated text, adding character-specific expressions and emotions to make the text more natural.
[0888] "Return" is the process of sending the final generated text to the user's terminal and displaying it to the user.
[0889] A "generative AI model" is an artificial intelligence model that generates natural language and has the ability to generate text based on the tone and expressions of a specified character.
[0890] The present invention relates to a natural language generation AI system that imitates the tone and speaking style of a specific character. Specific embodiments of the present invention will be described in detail below.
[0891] When a user uses the system, they first specify the character they want to generate. In order to imitate the character's speaking style, they must first collect relevant dialogue data. The server uses an API publicly available on the Internet to collect dialogue data from works (e.g., movies, anime, manga, games, etc.) in which the specified character appears. At this time, the server also references official scripts and online databases to obtain as much dialogue information as possible.
[0892] The collected dialogue data cannot be used as is, so the server performs data cleansing. Specifically, regular expressions and fuzzy matching algorithms are used to remove unnecessary information and noise (e.g., narration and lines from other characters) and extract only the characters' lines. This cleansed data is then tokenized using a natural language processing library (e.g., NLTK, Spacy). Tokenization divides the dialogue into words and phrases.
[0893] The server then trains a natural language generation model based on the preprocessed data and contextual information (e.g., surrounding dialogue and situation descriptions). The model is trained using a deep learning framework (e.g., TensorFlow, PyTorch) to learn the character's characteristics and speaking style.
[0894] When a user inputs the text they want to generate, the server receives the input and performs some preprocessing, which may include grammatical corrections and the conversion of certain words. The preprocessed data is then fed back into the natural language generation model, which generates text in the tone and expressions of the specified character.
[0895] The generated text is then post-processed to further emphasize the character's likeness. The server adds character-specific phrases and emotional expressions to the generated text, completing the final text. The completed text is then returned to the user via the terminal.
[0896] As a concrete example, if a user wants to generate the text "What's the weather like today?" in the voice of "Character A," the system will operate as follows:
[0897] 1. The user uses the system interface to specify "Character A" and enter "What's the weather like today?"
[0898] 2. The server collects dialogue data related to the specified character A through APIs on the Internet, script analysis, and database references.
[0899] 3. The server cleanses unnecessary information from the dialogue data and tokenizes it.
[0900] 4. The server trains a natural language generation model using a deep learning framework based on the preprocessed data.
[0901] 5. The server analyzes the user input "What's the weather like today?" and performs preprocessing.
[0902] 6. The server feeds the preprocessed input data into the natural language generation model and generates the text "It's a sunny day today!" in the voice of "Character A."
[0903] 7. The server adds phrases and expressions that are typical of Character A to the generated text, generating the final text: "I know the weather is sunny today!"
[0904] 8. The server sends the final text to the user's terminal for display.
[0905] This system allows users to generate natural-sounding text in the tone and manner of speech of a specified character, providing a more immersive dialogue experience.
[0906] Examples of prompts using generative AI models include:
[0907] "Say the following line in the voice of Character A: 'What's the weather like today?'"
[0908] "In the voice of Character B, answer the following question: 'What is your favorite food?'"
[0909] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0910] Step 1:
[0911] Character selection and data collection
[0912] Input: Characters specified by the user
[0913] Specific behavior:
[0914] The user uses the system's interface to specify the character they wish to generate.
[0915] The server identifies the works in which the specified character appears (e.g., movies, anime, manga, games, etc.) and collects dialogue data using APIs publicly available on the Internet.
[0916] The server also retrieves relevant dialogue data from official scripts and online databases.
[0917] Output: Character dialogue data
[0918] Step 2:
[0919] Data Cleansing and Tokenization
[0920] Input: Collected character dialogue data
[0921] Specific behavior:
[0922] The server cleanses the collected dialogue data, removing unnecessary information (e.g., narration and other character lines) using regular expressions and fuzzy matching algorithms.
[0923] The server tokenizes this cleansed data using a natural language processing library (e.g., NLTK, Spacy), specifically by dividing the dialogue into words and phrases.
[0924] Output: Preprocessed, tokenized dialogue data
[0925] Step 3:
[0926] Training the model
[0927] Input: Preprocessed tokenized dialogue data and context information
[0928] Specific behavior:
[0929] The server uses the preprocessed data and contextual information (e.g., surrounding dialogue and situation descriptions) to train a natural language generation model (e.g., built with TensorFlow or PyTorch).
[0930] The model is trained iteratively on huge amounts of data to learn the character's characteristics and speaking style.
[0931] Output: A trained natural language generation model
[0932] Step 4:
[0933] Accepting and Preprocessing User Input
[0934] Input: Text entered by the user
[0935] Specific behavior:
[0936] The user enters the text content they want to generate into an input field in the system (e.g., "What's the weather like today?").
[0937] The server receives this user input and performs pre-processing, including grammar correction and conversion of certain words.
[0938] Output: Preprocessed user input data
[0939] Step 5:
[0940] Text Generation
[0941] Input: Preprocessed user input data
[0942] Specific behavior:
[0943] The server inputs the preprocessed user input data into a natural language generation model and uses the model to generate text in the voice and expressions of the specified character.
[0944] Output: The generated text
[0945] Step 6:
[0946] Post-processing and returning results
[0947] Input: Generated text
[0948] Specific behavior:
[0949] The server then performs post-processing on the generated text, adding character-specific phrases and emotional expressions, making the generated text more character-like.
[0950] The server sends the final text to the user's terminal for display.
[0951] Output: Final adjusted text, text returned to user
[0952] (Application example 1)
[0953] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[0954] Conventional natural language generation systems have difficulty accurately imitating the tone and manner of speech of a specific character, making it difficult to generate responses that are characteristic of the character desired by the user. Furthermore, the experience from the time the generated text is returned to the user lacks consistency, preventing a sense of immersion for the user.
[0955] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0956] In this invention, the server includes means for collecting dialogue data from media data in which a character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, means for postprocessing the generated text and adding character-specific expressions, and means including a terminal on which the generated text is displayed and returned to the user, thereby enabling the character's unique tone and expressions to be accurately imitated, providing a consistent user experience.
[0957] "Media data featuring characters" refers to digital or analog data that includes scenes in which a specific character speaks lines in anime, manga, movies, games, etc.
[0958] "Dialogue data" refers to text information including the content of a character's speech, obtained from media data in which the character appears.
[0959] "Preprocessing" refers to processes such as removing unnecessary information and splitting words and phrases from dialogue data or user input in order to convert it into a format suitable for training and generating natural language generation models.
[0960] A "natural language generation model" is a machine learning model that generates new text based on input text data, and is specifically trained to imitate a character's unique speaking style and expressions.
[0961] "Post-processing" refers to the process of adding character-specific expressions or adjusting grammar to text generated by a natural language generation model.
[0962] "Device" refers to the user's device on which the generated text will ultimately be displayed, including smartphones, tablets, and personal computers.
[0963] "User input" refers to text information that a user writes and transmits to a natural language generation model the text content that the user desires to generate.
[0964] Specific embodiments for carrying out the present invention will be described below.
[0965] A system that realizes this application example imitates the tone and speaking style of a character and returns generated text to a user. The system consists of the following elements: means for collecting dialogue data from media data in which the character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, means for postprocessing the generated text and adding character-specific expressions, and means including a terminal on which the generated text to be returned to the user is displayed.
[0966] The system works as follows: First, the server collects dialogue data from media sources (anime, manga, movies, games, etc.) in which the characters appear. This process involves using methods such as APIs to obtain text data, analyzing official scripts, and referencing online databases. The hardware used includes cloud servers with high processing power. The software also utilizes APIs suitable for data acquisition.
[0967] Next, the server preprocesses the collected dialogue data. Specifically, it removes unnecessary information using regular expressions and fuzzy matching algorithms, and tokenizes the data using a natural language processing library (e.g., NLTK, Spacy). This process splits the dialogue data into individual words and phrases, and converts it into a format that can be used as training data for natural language generation models.
[0968] The server then trains a natural language generation model using a deep learning framework (e.g., TensorFlow, PyTorch) based on the preprocessed tokenized data. The training dataset also includes contextual information for each line (e.g., surrounding lines and situation descriptions) to generate more natural and character-like responses.
[0969] When a user wants to generate text, they input the text through the smartphone UI. This input data is preprocessed by the server and converted into a format suitable for the generative AI model. The server then uses the preprocessed input data to utilize a natural language generation model to generate text in the voice of the specified character.
[0970] The server performs post-processing on the generated text, adding phrases and emotional expressions specific to the character. This makes the generated text more character-like. The final adjusted text is returned from the server to the user via a device (such as a smartphone). The user can then view the generated text on their device.
[0971] As a concrete example, if a user wants to ask the question "What's the weather like today?" in the voice of "Character A," the system will send the following prompt sentence to the generative AI model:
[0972] Example prompt sentence:
[0973] User: How was your day?
[0974] Character A: Hey, today was awesome! How was it for you?
[0975] User: What's the weather like today?
[0976] Based on this prompt, the generative AI model generates a response in Character A's tone of voice, returning text such as, "I'm curious about today's weather!"
[0977] As described above, the present invention can accurately mimic the character's unique tone and expressions, providing a consistent user experience.
[0978] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0979] Step 1:
[0980] The server collects dialogue data from the media data in which the characters appear. Specifically, it uses methods such as obtaining text data via an API, analyzing official scripts, and referencing online databases. The input for this step is the media data in which the characters appear, and the output is the collected dialogue data.
[0981] Step 2:
[0982] The server preprocesses the collected dialogue data. It uses regular expressions and fuzzy matching algorithms to remove unnecessary information (narration and lines from other characters) from the dialogue data. It then uses tokenization to split the dialogue data into words and phrases. The input is the collected dialogue data, and the output is the preprocessed tokenized data.
[0983] Step 3:
[0984] The server trains a natural language generation model using the preprocessed tokenized data. It uses a deep learning framework (e.g., TensorFlow, PyTorch) to learn the character's features. The input is the preprocessed tokenized data, and the output is a trained generative AI model.
[0985] Step 4:
[0986] The user inputs the text content they want to generate through their device. Specifically, the user inputs text through the smartphone's UI. The input for this step is the text entered by the user, and the output is that text data.
[0987] Step 5:
[0988] The server preprocesses the user input. It analyzes the user's text input and performs grammar corrections and specific word conversions for the generative AI model. The input is the text data of the user input sent from the terminal, and the output is the preprocessed input data.
[0989] Step 6:
[0990] The server uses the preprocessed input data to generate text using a natural language generation model. The text is generated in the tone of a specified character. The input is the preprocessed input data, and the output is the generated text.
[0991] Step 7:
[0992] The server performs post-processing on the generated text. By adding character-specific phrases and emotional expressions, the generated text becomes more character-like. Specifically, it adjusts grammar and adds named entities. The input is the generated text, and the output is the post-processed text.
[0993] Step 8:
[0994] The server returns the final adjusted text to the device. The input of this step is the post-processed text, and the output is text generated in the voice of the character that is displayed on the user's device, such as a smartphone.
[0995] The above process makes it possible to generate natural text that mimics the unique expressions of characters, allowing users to enjoy the experience of interacting with their favorite characters.
[0996] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[0997] A specific embodiment for implementing the present invention in combination with an emotion engine will be described below.
[0998] The system of the present invention realizes a natural language generation AI that mimics the tone and speaking style of a specific character, and further has the ability to recognize user emotions and adjust the generated text accordingly. This system is composed of the following elements: means for collecting dialogue data from works in which the character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, means for post-processing the generated text and adding character-specific expressions, and an emotion engine that recognizes emotions contained in the user input.
[0999] The specific program processing flow is as follows:
[1000] Collection of dialogue data
[1001] 1. Character Selection and Data Collection
[1002] The user accesses the system and selects their favorite character (e.g., Character A).
[1003] The terminal transmits the character information received from the user to the server.
[1004] The server collects dialogue data from works (e.g., anime or manga) in which the specified character A appears. This process includes calling APIs, parsing official scripts, and referencing online databases.
[1005] Preprocessing of dialogue data
[1006] 2. Data Cleansing and Tokenization
[1007] The server cleanses the collected dialogue data, removing unnecessary information (e.g., lines from other characters or narration), using regular expressions and fuzzy matching algorithms.
[1008] The server then tokenizes the cleansed data and splits each line into words and phrases using a natural language processing library (e.g., NLTK, Spacy).
[1009] Training a natural language generation model
[1010] 3. Training the model
[1011] The server trains a natural language generation model based on the preprocessed tokenized data, configures a deep learning framework (e.g., TensorFlow, PyTorch), and tunes the model's architecture and hyperparameters.
[1012] The training dataset includes contextual information for each line, allowing for more natural and character-like responses.
[1013] User Input Processing and Emotion Recognition
[1014] 4. Accepting and Preprocessing User Input
[1015] The user enters the text they want to generate (e.g., "What's the weather like today?").
[1016] The terminal sends the user input to the server.
[1017] The server analyzes the user input and uses an emotion engine to recognize the emotions contained in the input, using emotion recognition algorithms.
[1018] 5. Preprocessing of input data
[1019] The server assigns emotion labels based on the output of the emotion engine and performs preprocessing for the generative AI model, correcting grammar and converting specific words to adapt to Character A's style and the user's emotions.
[1020] Text Generation and Post-Processing
[1021] 6. Text Generation
[1022] The server uses the preprocessed input data to generate text using a natural language generation model, which generates text that reflects the tone of voice of Character A and the user's emotions.
[1023] 7. Post-processing
[1024] The server performs post-processing on the generated text, adding phrases and emotional expressions specific to Character A. Furthermore, it makes appropriate adjustments based on the user's emotions recognized by the emotion engine (e.g., "I'm curious about the weather today!").
[1025] Returning the results
[1026] 8. Submitting the final results
[1027] The server sends the final adjusted text to the terminal.
[1028] The device displays the generated text to the user, allowing the user to receive text in real time in the tone of their favorite character's voice and enjoy responses that correspond to their emotions.
[1029] For example, if a user inputs "I'm sad today" in the tone of "Character A," the emotion engine recognizes the emotion of "sad." The generative AI model reflects this emotional information and generates a response such as "I'm sad too," in the style of Character A. After that, it undergoes post-processing to further adjust the expression to suit the character and return it to the user.
[1030] Through the above process, the system accurately imitates the tone and manner of speech of a specific character and generates text that reflects the user's emotions. Users can converse in real time in the tone of their favorite character's voice and enjoy personalized responses based on their emotions.
[1031] The processing flow will be explained below.
[1032] Step 1:
[1033] The user accesses the system and selects their favorite character (e.g., Character A).
[1034] The terminal transmits the character information received from the user to the server.
[1035] Step 2:
[1036] The server collects dialogue data from works (e.g., anime or manga) in which the specified character A appears.
[1037] The server calls the API to retrieve the dialogue data from an online database.
[1038] The server analyzes text from official scripts, script files, etc. and extracts the necessary lines.
[1039] Step 3:
[1040] The server cleanses the collected dialogue data.
[1041] The server uses regular expressions to remove unnecessary information (e.g., lines from other characters or narration).
[1042] The server uses a fuzzy matching algorithm to correct the incomplete text.
[1043] Step 4:
[1044] The server tokenizes the cleansed dialogue data.
[1045] The server uses a natural language processing library (e.g., NLTK, Spacy) to split the dialogue into words and phrases.
[1046] The server classifies each line by context and assigns appropriate tags.
[1047] Step 5:
[1048] The server trains a natural language generation model based on the preprocessed tokenized data.
[1049] The server configures the deep learning framework (e.g., TensorFlow, PyTorch) and tunes the model architecture and hyperparameters.
[1050] The server adds contextual information to each line in the training dataset, allowing for more natural, character-like responses to be generated.
[1051] Step 6:
[1052] The user enters the text they want to generate (e.g., "What's the weather like today?").
[1053] The terminal sends the user input to the server.
[1054] Step 7:
[1055] The server analyzes the user input and uses an emotion engine to recognize the emotion contained in the input.
[1056] The server uses an emotion recognition algorithm to extract emotions from the input text.
[1057] The server assigns emotion labels to the input data based on the output of the emotion engine.
[1058] Step 8:
[1059] The server generates text using a natural language generation model based on the preprocessed input data.
[1060] The server generates text that reflects the emotion label and character A's style.
[1061] Step 9:
[1062] The server performs post-processing on the generated text.
[1063] The server adds phrases and emotes specific to Character A and makes further fine-tuning adjustments (e.g., "I'm curious about the weather today!").
[1064] The server adjusts the generated text based on the user's emotions recognized by the emotion engine.
[1065] Step 10:
[1066] The server sends the final adjusted text to the terminal.
[1067] The terminal displays the generated text to the user.
[1068] Through these steps, users can receive text generated in the tone of their favorite character and enjoy personalized responses based on their emotions.
[1069] Example 2
[1070] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[1071] Currently, there are natural language generation AI systems that can mimic the tone and speaking style of specific characters. However, systems that take user emotions into account and generate appropriate responses in real time are still lacking. Existing systems have struggled to enrich the user experience by incorporating emotion recognition into text generation.
[1072] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[1073] In this invention, the server includes means for collecting dialogue data from works in which the character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for recognizing a user's emotion and preprocessing a user input including the emotion information, means for generating text using the natural language generation model based on the preprocessed input data, and means for post-processing the generated text to add character-specific expressions and adjust the text according to the user's emotion. This makes it possible to provide natural responses in real time that take the user's emotion into consideration while imitating the tone and speaking style of a specific character.
[1074] "Character" refers to a person, creature, or fictional being that appears in a story or work.
[1075] "Works" refers to content such as anime, manga, novels, movies, and games, as well as the stories and depictions contained within them.
[1076] "Dialogue data" refers to information collected as data on the words and dialogue that characters utter within a work.
[1077] "Collection" refers to the process of gathering the necessary data and information in various ways.
[1078] "Preprocessing" refers to the preparation process used in data analysis and machine learning to prepare data for use.
[1079] A "natural language generation model" is a machine learning model or algorithm for generating sentences in human language.
[1080] "User input" means the act of a system user inputting text, commands, etc., and the content of such input.
[1081] "Emotion recognition" refers to the technology and process of analyzing and identifying emotions from user input and expressions.
[1082] "Post-processing" refers to the process of making final adjustments or processing to the generated data or results.
[1083] "Unique expressions" refer to expressions or phrases that are specific to a particular character or context.
[1084] "Adjust" means changing data, results, or settings to suit a purpose.
[1085] This invention provides a natural language generation AI system that mimics the tone and speaking style of a specific character, and also has the ability to recognize the user's emotions and adjust the generated text accordingly. The system consists of the following components:
[1086] Collection of dialogue data
[1087] 1. The user accesses the system and selects their favorite character. For example, the user selects "Character A."
[1088] 2. The device sends the character information received from the user to the server.
[1089] 3. The server collects dialogue data from works (e.g., anime or manga) in which the specified character A appears. This process involves calling APIs and referencing online databases.
[1090] Preprocessing of dialogue data
[1091] 1. The server cleanses the collected data, using regular expressions to remove lines and narration from other characters.
[1092] 2. The server then tokenizes the data using a natural language processing library (e.g., Spacy) to split each line into words and phrases.
[1093] Training a natural language generation model
[1094] 1. The server trains a natural language generation model based on the preprocessed tokenized data, configures a deep learning framework (e.g., PyTorch), and tunes the model architecture and hyperparameters.
[1095] 2. The training dataset is enriched with contextual information to enable Character A to have natural conversations.
[1096] User Input Processing and Emotion Recognition
[1097] 1. The user enters the text they want to generate (e.g., "What's the weather like today?").
[1098] 2. The terminal sends the user's input to the server.
[1099] 3. The server uses an emotion engine to recognize the emotion (e.g., joy, sadness, anger) of the input data. Using an emotion recognition algorithm, it assigns an "emotion label" to the input data.
[1100] Preprocessing of input data
[1101] 1. The server adds emotion labels based on the output of the emotion engine and performs preprocessing for the generative AI model, correcting grammar and converting specific words to make it more suitable for Character A's style and the user's emotions.
[1102] Text Generation and Post-Processing
[1103] 1. The server uses the preprocessed input data to generate text that reflects Character A's tone of voice and the user's emotions using a natural language generation model.
[1104] 2. The server performs post-processing on the generated text, adding phrases and emotional expressions specific to Character A. It also makes further appropriate adjustments depending on the user's emotions recognized by the emotion engine.
[1105] Sending the final results
[1106] 1. The server sends the final adjusted text to the terminal.
[1107] 2. The device displays the generated text to the user, allowing the user to receive text generated in Character A's tone in real time and enjoy responses that correspond to their emotions.
[1108] Specific examples
[1109] For example, if a user inputs "I'm sad today" in the tone of "Character A," the server's emotion engine will recognize the emotion of "sad." The generative AI model then applies this emotional information along with Character A's speaking style to generate a response such as "I'm sad too." Post-processing further adjusts the expression to be more character-like, and the final result is returned to the user.
[1110] Prompt Sentence Examples
[1111] "Write the following sentence in the voice of Character A: 'I feel sad today.'"
[1112] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1113] Step 1:
[1114] Character selection and data collection
[1115] A user accesses the system and specifies their favorite character (e.g., "Character A"). This is the input. The device sends the character information received from the user to the server. The server collects dialogue data from works (e.g., anime or manga) in which the specified Character A appears. This process involves calling an API or referencing an online database. Specifically, the server queries the database to retrieve dialogue and contextual information related to Character A and saves this as the output.
[1116] Step 2:
[1117] Data Cleansing and Tokenization
[1118] The server performs data cleansing on the collected dialogue data, using regular expressions to remove unnecessary information such as lines from other characters and narration. The specific input is the collected dialogue data, and the server uses regular expression pattern matching to filter out unnecessary information and outputs the cleansed data. The server then uses a natural language processing library (e.g., Spacy) to tokenize the cleansed data and split each line into words and phrases. This split data is the output.
[1119] Step 3:
[1120] Training a natural language generation model
[1121] The server trains a natural language generation model based on the preprocessed tokenized data. It configures a deep learning framework (e.g., PyTorch) and adjusts the model architecture and hyperparameters. The input is the tokenized data, and the server trains the model using the deep learning framework. As a result of the training, the model parameters and weights are adjusted so that Character A can have natural conversations. This trained model is the output.
[1122] Step 4:
[1123] Accepting and Preprocessing User Input
[1124] The user enters the text content they want to generate (e.g., "What's the weather like today?"). This is the input. The device sends the user's input to the server. The server uses an emotion engine to recognize the emotion of the entered text. Specifically, the server applies an emotion recognition algorithm to extract an emotion label from the input. This emotion label is the output.
[1125] Step 5:
[1126] Preprocessing of input data
[1127] The server adds emotion labels based on the output of the emotion engine and performs preprocessing for the generative AI model. The input is the text entered by the user and the emotion labels. The server corrects grammar and converts specific words to format it to suit Character A's style and the user's emotion. This preprocessed data is the output.
[1128] Step 6:
[1129] Text generation
[1130] The server uses the preprocessed input data to generate text that reflects Character A's tone of voice and the user's emotions using a natural language generation model. The input is the preprocessed data and a trained generative AI model. The server applies a natural language generation algorithm based on these to generate text. The generated text is the output.
[1131] Step 7:
[1132] Post-Processing
[1133] The server performs post-processing on the generated text, adding phrases and emotional expressions specific to Character A. It also makes appropriate adjustments based on the user's emotions recognized by the emotion engine. The input is the generated text, and the server applies the post-processing algorithm to output text supplemented with expressions specific to Character A.
[1134] Step 8:
[1135] Returning the results
[1136] The server sends the final adjusted text to the terminal. The input is the post-processed text. The terminal displays the generated text to the user. This displayed text becomes the output, and the user can receive the text generated in the tone of Character A in real time and enjoy responses according to their emotions.
[1137] (Application example 2)
[1138] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[1139] Conventional natural language generation systems have difficulty not only imitating the tone and speaking style of a specific character, but also generating real-time responses that reflect the user's emotions. Furthermore, they lack the ability to recognize the user's emotions and generate text accordingly, limiting the user experience.
[1140] The identification processing by the identification processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for collecting dialogue data from works in which the character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, means for postprocessing the generated text and adding character-specific expressions, and means for recognizing the user's emotions and adjusting the generated text according to the emotions. This makes it possible to not only imitate the tone and speaking style of a specific character, but also to generate responses in real time that reflect the user's emotions.
[1141] A "means for collecting dialogue data from works in which a character appears" is a method or device for obtaining dialogue spoken by a particular character from a movie, anime, TV program, manga, etc. in which that character appears.
[1142] "Means for preprocessing collected dialogue data" refers to a method or device for performing processes such as cleansing and filtering on the acquired dialogue data to remove noise and prepare the data in a format suitable for analysis and model training.
[1143] A "means for training a natural language generation model on preprocessed data" is a method or apparatus for training a natural language generation model (e.g., a generative AI model) using preprocessed data.
[1144] "Means for preprocessing user input and generating text using a natural language generation model based on the preprocessed data" means a method or device for analyzing and formatting input text received from a user and generating new text based on that data using a pre-trained natural language generation model.
[1145] "Means for post-processing the generated text to add character-specific expressions" refers to a method or device for performing additional processing on the generated text to add expressions or phrases that are characteristic of a particular character.
[1146] "Means for recognizing user emotions and adjusting generated text accordingly" refers to a method or device for analyzing emotions from user input and appropriately modifying or adjusting generated text according to the user's emotional state.
[1147] A system for implementing this invention comprises the following elements: collecting dialogue data from works in which the character appears, preprocessing the data, and then training a natural language generation model; preprocessing text entered by a user, generating text based on the emotion using the model, and finally returning the text to the user with character-specific expressions;
[1148] System implementation
[1149] Hardware and software used
[1150] Hardware: Smartphone (iOS / Android), server
[1151] Software: Python environment, natural language processing library (SpaCy), deep learning framework (PyTorch or TensorFlow), tokenizer (for GPT-2), generative AI model (GPT-2)
[1152] Data collection and preprocessing
[1153] The server collects dialogue data for characters specified by the user. This data is automatically retrieved from online databases and official scripts. The collected data is then cleansed and tokenized to remove unnecessary information. This process uses regular expressions and a natural language processing library (SpaCy).
[1154] Model training
[1155] A natural language generation model is trained based on the preprocessed data. In this process, a deep learning framework (PyTorch or TensorFlow) is used to set the model's architecture and hyperparameters, and the model is trained to generate text that reflects the character's characteristics.
[1156] User Input Processing and Emotion Recognition
[1157] The text entered by the user through the smartphone is sent to the server, which analyzes the input and uses an emotion engine to recognize the user's emotions. This process uses emotion recognition algorithms.
[1158] Text Generation and Post-Processing
[1159] The user input with the emotion labels is fed into a generative AI model (GPT-2) to generate text that reflects the character's style and the user's emotion. The server then performs post-processing on the generated text, adding character-specific expressions and phrases. The final response is then returned to the user.
[1160] Specific examples
[1161] When a user types "What's the weather like today?", the system first preprocesses the user input and recognizes emotions using an emotion engine. It then uses a generative AI model to generate text and a response in Character A's voice style: "I'm curious about the weather today!" This response undergoes further post-processing before finally being returned to the user.
[1162] Prompt Sentence Examples
[1163] Example input: Write "I'm sad today" and have Character A respond.
[1164] Expected response: "I'm sad too."
[1165] Through this process, the system can mimic the tone and speaking style of a specific character and provide real-time response generation that recognizes the user's emotions.
[1166] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1167] Step 1:
[1168] The server collects dialogue data from works in which the characters appear. It receives character information specified by the user via smartphone and retrieves the corresponding dialogue data from online databases and official scripts. This is done by calling APIs and web scraping. The input is character information and the output is dialogue data.
[1169] Step 2:
[1170] The server preprocesses the collected dialogue data. Specifically, it uses regular expressions to remove unnecessary information and tokenizes it. During this process, the dialogue data is divided into words and phrases, and unnecessary parts are removed. The input is dialogue data, and the output is preprocessed tokenized data.
[1171] Step 3:
[1172] The server trains a natural language generation model (generative AI model) based on the preprocessed data. This process uses a deep learning framework (PyTorch or TensorFlow) to configure the model architecture and tune hyperparameters. The input is the preprocessed tokenized data, and the output is a trained natural language generation model.
[1173] Step 4:
[1174] The user inputs the text content they want to generate using their smartphone. The device sends this user input to the server. The input is the text entered by the user.
[1175] Step 5:
[1176] The server preprocesses user input. Specifically, it tokenizes the text and corrects grammar. It also uses an emotion engine to recognize the user's emotion from the input text and assigns an emotion label. The input is the user's text, and the output is the preprocessed text and emotion label.
[1177] Step 6:
[1178] The server uses the preprocessed input data to generate text using a natural language generation model. This generates text that reflects the character's tone of voice and the user's emotions. Post-processing is then performed on the generated text to add character-specific phrases and emotional expressions. The input is the preprocessed text and emotion labels, and the output is the generated text.
[1179] Step 7:
[1180] The server sends the final adjusted text to the terminal, which then displays the generated text to the user. This allows the user to receive text generated in the voice of their favorite character in real time and enjoy responses based on their emotions. The input is the adjusted text, and the output is the final text presented to the user.
[1181] Through the above processing steps, the system imitates the tone of a specific character and generates text that reflects the user's emotions.
[1182] The specific processing unit 290 transmits the result of the specific processing to the headset type terminal 314. In the headset type terminal 314, the control unit 46A causes the speaker 240 and the display 343 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[1183] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[1184] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the headset type terminal 314.
[1185] [Fourth embodiment]
[1186] FIG. 7 shows an example of the configuration of a data processing system 410 according to the fourth embodiment.
[1187] 7, a data processing system 410 includes a data processing device 12 and a robot 414. An example of the data processing device 12 is a server.
[1188] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[1189] The robot 414 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a control target 443. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the control target 443 are also connected to the bus 52.
[1190] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[1191] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[1192] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[1193] The control object 443 includes a display device, LEDs in the eyes, and motors for driving the arms, hands, and feet. The posture and gestures of the robot 414 are controlled by controlling the motors of the arms, hands, and feet. Some of the emotions of the robot 414 can be expressed by controlling these motors. In addition, the facial expressions of the robot 414 can also be expressed by controlling the light emission state of the LEDs in the eyes of the robot 414.
[1194] Fig. 8 shows an example of the main functions of the data processing device 12 and the robot 414. As shown in Fig. 8, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[1195] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[1196] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[1197] In the robot 414, the processor 46 performs the reception output process. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[1198] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1199] Specific embodiments for carrying out the present invention will be described below.
[1200] The system of the present invention realizes a natural language generation AI that imitates the tone and speaking style of a specific character. This system is composed of the following elements: a means for collecting dialogue data from works in which the character appears, a means for preprocessing the collected dialogue data, a means for training a natural language generation model based on the preprocessed data, a means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, and a means for post-processing the generated text and adding character-specific expressions.
[1201] The specific program processing flow is as follows:
[1202] Collection of dialogue data
[1203] 1. Character Selection and Data Collection
[1204] The system begins operation when the user selects their favorite character.
[1205] The server collects dialogue data from works (e.g., movies, anime, manga, games, etc.) in which the specified character appears. This is done by obtaining text data via API, analyzing official scripts, referencing online databases, etc.
[1206] Preprocessing of dialogue data
[1207] 2. Data Cleansing and Tokenization
[1208] The server cleanses the collected dialogue data, removing unnecessary information (e.g., narration and other characters' lines), using regular expressions and fuzzy matching algorithms.
[1209] The server then tokenizes the cleansed data and splits each line into words and phrases using a natural language processing library (e.g., NLTK, Spacy).
[1210] Training a natural language generation model
[1211] 3. Training the model
[1212] The server trains a natural language generation model based on the preprocessed tokenized data using a deep learning framework (e.g., TensorFlow, PyTorch) to learn the character's characteristics.
[1213] The training dataset also includes contextual information for each line (e.g., previous and following lines, situation descriptions) to generate more natural and character-like responses.
[1214] User input processing and text generation
[1215] 4. Accepting and Preprocessing User Input
[1216] The user sends a request to the system by entering the text content they want to generate (e.g., "What's the weather like today?").
[1217] The server parses user input and pre-processes it for the generative AI model, including grammar correction and the transformation of certain words.
[1218] 5. Text Generation
[1219] The server uses the preprocessed input data to generate text in the voice of the specified character using a natural language generation model.
[1220] Post-processing and returning results
[1221] 6. Post-processing and returning results
[1222] The server then performs post-processing on the generated text, adding character-specific phrases and emotional expressions, making the generated text more character-like.
[1223] The final adjusted text is returned from the server to the user via the terminal (e.g., "I'm curious about today's weather!").
[1224] Specific example explanation
[1225] For example, if a user wants to generate text in the tone of "Character A," they first collect lines from anime or manga in which Character A appears. The collected lines are preprocessed and converted into an appropriate format. A natural language generation model is then trained based on this to generate text that responds to the user's input in Character A's tone. The generated text then undergoes post-processing to be adjusted to more closely resemble Character A and provided to the user.
[1226] Through the above process, this system realizes a generative AI that accurately imitates the tone and speaking style of a specific character. Users can generate text in the tone of their favorite character, enjoying a more immersive dialogue experience.
[1227] The processing flow will be explained below.
[1228] Step 1:
[1229] The user accesses the system and selects their favorite character (e.g., Character A).
[1230] The terminal transmits the character information received from the user to the server.
[1231] Step 2:
[1232] The server collects dialogue data from works (e.g., anime or manga) in which the specified character A appears.
[1233] The server calls the API to retrieve the dialogue data from an online database.
[1234] The server analyzes text from official scripts, script files, etc. and extracts the necessary lines.
[1235] Step 3:
[1236] The server cleanses the collected dialogue data.
[1237] The server uses regular expressions to remove unnecessary information (e.g., lines from other characters or narration).
[1238] The server uses a fuzzy matching algorithm to correct the incomplete text.
[1239] Step 4:
[1240] The server tokenizes the cleansed dialogue data.
[1241] The server uses a natural language processing library (e.g., NLTK, Spacy) to split the dialogue into words and phrases.
[1242] Classify each line by context and assign appropriate tags.
[1243] Step 5:
[1244] The server trains a natural language generation model based on the preprocessed tokenized data.
[1245] The server configures the deep learning framework (e.g., TensorFlow, PyTorch) and tunes the model architecture and hyperparameters.
[1246] The training dataset includes contextual information for each line.
[1247] Step 6:
[1248] The user enters the text they want to generate (e.g., "What's the weather like today?").
[1249] The terminal sends the user input to the server.
[1250] Step 7:
[1251] The server parses user input and pre-processes it for the generative AI model.
[1252] The server will make grammar corrections and convert certain words to suit Character A's style.
[1253] Step 8:
[1254] The server uses the preprocessed input data to generate text using a natural language generation model.
[1255] The server generates text that reflects the tone of voice of character A.
[1256] Step 9:
[1257] The server performs post-processing on the generated text.
[1258] The server adds phrases and emotes specific to Character A and makes further fine-tuning adjustments (e.g., "I'm curious about the weather today!").
[1259] Step 10:
[1260] The server sends the final adjusted text to the terminal.
[1261] The terminal displays the generated text to the user.
[1262] Through these steps, users can receive text generated in the tone of their favorite character, allowing them to enjoy a more immersive conversational experience.
[1263] Example 1
[1264] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1265] Conventional natural language generation systems have struggled to accurately mimic the tone and speaking style of a specific character. Obtaining output appropriate for a user-specified character requires a great deal of manual effort and adjustment, making it inefficient. Furthermore, they were unable to generate natural text that incorporates the character's expressiveness and context, limiting the user experience. Therefore, an efficient method for automatically generating natural language with the tone and speaking style of a specific character is needed.
[1266] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[1267] In this invention, the server includes means for collecting dialogue data of a character designated by a user, means for cleansing the collected dialogue data and removing unnecessary information, means for tokenizing the cleansed data, means for training a natural language generation model based on the preprocessed data and contextual information, means for preprocessing user input and converting the input data for the generation AI model, means for generating text using the natural language generation model based on the preprocessed input data, means for post-processing the generated text and adding character-specific expressions, and means for returning the final text to the user. This enables the generation of natural text that has the tone and expressiveness of the designated character.
[1268] "Characters" are people, animals, robots, and other characters that appear in a particular work, and their speech patterns and expressions are imitated.
[1269] "Dialogue data" refers to the text information spoken by characters within a work, and is data used to train natural language generation models.
[1270] "Cleansing" is the process of removing unnecessary information and noise from collected dialogue data to turn it into pure text data.
[1271] "Tokenization" is the process of dividing cleansed text data into words and phrases, and is performed as an initial step in natural language processing.
[1272] "Contextual information" includes information about the context of the dialogue and a description of the situation, and is used by the natural language generation model to generate more appropriate responses.
[1273] A "natural language generation model" is an AI model that generates natural-sounding sentences based on input text data, and is trained using deep learning technology.
[1274] "Preprocessing" is the process of analyzing user-entered text data and converting it into a format that can be properly processed by the generative AI model.
[1275] "Post-processing" is the process of making final adjustments to the generated text, adding character-specific expressions and emotions to make the text more natural.
[1276] "Return" is the process of sending the final generated text to the user's terminal and displaying it to the user.
[1277] A "generative AI model" is an artificial intelligence model that generates natural language and has the ability to generate text based on the tone and expressions of a specified character.
[1278] The present invention relates to a natural language generation AI system that imitates the tone and speaking style of a specific character. Specific embodiments of the present invention will be described in detail below.
[1279] When a user uses the system, they first specify the character they want to generate. In order to imitate the character's speaking style, they must first collect relevant dialogue data. The server uses an API publicly available on the Internet to collect dialogue data from works (e.g., movies, anime, manga, games, etc.) in which the specified character appears. At this time, the server also references official scripts and online databases to obtain as much dialogue information as possible.
[1280] The collected dialogue data cannot be used as is, so the server performs data cleansing. Specifically, regular expressions and fuzzy matching algorithms are used to remove unnecessary information and noise (e.g., narration and lines from other characters) and extract only the characters' lines. This cleansed data is then tokenized using a natural language processing library (e.g., NLTK, Spacy). Tokenization divides the dialogue into words and phrases.
[1281] The server then trains a natural language generation model based on the preprocessed data and contextual information (e.g., surrounding dialogue and situation descriptions). The model is trained using a deep learning framework (e.g., TensorFlow, PyTorch) to learn the character's characteristics and speaking style.
[1282] When a user inputs the text they want to generate, the server receives the input and performs some preprocessing, which may include grammatical corrections and the conversion of certain words. The preprocessed data is then fed back into the natural language generation model, which generates text in the tone and expressions of the specified character.
[1283] The generated text is then post-processed to further emphasize the character's likeness. The server adds character-specific phrases and emotional expressions to the generated text, completing the final text. The completed text is then returned to the user via the terminal.
[1284] As a concrete example, if a user wants to generate the text "What's the weather like today?" in the voice of "Character A," the system will operate as follows:
[1285] 1. The user uses the system interface to specify "Character A" and enter "What's the weather like today?"
[1286] 2. The server collects dialogue data related to the specified character A through APIs on the Internet, script analysis, and database references.
[1287] 3. The server cleanses unnecessary information from the dialogue data and tokenizes it.
[1288] 4. The server trains a natural language generation model using a deep learning framework based on the preprocessed data.
[1289] 5. The server analyzes the user input "What's the weather like today?" and performs preprocessing.
[1290] 6. The server feeds the preprocessed input data into the natural language generation model and generates the text "It's a sunny day today!" in the voice of "Character A."
[1291] 7. The server adds phrases and expressions that are typical of Character A to the generated text, generating the final text: "I know the weather is sunny today!"
[1292] 8. The server sends the final text to the user's terminal for display.
[1293] This system allows users to generate natural-sounding text in the tone and manner of speech of a specified character, providing a more immersive dialogue experience.
[1294] Examples of prompts using generative AI models include:
[1295] "Say the following line in the voice of Character A: 'What's the weather like today?'"
[1296] "In the voice of Character B, answer the following question: 'What is your favorite food?'"
[1297] The flow of the identification process in the first embodiment will be described with reference to FIG.
[1298] Step 1:
[1299] Character selection and data collection
[1300] Input: Characters specified by the user
[1301] Specific behavior:
[1302] The user uses the system's interface to specify the character they wish to generate.
[1303] The server identifies the works in which the specified character appears (e.g., movies, anime, manga, games, etc.) and collects dialogue data using APIs publicly available on the Internet.
[1304] The server also retrieves relevant dialogue data from official scripts and online databases.
[1305] Output: Character dialogue data
[1306] Step 2:
[1307] Data Cleansing and Tokenization
[1308] Input: Collected character dialogue data
[1309] Specific behavior:
[1310] The server cleanses the collected dialogue data, removing unnecessary information (e.g., narration and other character lines) using regular expressions and fuzzy matching algorithms.
[1311] The server tokenizes this cleansed data using a natural language processing library (e.g., NLTK, Spacy), specifically by dividing the dialogue into words and phrases.
[1312] Output: Preprocessed, tokenized dialogue data
[1313] Step 3:
[1314] Training the model
[1315] Input: Preprocessed tokenized dialogue data and context information
[1316] Specific behavior:
[1317] The server uses the preprocessed data and contextual information (e.g., surrounding dialogue and situation descriptions) to train a natural language generation model (e.g., built with TensorFlow or PyTorch).
[1318] The model is trained iteratively on huge amounts of data to learn the character's characteristics and speaking style.
[1319] Output: A trained natural language generation model
[1320] Step 4:
[1321] Accepting and Preprocessing User Input
[1322] Input: Text entered by the user
[1323] Specific behavior:
[1324] The user enters the text content they want to generate into an input field in the system (e.g., "What's the weather like today?").
[1325] The server receives this user input and performs pre-processing, including grammar correction and conversion of certain words.
[1326] Output: Preprocessed user input data
[1327] Step 5:
[1328] Text Generation
[1329] Input: Preprocessed user input data
[1330] Specific behavior:
[1331] The server inputs the preprocessed user input data into a natural language generation model and uses the model to generate text in the voice and expressions of the specified character.
[1332] Output: The generated text
[1333] Step 6:
[1334] Post-processing and returning results
[1335] Input: Generated text
[1336] Specific behavior:
[1337] The server then performs post-processing on the generated text, adding character-specific phrases and emotional expressions, making the generated text more character-like.
[1338] The server sends the final text to the user's terminal for display.
[1339] Output: Final adjusted text, text returned to user
[1340] (Application example 1)
[1341] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1342] Conventional natural language generation systems have difficulty accurately imitating the tone and manner of speech of a specific character, making it difficult to generate responses that are characteristic of the character desired by the user. Furthermore, the experience from the time the generated text is returned to the user lacks consistency, preventing a sense of immersion for the user.
[1343] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[1344] In this invention, the server includes means for collecting dialogue data from media data in which a character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, means for postprocessing the generated text and adding character-specific expressions, and means including a terminal on which the generated text is displayed and returned to the user, thereby enabling the character's unique tone and expressions to be accurately imitated, providing a consistent user experience.
[1345] "Media data featuring characters" refers to digital or analog data that includes scenes in which a specific character speaks lines in anime, manga, movies, games, etc.
[1346] "Dialogue data" refers to text information including the content of a character's speech, obtained from media data in which the character appears.
[1347] "Preprocessing" refers to processes such as removing unnecessary information and splitting words and phrases from dialogue data or user input in order to convert it into a format suitable for training and generating natural language generation models.
[1348] A "natural language generation model" is a machine learning model that generates new text based on input text data, and is specifically trained to imitate a character's unique speaking style and expressions.
[1349] "Post-processing" refers to the process of adding character-specific expressions or adjusting grammar to text generated by a natural language generation model.
[1350] "Device" refers to the user's device on which the generated text will ultimately be displayed, including smartphones, tablets, and personal computers.
[1351] "User input" refers to text information that a user writes and transmits to a natural language generation model the text content that the user desires to generate.
[1352] Specific embodiments for carrying out the present invention will be described below.
[1353] A system that realizes this application example imitates the tone and speaking style of a character and returns generated text to a user. The system consists of the following elements: means for collecting dialogue data from media data in which the character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, means for postprocessing the generated text and adding character-specific expressions, and means including a terminal on which the generated text to be returned to the user is displayed.
[1354] The system works as follows: First, the server collects dialogue data from media sources (anime, manga, movies, games, etc.) in which the characters appear. This process involves using methods such as APIs to obtain text data, analyzing official scripts, and referencing online databases. The hardware used includes cloud servers with high processing power. The software also utilizes APIs suitable for data acquisition.
[1355] Next, the server preprocesses the collected dialogue data. Specifically, it removes unnecessary information using regular expressions and fuzzy matching algorithms, and tokenizes the data using a natural language processing library (e.g., NLTK, Spacy). This process splits the dialogue data into individual words and phrases, and converts it into a format that can be used as training data for natural language generation models.
[1356] The server then trains a natural language generation model using a deep learning framework (e.g., TensorFlow, PyTorch) based on the preprocessed tokenized data. The training dataset also includes contextual information for each line (e.g., surrounding lines and situation descriptions) to generate more natural and character-like responses.
[1357] When a user wants to generate text, they input the text through the smartphone UI. This input data is preprocessed by the server and converted into a format suitable for the generative AI model. The server then uses the preprocessed input data to utilize a natural language generation model to generate text in the voice of the specified character.
[1358] The server performs post-processing on the generated text, adding phrases and emotional expressions specific to the character. This makes the generated text more character-like. The final adjusted text is returned from the server to the user via a device (such as a smartphone). The user can then view the generated text on their device.
[1359] As a concrete example, if a user wants to ask the question "What's the weather like today?" in the voice of "Character A," the system will send the following prompt sentence to the generative AI model:
[1360] Example prompt sentence:
[1361] User: How was your day?
[1362] Character A: Hey, today was awesome! How was it for you?
[1363] User: What's the weather like today?
[1364] Based on this prompt, the generative AI model generates a response in Character A's tone of voice, returning text such as, "I'm curious about today's weather!"
[1365] As described above, the present invention can accurately mimic the character's unique tone and expressions, providing a consistent user experience.
[1366] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[1367] Step 1:
[1368] The server collects dialogue data from the media data in which the characters appear. Specifically, it uses methods such as obtaining text data via an API, analyzing official scripts, and referencing online databases. The input for this step is the media data in which the characters appear, and the output is the collected dialogue data.
[1369] Step 2:
[1370] The server preprocesses the collected dialogue data. It uses regular expressions and fuzzy matching algorithms to remove unnecessary information (narration and lines from other characters) from the dialogue data. It then uses tokenization to split the dialogue data into words and phrases. The input is the collected dialogue data, and the output is the preprocessed tokenized data.
[1371] Step 3:
[1372] The server trains a natural language generation model using the preprocessed tokenized data. It uses a deep learning framework (e.g., TensorFlow, PyTorch) to learn the character's features. The input is the preprocessed tokenized data, and the output is a trained generative AI model.
[1373] Step 4:
[1374] The user inputs the text content they want to generate through their device. Specifically, the user inputs text through the smartphone's UI. The input for this step is the text entered by the user, and the output is that text data.
[1375] Step 5:
[1376] The server preprocesses the user input. It analyzes the user's text input and performs grammar corrections and specific word conversions for the generative AI model. The input is the text data of the user input sent from the terminal, and the output is the preprocessed input data.
[1377] Step 6:
[1378] The server uses the preprocessed input data to generate text using a natural language generation model. The text is generated in the tone of a specified character. The input is the preprocessed input data, and the output is the generated text.
[1379] Step 7:
[1380] The server performs post-processing on the generated text. By adding character-specific phrases and emotional expressions, the generated text becomes more character-like. Specifically, it adjusts grammar and adds named entities. The input is the generated text, and the output is the post-processed text.
[1381] Step 8:
[1382] The server returns the final adjusted text to the device. The input of this step is the post-processed text, and the output is text generated in the voice of the character that is displayed on the user's device, such as a smartphone.
[1383] The above process makes it possible to generate natural text that mimics the unique expressions of characters, allowing users to enjoy the experience of interacting with their favorite characters.
[1384] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[1385] A specific embodiment for implementing the present invention in combination with an emotion engine will be described below.
[1386] The system of the present invention realizes a natural language generation AI that mimics the tone and speaking style of a specific character, and further has the ability to recognize user emotions and adjust the generated text accordingly. This system is composed of the following elements: means for collecting dialogue data from works in which the character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, means for post-processing the generated text and adding character-specific expressions, and an emotion engine that recognizes emotions contained in the user input.
[1387] The specific program processing flow is as follows:
[1388] Collection of dialogue data
[1389] 1. Character Selection and Data Collection
[1390] The user accesses the system and selects their favorite character (e.g., Character A).
[1391] The terminal transmits the character information received from the user to the server.
[1392] The server collects dialogue data from works (e.g., anime or manga) in which the specified character A appears. This process includes calling APIs, parsing official scripts, and referencing online databases.
[1393] Preprocessing of dialogue data
[1394] 2. Data Cleansing and Tokenization
[1395] The server cleanses the collected dialogue data, removing unnecessary information (e.g., lines from other characters or narration), using regular expressions and fuzzy matching algorithms.
[1396] The server then tokenizes the cleansed data and splits each line into words and phrases using a natural language processing library (e.g., NLTK, Spacy).
[1397] Training a natural language generation model
[1398] 3. Training the model
[1399] The server trains a natural language generation model based on the preprocessed tokenized data, configures a deep learning framework (e.g., TensorFlow, PyTorch), and tunes the model's architecture and hyperparameters.
[1400] The training dataset includes contextual information for each line, allowing for more natural and character-like responses.
[1401] User Input Processing and Emotion Recognition
[1402] 4. Accepting and Preprocessing User Input
[1403] The user enters the text they want to generate (e.g., "What's the weather like today?").
[1404] The terminal sends the user input to the server.
[1405] The server analyzes the user input and uses an emotion engine to recognize the emotions contained in the input, using emotion recognition algorithms.
[1406] 5. Preprocessing of input data
[1407] The server assigns emotion labels based on the output of the emotion engine and performs preprocessing for the generative AI model, correcting grammar and converting specific words to adapt to Character A's style and the user's emotions.
[1408] Text Generation and Post-Processing
[1409] 6. Text Generation
[1410] The server uses the preprocessed input data to generate text using a natural language generation model, which generates text that reflects the tone of voice of Character A and the user's emotions.
[1411] 7. Post-processing
[1412] The server performs post-processing on the generated text, adding phrases and emotional expressions specific to Character A. Furthermore, it makes appropriate adjustments based on the user's emotions recognized by the emotion engine (e.g., "I'm curious about the weather today!").
[1413] Returning the results
[1414] 8. Submitting the final results
[1415] The server sends the final adjusted text to the terminal.
[1416] The device displays the generated text to the user, allowing the user to receive text in real time in the tone of their favorite character's voice and enjoy responses that correspond to their emotions.
[1417] For example, if a user inputs "I'm sad today" in the tone of "Character A," the emotion engine recognizes the emotion of "sad." The generative AI model reflects this emotional information and generates a response such as "I'm sad too," in the style of Character A. After that, it undergoes post-processing to further adjust the expression to suit the character and return it to the user.
[1418] Through the above process, the system accurately imitates the tone and manner of speech of a specific character and generates text that reflects the user's emotions. Users can converse in real time in the tone of their favorite character's voice and enjoy personalized responses based on their emotions.
[1419] The processing flow will be explained below.
[1420] Step 1:
[1421] The user accesses the system and selects their favorite character (e.g., Character A).
[1422] The terminal transmits the character information received from the user to the server.
[1423] Step 2:
[1424] The server collects dialogue data from works (e.g., anime or manga) in which the specified character A appears.
[1425] The server calls the API to retrieve the dialogue data from an online database.
[1426] The server analyzes text from official scripts, script files, etc. and extracts the necessary lines.
[1427] Step 3:
[1428] The server cleanses the collected dialogue data.
[1429] The server uses regular expressions to remove unnecessary information (e.g., lines from other characters or narration).
[1430] The server uses a fuzzy matching algorithm to correct the incomplete text.
[1431] Step 4:
[1432] The server tokenizes the cleansed dialogue data.
[1433] The server uses a natural language processing library (e.g., NLTK, Spacy) to split the dialogue into words and phrases.
[1434] The server classifies each line by context and assigns appropriate tags.
[1435] Step 5:
[1436] The server trains a natural language generation model based on the preprocessed tokenized data.
[1437] The server configures the deep learning framework (e.g., TensorFlow, PyTorch) and tunes the model architecture and hyperparameters.
[1438] The server adds contextual information to each line in the training dataset, allowing for more natural, character-like responses to be generated.
[1439] Step 6:
[1440] The user enters the text they want to generate (e.g., "What's the weather like today?").
[1441] The terminal sends the user input to the server.
[1442] Step 7:
[1443] The server analyzes the user input and uses an emotion engine to recognize the emotion contained in the input.
[1444] The server uses an emotion recognition algorithm to extract emotions from the input text.
[1445] The server assigns emotion labels to the input data based on the output of the emotion engine.
[1446] Step 8:
[1447] The server generates text using a natural language generation model based on the preprocessed input data.
[1448] The server generates text that reflects the emotion label and character A's style.
[1449] Step 9:
[1450] The server performs post-processing on the generated text.
[1451] The server adds phrases and emotes specific to Character A and makes further fine-tuning adjustments (e.g., "I'm curious about the weather today!").
[1452] The server adjusts the generated text based on the user's emotions recognized by the emotion engine.
[1453] Step 10:
[1454] The server sends the final adjusted text to the terminal.
[1455] The terminal displays the generated text to the user.
[1456] Through these steps, users can receive text generated in the tone of their favorite character and enjoy personalized responses based on their emotions.
[1457] Example 2
[1458] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1459] Currently, there are natural language generation AI systems that can mimic the tone and speaking style of specific characters. However, systems that take user emotions into account and generate appropriate responses in real time are still lacking. Existing systems have struggled to enrich the user experience by incorporating emotion recognition into text generation.
[1460] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[1461] In this invention, the server includes means for collecting dialogue data from works in which the character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for recognizing a user's emotion and preprocessing a user input including the emotion information, means for generating text using the natural language generation model based on the preprocessed input data, and means for post-processing the generated text to add character-specific expressions and adjust the text according to the user's emotion. This makes it possible to provide natural responses in real time that take the user's emotion into consideration while imitating the tone and speaking style of a specific character.
[1462] "Character" refers to a person, creature, or fictional being that appears in a story or work.
[1463] "Works" refers to content such as anime, manga, novels, movies, and games, as well as the stories and depictions contained within them.
[1464] "Dialogue data" refers to information collected as data on the words and dialogue that characters utter within a work.
[1465] "Collection" refers to the process of gathering the necessary data and information in various ways.
[1466] "Preprocessing" refers to the preparation process used in data analysis and machine learning to prepare data for use.
[1467] A "natural language generation model" is a machine learning model or algorithm for generating sentences in human language.
[1468] "User input" means the act of a system user inputting text, commands, etc., and the content of such input.
[1469] "Emotion recognition" refers to the technology and process of analyzing and identifying emotions from user input and expressions.
[1470] "Post-processing" refers to the process of making final adjustments or processing to the generated data or results.
[1471] "Unique expressions" refer to expressions or phrases that are specific to a particular character or context.
[1472] "Adjust" means changing data, results, or settings to suit a purpose.
[1473] This invention provides a natural language generation AI system that mimics the tone and speaking style of a specific character, and also has the ability to recognize the user's emotions and adjust the generated text accordingly. The system consists of the following components:
[1474] Collection of dialogue data
[1475] 1. The user accesses the system and selects their favorite character. For example, the user selects "Character A."
[1476] 2. The device sends the character information received from the user to the server.
[1477] 3. The server collects dialogue data from works (e.g., anime or manga) in which the specified character A appears. This process involves calling APIs and referencing online databases.
[1478] Preprocessing of dialogue data
[1479] 1. The server cleanses the collected data, using regular expressions to remove lines and narration from other characters.
[1480] 2. The server then tokenizes the data using a natural language processing library (e.g., Spacy) to split each line into words and phrases.
[1481] Training a natural language generation model
[1482] 1. The server trains a natural language generation model based on the preprocessed tokenized data, configures a deep learning framework (e.g., PyTorch), and tunes the model architecture and hyperparameters.
[1483] 2. The training dataset is enriched with contextual information to enable Character A to have natural conversations.
[1484] User Input Processing and Emotion Recognition
[1485] 1. The user enters the text they want to generate (e.g., "What's the weather like today?").
[1486] 2. The terminal sends the user's input to the server.
[1487] 3. The server uses an emotion engine to recognize the emotion (e.g., joy, sadness, anger) of the input data. Using an emotion recognition algorithm, it assigns an "emotion label" to the input data.
[1488] Preprocessing of input data
[1489] 1. The server adds emotion labels based on the output of the emotion engine and performs preprocessing for the generative AI model, correcting grammar and converting specific words to make it more suitable for Character A's style and the user's emotions.
[1490] Text Generation and Post-Processing
[1491] 1. The server uses the preprocessed input data to generate text that reflects Character A's tone of voice and the user's emotions using a natural language generation model.
[1492] 2. The server performs post-processing on the generated text, adding phrases and emotional expressions specific to Character A. It also makes further appropriate adjustments depending on the user's emotions recognized by the emotion engine.
[1493] Sending the final results
[1494] 1. The server sends the final adjusted text to the terminal.
[1495] 2. The device displays the generated text to the user, allowing the user to receive text generated in Character A's tone in real time and enjoy responses that correspond to their emotions.
[1496] Specific examples
[1497] For example, if a user inputs "I'm sad today" in the tone of "Character A," the server's emotion engine will recognize the emotion of "sad." The generative AI model then applies this emotional information along with Character A's speaking style to generate a response such as "I'm sad too." Post-processing further adjusts the expression to be more character-like, and the final result is returned to the user.
[1498] Prompt Sentence Examples
[1499] "Write the following sentence in the voice of Character A: 'I feel sad today.'"
[1500] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1501] Step 1:
[1502] Character selection and data collection
[1503] A user accesses the system and specifies their favorite character (e.g., "Character A"). This is the input. The device sends the character information received from the user to the server. The server collects dialogue data from works (e.g., anime or manga) in which the specified Character A appears. This process involves calling an API or referencing an online database. Specifically, the server queries the database to retrieve dialogue and contextual information related to Character A and saves this as the output.
[1504] Step 2:
[1505] Data Cleansing and Tokenization
[1506] The server performs data cleansing on the collected dialogue data, using regular expressions to remove unnecessary information such as lines from other characters and narration. The specific input is the collected dialogue data, and the server uses regular expression pattern matching to filter out unnecessary information and outputs the cleansed data. The server then uses a natural language processing library (e.g., Spacy) to tokenize the cleansed data and split each line into words and phrases. This split data is the output.
[1507] Step 3:
[1508] Training a natural language generation model
[1509] The server trains a natural language generation model based on the preprocessed tokenized data. It configures a deep learning framework (e.g., PyTorch) and adjusts the model architecture and hyperparameters. The input is the tokenized data, and the server trains the model using the deep learning framework. As a result of the training, the model parameters and weights are adjusted so that Character A can have natural conversations. This trained model is the output.
[1510] Step 4:
[1511] Accepting and Preprocessing User Input
[1512] The user enters the text content they want to generate (e.g., "What's the weather like today?"). This is the input. The device sends the user's input to the server. The server uses an emotion engine to recognize the emotion of the entered text. Specifically, the server applies an emotion recognition algorithm to extract an emotion label from the input. This emotion label is the output.
[1513] Step 5:
[1514] Preprocessing of input data
[1515] The server adds emotion labels based on the output of the emotion engine and performs preprocessing for the generative AI model. The input is the text entered by the user and the emotion labels. The server corrects grammar and converts specific words to format it to suit Character A's style and the user's emotion. This preprocessed data is the output.
[1516] Step 6:
[1517] Text generation
[1518] The server uses the preprocessed input data to generate text that reflects Character A's tone of voice and the user's emotions using a natural language generation model. The input is the preprocessed data and a trained generative AI model. The server applies a natural language generation algorithm based on these to generate text. The generated text is the output.
[1519] Step 7:
[1520] Post-Processing
[1521] The server performs post-processing on the generated text, adding phrases and emotional expressions specific to Character A. It also makes appropriate adjustments based on the user's emotions recognized by the emotion engine. The input is the generated text, and the server applies the post-processing algorithm to output text supplemented with expressions specific to Character A.
[1522] Step 8:
[1523] Returning the results
[1524] The server sends the final adjusted text to the terminal. The input is the post-processed text. The terminal displays the generated text to the user. This displayed text becomes the output, and the user can receive the text generated in the tone of Character A in real time and enjoy responses according to their emotions.
[1525] (Application example 2)
[1526] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1527] Conventional natural language generation systems have difficulty not only imitating the tone and speaking style of a specific character, but also generating real-time responses that reflect the user's emotions. Furthermore, they lack the ability to recognize the user's emotions and generate text accordingly, limiting the user experience.
[1528] The identification processing by the identification processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for collecting dialogue data from works in which the character appears, means for preprocessing the collected dialogue data, means for training a natural language generation model based on the preprocessed data, means for preprocessing user input and generating text using the natural language generation model based on the preprocessed data, means for postprocessing the generated text and adding character-specific expressions, and means for recognizing the user's emotions and adjusting the generated text according to the emotions. This makes it possible to not only imitate the tone and speaking style of a specific character, but also to generate responses in real time that reflect the user's emotions.
[1529] A "means for collecting dialogue data from works in which a character appears" is a method or device for obtaining dialogue spoken by a particular character from a movie, anime, TV program, manga, etc. in which that character appears.
[1530] "Means for preprocessing collected dialogue data" refers to a method or device for performing processes such as cleansing and filtering on the acquired dialogue data to remove noise and prepare the data in a format suitable for analysis and model training.
[1531] A "means for training a natural language generation model on preprocessed data" is a method or apparatus for training a natural language generation model (e.g., a generative AI model) using preprocessed data.
[1532] "Means for preprocessing user input and generating text using a natural language generation model based on the preprocessed data" means a method or device for analyzing and formatting input text received from a user and generating new text based on that data using a pre-trained natural language generation model.
[1533] "Means for post-processing the generated text to add character-specific expressions" refers to a method or device for performing additional processing on the generated text to add expressions or phrases that are characteristic of a particular character.
[1534] "Means for recognizing user emotions and adjusting generated text accordingly" refers to a method or device for analyzing emotions from user input and appropriately modifying or adjusting generated text according to the user's emotional state.
[1535] A system for implementing this invention comprises the following elements: collecting dialogue data from works in which the character appears, preprocessing the data, and then training a natural language generation model; preprocessing text entered by a user, generating text based on the emotion using the model, and finally returning the text to the user with character-specific expressions;
[1536] System implementation
[1537] Hardware and software used
[1538] Hardware: Smartphone (iOS / Android), server
[1539] Software: Python environment, natural language processing library (SpaCy), deep learning framework (PyTorch or TensorFlow), tokenizer (for GPT-2), generative AI model (GPT-2)
[1540] Data collection and preprocessing
[1541] The server collects dialogue data for characters specified by the user. This data is automatically retrieved from online databases and official scripts. The collected data is then cleansed and tokenized to remove unnecessary information. This process uses regular expressions and a natural language processing library (SpaCy).
[1542] Model training
[1543] A natural language generation model is trained based on the preprocessed data. In this process, a deep learning framework (PyTorch or TensorFlow) is used to set the model's architecture and hyperparameters, and the model is trained to generate text that reflects the character's characteristics.
[1544] User Input Processing and Emotion Recognition
[1545] The text entered by the user through the smartphone is sent to the server, which analyzes the input and uses an emotion engine to recognize the user's emotions. This process uses emotion recognition algorithms.
[1546] Text Generation and Post-Processing
[1547] The user input with the emotion labels is fed into a generative AI model (GPT-2) to generate text that reflects the character's style and the user's emotion. The server then performs post-processing on the generated text, adding character-specific expressions and phrases. The final response is then returned to the user.
[1548] Specific examples
[1549] When a user types "What's the weather like today?", the system first preprocesses the user input and recognizes emotions using an emotion engine. It then uses a generative AI model to generate text and a response in Character A's voice style: "I'm curious about the weather today!" This response undergoes further post-processing before finally being returned to the user.
[1550] Prompt Sentence Examples
[1551] Example input: Write "I'm sad today" and have Character A respond.
[1552] Expected response: "I'm sad too."
[1553] Through this process, the system can mimic the tone and speaking style of a specific character and provide real-time response generation that recognizes the user's emotions.
[1554] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1555] Step 1:
[1556] The server collects dialogue data from works in which the characters appear. It receives character information specified by the user via smartphone and retrieves the corresponding dialogue data from online databases and official scripts. This is done by calling APIs and web scraping. The input is character information and the output is dialogue data.
[1557] Step 2:
[1558] The server preprocesses the collected dialogue data. Specifically, it uses regular expressions to remove unnecessary information and tokenizes it. During this process, the dialogue data is divided into words and phrases, and unnecessary parts are removed. The input is dialogue data, and the output is preprocessed tokenized data.
[1559] Step 3:
[1560] The server trains a natural language generation model (generative AI model) based on the preprocessed data. This process uses a deep learning framework (PyTorch or TensorFlow) to configure the model architecture and tune hyperparameters. The input is the preprocessed tokenized data, and the output is a trained natural language generation model.
[1561] Step 4:
[1562] The user inputs the text content they want to generate using their smartphone. The device sends this user input to the server. The input is the text entered by the user.
[1563] Step 5:
[1564] The server preprocesses user input. Specifically, it tokenizes the text and corrects grammar. It also uses an emotion engine to recognize the user's emotion from the input text and assigns an emotion label. The input is the user's text, and the output is the preprocessed text and emotion label.
[1565] Step 6:
[1566] The server uses the preprocessed input data to generate text using a natural language generation model. This generates text that reflects the character's tone of voice and the user's emotions. Post-processing is then performed on the generated text to add character-specific phrases and emotional expressions. The input is the preprocessed text and emotion labels, and the output is the generated text.
[1567] Step 7:
[1568] The server sends the final adjusted text to the terminal, which then displays the generated text to the user. This allows the user to receive text generated in the voice of their favorite character in real time and enjoy responses based on their emotions. The input is the adjusted text, and the output is the final text presented to the user.
[1569] Through the above processing steps, the system imitates the tone of a specific character and generates text that reflects the user's emotions.
[1570] The specific processing unit 290 transmits the result of the specific processing to the robot 414. In the robot 414, the control unit 46A causes the speaker 240 and the control target 443 to output the result of the specific processing. The microphone 238 acquires voice indicating a user input regarding the result of the specific processing. The control unit 46A transmits voice data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the voice data.
[1571] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[1572] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the robot 414.
[1573] The emotion identification model 59 as an emotion engine may determine the user's emotion according to a specific mapping. Specifically, the emotion identification model 59 may determine the user's emotion according to an emotion map (see FIG. 9), which is a specific mapping. Similarly, the emotion identification model 59 may determine the robot's emotion, and the identification processing unit 290 may perform identification processing using the robot's emotion.
[1574] FIG. 9 is a diagram illustrating an emotion map 400 on which multiple emotions are mapped. In the emotion map 400, emotions are arranged in concentric circles radiating from the center. Emotions closer to the center of the concentric circles are more primitive. Emotions representing states and actions arising from a state of mind are arranged on the outer edges of the concentric circles. The concept of emotion includes both affect and mental states. Emotions generally generated from reactions occurring in the brain are arranged on the left side of the concentric circles. Emotions generally induced by situational judgment are arranged on the right side of the concentric circles. Emotions generally generated from reactions occurring in the brain and induced by situational judgment are arranged on the upper and lower sides of the concentric circles. Furthermore, the emotion of "pleasure" is arranged on the upper side of the concentric circles, and the emotion of "discomfort" is arranged on the lower side. In this way, in the emotion map 400, multiple emotions are mapped based on the structure by which emotions are generated, and emotions that tend to occur simultaneously are mapped close to each other.
[1575] These emotions are distributed in the 3 o'clock direction on emotion map 400, and typically fluctuate between relief and anxiety. In the right half of emotion map 400, situational awareness dominates over internal sensations, resulting in a sense of calm.
[1576] The inside of emotion map 400 represents what is going on in the mind, and the outside of emotion map 400 represents behavior, so the further you go outside emotion map 400, the more visible the emotions become (the more they are expressed in behavior).
[1577] Human emotions are based on various balances, such as posture and blood sugar levels. When these balances deviate from the ideal, a state of discomfort is indicated, and when they approach the ideal, a state of pleasure is indicated. Emotions can also be created for robots, automobiles, and motorcycles, based on various balances, such as posture and remaining battery life. When these balances deviate from the ideal, a state of discomfort is indicated, and when they approach the ideal, a state of pleasure is indicated. An emotion map can be generated, for example, based on Dr. Mitsuyoshi's emotion map (Research on Voice Emotion Recognition and Emotional Brain Physiological Signal Analysis Systems, Tokushima University, Doctoral Dissertation: https: / / ci.nii.ac.jp / naid / 500000375379). The left half of the emotion map lists emotions belonging to the "reaction" domain, where sensation is dominant. The right half of the emotion map lists emotions belonging to the "situation" domain, where situational awareness is dominant.
[1578] The emotion map defines two emotions that promote learning. One is a negative emotion on the situation side, around the middle of "repentance" or "reflection." In other words, this occurs when the robot experiences negative emotions such as "I never want to feel this way again" or "I don't want to be scolded again." The other is a positive emotion on the response side, around "desire." In other words, this occurs when the robot experiences positive feelings such as "I want more" or "I want to know more."
[1579] The emotion identification model 59 inputs user input into a pre-trained neural network, obtains emotion values indicating each emotion shown in the emotion map 400, and determines the user's emotion. This neural network is pre-trained based on multiple pieces of training data that are combinations of user input and emotion values indicating each emotion shown in the emotion map 400. Furthermore, this neural network is trained so that emotions that are located close to each other have similar values, as in the emotion map 900 shown in FIG. 10. FIG. 10 shows an example in which multiple emotions, "relieved," "calm," and "reassuring," have similar emotion values.
[1580] The system according to the present disclosure has been described above mainly with respect to the functions of the data processing device 12, but the system according to the present disclosure is not necessarily implemented on a server. The system according to the present disclosure may be implemented as a general information processing system. The present disclosure may be implemented, for example, as a software program running on a personal computer or an application running on a smartphone, etc. The method according to the present disclosure may be provided to users in the form of SaaS (Software as a Service).
[1581] In the above embodiment, an example was given in which the specific processing is performed by one computer 22, but the technology of the present disclosure is not limited to this, and the specific processing may be distributed and performed by a plurality of computers including the computer 22. For example, the data generation model 58 may be provided in an external device of the data processing device 12, and data may be generated in the external device in accordance with input data.
[1582] In the above embodiment, an example in which the specific processing program 56 is stored in the storage 32 has been described, but the technology of the present disclosure is not limited to this. For example, the specific processing program 56 may be stored in a portable, computer-readable, non-transitory storage medium such as a USB (Universal Serial Bus) memory. The specific processing program 56 stored in the non-transitory storage medium is installed in the computer 22 of the data processing device 12. The processor 28 executes the specific processing in accordance with the specific processing program 56.
[1583] Alternatively, the specific processing program 56 may be stored in a storage device such as a server connected to the data processing device 12 via the network 54, and the specific processing program 56 may be downloaded and installed on the computer 22 in response to a request from the data processing device 12.
[1584] It is not necessary to store all of the specific processing program 56 in a storage device such as a server connected to the data processing device 12 via the network 54, or to store all of the specific processing program 56 in the storage 32; only a portion of the specific processing program 56 may be stored.
[1585] The hardware resource for executing a specific process can be any of the following processors: An example of a processor is a CPU, which is a general-purpose processor that functions as a hardware resource for executing a specific process by executing software, i.e., a program. Another example of a processor is a dedicated electrical circuit, such as an FPGA (Field-Programmable Gate Array), a PLD (Programmable Logic Device), or an ASIC (Application Specific Integrated Circuit), which is a processor with a circuit configuration designed specifically for executing a specific process. Each processor has built-in or connected memory, and each processor uses the memory to execute the specific process.
[1586] The hardware resource that executes the specific processing may be configured with one of these various processors, or may be configured with a combination of two or more processors of the same or different types (for example, a combination of multiple FPGAs, or a combination of a CPU and an FPGA). Also, the hardware resource that executes the specific processing may be a single processor.
[1587] As an example of a system configured with a single processor, first, one processor is configured by combining one or more CPUs and software, and this processor functions as a hardware resource that executes a specific process. Second, there is a system that uses a processor that realizes the functions of an entire system including multiple hardware resources that execute a specific process on a single IC chip, as typified by SoC (System-on-a-chip). In this way, a specific process is realized using one or more of the above-mentioned various processors as hardware resources.
[1588] Furthermore, the hardware structure of these various processors can be, more specifically, an electric circuit that combines circuit elements such as semiconductor devices. The specific processing described above is merely an example. Therefore, it goes without saying that unnecessary steps may be deleted, new steps may be added, or the processing order may be rearranged, without departing from the spirit of the invention.
[1589] The above-described description and illustrations are a detailed explanation of the parts related to the technology of the present disclosure and are merely an example of the technology of the present disclosure. For example, the above description of the configuration, functions, actions, and effects is an explanation of an example of the configuration, functions, actions, and effects of the parts related to the technology of the present disclosure. Therefore, it goes without saying that unnecessary parts may be deleted, new elements may be added, or replacements may be made to the above-described description and illustrations within the scope of the gist of the technology of the present disclosure. Furthermore, to avoid confusion and facilitate understanding of the parts related to the technology of the present disclosure, the above-described description and illustrations omit explanations of common technical knowledge that do not require particular explanation to enable the implementation of the technology of the present disclosure.
[1590] All publications, patent applications, and technical standards mentioned in this specification are herein incorporated by reference to the same extent as if each individual publication, patent application, or technical standard was specifically and individually indicated to be incorporated by reference.
[1591] The following is further disclosed regarding the above embodiment.
[1592] (Claim 1)
[1593] A means of collecting dialogue data from works in which the characters appear,
[1594] a means for preprocessing the collected dialogue data;
[1595] means for training a natural language generation model on the preprocessed data;
[1596] means for preprocessing user input and generating text using a natural language generation model based on the preprocessed data;
[1597] A means of post-processing the generated text to add character-specific expressions;
[1598] A system including:
[1599] (Claim 2)
[1600] 10. The system of claim 1, further comprising means for a user to specify a desired character.
[1601] (Claim 3)
[1602] 10. The system of claim 1, further comprising: means for tokenizing the preprocessed dialogue data.
[1603] "Example 1"
[1604] (Claim 1)
[1605] A means for collecting dialogue data of a character designated by a user;
[1606] A means for cleansing the collected dialogue data and removing unnecessary information;
[1607] A means for tokenizing the cleansed data;
[1608] means for training a natural language generation model based on the preprocessed data and contextual information;
[1609] a means for preprocessing user input and transforming the input data for the generative AI model;
[1610] a means for generating text using a natural language generation model based on preprocessed input data;
[1611] A means of post-processing the generated text to add character-specific expressions;
[1612] a means for returning the final text to the user;
[1613] A system including:
[1614] (Claim 2)
[1615] 2. The system according to claim 1, further comprising means for allowing a user to specify a character they wish to create and to obtain a list of works in which the character appears.
[1616] (Claim 3)
[1617] 10. The system of claim 1, further comprising means for training a natural language generation model based on the preprocessed speech data and the contextual information using a deep learning framework.
[1618] "Application Example 1"
[1619] (Claim 1)
[1620] A means for collecting dialogue data from media data in which the character appears;
[1621] a means for preprocessing the collected dialogue data;
[1622] means for training a natural language generation model on the preprocessed data;
[1623] means for preprocessing user input and generating text using a natural language generation model based on the preprocessed data;
[1624] A means of post-processing the generated text to add character-specific expressions;
[1625] means including a terminal on which the generated text is displayed to be returned to the user;
[1626] A system including:
[1627] (Claim 2)
[1628] 2. The system according to claim 1, further comprising means for displaying the generated text on the terminal in the voice of a character designated by the user.
[1629] (Claim 3)
[1630] 10. The system of claim 1, further comprising: means for tokenizing the preprocessed dialogue data.
[1631] "Example 2: Combining Emotion Engines"
[1632] (Claim 1)
[1633] A means of collecting dialogue data from works in which the characters appear,
[1634] a means for preprocessing the collected dialogue data;
[1635] means for training a natural language generation model on the preprocessed data;
[1636] means for recognizing a user's emotion and preprocessing the user input including the emotion information;
[1637] a means for generating text using a natural language generation model based on the preprocessed input data;
[1638] A means for post-processing the generated text to add character-specific expressions and adjust the text according to the user's emotions;
[1639] A system including:
[1640] (Claim 2)
[1641] 10. The system of claim 1, further comprising means for a user to specify a desired character.
[1642] (Claim 3)
[1643] 10. The system of claim 1, further comprising: means for tokenizing the preprocessed dialogue data.
[1644] "Application example 2 when combining emotion engines"
[1645] (Claim 1)
[1646] A means of collecting dialogue data from works in which the characters appear,
[1647] a means for preprocessing the collected dialogue data;
[1648] means for training a natural language generation model on the preprocessed data;
[1649] means for preprocessing user input and generating text using a natural language generation model based on the preprocessed data;
[1650] A means of post-processing the generated text to add character-specific expressions;
[1651] means for recognizing a user's emotion and adjusting the generated text accordingly;
[1652] A system including:
[1653] (Claim 2)
[1654] 10. The system of claim 1, further comprising means for a user to specify a desired character.
[1655] (Claim 3)
[1656] 10. The system of claim 1, further comprising: means for tokenizing the preprocessed dialogue data. [Explanation of symbols]
[1657] 10, 210, 310, 410 Data Processing Systems 12 Data Processing Device 14 Smart Devices 214 Smart Glasses 314 Headset-type terminal 414 Robot< / url:> < / url:> < / url:> < / url:>
Claims
1. A means of collecting dialogue data from works in which the characters appear, a means for preprocessing the collected dialogue data; means for training a natural language generation model on the preprocessed data; means for preprocessing user input and generating text using a natural language generation model based on the preprocessed data; A means of post-processing the generated text to add character-specific expressions; A system including:
2. 10. The system of claim 1, further comprising means for a user to specify a desired character.
3. The system of claim 1 , further comprising: means for tokenizing the preprocessed dialogue data.
Citation Information
Patent Citations
Persona chatbot control method and system
JP2022180282A