kjactive Posted July 2, 2005 Share Posted July 2, 2005 (edited) I just played around on the net to look for activeX components and stumbled over an old friend of mine - TRSpeaker. This is a text to voice control, it needs some install but fair easy, the component can be used both in DHTML as in VB and all other languages that can embed objects with or witout interface ( and visual mouth )...expandcollapse popup#include <GUIConstants.au3> $Tx = "hi this is text to voice interface" $oTRR = ObjCreate("TRReader.TRSpeaker.1") $oTRH = ObjCreate("TRHelper.Helper.1") GUICreate ( "Embedded TRSpeaker test", 640, 580,(@DesktopWidth-640)/2, (@DesktopHeight-580)/2 ,BitOr($WS_OVERLAPPEDWINDOW,$WS_VISIBLE,$WS_CLIPSIBLINGS)) $Replay = GuiCtrlCreateButton("Replay",455, 550, 60, 20) $Interface = GuiCtrlCreateButton("Interface", 515, 550, 60, 20) $Load = GuiCtrlCreateButton("Load",575, 550, 60, 20) $Label = GUICtrlCreateInput($Tx,5,550,440,20) $LinkObject = ObjEvent($oTRR,"IEEvent_","TRSpeaker"); this is a dummy events->NULL $GUIActiveX = GUICtrlCreateObj($oTRR, 10, 20 , 620 , 540 ) GUISetState () ;Show GUI With $oTRR; Object pool .Speak($Tx) EndWith While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Replay $tx = GUICtrlRead($Label) If $tx = '' Then MsgBox(48,"ERROR...","No text to speak available") Else $oTRR.Speak($Tx) EndIf Case $msg = $Interface $oTRH.ShowPage("Properties","TRReader.SpeechPropPage.1", $oTRR) Case $msg = $Load $tmp = FileLoad('Load a text file to speak out load',@DocumentsCommonDir,'Scripts (*.txt;*.au3)') If $tmp = '' Then MsgBox(48,'ERROR...','Project Cancel') Else $ID = FileOpen($tmp,0) IF $ID = -1 THEN MsgBox(48,'ERROR...','Project text file failed to read in') Else $Tx = FileRead($ID,99999) FileClose($ID) $oTRR.Speak($Tx) EndIf EndIf EndSelect WEnd Exit ;================================================================== ;FileLoad: open a filerequester to get finename and path ;argument: display text, starting path, suffix / return the selction or empty string ;================================================================== Func FileLoad($mess,$Path,$suff) $var = FileOpenDialog($mess, $Path, $Suff, 5) If @error Then Return '' Return StringReplace($var, "|", @CRLF) EndFuncDownload TRSpeaker:http://www.text-reader.com/downloads/text-reader-setup-l.exeMaybe one also need to download the 'TR Speaker component' at the same site:http://www.text-reader.com/downloads/setup_trspeaker.exeOne also need a voice or two to load in the first time TRSpeaker starts, just use the one called mary - well just follow the install process...If you don't have any voices installed - use Mary voice here:http://www.text-reader.com/downloads/msttsf22l.exeThere is a lot of different free voices around this page to every languages - look it up:http://www.text-reader.com/trspeaker_Engli...eechengines.htmThere are some control tags I did not use, feel free to change code - Have funThis is a nice activex interface SvenP wrote...kjactive Edited July 2, 2005 by kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc... Link to comment Share on other sites More sharing options...
w0uter Posted July 2, 2005 Share Posted July 2, 2005 what can this do what the MS Speech SDK cant ? My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
kjactive Posted July 3, 2005 Author Share Posted July 3, 2005 (edited) I don't know MS Speech that well as I don't want a 295MB download situation but TRSpeech is a very small, well designed activeX component, comes free of charges and has an intuition directly attached to control the voices peak and speed etc. and all components can be embedded and controlled in a autoit3 gui with just a few lines... Just another ActiveX component - 'text/file to speak' thats all... kjactive Edited July 3, 2005 by kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now