Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,541 members, 7,816,314 topics. Date: Friday, 03 May 2024 at 09:23 AM

LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! - Programming (2) - Nairaland

Nairaland Forum / Science/Technology / Programming / LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! (16770 Views)

Difference Between System Software And Application Software / Let's Learn Python-striktly Noobed!! / Let's Learn Object Oriented PHP! (2) (3) (4)

(1) (2) (3) (4) (Reply) (Go Down)

Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 1:43pm On Jan 05, 2012
Whoa!
Had to retrieve this piece from the archives!
Got it lost somewhere between the bannings and deleting of posts!
Well I will continue this lesson, like I intended to, banning or no ban! grin
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 1:45pm On Jan 05, 2012
Er, but before we continue, I want to add a twist to the lesson, a slight deviation. . . wink
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 1:49pm On Jan 05, 2012
I want to us to learn how to control the device that we created in the last lesson, by voice control!
Yep!
Imagine saying to your computer "ON LIGHTS" or "FIRE UP" or "ANTI-NEPA" or some other command , and the PC puts on the device for you!
Pretty cool eh?
Right, stay tuned to this tread! Lesson Coming Soon!
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by gameaddict(m): 3:32pm On Jan 06, 2012
first post of 2012: sweet pawn for president. grin
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 9:54pm On Jan 06, 2012
^^^
Thanks men!
Make I go find country wey I go rule!
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by prodgalson: 4:17pm On Jan 07, 2012
A tinkerer myself, I'm curious to see the rest of your post.
As for 'sweet-pawn for president', first step: dont promise to post, just post. smiley
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 7:39pm On Jan 07, 2012
prodgalson:

A tinkerer myself, I'm curious to see the rest of your post.
As for 'sweet-pawn for president',  first step: dont promise to post, just post.  smiley

@ prodgalson which one be tinkerer again? You don de think so tey u don dey forget how to type 'thinker' and now u don fire blazing arrow! E don tey wey I don bend down for am!
*Bends down under desk as arrow shoots from laptop screen*
*Gets up in Slow-Motion from under the desk*
*Wipes the blood from his lips*
*Cracks his fingers and dims his eyes to focus on the perpetrator of the dastard act*
*Now its time for revenge!*
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 7:41pm On Jan 07, 2012
Personally I hate politics and dislike many of those who involve themselves neck-deep in the vice, and now that you have compared me to one-I must redeem myself. . .
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 7:50pm On Jan 07, 2012
Oya make we start!

Tools Needed for Voice Control Application
-------------------------------------------------------
Software Needed:
1. The good old Legacy VB for coding the application.(That's what we used in the last lesson)

2. Microsoft Direct Speech Development Tools (Now this is the stuff that does the magic!)

Hardware Needed:

A good microphone. The better the quality of the mic, the better the results we will get!
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 7:54pm On Jan 07, 2012
You can get a hand mic or the head set mic from any local computer store for nothing more than 1K

Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 8:03pm On Jan 07, 2012
Now to download the Microsoft Direct Speech Development Tool, click on the link below:

http://activex.microsoft.com/activex/controls/agent2/actcnc.exe


Take note, the size of the software is 6MB so make sure you have the internet connect for that size!
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 8:06pm On Jan 07, 2012
*Smoke steaming from my head-Still in vex mode*

Okay, do I still sound like a Politician?

Hold that thought-cos I ain't done yet, we've only just begun! angry
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 8:20pm On Jan 07, 2012
Now install the 6MB file you downloaded.

You will see a screen that looks like the first picture below.

It's a wizard of the Microsoft Direct Speech Development Tool.

Follow the instructions you see on the wizard until you are done, You will see screens like the second picture below-Make sure that you have connected your MICROPHONE to the PC before you start O!

You will be told that the Microsoft Direct Speech Development Tool has been successfully installed with a pop-up when you are done.

Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 8:23pm On Jan 07, 2012
Now when you have done that you may be tempted to go to the Program Files and and go look for the Tool that you just installed.

Go ahead, try. . .
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 8:24pm On Jan 07, 2012
Has any body seen it?
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 8:28pm On Jan 07, 2012
Eh-eh! So everybody have gone to bed at 8.00 pm now eh?
Oya make I follow go sleep!
Will continue "tomorrow",or when somebody answers my question-which ever comes first!
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by bakenda(m): 10:56pm On Jan 08, 2012
Ride on bro, the world is following.
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 12:04am On Jan 09, 2012
Oh good! Thank you Bakenda!
Now I know I have followers despite the fact that I do not have a twitter account!

Right, let's continue. . .

So as I was saying, after installing the Microsoft Direct Speech Development Tool, and you go to Program Files to look for the installed program, will you see it?

No you wont!

Why?

Cos its a  Development Tool, meant for developing applications with programming languages like VB, not for regular PC users to play with (MS recorder and Windows media player already do that!)

Now I am going to show you how I will use our programming language of choice (VB6) to interact with the  Microsoft Direct Speech Development Tool. . .
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 12:06am On Jan 09, 2012
Okay, now you will first. . .
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 12:08am On Jan 09, 2012
Oh, NEPA has taken light!

Damn!

Sorry folks, its not my fault, its the economy's-will be back when the light is back!
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 12:15am On Jan 09, 2012
*Sits down on chair and looks and the dark space around him*

*Notices that all is dead quite around him*

*Feels one wave of QUALITY fresh air blowing on him from the window*

*Eyes become heavy, sweet sleep beckons*

*Goes over to the bed, lays his body down, feels the soft blanket enveloping him, nice and wooly*

*Goes to sleep!*

*Starts to snore*

*Nepa brings light! angry *

*Hisses and covers himself with the blanket*

Sorry folks-too late!Sleep wins! See ya tomorrow!  wink
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by bakenda(m): 3:34am On Jan 09, 2012
OK, goodnight but i'm still awake. wink
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 2:30pm On Jan 10, 2012
Okay, let's move on. . .

Next launch VB and select a new Standard Exe project. . .

Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 2:36pm On Jan 10, 2012
Your screen should look like this. . .

Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 2:46pm On Jan 10, 2012
Now press CTRL + T to bring up the Add Components Dialogue Box.

Scroll till you see the Microsoft Direct Speech Recognition option and select it as shown in the image below. Select Okay when you are done.

You will see an Ear in the tool bar by the left, that is the Active X Control (or according to Java folks, the Class Interface) that represents the Microsoft Direct Speech Tool that we just installed.

The above shows how we add the Microsoft Direct Speech Tool to our VB project.

Next we look at how to sing a song. . .

Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 2:57pm On Jan 10, 2012
Do for dodo a hot red dodo

Re some thing in front of email

Mi A name of a TV presenter that died some 5 years ago

Fa for Fa-fa-fa-foul!

So, so what in heavens name am I doing!?!

Sorry folks, slip of brain matter! Happens to the best of us. embarassed

Sorry about that mis-typing , er let's get back to the main topic which was. . .

*checks list*

Oh, er, yes!

Er-em, The above post showed how we add the Microsoft Direct Speech Tool to our VB project.

Now let us see how we can make a sample application that will type when we say some thing i.e speech to text. . .
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 3:04pm On Jan 10, 2012
First, add the  Microsoft Direct Speech Tool (The "Ear"wink to the form.

Then add a Text box

Then Add a command button

Then add pepper, maggi and salt.

Oops, I done it again! embarassed Ignore that last part!

Now, you should have something like the picture below. . .

Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 3:13pm On Jan 10, 2012
Now double click on the command button, you will be show the Command1_Click() event procedure (or the onClick Event handler for Java folks).

Now allow me to show you what code you will type with explanations. . .

Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 3:21pm On Jan 10, 2012
By the way, as I was typing this chic came around, check her out! Na fine chic O! grin

Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 3:43pm On Jan 10, 2012
I don see wetin I go chop tonite!

Enough of business, let's continue with pleasure. . .

Now the first line of code:

Dim SpeechGrammer As String
We are declaring a String variable called SpeechGrammer, later we will discuss what it will hold. . .


word1 = "I"

Now the word that we are going to say for the PC to type is going to be stored  in this string variable called word1. Are you asking why do we need to store the words we have to say in a variable? If you are asking, you are a good student for asking that question and I will explain shortly, if you did not ask, well, its not your fault.

What we have done in the code above is to assign to the the variable called word1 the string value, "I", which is one of the words we are going to tell the PC to type. The code for the other words are given below. . .

word2 = "Am"
word3 = "Very"
word4 = "Happy"

There! we are going to have four words: I,Am,Very,Happy

Now here comes the ugly bit!

SpeechGrammer = "[Grammar]" & vbCrLf & _
                              "langid = 1033" & vbCrLf & _
                              "type=cfg" & vbCrLf & _
                              "[<Start>]" & vbCrLf & _
                              "<start>=" & word1 & vbCrLf & _
                              "<start>=" & word2 & vbCrLf & _
                              "<start>=" & word3 & vbCrLf & _
                              "<start>=" & word4


Okay, do not be afraid. The piece of code you see above comes in peace!

Now let me answer the question of why we need to store the words we have to say in a variable. But that will be in the next post-this one is getting long!
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 4:05pm On Jan 10, 2012
Right,
before the computer can "understand" what you say, it has to given a set of words which will form its language set or vocabulary or grammar , much in the same way a child will have to be taught a set of words first before it can learn how to speak.

So you will have to create a kind of dictionary, where all the words that will make up the computer's grammar will be stored. That was why we created the SpeechGrammer string variable. It is the variable that will contain the computer's grammar.

We have decided, for the sake of this lesson, to populate the grammar of the PC with 4 words: I,am,very,happy. These words we have stored in the variables[b] word1[/b],word2,word3 and word4.


Okay, so the next thing is: How do we create the dictionary and add the words to it? Just as there is a format for writing a human dictionary, it follows logically that there should be a special format for writing a computer's dictionary-remember, we are programmers, we talk to the computer in a language it understands-so we should write a dictionary, the way that the computer will understand!

Next we shall look at the format for writing the dictionary for the computer. . .

(1) (2) (3) (4) (Reply)

Hope For C++ Newbies: Gui Toolkits / Javascript With NodeJS / Which Is The Best Place To Learn Programming In Nigeria?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 34
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.