Make your Computer Talk

Επισκόπηση προηγούμενης Θ.Ενότητας Επισκόπηση επόμενης Θ.Ενότητας Πήγαινε κάτω

Make your Computer Talk

Δημοσίευση  Admin Την / Το Κυρ 20 Δεκ - 6:13

Have you ever wondered how can you make your computer speak whatever you input to it like in the movies? Would it not be fun? If only it was possible! Rejoice, because now it is possible. Well, if you wish to know how to do this, then you have come to the right place. With this trick, you can create a script in Windows which will make your computer speak whatever you input to it.

To create one such talk script, follow the steps given below:-





Steps
Open Notepad.
Copy and paste the exact code given below.



Dim Message, Speak
Message=InputBox("Enter text","Speak")
Set Speak=CreateObject("sapi.spvoice")
Speak.Speak Message


3. Click on File Menu, Save As, select All Types in Save as Type option, and save the file as Speak.vbs or "*.vbs".
4. Double click on the saved file, a window will open like the one in the image. Enter some text in enter text column and click OK.

Now your Computer will speak / talk what you typed in Step 4. Try it yourself.

Windows Compatibility: This VBS file can be executed on all versions of Windows including Windows XP, Windows Vista, Windows 7 and Windows 8.

Personal Experience: I personally showed this trick to many of my friends and they were literally left awestruck. You too can impress your friends by making your PC talk and be the Computer Wiz.

Admin
Admin

Αριθμός μηνυμάτων : 823
Ημερομηνία εγγραφής : 08/11/2009

Επισκόπηση του προφίλ των χρηστών http://cooking.bestforumlive.com

Επιστροφή στην κορυφή Πήγαινε κάτω

Απ: Make your Computer Talk

Δημοσίευση  Admin Την / Το Κυρ 20 Δεκ - 11:00

Time of Day VBScript Script
If you would like to get a little bit more advanced and receive the time, you can create a new notepad and enter this script.

The script may look complicated, but it is essentially telling your computer what to say and how to say it based on the time that is shown on your computer’s clock. You can always replace the “The current time is” with any introduction for the time that you want.



Set Sapi = Wscript.CreateObject("SAPI.SpVoice")
Sapi.speak "The current time is"
if hour(time) > 12 then
Sapi.speak hour(time)-12
else
if hour(time) = 0 then
Sapi.speak "12"
else
Sapi.speak hour(time)
end if
end if
if minute(time) < 10 then
Sapi.speak "o"
if minute(time) < 1 then
Sapi.speak "clock"
else
Sapi.speak minute(time)
end if
else
Sapi.speak minute(time)
end if
if hour(time) > 12 then
Sapi.speak "P.M."
else
if hour(time) = 0 then
if minute(time) = 0 then
Sapi.speak "Midnight"
else
Sapi.speak "A.M."
end if
else
if hour(time) = 12 then
if minute(time) = 0 then
Sapi.speak "Noon"
else
Sapi.speak "P.M."
end if
else
Sapi.speak "A.M."
end if
end if
end if



Startup Greeting
Now that you know how to make your computer greet you and tell you the time, how cool would it be if the computer would do that when you turn on the computer. It is actually very easy to do if you just combine the two scripts and put them in the right place.

Start by opening up Microsoft notepad and copying this code into the window. It is simply a copy of both codes combined for you. Remember that you can change the greeting to “What’s up dude, Hello Master, Greetings your almighty highness,” or anything you want your computer to say to you.

Set Sapi = Wscript.CreateObject("SAPI.SpVoice")
dim str
if hour(time) < 12 then
Sapi.speak "Good Morning Geekmeister "
else
if hour(time) > 12 then
if hour(time) > 16 then
Sapi.speak "Good evening Geekmeister "
else
Sapi.speak "Good afternoon Geekmeister "
end if
end if
end if
Sapi.speak "The current time is"
if hour(time) > 12 then
Sapi.speak hour(time)-12
else
if hour(time) = 0 then
Sapi.speak "12"
else
Sapi.speak hour(time)
end if
end if
if minute(time) < 10 then
Sapi.speak "o"
if minute(time) < 1 then
Sapi.speak "clock"
else
Sapi.speak minute(time)
end if
else
Sapi.speak minute(time)
end if
if hour(time) > 12 then
Sapi.speak "P.M."
else
if hour(time) = 0 then
if minute(time) = 0 then
Sapi.speak "Midnight"
else
Sapi.speak "A.M."
end if
else
if hour(time) = 12 then
if minute(time) = 0 then
Sapi.speak "Noon"
else
Sapi.speak "P.M."
end if
else
Sapi.speak "A.M."
end if
end if
end if





Admin
Admin

Αριθμός μηνυμάτων : 823
Ημερομηνία εγγραφής : 08/11/2009

Επισκόπηση του προφίλ των χρηστών http://cooking.bestforumlive.com

Επιστροφή στην κορυφή Πήγαινε κάτω

Επισκόπηση προηγούμενης Θ.Ενότητας Επισκόπηση επόμενης Θ.Ενότητας Επιστροφή στην κορυφή


 
Δικαιώματα σας στην κατηγορία αυτή
Δεν μπορείτε να απαντήσετε στα Θέματα αυτής της Δ.Συζήτησης