Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • How to Download Your Personal Data From Google How-To
  • Live Stream Games to Twitch, YouTube, and Other Popular Platforms How-To
  • 7 Best Plex Plugins You Should Install Now Reviews
  • Use an iPad as a Second Monitor for PC or Mac Gadgets
  • How to Get Dark Mode on WhatsApp for Android How-To
  • The Best Smart Home Tech That Doesn’t Need Power Smart Home
  • youtube comments not loading on chrome Help Desk
  • The Best Extensions For The Safari Browser Safari

How to Make Your Computer Talk/Speak What You Type

Posted on October 6, 2020 By bilal 1983 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!

–

Share this:

  • Facebook
  • X
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

  • Top 25 Movies on Amazon Prime until 2010 technology
  • How to watch Cricket World Cup 2023 online without cable technology
  • How to Preview a Game on Steam For Free technology
  • How to Find Songs or Audio Used in TikTok Videos technology
  • How to Respond to Messages on Instagram (Mobile and PC) technology
  • How to make your own NFT and sell it for free technology

Leave a Reply Cancel reply

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

Archives

  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • 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
  • March 2021
  • 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
  • September 2018
  • August 2018

Categories

  • – 436
  • – 939
  • 1Win AZ Bonuslar, Mobil Tətbiq və Mərc Marketləri – 376
  • 1xbet Azerbaycan,1xbet az merc saytı, en yaxsi bukmeker 1xbet Azerbaycan merc oyunlari, 1xbet az, Azerbaycan merc saytlari – 280
  • AI Tools & Guides
  • Amazon Web Services
  • Apple Watch
  • B1 Bet Aviator: Jogo de Cassino Online Tutorial Passo a Passo 202 – 14
  • Calculator
  • Computer Tips
  • Cool Websites
  • Dasinmaz emlak elanlari, ev elanlari, ev alqi satqisi, kiraye evler, torpaq, obyekt, bina, bina ev, mənzil, villa, kreditle satilan evler – 814
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • islamic Books
  • Linux
  • Linux Tips
  • Mac OS X
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorial
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress
  • бонусы до 250%, официальный сайт в Узбекистане – 69
  • Мостбет Уз Ставки на спорт и казино в букмекерской конторе Mostbet Uz – 527
  • 1Win Güncel Giriş Adresi 1Win Engelsiz Yeni Giriş
  • 4 Things You Can Do If You Forget Your Wi-Fi Password
  • How To Use DriveDroid to Boot Linux On PC Using Android
  • How do I Find Release Date of Any Google Play App
  • How To Change IP Address in Windows
DMCA.com Protection Status

Recent Posts

  • Análise informativa do Casino B1 Bet: tudo o que você precisa saber
  • Football Betting tips for today’s matches
  • B1 Bet é Confiável? Paga Mesmo? Avaliação 2023
  • B1 Bet é confiável? SIM! Nota 4 de 5 em nossa análise
  • Experience the joys of gay asian dating with your site today

Recent Comments

  1. Instagram stories not working/loading? Try These 9 Fixes on Can’t update PS5 system software? Try These 10 Fixes
  2. How to Link to a Specific Part Of A Webpage & Share it on Best PDF to Word Converter Online (Free Without Email)
  3. See What’s Taking up Space on Your Hard Drive on 7 best 3D scanning apps for Android and iOS
  4. Make your Devices Read Out Text, With Text to Speech on 9 Best 10K Running Apps for 2023
  5. How to Find your Router’s IP Address on How to Fix Apple CarPlay Not Working? 7 Possible ways
  • HDG Explains : What Is Bandwidth? Networking
  • Best fraction calculator 2020 Area
  • Best ba ii plus professional financial calculator 2020

    Best ba ii plus professional financial calculator 2020. 1 - Texas Instruments BA II Plus Professional Advanced Financial Calculator by Texas Instrum

  • Differences Between the Many Archive Compressed File Formats Tools Review
  • 12 Best Grammarly Alternatives to Improve Your Writing Software Reviews
  • How to Maintain the Battery Life of Your iPhone, iPad and MacBook Hardware
  • How To Make Windows 10 Faster in 9 Simple Steps Hardware
  • Manually change audio output android How-To

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version