sandman Posted September 8, 2007 Share 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] Link to comment Share on other sites More sharing options...
JustinReno Posted September 8, 2007 Share Posted September 8, 2007 Cool! Link to comment Share on other sites More sharing options...
jaenster Posted October 12, 2007 Share Posted October 12, 2007 lolller! -jaenster Link to comment Share on other sites More sharing options...
Dhilip89 Posted October 12, 2007 Share 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] Link to comment Share on other sites More sharing options...
lod3n Posted October 12, 2007 Share 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] 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