Skip to content

How To Blog

how to

  • Using the Translator app on iPhone and iPad iPad
  • Fix "There are no Active Mixer Devices Available" Error in Windows Computer Tips
  • Is PC Water Cooling Actually Better? Reviews
  • 5 Simple macOS Tips and Tricks to Streamline Your Workflow OS X
  • 5 Ways To Prevent Other People From Accessing Apps On Your iPhone iOS
  • Troubleshoot RAM with Windows Memory Diagnostic Tool How-To
  • Fix “Instruction at Referenced Memory Could Not Be Read” Errors Help Desk
  • Best texas ba ii plus financial calculator 2020

    Best texas ba ii plus financial calculator 2020

How to Make Your Computer Talk/Speak What You Type

Posted on October 6, 2020 By blog_786 No Comments on How to Make Your Computer Talk/Speak What You Type

Windows has a cool feature that lets you make your computer say or say whatever you say to it! This method takes advantage of a built-in API found in Windows XP, Vista, 7, 8 and 10 called SAPI (Speech Programming Interface).

The Microsoft Speech API is what is used for the text-to-speech accessibility feature built into Windows. You can also write programs that call APIs, allowing your applications to speak, but that’s for developers.

It’s actually very easy to get your computer to say what you want! In this article, I’ll show you how to create a VBS script that accepts user input and then speaks it out. I’ll also show you how to hard-code the text you want to read, and then schedule that script to run on certain events, such as Windows startup or logoff.

Input text, pronounce the message

Let’s start with a simple script that will open a dialog box where you can enter what you want Windows to say. Open Notepad first.

Step 1. Paste the following text into a new document:

Faint message, sapi
message = InputBox (“Enter the text you want to speak,” “Speak”)
Install sapi = CreateObject (“sapi.spvoice”)
sapi.Speak message

Note that when you copy text from a web browser and paste it into Notepad, the quotes will cause problems. Before saving the file, you need to review and delete each quote (“) and re-enter the quote. The example below has six quotes. It should look something like the image below.

Now, when you are going to save the file, give it any name, but make sure you also type .VBS after the name. Then, in the Save as type box, select All files instead of default text documents.

Now double click on the VBS file and you should see an input box where you can enter the text you want to speak! Enter something and click OK.

How to Make Your Computer Talk/Speak What You Type

If you did everything correctly, you should hear a male or female voice pronouncing your phrase. If you receive any error message, be sure to copy and paste the text again and replace those quotes.

Configure SAPI Voice settings

It’s fun, but we can also customize our little talking computer with different settings. We can change the volume, speed or slowness of the voice, and also change the gender from male to female. Here’s some sample code where I’ve added a couple of extra lines.

Faint message, sapi
message = InputBox (“Enter the text you want to speak”, “Speak”)
Install sapi = CreateObject (“sapi.spvoice”)
Install sapi.Voice = sapi.GetVoices.Item (1)
sapi.Rate = 0
sapi.volume = 100
sapi.Speak message

The default speed is 0, the range is -10 to 10. -10 means the voice will speak very slowly and 10 means very fast. The default volume is 100 and the range is 0 to 100. The line that starts with Set sapi.Voice will allow you to switch to a different voice if installed on your system.

Please note that the number of voices you can choose depends on the operating system. There is only one voice in Windows 7, Microsoft Anna.

How to Make Your Computer Talk/Speak What You Type

Windows 10 has two voices, Microsoft David and Microsoft Zira, as shown below.

How to Make Your Computer Talk/Speak What You Type

How to Make Your Computer Talk/Speak What You Type

If you only have one voice installed on your system, you need to change what sapi.GetVoices.Item (1) says to sapi.GetVoices.Item (0) < / em>, otherwise you will get an error when you try to run the script. You can also create another Notepad document and paste the code below into it that will tell you which voices are installed. Save it as a .VBS file as shown above and run.

Install VObj = CreateObject (“SAPI.SpVoice”)
For each voice in VObj.getvoices
I = I + 1
msgbox “” & (I – 1) & “-” & Voice.GetDescription
Next

So far, we have used this popup dialog to enter text, but you can also just type your message into the script file. This would be useful if you want to schedule the script to run automatically. Obviously this can be used to prank your friends and family and it works really well.

Imagine that someone turns on their computer and hears the computer say to him, “Hi John, I really want to sleep, please don’t bother me today!” when it boots up! From experience I can promise that this is hysterical and you should definitely try it.

To hardcode the message, just change the last line to something like this:

sapi. Say, “Hi John, I’m really tired today!”

Schedule a script file

Now that you’ve hard-coded your message for the intended purpose, you just need to fire it whenever you want. If you’re tech-savvy, you can use a program like AutoIt, which will allow you to do extreme things, like running a script file when a certain program is open or when windows are maximized or minimized.

I don’t have time to go into detail on this in this post, but luckily Microsoft has a built-in feature called Task Scheduler that makes it easy to do fairly complex scripted tasks.

My previous post went into detail about how to schedule a script file to run when certain events occur on Windows. If you have any problems getting the script to work, feel free to leave comments and I’ll try to help. Enjoy!

–

technology

Post navigation

Previous Post: Change Default Search Provider in Microsoft Edge to Google
Next Post: How to Hide Your Facebook Online Status

Related Posts

  • Here Are Some Biggest Myth in Technology How-To
  • How to Give a TED Talk technology
  • How do streaks work on Snapchat? technology
  • Best picture nominees 2022 technology
  • What Is Vanish Mode on Instagram 2022 technology
  • How to Detect Invisible Users on Yahoo Messenger technology

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • How-To
  • iOS
  • iPad
  • iPhone
  • Linux Tips
  • macOS
  • MS Office Tips
  • Networking
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018

2021 Amazon Android ) Apple apps Best browser change Chrome Closing words Concluding remarks Delete Download Enable Error Facebook Find Free) From Google Keyboard Mac make Mobile Music Netflix ( online Packaging phone? Photos Reset Network Settings sites Switch Tips turn using Video Videos Watch Websites What With Working? your YouTube

  • Mac : Update Your Web Browser macOS
  • 5 Best Free Disposable Email Accounts Tools Review
  • How to Download Instagram Videos on iPhone? How-To
  • Best canon mp25dv calculator ribbon 2020 black
  • 7 Fun Hidden Google Games You Can Play for Free Google Software/Tips
  • 7 Best Sites To Identify A Phone Number Cool Websites
  • The Best IFTTT Recipe Ideas for the Smart Home Smart Home
  • How to Take Screenshots in Restricted Apps in Android How-To

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}
Go to mobile version