Voice Recognition Technology To Control Electronic/Electrical Appliances.

(1)

VOICE RECOGNITION TECHNOLOGY TO CONTROL ELECTRONIC/ELECTRICAL APPLIANCES

INTAN NADIRA BINTI ABDULLAH SANI

This report is submitted in partial fulfillment of the requirements for the award of Bachelor of Electronic Engineering (Computer Engineering) With Honors

Faculty of Electronic and Computer Engineering Universiti Teknikal Malaysia Melaka


(2)

UNIVERSTI TEKNIKAL MALAYSIA MELAKA

FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER

BORANG PENGESAHAN STATUS LAPORAN

PROJEK SARJANA MUDA II

Tajuk Projek : Voice Recognition Technology to Control Electronic/Electrical Appliances

Sesi

Pengajian : 2008/2009

Saya INTAN NADIRA BINTI ABDULLAH SANI

mengaku membenarkan Laporan Projek Sarjana Muda ini disimpan di Perpustakaan dengan syarat-syarat kegunaan seperti berikut:

1. Laporan adalah hakmilik Universiti Teknikal Malaysia Melaka.

2. Perpustakaan dibenarkan membuat salinan untuk tujuan pengajian sahaja.

3. Perpustakaan dibenarkan membuat salinan laporan ini sebagai bahan pertukaran antara institusi pengajian tinggi.

4. Sila tandakan ( ) :

SULIT*

(Mengandungi maklumat yang berdarjah keselamatan atau kepentingan Malaysia seperti yang termaktub di dalam AKTA RAHSIA RASMI 1972)

TERHAD* (Mengandungi maklumat terhad yang telah ditentukan oleh

organisasi/badan di mana penyelidikan dijalankan)

TIDAK TERHAD

Disahkan oleh:

__________________________ ___________________________________

(TANDATANGAN PENULIS) (COP DAN TANDATANGAN PENYELIA)

Alamat Tetap: BLOK P7A2-T01-U05, FASA 7,

JALAN P9C/1, PRESINT 9, 62200 PUTRAJAYA.


(3)

“I hereby declare that this report is the result of my own work except for quotes as

cited in the references.”

Signature : ………..

Author : INTAN NADIRA BINTI ABDULLAH SANI Date : 30 APRIL 2009


(4)

“I hereby declare that I have read this report and in my opinion this report is

sufficient in terms of the scope and quality for the award of Bachelor of Electronic

Engineering (Computer Engineering) With Honors.”

Signature : ………..

Supervisor‟s Name : SYAFEEZA BINTI AHMAD RADZI


(5)

(6)

ACKNOWLEDGEMENTS

Firstly, I would like to dedicate my highest gratitude to Allah SWT for giving me the strength to complete this final project.

Secondly, I would like to take this opportunity to express my gratitude to my beloved parents for their continuous support to ensure that I continue growth and success during my educational process. My sincere appreciation also goes to my supervisor, Cik Syafeeza binti Ahmad Radzi for giving me prudent advice and guidance in shaping my direction to ensure that I could complete my final project. Thank you for the time and sharing experiences as well as addition knowledge that I believe I would not have this kind of opportunity elsewhere.

Finally I would like to thank also to my entire friend for the support and constructive ideas. Last but not least, I want to thank again to all persons I mentioned above because it was quite hard for me to complete this final project without their guidance, assistance and support.


(7)

ABSTRACT

Overall, the purpose of this project is to build a system that can control electronic and electrical appliances by using voice recognition technology. Voice recognition technology is applied in computer systems converts speech directly into electronic text. This technology allows computer users to bypass their keyboards and use their voices to enter text. It also a fairly natural and intuitive way of controlling the simulation while allowing the user's hands to remain free. Basically, this project development consists of three parts. The first part is software development. GUI is used as interface from user to the system. Program code and GUI is designed using Visual Basic 6.0 while Windows API is used to apply voice recognition in this system. This software provides function to hear voice and access the function of microphone. The second part is using simple circuit as prototype to trigger the output. Simple components are used such as bulb represents a lamp; motor represents a fan and relay represents a door. The third part is applying parallel port as a connection between the circuits with the system (Personal Computer). This voice recognition technology system is operate by input voice is given by user then the system will accept the input the signal is pass through the parallel port and trigger the output shows at circuit. Otherwise, the output will not trigger and need to give another input.


(8)

ABSTRAK

Secara keseluruhannya, projek ini bertujuan untuk menghasilkan satu sistem yang boleh mengawal peralatan elektrik dan elektronik dengan mengunakan teknologi pengesan suara. Teknologi pengesan suara ini dipraktikkan dalam sistem komputer dengan menukar suara ke teks elektronik. Teknologi ini membenarkan pengguna komputer untuk menggunakan suara sebagai input tanpa perlu menekan papan kekunci. Ia juga cara yang agak munasabah untuk mengawal simulasi tanpa menggunakan tangan. Pada dasarnya, pembangunan projek ini terbahagi kepada tiga bahagian. Bahagian pertama ialah pembangunan perisian. GUI digunakan sebagai perantaramuka di antara pengguna dengan sistem. Kod program dan GUI direka dengan menggunakan perisian Visual Basic 6.0 sementara Windows API digunakan untuk mengaplikasi pengesanan suara dalam sistem ini. Perisian ini menyediakan fungsi untuk mendengar suara dan fungsi untuk mikrofon. Bahagian kedua pula ialah menggunakan litar yang mudah sebagai prototaip untuk mengubah keadaan keluaran. Komponen yang digunakan juga adalah mudah iaitu mantol mewakili lampu, motor mewakili kipas dan geganti mewakili pintu. Bahagian ketiga pula adalah mengaplikasi parallel port sebagai penyambung di antara litar dan juga sistem (komputer peribadi). Sistem teknologi pengesan suara ini beroperasi dengan memberikan masukan suara dari pengguna. Sistem akan menerima masukan dengan berhubung melalui parallel port dan perubahan pada keluaran akan ditunjukkan pada litar. Sekiranya masukan tidak diterima, keluaran tidak akan menunjukkan perubahan dan pengguna perlu memberikan masukan semula.


(9)

CONTENTS

CHAPTER TITLE PAGE

PROJECT TITLE i

REPORT STATUS FORM ii

DECLARATION iii

APPROVAL iv

DEDICATION v

ACKNOWLEDGEMENT vi

ABSTRACT vii

ABSTRAK viii

CONTENTS ix

LIST OF TABLES xii

LIST OF FIGURES xiii

LIST OF ABBREVIATIONS xv

LIST OF APPENDIX xvi

1 INTRODUCTION

1.1 Introduction 1

1.2 Project Objective 2

1.3 Problem Statement 2

1.4 Scope of Work 3


(10)

2 LITERATURE REVIEW

2.1 Visual Basic 6.0 5

2.2 Graphical User Interface (GUI) 7

2.3 Hardware 8

2.3.1 Simple LED driving circuit 8

2.4 Cakewalk SONAR 6 Producer Edition 10

2.5 Parallel Port 11

2.5.1 Background 11

2.5.2 Hardware 12

2.5.3 Parallel Port Register 14

2.6 Microphone 15

2.7 Voice Recognition 16

2.7.1 How is Voice Recognition Performed 16

2.7.2 Discrete Word 18

2.7.3 Disciplines that involve in Voice Recognition 19

2.8 Windows API 20

2.9 TVicLPT 21

2.9.1 TVicLPT Features 22

3 PROJECT METHODOLOGY

3.1 Introduction 23

3.2 Data Collection Method 24

3.3 Project Methodology 25

3.4 Flowchart of Project Methodology 26

3.5 System Flowchart 27

3.6 Project Phases 28

3.7 Advantages Visual Basic 6.0 over VB.NET 28


(11)

3.9 The Wave Format 30

3.10 Circuit Selection 31

3.11 Component Selection 32

3.11.1 Resistor 32

3.11.2 Diode 34

3.11.3 Relay 35

3.11.4 Transistor 36

4 RESULTS AND ANALYSIS

4.1 Expected Result 38

4.2 Software Result 39

4.3 Software Testing 39

4.4 Graphical User Interface 39

4.5 Analysis of Appliances System Activation 41

4.6 Circuit 46

5 DISCUSSION AND CONCLUSION

5.1 Discussion 47

5.2 Commercialization 48

5.3 Conclusion 49

5.4 Future Works 49


(12)

LIST OF TABLES

NO TITLE PAGE


(13)

LIST OF FIGURES

NO TITLE PAGE

1 Microsoft Visual Basic 6.0 5

2 Graphical User Interface 7

3 Simple LED Circuit 9

4 Cakewalk SONAR 6 Producer Edition 10

5 Sound Wave 10

6 DB25 Connector 12

7 Microphone 15

8 TVicLPT Logo 21

9 Add TVicLPT Component in VB 6.0 21

10 Project Methodology 26

11 System Flowchart 27

12 Main Circuit (Relay Circuit) 31

13 Lamp Circuit 31

14 Fan Circuit 32

15 Standard EIA Color Code 33

16 Protection Diodes for Relays 34

17 Relays 35

18 Transistor C1815 36

19 Transistor Circuit Symbols 36

20 Expected Result 38

21 Main Menu 40

22 Item Menu 41

23 Checked Item Menu 42


(14)

25 Activate Lamp 1 and Fan 44

26 Activate Lamp 1 and Deactivate Fan 45


(15)

LIST OF ABBREVIATIONS

ADC Analog-Digital Converter

API Application Programming Interface GUI Graphical User Interface

IDE Integrated Development Environment

IEEE Institute of Electrical and Electronics Engineers LED Light Emitted Diode

PC Personal Computer


(16)

LIST OF APPENDIX

Appendix A Project Planning Appendix B Program Source Code


(17)

CHAPTER 1

INTRODUCTION

1.1 Introduction

This project is about developing a Windows application with voice recognition technology to control electronic/electrical appliances such as fan, lamps or lock/unlock the doors. This application enables a person to control any home appliances by voice; therefore it is essential for people with limited physical ability. Personal computer is used as an interface to speech recognition engine with the menu interface developed in Visual Basic 6.0 so that it is easy to be used by anyone.

Voice recognition is the technology by which sounds, words or phrases spoken by humans are converted into electrical signals and these signals are transformed into coding patterns to which meaning has been assigned. Discrete word system is the easiest way to implement voice recognition system. For this type of system, the speaker must pause between words compared to continuous speech where adjacent words run together without pauses or any other apparent division between words.


(18)

1.2 Project Objective

The main objective of this project is to design and implement the voice recognition technique to control the electronic/electrical appliances which can ease a

person‟s daily activity. Thus, it helps to cut down utility expenses. Other objectives

are:

i. To familiar with programming coding using Visual Basic 6.0 environments. ii. To construct and analyze the suitable circuit for external hardware.

iii. To learn and study the specification of parallel port. iv. To apply the function of parallel port.

v. To apply voice recognition technique to control the electronic/electrical appliances.

1.3 Problem Statement

This project is proposed to solve problems that occur mostly towards disable people. The target users are:

Handicapped people (OKU) Paralytic people

Elder person

Person who recovered from surgery Overweight person

By developing this project, it will give them benefit and convenience by lighten their burden and make their life easier so that they are not fully depending to other people.


(19)

1.4 Scope of Work

This project is started by information gathering about all the requirements needed to accomplish these matters. Basically, the searching process begins by exploring information via internet, related books, journals and thesis. Resource from

the library and supervisor‟s guidance is used and some essential information is used

in this project. After the information gathering, the project methodology is sketched. The project development is preceded based on the methodology. Overall, this project is divided into three parts which is consists of:

i) Software writing using Microsoft Visual Basic 6.0

Create a suitable code that will be used as a user‟s interface. There is a

specific coding to connect the circuit to the Personal Computer. ii) Speech recognition engine from Microsoft

Learn and search information more about Microsoft Direct Speech Recognition.

Find a suitable microphone as a voice input. iii) Hardware

Find suitable circuit and components. Study the specification of parallel port.


(20)

1.5 Thesis Outline

This thesis is represented by five chapters. The following is the outline for this project in order to understand the whole report.

The first chapter of the thesis will explain briefly about the project background, objective of the project which needs to be achieved, problem statement of the project, scope of works regarding the project and methodology of the project.

Chapter 2 describes about literature review and information gathering of the project in order to complete the whole project. This study is focused especially on Visual Basic 6.0 software, applying voice recognition technique and circuit application.

Chapter 3 explains about the project methodology on how the project is implemented. The approach for meeting the goals and objectives and project life cycle phase is described in this chapter, along with the tasks needed to complete it.

Chapter 4 describes the project finding which includes the simulation design and GUI. This chapter also discusses and analyze about the project and operation of the software such as the programming code. Furthermore, the output from combination of software and hardware is also included.

Chapter 5 will be the conclusion and suggestion to the project for the future recommendation.


(21)

CHAPTER 2

LITERATURE REVIEW

2.1 Visual Basic 6.0

Figure 1 Microsoft Visual Basic 6.0

Microsoft Visual Basic 6.0 is a programming environment used to create graphical applications for the Microsoft Windows family of operating systems. Visual Basic is the most productive tool for rapidly creating a wide range of Windows, Web, Mobile, and Office applications built on the .NET Framework. A simple utilities or sophisticated applications can be developing using Visual Basic 6.0. The Visual Basic language is designed to be human readable and accessible to everyone from novice programmers to advanced system architects. All of this is built on top of the .NET Framework, which guarantees that programs written in Visual


(22)

Basic run with unsurpassed scalability and reliability. Programs written in Visual Basic will interoperate seamlessly with programs written in any other .NET languages such as Visual C#, Visual J#, or Visual C++. ActiveX® technologies allow us to use the functionality provided by other applications, and even automate applications and objects created using the Professional or Enterprise editions of Visual Basic. Internet capabilities make it easy to provide access to documents and applications across the Internet or intranet from within your application, or to create Internet server applications. Generally speaking there are required two things:

The Visual Basic compiler to turn programs into running applications Some form of IDE (Integrated Development Environment) in which to write code.


(23)

2.2 Graphical User Interface (GUI)

Figure 2 Graphical User Interface (GUI)

A GUI is a graphical (rather than purely textual) user interface to a computer. The term came into existence because the first interactive user interfaces to computers were not graphical; they were text-and-keyboard oriented and usually consisted of commands that had to remember and computer responses that were infamously brief. The command interface of the DOS operating system is an example of the typical user-computer interface before GUIs arrived. An intermediate step in user interfaces between the command line interface and the GUI was the non-graphical menu-based interface, which let interact by using a mouse rather than by having to type in keyboard commands. Graphical user interfaces (GUI) allow end users to interact with applications in a more or less intuitive manner. There are two types of interfaces between a computer application and the user:

i. Command-line : the user types a text command and the computer responds according to that command

ii. GUI : the user clicks on a visual screen that has icons, windows and menus, by using a pointing device, such as a mouse.


(24)

GUI is a type of user interface which allows people to interact with electronic devices like computers, hand-held devices (MP3 Players, Portable Media Players, Gaming devices), household appliances and office equipment. A GUI offers graphical icons, and visual indicators as opposed to text-base interfaces, typed command labels or text navigation to fully represent the information and actions available to a user. The actions are usually performed through direct manipulation of the graphical elements.

2.3 Hardware

A simple circuit is used as a prototype to trigger the output. Simple components are used such as bulb represents a lamp; motor represents a fan and relay represents a door.

2.3.1 Simple LED driving circuits

A simple circuit can be construct to drive a small LED through PC parallel port. The only components needed are one LED and one 470 ohm resistors. It simply connects the diode and resistor in series. The resistors is needed to limit the current taken from parallel port to a value which light up acceptably normal LEDs and is still safe value (not overloading the parallel port chip). In practical case the output current will be few mA for the LED, which will cause a typical LED to somewhat light up visibly, but not get the full brightness.

Then the circuit is connected to the parallel port so that one end of the circuit goes to one data pin (the one you wish to use for controlling that LED) and another one goes to any of the ground pins. Be sure to fit the circuit so that the LED positive lead (the longer one) goes to the data pin. If the LED is connected in the wrong way, it will not light in any condition.


(1)

1.4 Scope of Work

This project is started by information gathering about all the requirements needed to accomplish these matters. Basically, the searching process begins by exploring information via internet, related books, journals and thesis. Resource from the library and supervisor‟s guidance is used and some essential information is used in this project. After the information gathering, the project methodology is sketched. The project development is preceded based on the methodology. Overall, this project is divided into three parts which is consists of:

i) Software writing using Microsoft Visual Basic 6.0

Create a suitable code that will be used as a user‟s interface. There is a specific coding to connect the circuit to the Personal Computer.

ii) Speech recognition engine from Microsoft

Learn and search information more about Microsoft Direct Speech Recognition.

Find a suitable microphone as a voice input. iii) Hardware

Find suitable circuit and components. Study the specification of parallel port.


(2)

1.5 Thesis Outline

This thesis is represented by five chapters. The following is the outline for this project in order to understand the whole report.

The first chapter of the thesis will explain briefly about the project background, objective of the project which needs to be achieved, problem statement of the project, scope of works regarding the project and methodology of the project.

Chapter 2 describes about literature review and information gathering of the project in order to complete the whole project. This study is focused especially on Visual Basic 6.0 software, applying voice recognition technique and circuit application.

Chapter 3 explains about the project methodology on how the project is implemented. The approach for meeting the goals and objectives and project life cycle phase is described in this chapter, along with the tasks needed to complete it.

Chapter 4 describes the project finding which includes the simulation design and GUI. This chapter also discusses and analyze about the project and operation of the software such as the programming code. Furthermore, the output from combination of software and hardware is also included.

Chapter 5 will be the conclusion and suggestion to the project for the future recommendation.


(3)

CHAPTER 2

LITERATURE REVIEW

2.1 Visual Basic 6.0

Figure 1 Microsoft Visual Basic 6.0

Microsoft Visual Basic 6.0 is a programming environment used to create graphical applications for the Microsoft Windows family of operating systems. Visual Basic is the most productive tool for rapidly creating a wide range of Windows, Web, Mobile, and Office applications built on the .NET Framework. A simple utilities or sophisticated applications can be developing using Visual Basic 6.0. The Visual Basic language is designed to be human readable and accessible to everyone from novice programmers to advanced system architects. All of this is built on top of the .NET Framework, which guarantees that programs written in Visual


(4)

Basic run with unsurpassed scalability and reliability. Programs written in Visual Basic will interoperate seamlessly with programs written in any other .NET languages such as Visual C#, Visual J#, or Visual C++. ActiveX® technologies allow us to use the functionality provided by other applications, and even automate applications and objects created using the Professional or Enterprise editions of Visual Basic. Internet capabilities make it easy to provide access to documents and applications across the Internet or intranet from within your application, or to create Internet server applications. Generally speaking there are required two things:

The Visual Basic compiler to turn programs into running applications Some form of IDE (Integrated Development Environment) in which to write code.


(5)

2.2 Graphical User Interface (GUI)

Figure 2 Graphical User Interface (GUI)

A GUI is a graphical (rather than purely textual) user interface to a computer. The term came into existence because the first interactive user interfaces to computers were not graphical; they were text-and-keyboard oriented and usually consisted of commands that had to remember and computer responses that were infamously brief. The command interface of the DOS operating system is an example of the typical user-computer interface before GUIs arrived. An intermediate step in user interfaces between the command line interface and the GUI was the non-graphical menu-based interface, which let interact by using a mouse rather than by having to type in keyboard commands. Graphical user interfaces (GUI) allow end users to interact with applications in a more or less intuitive manner. There are two types of interfaces between a computer application and the user:

i. Command-line : the user types a text command and the computer responds according to that command

ii. GUI : the user clicks on a visual screen that has icons, windows and menus, by using a pointing device, such as a mouse.


(6)

GUI is a type of user interface which allows people to interact with electronic devices like computers, hand-held devices (MP3 Players, Portable Media Players, Gaming devices), household appliances and office equipment. A GUI offers graphical icons, and visual indicators as opposed to text-base interfaces, typed command labels or text navigation to fully represent the information and actions available to a user. The actions are usually performed through direct manipulation of the graphical elements.

2.3 Hardware

A simple circuit is used as a prototype to trigger the output. Simple components are used such as bulb represents a lamp; motor represents a fan and relay represents a door.

2.3.1 Simple LED driving circuits

A simple circuit can be construct to drive a small LED through PC parallel port. The only components needed are one LED and one 470 ohm resistors. It simply connects the diode and resistor in series. The resistors is needed to limit the current taken from parallel port to a value which light up acceptably normal LEDs and is still safe value (not overloading the parallel port chip). In practical case the output current will be few mA for the LED, which will cause a typical LED to somewhat light up visibly, but not get the full brightness.

Then the circuit is connected to the parallel port so that one end of the circuit goes to one data pin (the one you wish to use for controlling that LED) and another one goes to any of the ground pins. Be sure to fit the circuit so that the LED positive lead (the longer one) goes to the data pin. If the LED is connected in the wrong way, it will not light in any condition.