0

I've just created a text to speech converter using this programming language.

The code is,

DO
    CLS
    PRINT "This is the program built by Adhikari Newtorks Team Using QBASIC..........."
    PRINT "This is a text to speech converter.."
    PRINT
    PRINT
    INPUT "Enter the word to pronounce: ", speak$
    OPEN "sound.vbs" FOR OUTPUT AS #1
    PRINT #1, "dim speechobject"
    PRINT #1, "set speechobject=createobject ("; CHR$(34); "sapi.spvoice"; CHR$(34); ")"
    PRINT #1, "speechobject.speak"; CHR$(34); speak$; CHR$(34)
    CLOSE #1
    SHELL "sound.vbs"
    KILL "sound.vbs"
LOOP

You know, here i've programmed a visual basic code using this language. My main confusion is that, can I say that this program is built using QBASIC programming language or should I call it a Visual Basic program?

Matthew Verstraete
  • 6,335
  • 22
  • 67
  • 123
Sugam Adhikari
  • 131
  • 1
  • 1
  • 6
  • It's a QBASIC pogram. Is there a reason why you didn't just write the VBScript file directly and ask for a word using [`InputBox`](https://msdn.microsoft.com/en-us/library/3yfdhzk5(v=vs.84).aspx)? –  Jun 25 '16 at 01:13
  • 1
    I wouldn't say you created a text to speech converter. That's like typing "mspaint" in the command prompt and saying you created a graphical bitmap editor. – BdR Jun 25 '16 at 20:40
  • Actually, i wanted to create a QBASIC program with a lot of other features and this would be one of them. I could also do with the VB script but I wanted a QBASIC program to do all these stuff. – Sugam Adhikari Jun 26 '16 at 17:01

1 Answers1

5

It's a QBasic program that starts a VBScript.

Although I don't really see the point. It's like someone already commented, why not just write a vbscript directly? It would be much shorter code too, something like this:

Do 
   str = InputBox("Enter the word to pronounce","Enter text")
   Dim speechobject
   Set speechobject = createobject("sapi.spvoice")
   speechobject.speak str
Loop Until (str = "")

And if you want to run it in the command prompt, you can type: cscript /nologo myscript.vbs

BdR
  • 2,770
  • 2
  • 17
  • 36