sandman 0 Posted September 8, 2007 (edited) I've seen a few topics in General Help and Support about saving TTS to file. Well, your problems are solved, thanks to this simple UDF!The code:Func _TTSToFile($sText, $sFile) Const $SSFMCreateForWrite = 3 $objVoice = ObjCreate("SAPI.SpVoice") $objFile = ObjCreate("SAPI.SpFileStream.1") $objFile.Open($sFile, $SSFMCreateForWrite) $objVoice.AudioOutputStream = $objFile $objVoice.Speak($sText) _Talk($sText) EndFunc Func _Talk($sText) Local $oSpeech = ObjCreate("SAPI.SpVoice") $oSpeech.Speak($sText) $oSpeech = "" EndFuncoÝ÷ ØLZ^jëh×6#include <_TTSToFile.au3> _TTSToFile("This is a test", @DesktopDir & "\test.wav")AFAIK, this is only compatible with WAVs.Thanks to the info-giver.. http://www.microsoft.com/technet/scriptcen...s/sapi.mspx#EKH Edited September 8, 2007 by sandman [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Share this post Link to post Share on other sites
jaenster 0 Posted October 12, 2007 lolller! -jaenster Share this post Link to post Share on other sites
Dhilip89 11 Posted October 12, 2007 Very nice! [u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠ 2[/quote] Share this post Link to post Share on other sites
lod3n 4 Posted October 12, 2007 I posted _text2mp3() a year ago, if you'd like to save it as something other than WAV. http://www.autoitscript.com/forum/index.php?showtopic=33737 [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Share this post Link to post Share on other sites