I recently got a program where you can type something in and it will say it back to you in english. how is this done? please see what i mean here.
Printable View
I recently got a program where you can type something in and it will say it back to you in english. how is this done? please see what i mean here.
Hi, well first of all the link you provided is broken. There is alot of way you can make such a program. You can use microsoft text to speech engine, which then you can creat a text box and a command button on a form and then when ever somebody typed something in the text box and clicked read, the program will read it back to them.
The other way is to use microsoft Agent, which you can download off microsoft site.
I will give you an example of this. Make a Form with a TextBox, CommandButton and a Text2Speech Control.
Make sure that your sound is on and put this simple line of code in your command button. Also change the name of your Speech control to Talker
Code:Private Sub Command1_Click()
If Not Text1.Text "" Then Talker.Speak(Text1.Text)
End Sub
Yes you can use MSAgent better. Install Microsoft Agent on your system and also install the Character Merlin or Genie or both.
Easier way!
Open notepad and copy the following(If you are using older ver of VB, then change the version line):
VERSION 5.00
Object = "{F5BE8BC2-7DE6-11D0-91FE-00C04FD701A5}#2.0#0"; "AGENTCTL.DLL"
Begin VB.Form frmMain
BorderStyle = 4 'Fixed ToolWindow
Caption = "Speaker"
ClientHeight = 1395
ClientLeft = 45
ClientTop = 285
ClientWidth = 4680
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1395
ScaleWidth = 4680
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton cmdSpeak
Caption = "&Speak!"
Default = -1 'True
Height = 375
Left = 1553
TabIndex = 1
Top = 840
Width = 1575
End
Begin VB.TextBox txtSpeak
Alignment = 2 'Center
Height = 495
Left = 473
MultiLine = -1 'True
TabIndex = 0
Top = 240
Width = 3735
End
Begin AgentObjectsCtl.Agent agtMain
Left = 0
Top = 240
_cx = 847
_cy = 847
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Genie As IAgentCtlCharacterEx
Const DATAPATH = "Genie.acs"
Private Sub cmdSpeak_Click()
Genie.Speak txtSpeak
txtSpeak.SetFocus
txtSpeak.SelStart = 0
txtSpeak.SelLength = Len(txtSpeak)
End Sub
Private Sub Form_Load()
agtMain.Characters.Load "Genie", DATAPATH
Set Genie = agtMain.Characters("Genie")
Genie.LanguageID = &H409
Genie.Show
Genie.Think "What a bad work I have given. But..."
Genie.Speak "Welcome to speaker. Type anything and I will speak it for you. Hahaha!"
agtMain.PropertySheet.Visible = True
End Sub
Save the file as frmMain.frm. Open VB. Create new project. Add the form file you had saved. Run to see the INTERACTION!
[Edited by Kazim Zaidi on 06-03-2000 at 10:18 AM]
The agent needs more downloading (or items to distribute). The Text to Speach control is one control and you don't need to put anything into the declarations. I can never remember the Agents declarations. The text2speach engine you just put in your code.
Ex.
Put a button, Text2speach control, and textbox onto the form...
In the button
Text2speach1.speak Text1.text
And it speaks!
The Speech Controls come with the Speech Engine, so when you install the Engine, you are also installing the controls.
Sorry, I was out of town and not able to reply to this post. Steve and megatron, those controlls sound like exactly what i need! where can I get them? Sorry about the broken link, i forgot the http:// and plus I deleted that account anyway.
Please? Somebody? Does anybody know? I need this!
You can get them from the Microsoft website. http://www.microsoft.com
Just search for AGENT. And then go to the download page.