Docsity

Voice Controlled Stereo System - Project 15 | ECE 445, Study Guides, Projects, Research of Electrical and Electronics Engineering

Partial preview of the text

Download Voice Controlled Stereo System - Project 15 | ECE 445 and more Study Guides, Projects, Research Electrical and Electronics Engineering in PDF only on Docsity!

Voice Controlled Stereo System By Tung-Sheng Tony Lee Tung-Lin Dennis Lee Frank Liang ECE 445, SENIOR DESIGN PROJECT FALL 2004 TA: Alex Spektor Date: 12/05/ Project No. 15

ABSTRACT

This project is to design and build a voice controlled stereo system that may be used by people, who cannot reach the stereo system or its remote and want to operate the system. For example, patients in the hospital who cannot leave their beds may use our design to play music. The system is built separately in three parts, the voice recognition part, the wireless communication and interface part, and the audio amplifier part. Voice recognition system communicates with stereo system through the serial port interface and wireless communication. This is a simple version of voice controlled stereo system, and there are still rooms for improvements in the future. ii

iv

1. INTRODUCTION

People’s lives are changing as technology advances. Many inventions were created to make our lives easier and more convenient. Traditionally, stereo systems are controlled by people pushing buttons manually. With our voice controlled stereo system, people can easily control the stereo system with their voice. This technology may also be applied to many other daily used devices to enhance our life quality. This project is to design and build a voice controlled stereo system that may be used by people, who cannot reach the stereo system or its remote and want to operate the system. For example, patients who cannot leave the bed in the hospital may use our design to play music.

1.1 Overview.............................................................................................................................

The system is built separately in three parts, the voice recognition part, the wireless communication and interface part, and the audio amplifier part. Voice recognition system communicates with stereo system through the serial port interface and wireless communication.

1.2 Features...............................................................................................................................

The system has four main features: ․ Build specific user’s voice profile ․ Recognizing five voice instructions: Play, Stop, Pause, Next, Previous ․ Output control signals through serial port ․ Graphical User Interface

1.3 Subprojects.........................................................................................................................

The three parts of our project: ․ Voice Recognition System: by Tony Lee ․ Wireless Communication and Interface: by Dennis Lee ․ Audio Amplifier: by Frank Liang 1.31 Voice Recognizing System The purpose of this part is to recognize the user’s voice correctly. In our project, we need five voice instructions to do five different operations. They are “play”, “stop”, “pause”, “next”, and “previous.” The voice recognizing system will output control signals when voice instructions are recognized. The control signals will be outputted through serial port to the wireless transmission chipset.

1.3 2 Wireless Communication and Interfaces..........................................................................

The wireless transmission contains the wireless transmitter and wireless receiver. Before the transmission, the information is encoded through an encoder, the after received, decoded back to the original data.

2. DESIGN PROCEDURE

2.1 Design Decisions................................................................................................................

Voice Recognizing System In order to use the vowel sound to recognize voice instructions, we needed to find the exact vowel section in a voice waveform. Then, we find the zero crossing rates to do recognition. Here are the waveforms and fft of the voice instructions: From figure 2.1 to figure 2.5, we noticed that all voice instructions are within frequency range 0Hz to 1000Hz. We decided to use different filters to filter out the particular characteristic of certain frequency, so that we can produce the unique information about each voice instructions.

3 2 Wireless Communication and Interfaces............................................................................

Due to the usage of the Matlab to analyze the voice sample, we choose using serial port to communicate between the PC and our stereo system. The original design is using the parallel part cable as an interface. However, Matlab only allows users to communicate with devices through the serial port cable. The pins assignments and functions are shown in Figure 2.6. Pin 2 transfers information needed to control the stereo system. Refer to Figure 2.7, start bit comes first in the serial data transmission, it always has a value of zero; the first data bit corresponds to the least significant bit (LSB), the last bit in the data bits section corresponds to the most significant bit. The parity bit is following by the data bits if it is defined in the transmission. There are 1 or 2 stop bits at the end of the data transmitted with values of one. As shown in Figure 3.12, a logical one transmitting through the serial port has a voltage level -3 Volts. Therefore we could think the signal has been reversed. With the understanding of how the serial ports transmitting the data, we could start designing the control signals needed to trig our stereo system. Audio Amplifier

  • The CD player There are 3 wires out of the output of the CD player. The yellow wire is the stereo ground. The red and white wires are the 2 signals to be amplified for the left and right speakers.
  • The speaker 8 Ω 40W speaker

2.2 Tools Used..........................................................................................................................

Voice Recognizing System

  • Matlab
  • Computer
  • Philips Microphone Wireless Communication and Interfaces
  • Philips 5139 function generator
  • Agilent 54642A Oscilloscope
  • Agilent IntuiLink Data Capture Application Audio Amplifier
  • Philips 5139 function generator
  • Agilent 54642A Oscilloscope
  • Agilent IntuiLink Data Capture Application

So, here are the specs of our new design:  Band Pass Filter 1 ~ 10: 、 36-tap filter 、 Band pass frequency: 0-100 Hz, 100-200 Hz, … , 1000-1100 Hz 、 Transition band: 100 Hz  ZCR 1 ~ 10: ZCR = 1/M * Σ(m=0, M) [1/2 * | sgn(Xm) – sgn(Xm-1)| ] (3) The block diagram is showed in figure 3.2. The voice input comes in through microphone and through D/A converter. It will then pass ten different band pass filters, which are 0-100Hz, 100-200Hz to 1000-1100 Hz. The output of all filters will go through ZCR blocks which will find the maximum zero crossing rate over the waveform and output to recognizing block. The recognizing block will make a decision based on the output of ZCR blocks. If the ten-element vector input is close to, say, “play”, the decision will be made. It will recognize the input as voice instruction, “play”. Figure 3.7 shows the original waveform of “play” goes through ten different band pass filters. Figure 3.8 shows the waveform is chopped; only the waveform of “play” has left. Figure 3.9 shows the FFT of the output of ten filters. Finally, the outputs of all ZCR blocks are showed in Figure 3.10. This clearly gave us more information to make decision on the voice instruction that is recognizing. We have also designed a graphical user interface (GUI) for our system. As showed in Figure 3.11, there are three bottoms for different users. Each of the bottoms will recognize voice instructions base on different database. Although the GUI we design is not very beautiful, it contains all the functions we want to implement. 3.2 Wireless communication Due to the fact that the encoder takes only parallel inputs, the conversion of the serial data is needed. Implementing the converting circuit with serial input parallel output shift register (DM74LS164) to get bits we want in serial port transmitting. The idea is to use another serial port to output a signal which has all one string to enable the shift register to shift in the needed data bits, which is showed in Figure 4. The register is providing with a clock signal which generating by the function generator with the same parallel transmitting frequency. The serial data transmitting rate can be varied by changing the Baudrate in Matlab. Problem encounter:

1. While shifting bits into register, the parallel outputs of shift register changes respected. A serious issue is that the wireless network would transfer the changes of the contents in shift register to the remote control of CD player. That unexpected changes would cause the confusing of the CD player since the multiple commands are sent in a very short amount of time. Solution: Use a D-register (DM74173) to hold the data. The D-register reads in data while the clock is active. The D register needs not to read in data while the shift register are performing shifting operation. Therefore, the extra serial port is used to deactivate the clock of the D register. The wireless transmitting circuit takes the outputs of the D-register as the inputs.

2. Clock timing issue: Since the clock is generated by the function generator, the serial port input could come in at any position in the signal clock period. If the serial data come in before the positive edge, the shift register would start shifting when the clock reaches the positive edge. However, if the serial data comes in after the positive edge, it would not perform shifting until the next clock cycle. Therefore, the shifting register would sometimes shift a bit more than expected. We could not design of the control signal with such random shifting results. Solution : Use the presettable counter (MC74HCT163A) to produce the new clock. The counter would not start counting until the shift register starting shifting. Therefore, we used the extra serial port again to enable the counter. With the new clock generates by the counter, the clock signal always starts trigging when the shifting register is ready to shift in the serial port data. Wireless Transmission Network: Encoder and Decoder IC (HT-12E, HT-12D) In order to avoid signal interference from other wireless devices, a pair of encoder and decoder circuits is needed. A Holtek HT-12E encoder is able to encrypt any 4 bits of data into one of 2^8 specified addresses and then transmit out through the RF transmitter, as showed in Figure 3.14. After the RF receiver has received the encrypted data, the HT-12D decoder would verify the data with a specified address code three times and then send a valid signal into the microcontroller. This valid signal will be treated as like a push button had been pressed and corresponding reaction would be responded by the microcontroller. Wireless transmitter (TXM-900-HP3): The wireless transmitter takes a serial data string from encoder and transmits the signal to the receiver wirelessly though an antenna. Wireless Receiver (RXM-900-HP3): A complete set of Radio Frequency Modules contains a transmitter and a receiver, which is based on the same transmission frequency. The model transfers of the digital information in the 902-928 MHz band. It can transfer the information wirelessly up to a distance of 1000ft. CD player (COBY): Use the CD player with a line remote control which allows the user to control the CD player by pressing the button on the remote. After the simple test and observation, the CD player could be controlled by shorting the 2 nodes under the pressing button. Using the relay and the control signals received by the wireless receiver to short the 2 nodes or open the 2 nodes. Relay: The relay is a switch which turns on if the supply voltage is higher than 5V and the current is greater than 10 mA. We use 4 relays to control the 4 command buttons on the CD player remote control. Problem encountered: The voltage level of outputs of the decoder is not high enough to trigger the relay. After the measuring on the output of decoder, the output is only 1.9V which could not turn on the relay. The current output form the decoder is around 3mA which is too small to trigger the relay as well. Solution:

Figure 2 .1 “Play” with vowel /AYE/ Figure 2. 2 “Stop” with vowel /AH/ Figure 2. 3 “Pause” with vowel /AWE/

Figure 2. 4 “Previous” with vowel /EE/ Figure 2. 5 “Next” with vowel /EH/

Mic A/D^ Energy Low Pass High Pass ZCR ZCR Recognition System Mic A/D^ Energy Low Pass High Pass ZCR ZCR Recognition System Figure 3 .1 Block Diagram of original design Mic A/D ZCR Band Pass 2 Band Pass 10 ZCR 2 ZCR 10 Recognition System Band Pass 1 Figure 3.2 Block diagram of new design

Figure 3.3 Result from original design “+”: play, “o”: stop, “”: next, “x”: previous, “reverse Δ””: pause Figure 3.4 Result from original design “+”: play, “o”: stop, “”: next, “x”: previous, “reverse Δ””: pause

Figure 3.6 Output from ZCR block in new design. This is voice instruction “play.”

Figure 3.7 Original waveform output from Band Pass block in new design Figure 3.8 Chopped waveform output from Band Pass block in new design