ROS-based robot intelligent voice interaction system and method
By integrating voice wake-up, dictation, large language models and intelligent interaction modules on the ROS platform, the conversion of user intentions into robot operating instructions is realized, solving the problem of single function in the existing technology, and improving the robot interaction capabilities and user experience.
Patent Information
- Application Number
- CN202410991754.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-09-27
AI Technical Summary
The existing ROS-based intelligent robot voice interaction system has a single function and cannot handle complex semantic tasks. The intelligence level of the voice system needs to be improved.
A ROS-based robot intelligent voice interaction system is designed, including a voice wake-up module, a voice dictation module, a large language model module and an intelligent voice interaction module. Through voice recognition, deep semantic analysis and natural language processing technology, user intentions are transformed into Robot operation instructions are issued through ROS topics to control the movement of the robot.
It improves the interaction capabilities and execution efficiency of the robot, optimizes the user experience, enhances the flexibility and adaptability of the system, realizes intelligent interaction and detailed and flexible robot operation instructions, and solves the problem of single function.
Smart Images

Figure CN118711587A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robotics technology, and in particular to a robot intelligent voice interaction system and method based on ROS. Background Art
[0002] With the rapid development of science and technology and the continuous advancement of artificial intelligence technology, intelligent robots have become an indispensable part of modern society. Especially in the fields of home services, industrial manufacturing, medical care, etc., intelligent robots provide great convenience for people with their high efficiency, convenience and intelligence. Among the many functions of intelligent robots, voice interaction technology has attracted much attention due to its intuitive and natural interaction method.
[0003] At present, the intelligent robot voice interaction system and its interaction method based on ROS (Robot Operating System) have become a hot topic of research.
[0004] The existing technology, such as an intelligent robot voice interaction system based on ROS, includes four main modules: voice wake-up module, voice recognition module, semantic understanding module and voice synthesis module. The specific scheme of the modules is as follows:
[0005] Voice wake-up module: Use the PocketSphinx speech recognition system to process the wake-up word locally to activate the robot.
[0006] Speech recognition module: In offline state, use iFlytek's offline command word recognition SDK; in online state, use iFlytek's online speech recognition SDK.
[0007] Semantic understanding module: It is not described in detail in offline state, but in online state, Turing server is used for semantic understanding.
[0008] Speech synthesis module: The offline version uses the iFlytek TTS package, while the online version uses the iFlytek online speech synthesis SDK.
[0009] However, the above solution mainly involves four modules: voice wake-up module, voice recognition module, semantic understanding module and voice synthesis module. It does not involve voice interaction and issuing robot operation instructions through ROS communication. The voice system function is limited and cannot handle complex semantic tasks. The intelligence level needs to be further improved. Summary of the invention
[0010] Based on this, the embodiments of the present application provide a robot intelligent voice interaction system and method based on ROS, which can improve the robot's interaction ability and execution efficiency.
[0011] In the first aspect, a robot intelligent voice interaction system based on ROS is provided, which includes a voice wake-up module, a voice dictation module, a large language model module, an intelligent voice interaction module, and a robot motion instruction issuing module, wherein:
[0012] A voice wake-up module is used to identify a preset wake-up word through voice recognition technology, and activate the system from a dormant state when the preset wake-up word is detected;
[0013] The voice dictation module is used to collect voice information in the environment through the microphone when the system is activated from the sleep state, and convert the voice into text using the voice recognition technology;
[0014] The large language model module receives the text output by the voice dictation module, performs deep semantic analysis on it, and uses natural language processing technology to understand user intent;
[0015] The intelligent voice interaction module is used to convert the parsed user intention into an operation instruction; the user intention is mapped to the corresponding ROS topic, and the robot's action is triggered by publishing these ROS topics;
[0016] The robot motion instruction publishing module is used to subscribe to the ROS topic published by the intelligent voice interaction module and control the robot's motion according to the received operation instructions.
[0017] Optionally, the voice wake-up module is also used to set the wake-up word in advance through the ROS topic.
[0018] Optionally, the voice dictation module collects voice information in the environment through a microphone and converts the voice into text using voice recognition technology, specifically including:
[0019] Initialize through the voice dictation SDK software development kit and set the function of monitoring the wake-up word. When the wake-up word is recognized, start the recording function and collect voice information in the environment through the microphone;
[0020] Call the speech-to-text API to convert the recorded voice information into text messages;
[0021] Finally, the converted text message is published through the ROS topic voiceWordsPub.
[0022] Optionally, the large language model module is used to receive the text output by the speech dictation module and perform deep semantic analysis on it, specifically including:
[0023] Through the ROS message passing mechanism, subscribe to the ROS topic published by the voice dictation module, monitor the ROS topic, and receive new text messages immediately once they are published;
[0024] Performing preprocessing operations on the received text; wherein the preprocessing operations include removing stop words, normalizing punctuation marks, and text segmentation;
[0025] Use natural language processing technology to perform deep semantic analysis on the preprocessed text, and extract user intent based on the results of the deep semantic analysis; deep semantic analysis includes text classification, named entity recognition, and relationship extraction.
[0026] Optionally, the natural language processing technology includes a Transformer model or a BERT model.
[0027] Optionally, the intelligent voice interaction module converts the parsed user intention into an operation instruction, including:
[0028] Setting a mapping table from user intent to ROS topic; the mapping table defines the correspondence between user intent and ROS topic;
[0029] When the user intent is parsed and mapped to the corresponding ROS topic, a message is created and published to the corresponding ROS topic; the message contains the specific content and parameters of the user intent.
[0030] Optionally, the robot motion instruction publishing module subscribes to the ROS topic published by the intelligent voice interaction module, and controls the movement of the robot according to the received operation instructions, including:
[0031] Receiving an operation instruction; wherein the operation instruction includes specific content and parameters of the user's intention, including the direction, speed, and distance of movement;
[0032] Parse the received operation instructions and extract the specific content and parameters of the operation instructions;
[0033] Control the movement of the robot according to the received operation instructions.
[0034] Optionally, the movement of the robot is controlled according to the received operation instructions, including using the message passing mechanism provided by ROS to pass the operation instructions to the robot's motion control node, and the motion control node drives the robot's motors and joints according to the instructions to realize the robot's action execution.
[0035] Optionally, the motion control node drives the motors and joints of the robot according to the instructions to implement the robot's action execution, including implementing the robot's action execution according to the motor's drive signal and the joint angle instruction.
[0036] In the second aspect, a robot intelligent voice interaction method based on ROS is provided, the method comprising:
[0037] The preset wake-up word is recognized through voice recognition technology, and when the preset wake-up word is detected, the system is activated from the sleep state;
[0038] When the system is activated from sleep mode, it collects voice information in the environment through the microphone and converts the voice into text using speech recognition technology;
[0039] Receive the text output by the voice dictation module, perform deep semantic analysis on it, and use natural language processing technology to understand the user's intention;
[0040] Convert the parsed user intent into an operation instruction; map the user intent to the corresponding ROS topic, and trigger the robot's action by publishing these ROS topics;
[0041] Subscribe to the ROS topic published by the intelligent voice interaction module and control the movement of the robot according to the received operation instructions.
[0042] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least: the use of ROS architecture facilitates the expansion of the system and the coordination between modules, allowing new functions to be easily added or existing functions to be upgraded. The integrated iFlytek speech recognition and large language model technology improves the accuracy of speech-to-text conversion and intent parsing, and the system is capable of intelligent interaction and generating detailed and flexible robot operation instructions. This technical integration not only optimizes the robot's interaction process and improves the user experience, but also enhances the flexibility and adaptability of the system. It is flexible, accurate, and practical, solving the problem of the single interaction function of existing robots. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0044] Figure 1 A flowchart of a robot intelligent voice interaction system based on ROS provided in an embodiment of the present application;
[0045] Figure 2 A system information interaction block diagram provided for an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0047] In the description of the present invention, the terms "comprises", "has" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may also include other steps or units that are not explicitly listed but are inherent to these processes, methods, products or apparatuses, or steps or units added based on further optimization schemes conceived by the present invention.
[0048] The present invention discloses a robot intelligent voice interaction system and method based on ROS. The purpose is to improve the interaction ability and execution efficiency of the robot. It mainly includes modules such as voice wake-up, voice dictation, large language model, intelligent voice interaction, and issuing robot motion instructions. Each module communicates, controls, and cooperates through the ROS distributed architecture. The system has the function of calling the large language model to realize simultaneous online intelligent voice interaction and issuing robot control voice instructions. The advantage is that the system integrates the interaction module using the distributed architecture of ROS to achieve efficient intelligent voice interaction and control. Using the large language model, real-time online processing and response to complex voice instructions are achieved, providing accurate semantic understanding and personalized interactive experience. This system is particularly suitable for application scenarios that require fast and accurate interaction, such as service robots, emergency rescue, and home automation, which greatly improves the operating efficiency and user satisfaction of the robot.
[0049] The present invention describes a robot intelligent voice interaction system and method based on ROS. The system flow chart is as follows: Figure 1 As shown in the figure. The workflow is as follows: the system first activates the dormant robot through the voice wake-up module. After waking up, the microphone collects voice information in the environment and starts recording. These voice data are then converted into text through the voice recognition module, and the text data is sent to the large language model for deep semantic analysis to resolve the user's intention. The resolved intention is converted into specific robot operation instructions and published through ROS topics. The robot node subscribes to these topics, receives and executes the corresponding operation instructions, thereby completing the entire process from voice input to action execution. This system improves the robot's interaction efficiency and execution accuracy, and optimizes the user experience.
[0050] In the embodiment of the present application, the system specifically includes a voice wake-up module, a voice dictation module, a large language model module, an intelligent voice interaction module, and a robot motion instruction issuing module, wherein:
[0051] The voice wake-up module is used to identify the preset wake-up word through voice recognition technology. When the preset wake-up word is detected, the system is activated from the sleep state.
[0052] Specifically, the voice wake-up module publishes the wake-up word through the ROS topic ROStopic pub / Wakeup. When the system detects the preset wake-up word, the module triggers and activates the entire system from the sleep state. This step is the trigger point for the system to start interacting with the user, ensuring that the robot can quickly switch from the standby state to the working state.
[0053] The voice dictation module is used to collect voice information in the environment through the microphone when the system is activated from the sleep state, and convert the voice into text using the voice recognition technology.
[0054] Specifically, the voice dictation module includes two parts: microphone recording and voice-to-text conversion. The module is first initialized through the iFlytek Voice Dictation SDK software development kit, and the function of monitoring the wake-up word is set. When the wake-up word is recognized, that is, "WakeupFlag" is true, the module will start the recording function and collect voice information in the environment through the microphone. Next, call the iFlytek voice-to-text API to convert the recorded voice information into a text message. Finally, the converted text message is published through the ROS topic voiceWordsPub for use by subsequent modules.
[0055] In an embodiment of the present application, the voice dictation module collects voice information in the environment through a microphone, and uses voice recognition technology to convert the voice into text, specifically including: initializing through the voice dictation SDK software development toolkit, and setting the function of monitoring the wake-up word. When the wake-up word is recognized, the recording function is started to collect voice information in the environment through the microphone; calling the voice-to-text API to convert the recorded voice information into a text message; and finally publishing the converted text message through the ROS topic voiceWordsPub.
[0056] The large language model module is used to receive the text output by the voice dictation module, perform deep semantic analysis on it, and use natural language processing technology to understand user intentions.
[0057] Specifically, the large language model module is responsible for receiving the text output by the voice dictation module and calling iFlytek Spark Large Model v3.1 for deep semantic analysis. The model analyzes the text content, understands the user's intention, and returns the corresponding text response. In order to achieve intelligent voice interaction, the module also needs to convert the text response into a voice format (such as record.mp3) so that the robot can broadcast it to the user.
[0058] In an embodiment of the present application, a large language model module is used to receive the text output by the voice dictation module and perform deep semantic analysis on it, specifically including: subscribing to the ROS topic published by the voice dictation module through the ROS message passing mechanism, monitoring the ROS topic, and immediately receiving these texts once a new text message is published; performing preprocessing operations on the received text; wherein the preprocessing operations include removing stop words, normalizing punctuation marks, and text segmentation; using natural language processing technology, performing deep semantic analysis on the preprocessed text, and extracting user intent based on the results of the deep semantic analysis; wherein the deep semantic analysis includes text classification, named entity recognition, and relationship extraction. Natural language processing technology includes Transformer model or BERT model.
[0059] The intelligent voice interaction module is used to convert the parsed user intention into an operation instruction; wherein, the user intention is mapped to the corresponding ROS topic and the robot's action is triggered by publishing these ROS topics.
[0060] Specifically, the intelligent voice interaction module is responsible for converting the user intent output by the large language model module into specific robot operation instructions. Through the ROS topic subscription mechanism, the module obtains the user intent text and maps the text to a ROS topic that the robot can understand and execute based on the preset instruction mapping rules. For example, when the user says "move five steps forward", the module will parse out instructions such as "{action:'move',direction:'forward',steps:5}" and publish it through the ROS topic.
[0061] The robot motion instruction publishing module is used to subscribe to the ROS topic published by the intelligent voice interaction module and control the robot's motion according to the received operation instructions.
[0062] Specifically, the robot motion instruction publishing module subscribes to the ROS topic published by the intelligent voice interaction module and controls the robot's motion according to the received operation instructions. The module uses the message passing mechanism provided by ROS to pass the operation instructions to the robot's motion control node. The motion control node drives the robot's motor, joints or other actuators according to the instruction content to realize the robot's action execution.
[0063] In the embodiment of the present application, the robot motion instruction publishing module subscribes to the ROS topic published by the intelligent voice interaction module, and controls the movement of the robot according to the received operation instructions, including:
[0064] Receiving an operation instruction; wherein the operation instruction includes specific content and parameters of the user's intention, including the direction, speed, and distance of movement;
[0065] Parse the received operation instructions and extract the specific content and parameters of the operation instructions;
[0066] Control the movement of the robot according to the received operation instructions.
[0067] The robot's motion is controlled according to the received operation instructions, including using the message passing mechanism provided by ROS to pass the operation instructions to the robot's motion control node, and the motion control node drives the robot's motors and joints according to the instructions to realize the robot's action execution. The motion control node drives the robot's motors and joints according to the instructions to realize the robot's action execution, including realizing the robot's action execution according to the motor's drive signal and joint angle instructions.
[0068] In the embodiment of the present application, the above steps also include:
[0069] Voice wake-up: The system first activates the dormant robot through the voice wake-up module. This module publishes the wake-up word ROStopic pub / Wakeup through the ROS topic;
[0070] Voice dictation: Voice dictation includes microphone recording and text conversion, which is handled by the iFlytek Voice Dictation SDK software development kit integrated into the robot. First, by modifying its code, add ROS to monitor the wake-up word. When the wake-up word is recognized, the robot will wake up and put the microphone into recording state. The microphone starts recording and collects surrounding voice information. Then, by calling the iFlytek voice-to-text API, the voice information recognized by the microphone is converted into a text message msg. Finally, by modifying the code, add a ROS topic to publish the text message voiceWordsPub.publish(msg);
[0071] Large model voice interaction: Call iFlytek Spark Large Model v3.1, and use the text message published in the previous step as input through ROS topic subscription to interact intelligently with Spark Large Model v3.1. The interaction information returned by Spark Large Model v3.1 is in text form, which needs to be further converted into the corresponding audio format for further broadcasting to achieve intelligent voice interaction;
[0072] Large model robot motion command generation: Based on the user intent obtained from the large language model, the system converts these intents into specific operation instructions that the robot can understand and execute. For example, if the user says "move five steps forward", the model needs to interpret this instruction and convert it into a command that the robot understands, such as {action:"move",direction:"forward",steps:5}. At the same time, the generated robot operation instructions are published through ROS topics. The robot node subscribes to these ROS topics to execute commands.
[0073] In the above technical solution, in addition to being implemented based on iFlytek, the various voice modules and large model modules can also be implemented through other software such as openAI, and are not limited to iFlytek.
[0074] like Figure 2 , a system information interaction block diagram is given. In summary, the present invention relates to a robot intelligent voice interaction system and method based on ROS, which specifically implements:
[0075] Voice wake-up module: The robot is activated by publishing a wake-up word through the ROS topic. This step is the trigger point for the system to start interacting, ensuring that the robot can quickly switch from the dormant state to the working state.
[0076] iFlytek Voice Dictation SDK Integration: This SDK is responsible for converting voice signals into text. With its high-precision speech recognition technology, it can effectively process voice input in complex and various environments.
[0077] Application of large language model (iFlytek Spark Large Model v3.1): Use the large model to process speech-converted text, conduct deep semantic analysis and intelligent interaction. The model is highly intelligent and can understand complex user intentions and generate corresponding responses.
[0078] Generate robot motion instructions using a large language model: Based on the results of semantic analysis of the large language model, the system converts the user's instructions into specific operation commands that the robot can understand.
[0079] Use of ROS topics: The modules of the entire system communicate through ROS topics, ensuring real-time transmission of information and coordination between modules.
[0080] The present application also provides a method for robot intelligent voice interaction based on ROS. The method includes:
[0081] The preset wake-up word is recognized through voice recognition technology, and when the preset wake-up word is detected, the system is activated from the sleep state;
[0082] When the system is activated from sleep mode, it collects voice information in the environment through the microphone and converts the voice into text using speech recognition technology;
[0083] Receive the text output by the voice dictation module, perform deep semantic analysis on it, and use natural language processing technology to understand the user's intention;
[0084] Convert the parsed user intent into an operation instruction; map the user intent to the corresponding ROS topic, and trigger the robot's action by publishing these ROS topics;
[0085] Subscribe to the ROS topic published by the intelligent voice interaction module and control the movement of the robot according to the received operation instructions.
[0086] For the specific limitations of the ROS-based robot intelligent voice interaction method, please refer to the above limitations of the ROS-based robot intelligent voice interaction system, which will not be repeated here.
[0087] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0088] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent application shall be subject to the attached claims.
Claims
1. A robot intelligent voice interaction system based on ROS, characterized in that: The system includes a voice wake-up module, a voice dictation module, a large language model module, an intelligent voice interaction module, and a robot motion instruction issuing module, wherein: A voice wake-up module is used to identify a preset wake-up word through voice recognition technology, and activate the system from a dormant state when the preset wake-up word is detected; The voice dictation module is used to collect voice information in the environment through the microphone when the system is activated from the sleep state, and convert the voice into text using the voice recognition technology; The large language model module receives the text output by the voice dictation module, performs deep semantic analysis on it, and uses natural language processing technology to understand user intent; The intelligent voice interaction module is used to convert the parsed user intention into an operation instruction; the user intention is mapped to the corresponding ROS topic, and the robot's action is triggered by publishing these ROS topics; The robot motion instruction publishing module is used to subscribe to the ROS topic published by the intelligent voice interaction module and control the robot's motion according to the received operation instructions.
2. The robot intelligent voice interaction system according to claim 1, characterized in that: The voice wake-up module is also used to set the wake-up word in advance through the ROS topic.
3. The robot intelligent voice interaction system according to claim 1, characterized in that: The voice dictation module collects voice information in the environment through a microphone and uses speech recognition technology to convert the voice into text, including: Initialize through the voice dictation SDK software development kit and set the function of monitoring the wake-up word. When the wake-up word is recognized, start the recording function and collect voice information in the environment through the microphone; Call the speech-to-text API to convert the recorded voice information into text messages; Finally, the converted text message is published through the ROS topic voiceWordsPub.
4. The robot intelligent voice interaction system according to claim 1, characterized in that: The large language model module is used to receive the text output by the speech dictation module and perform deep semantic analysis on it, including: Through the ROS message passing mechanism, subscribe to the ROS topic published by the voice dictation module, monitor the ROS topic, and receive new text messages immediately once they are published; Performing preprocessing operations on the received text; wherein the preprocessing operations include removing stop words, normalizing punctuation marks, and text segmentation; Use natural language processing technology to perform deep semantic analysis on the preprocessed text, and extract user intent based on the results of the deep semantic analysis; deep semantic analysis includes text classification, named entity recognition, and relationship extraction.
5. The robot intelligent voice interaction system according to claim 4, characterized in that: The natural language processing technology includes a Transformer model or a BERT model.
6. The robot intelligent voice interaction system according to claim 1, characterized in that: The intelligent voice interaction module converts the analyzed user intention into operation instructions, including: Setting a mapping table from user intent to ROS topic; the mapping table defines the correspondence between user intent and ROS topic; When the user intent is parsed and mapped to the corresponding ROS topic, a message is created and published to the corresponding ROS topic; the message contains the specific content and parameters of the user intent.
7. The robot intelligent voice interaction system according to claim 1, characterized in that: The robot motion command publishing module subscribes to the ROS topic published by the intelligent voice interaction module and controls the robot's motion according to the received operation instructions, including: Receiving an operation instruction; wherein the operation instruction includes specific content and parameters of the user's intention, including the direction, speed, and distance of movement; Parse the received operation instructions and extract the specific content and parameters of the operation instructions; Control the movement of the robot according to the received operation instructions.
8. The robot intelligent voice interaction system according to claim 7, characterized in that: The robot's movement is controlled according to the received operation instructions, including using the message passing mechanism provided by ROS to pass the operation instructions to the robot's motion control node. The motion control node drives the robot's motors and joints according to the instructions to realize the robot's action execution.
9. The robot intelligent voice interaction system according to claim 8, characterized in that: The motion control node drives the motors and joints of the robot according to the instructions to realize the robot's action execution, including realizing the robot's action execution according to the motor's drive signal and joint angle instructions.
10. A robot intelligent voice interaction method based on ROS, characterized in that: The method comprises: The preset wake-up word is recognized through voice recognition technology, and when the preset wake-up word is detected, the system is activated from the sleep state; When the system is activated from sleep mode, it collects voice information in the environment through the microphone and converts the voice into text using speech recognition technology; Receive the text output by the voice dictation module, perform deep semantic analysis on it, and use natural language processing technology to understand the user's intention; Convert the parsed user intent into an operation instruction; map the user intent to the corresponding ROS topic, and trigger the robot's action by publishing these ROS topics; Subscribe to the ROS topic published by the intelligent voice interaction module and control the movement of the robot according to the received operation instructions.
Citation Information
Cited By
Intelligent questioning and answering method and device for enhancing large model government affairs by combining speech recognition with database
CN119541492A
Voice interaction method and device
CN119811368A
ROS robot intelligent teaching auxiliary system, method and device based on large model, medium and product
CN119862882A
Ros robot intelligent teaching auxiliary system, method, equipment, medium and product based on large model
CN119862882B
Robot autonomous exploration mapping method, device and equipment and medium
CN121297816A
