Tukata Posted September 30, 2006 Share Posted September 30, 2006 Hi, Using ObjCreate("SAPI.SpVoice"), is it possible to speak the text and save it to a wav file ? Thank you Tuk Link to comment Share on other sites More sharing options...
AceLoc Posted September 30, 2006 Share Posted September 30, 2006 (edited) MsgBox(0, "Removed:", "See below.") Thnk Edited September 30, 2006 by aceloc [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
FuryCell Posted September 30, 2006 Share Posted September 30, 2006 (edited) _Talk()@aceloc What are you trying to accomplish with that code? It's better to not make a post if you don't understand the topic rather than give people wrong information IMHO. Edited September 30, 2006 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
Tukata Posted September 30, 2006 Author Share Posted September 30, 2006 I can talk the text but how will I save it to WAV ? Thank you Tuk Link to comment Share on other sites More sharing options...
Tukata Posted October 1, 2006 Author Share Posted October 1, 2006 Anybody ? Link to comment Share on other sites More sharing options...
Fossil Rock Posted October 1, 2006 Share Posted October 1, 2006 Maybe you can use this.... Ultra Hal TTS Reader Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
Tukata Posted October 1, 2006 Author Share Posted October 1, 2006 Please guys, I use Autoit with ObjCreate("SAPI.SpVoice") to speak a text. All I want to do is save the spoken text as WAV file with Autoit alone. Thank you Tuk Link to comment Share on other sites More sharing options...
Valuater Posted October 1, 2006 Share Posted October 1, 2006 @tuk... AFAIK it hasn't been done with Autoit....yet @fosil.... 1000% on the Avitar 8) Link to comment Share on other sites More sharing options...
Tukata Posted October 1, 2006 Author Share Posted October 1, 2006 (edited) Thanks. As I understand this will be possible only if someone will make a DLL for autoit. So I will wait and hope to be lucky. Thank you Tuk Edited October 1, 2006 by Tukata Link to comment Share on other sites More sharing options...
Valuater Posted October 1, 2006 Share Posted October 1, 2006 not sure if it will be a dll... but, i would love to have that capability in autoit also 8) Link to comment Share on other sites More sharing options...
lod3n Posted October 1, 2006 Share Posted October 1, 2006 Try this:$strFName = @scriptdir&"\AudioOutputStream.wav" $Text = "The TTS voice will speak this text into a file." Const $SSFMCreateForWrite = 3 $objVOICE = ObjCreate("SAPI.SpVoice") $objFSTRM = ObjCreate("SAPI.SpFileStream") $objFSTRM.Open($strFName , $SSFMCreateForWrite, False) $objVOICE.AudioOutputStream = $objFSTRM $objVOICE.Speak($Text) $objFSTRM.Close [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
Tukata Posted October 1, 2006 Author Share Posted October 1, 2006 (edited) lod3n You are great !!! Just when I was giving up, you came to the rescue. Many many many thanks to you ! BTW, where can I find info about "SAPI.SpFileStream" command ? Are there any parameters we can add to manipulate the recording ? Can it be save to MP3 ? (just curious). Does it works with all OS ? Are there any limitation on the length of file or size or special characters like < " > ? Thank you again Tuk Edited October 1, 2006 by Tukata Link to comment Share on other sites More sharing options...
lod3n Posted October 1, 2006 Share Posted October 1, 2006 I found this information on MSDN by searching for SAPI and .wav, and then I just translated it to AutoIt. I am sure there are more parameters, yes. No, it cannot be saved to MP3 (that I know of), but you could run the resulting wav through a MP3 encoder afterwards. This should work on any version of Windows where SAPI is installed. SAPI is available as a download from Microsoft if not, but it comes with Windows XP. I haven't experimented with the text or file sizes, but I don't think there's a limit on either, other than physical disk space. I am going to post this as a UDF in Scripts and Scraps later, along with a method of saving it as a MP3. I will post a link to it here when I do. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
Tukata Posted October 1, 2006 Author Share Posted October 1, 2006 (edited) lod3n Thanks for the info. I am using MMB (MultiMedia Builder) to send the $text as parameter and I know already that the < " > is a problem and should be removed from string. I am sure many will like this UDF (me for sure). I thouth about some features: Speak and save. Speak only. Save only. Convert to MP3 Recording with mic (?) Capturing playing sound (from another application) !!!! Good luck and thanks Tuk Edited October 1, 2006 by Tukata Link to comment Share on other sites More sharing options...
lod3n Posted October 1, 2006 Share Posted October 1, 2006 Here's the UDF:http://www.autoitscript.com/forum/index.php?showtopic=33737 [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
i386 Posted October 2, 2006 Share Posted October 2, 2006 (edited) Well, I will be the first to let you all know that it works wonderfully on Windows® Longhorn® (otherwise know as Vista®). I know I will be able to put this UDF to good use sometime in the near or distant future. Thanks lod3n for the nice UDF contribution. terrabyte *EDIT:* By the way, I will be putting this UDF under some testing. ie: File limitations, file formats, ect. Edited October 2, 2006 by terrabyte Spoiler "...Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like.My crime is that of outsmarting you, something that you will never forgive me for." --The Mentor "Mess with the best, die like the rest!!" -Hackers "This above all to thine own self be true." -William Shakespeare "Corruption is only as corrupted as the individual makes it out to be." -i386 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