Design and implementation of speech intelligent robot Assistant

Source: Internet
Author: User

Design and implementation of speech intelligent robot Assistant

(Author Wavelet QQ463431476)

(Bowen Source http://blog.chinaaet.com/zhaocundang/p/5100017667)

(Bowen Source: http://www.cnblogs.com/xiaobo-Linux/p/5637861.html)

Before learning STM32 of a project, I asked everyone speech recognition which strong? At the moment, it looks like a icroute company, right? Then if you discard other hardware identification is based on STM32 Cortex M Core, pure software to achieve, the recognition effect will certainly not be good, the application is also relatively poor bar. This recognition method must be recorded first, and then match your recording to achieve the purpose of recognition.

Before taking this project to participate in the Huawei Cup competition, did not expect no comment on, wasted the teacher's 200 dollars, a little disappointed, so put this project to share to everyone to see it.

Project implementation Function Summary: The main realization of speech recognition, analog HID keyboard, voice control computer HID keyboard, voice control external devices, such as lamp, fan lights. Achieve voice adjustment rtc,oled display and so on.

Overall project design:

The first picture is built by the manual module.

The second picture is made of a PCB external expansion straight plug board

A simple introduction to the principle of the content:

Introduction 1. Background and significance of the works

(1) Social background

With the increasing popularity of computers, almost every household has a computer, but the family of children, the elderly, and disabled people are not very likely or inconvenient to use the computer, so design a voice to operate the computer's voice robot Assistant is very necessary, can be in their inconvenient time to provide convenience.

(2) Life predicament

Often the morning life is busy, early morning to get up, go out. If we want to do something else, such as tying our shoelaces at the front door, or taking something, and looking at the current time and temperature, we have to look up and watch the phone, watch the clock, that much trouble! As long as we through the voice, casually so that the intelligent robot assistant can be real-time voice broadcast current time and temperature, this is how convenient and intimate!

(3) PC software no hardware line

Cortana on the computer Win10 can recognize voice commands, but the experience is poor, especially if the computer is not configured enough to open Cortana and compare cards. Therefore, if the use of hardware-based speech robot assistant, speech processing is done by the hardware, instructions just send out the good. This efficiency is certainly much better than the results of computer software implementation.

(4) Personal work Assistant

I think, maybe everyone wants a bot that belongs to them? Help yourself to deal with some things, but also more intimate sweating warmth, so that their lives more rich color of life. For example: oneself in front of the computer, next to own small assistant, oneself tired, or own desktop file too many, casually say, "Open Word document", the speech robot Assistant can help you open document. or want to listen to the movie, casually said, "Play Music", "Play movies", the assistant can help you in a short time to open the music player and Storm audio, so that you immediately listen to music, watching movies ... , Ah! Life is beautiful!

2. Introduction to the System

This work is a multi-function embedded voice control device based on STM32 microcontroller. Based on speech recognition and embedded technology, voice robot Assistant can recognize other people's voice commands, so that people simple and convenient use of computer, robot design mainly includes speech recognition, MCU master control, USB communication, desk lamp control, fan control, OLED display, RTC clock, temperature acquisition, voice broadcast, Power circuit, such as several parts, design small, practical!

It can realize the speech recognition function, and realizes the corresponding instruction control by collecting the close-range audio signal. Through the STM32 microcontroller connected to the computer's USB port, the STM32 enumeration into a HID human body input device personality Keyboard, through the voice recognition function to collect people's commands, such as "Open the Storm audio" voice recognition command, via USB to the computer keyboard key value, you can play the movie, " Open QQ Music Player "can play music, in addition to the computer through the hardware to sleep and lock screen, as well as voice input computer login password to unlock and computer wake-up function.

Voice recognition can be used to control external devices, such as the use of small fans in summer, voice control of small fan switch, voice recognition can also be controlled through the relay desk lamp switch. can also be temperature acquisition, the collected indoor temperature values to the microcontroller, OLED display temperature value and voice real-time broadcast indoor temperature. The RTC clock function enables accurate timing of the time when the system is turned off, as well as voice broadcast time. In addition, through the voice output instruction, the robot answers once, so as to realize the human-machine interactive function. shown in block Diagram 1 of the system.

Figure 1 System block diagram

3. System Innovation

(1) Benefits for users who do not use or are not comfortable with the use of the computer

There must be a lot of people in the community who do not use computers, so that through voice control, computers can be easily and quickly used, especially for the elderly and the disabled, to provide some convenience in their inconvenient times.

(2) Stress relief, fun voice interaction

(3) Through a question and answer, say a sentence to execute a command of the way to achieve the function of human-computer interaction

Can relieve the pressure in the busy work, cultivates the life interest, makes the life colorful.

(4) The time-hour minute adjustment can be realized by voice

Voice to achieve the time of the hour, minutes of rapid adjustment, the liberation of hands, so that life is full of fun.

(5) Realize the control of USB lamp and USB fan

can be the desk lamp and small fan control, give inconvenient time to provide convenient.

(6) Compared with computer software, the performance of this work is more stable and more convenient to use.

(7) Voice broadcast

The current indoor temperature and the current time can be broadcast in real time, so that the information can be obtained by listening, but also can do some of their own things, improve the efficiency of life.

a system design

1.1. System Design Scheme

(1) The system adopts STM32 as the main controller, the STM32 minimum system design includes MCU core chip, power circuit, clock circuit and reset circuit.

(2) Choice of speech recognition scheme

At present, STM32 speech recognition scheme has 2 kinds, one is to realize speech recognition directly based on STM32, and the second is to realize speech recognition based on LD3320 speech module. The first method of recognition through voice sampling, amplification filter circuit, the ADC converts the analog amount to a microcontroller can recognize the digital amount, prior to the speech training, that is, recording, and finally the acquisition of audio and audio matching to achieve sound match recognition. The second is based on the LD3320 speech recognition module for speech recognition, the efficiency of this recognition is higher than the use of direct recognition of microcontrollers, so this design uses this high-efficiency recognition method.

(3) USB serial port Design

Universal asynchronous transmission, also known as the universal asynchronous serial port, the microcontroller is commonly used in the communication mode, the microcontroller PA9 PA10 pin (RX TX) connected with external devices, the implementation of serial data transmission.

(4) USB slave design

The PA11 USBDM and PA12 USBDP pins directly connected to the microcontroller allow the computer to be recognized as a USB device.

(5) Relay control circuit, control lamp, fan switch.

(6) USB fan, table lamp interface, universal interface, practical and convenient.

(7) Ds18b20 temperature acquisition circuit for real-time acquisition of current temperature.

(8) Speech text read aloud, the text into a speech module, used to broadcast the current temperature and the current time.

(9) OLED display system menu, OLED right display system function menu, can be switched in real time.

The RTC clock, which displays the current time, can also be adjusted for minutes and hours.

1.3 UCOS II Operating system operation diagram (http://www.cnblogs.com/xiaobo-Linux/QQ463431476 wavelet)

The project joins the Ucos II operating system, enables the program to run concurrently, divides the function into several modules, facilitates the maintenance and deletion of the project function, the project Ucos II operating system diagram 1.3 and Figure 1.4 shows:

Figure 1.3 UCOS II Task creation

hardware design of two systems

2.1 System hardware Circuit design

(1) Power supply circuit

The STM32 main controller uses 3.3V voltage, so the power supply circuit is powered by a 5V to 3.3V voltage regulator, which provides the main power supply to the microcontroller already external equipment, the power circuit 2.1.1 shows.

Figure 2.1.1 Power supply circuit

(2) STM32 minimum system circuit

STM32 minimum system circuit includes STM32 main control chip, clock circuit, reset circuit and other parts, the minimum system 2.1.2 shown.

Figure 2.1.2 STM32 Minimum system circuit

3.1 System PCB Board Design

(1) The first board PCB Development Board design, design relatively large, running line is more, PCB3.1.1 shown.

Figure 3.1.1 First Board PCB

(2) The second board design focused on simplicity, removed the redundant gpio and LCD, increased the OLED, lead to the UART, the overall more practical, 3.1.2 is shown.

Figure 3.1.2 Second Board PCB

(3) The third board will STM32 the core board to take out, to facilitate the transfer of connection to external equipment, to avoid manual welding STM32 144-pin chip as the entire board can not be used. As shown in 3.1.3.

Figure 3.1.4 Third Board PCB

STM32 is enumerated as a USB device after connecting the computer, the computer will be recognized as a USB HID keyboard, (school please disregard = =) 4.4.3 shows:

Figure 4.4.3stm32 is recognized by computer

Four introduction to simple implementation principle

First, the system function Realization principle 1.1 stm32f103 chip hardware USB Slave Machine interface principle

(1) in the stm32f103 chip, the USB interface area uses a dedicated 512-byte SRAM data buffer memory for data transmission and reception between the PC, the buffer can be directly accessed by the USB peripheral, the chip USB peripheral structure 1.1 is shown.

Figure 1.1 Chip USB Architecture

2.4.3 LD3320 Speech Recognition principle

The user through the mic input audio stream, to the input audio stream amplification filtering shaping, the LD3320 chip carries on the spectrum analysis, carries on the characteristic extraction to the input audio, on the other hand, writes the phonetic keyword pinyin in the MCU, in the speech recognizer, the chip pairs the audio and the pinyin string to match, after the match succeeds, The output recognition results are shown in the identification process 2.4.3.

Figure 2.4.3 Identification process

Let's take a brief look at the video demo! (http://v.qq.com/page/g/0/i/g03050r660i.html)

If you are interested, or have any ideas to explore, please leave a comment below! or contact QQ463431476 to learn it together!

Design code Download: https://item.taobao.com/item.htm?spm=686.1000925.0.0.6wFecf&id=534809801064



Design and implementation of speech intelligent robot Assistant

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.