Let’s create a Text to Speech tool using Code Line 4 using Notepad

Intelligence machines with the ability to speak we often see through movies, but if you know programming any computer can do the talking. There are only a very small number of tools on the stage that keep people talking to us, and it’s difficult for someone who does not have a good idea of ​​how to create such tools, as the code must contain artificial intelligence when they are created. Today we will start the first steps of creating such a tool with this article.

Below is the code needed to create the simple tool we are talking about. We can write and run the Tool to write this talk on any Windows computer. So today we create a very simple VBscript with 4 lines of code.

Step 1
Copy this code and paste it into Notepad.

Dim text, sapi

text = inputbox (“Enter the text you want to speak:”)

Set sapi = Createobject (“sapi.spvoice”)

sapi.Speak text

Step 2

The following are mandatory when saving.

When entering a file name, enter the file name as “.vbs” at the end. Ex. Speak.vbs
Select ANSI as the encoding.
Step 03

Go to the saved location and see if a .vbs file has been created as above.

Step 04

Type the required text and click Ok.

Leave a Reply

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