Introduction: Control Your Computer With Your Voice
this is not a very big code and you can
command your computer with your voice
in around 10 minutes
Step 1: What You Will Need
you will need:
any programming software for this i am using notepad++
Step 2: The Code
this is the code:
Set Sapi = Wscript.CreateObject("SAPI.SpVoice")
set wshshell = wscript.CreateObject("wscript.shell")
dim Input
wshshell.run "%windir%\Speech\Common\sapisvr.exe -SpeechUX" Sapi.speak "Please speak, or type, what you want to open?" Input=inputbox ("Please speak, or type, what you want to open.")
if Input = "youtube" OR Input = "Youtube"then Sapi.speak "Opening youtube" wshshell.run "www.youtube.com"
else if Input = "instructables" OR Input = "Instructables" then Sapi.speak "Opening instructables" wshshell.run "www.instructables.com"
else if Input = "google" OR Input = "Google" then Sapi.speak "Opening google" wshshell.run "www.google.com"
else if Input = "command prompt" OR Input = "Command prompt" then Sapi.speak "Opening command prompt" wshshell.run "cmd"
else if Input = "calculator" OR Input = "Calculator" then Sapi.speak "Opening calculator" wshshell.run "calc"
else if Input = "notepad" OR Input = "Notepad" then Sapi.speak "Opening notepad" wshshell.run "notepad"
else if Input = "" then else
Sapi.speak "I don't recognize your input, Please try something else" end if end if end if end if end if end if end if
Step 3: How to Save
name the file whatever you want
as long as you add .vbs at the end
then open your file and learn how to control your computer
there is a built in tutorial for how to do it
1 Person Made This Project!
- JunixC made it!
Comments
7 years ago
I would love to see some photos of your steps to achieve this. I would love to have voice control on my computer! Thanks for posting.