FuryCell Posted November 24, 2006 Posted November 24, 2006 (edited) Just a quickly written scrap that can speak text directly into a wav file using COM. Just want to see if there is any interest. If intrest is high maybe I can add some proper error checking and clean the code up a bit. _SpeakToWAV("hello",@ScriptDir&"\TEST.wav") Func _SpeakToWAV($sText,$sFile) $ObjVoice=ObjCreate("Sapi.SpVoice") $ObjFile=ObjCreate("SAPI.SpFileStream.1") $objFile.Open($sFile,3) $objVoice.AudioOutputStream = $objFile $objVoice.Speak ($sText) EndFunc Edited November 24, 2006 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Pakku Posted November 24, 2006 Posted November 24, 2006 (edited) Hi, i like the idee! it may for some of us very useful. keep it up! Edited November 16, 2010 by Pakku How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me
FuryCell Posted November 24, 2006 Author Posted November 24, 2006 Hi,i like the idee! it may for some of us very useful.keep it up!ArjanThanks for the feedback. I will look into a way to implement error checking. HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
ConsultingJoe Posted November 24, 2006 Posted November 24, 2006 Thanks for the feedback. I will look into a way to implement error checking. Great job. i wanted to do this before but did know exactly. someone should write up a good UDF like IE.au3 Check out ConsultingJoe.com
theguy0000 Posted November 24, 2006 Posted November 24, 2006 awsome... The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN
the DtTvB Posted November 25, 2006 Posted November 25, 2006 Wow, that's a cool script. [right]Please visit: My biggest project, the DtTvB's AutoIt Web ServerOlder Stuff: A Smoother MouseMove :: AutoIt Syntax Highlighter[/right]
Zephir Posted November 25, 2006 Posted November 25, 2006 Hey SolidSnake,i like your func alot. however i would like to know whether there is a possibility to use diffrent languages? i tried german and russian texts .... and it sounded like crap cuz it uses a english dialect. i appreciate your help. greetz,Zephir
FuryCell Posted November 25, 2006 Author Posted November 25, 2006 @All Thanks for the replies @Zephir Not sure. I always thought it would use the OS's default language. Anyone know how to change languages? HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Michel Claveau Posted November 25, 2006 Posted November 25, 2006 (edited) Hi! Anyone know how to change languages? Use: .voice = .GetVoices("Name","LanguageCode") Edited November 25, 2006 by Michel Claveau
Zephir Posted November 25, 2006 Posted November 25, 2006 (edited) ok so far so good.did some research and found this:http://www.text-reader.com/trspeaker_Engli...eechengines.htmhere u can download the engines for the different languages.EDIT: Did what you said. and downloaded the German Engine, read through some things in the official SAPI Help File but still cant find out what languagecode to use for german or russian... ? Edited November 25, 2006 by Zephir
Westi Posted December 3, 2006 Posted December 3, 2006 SAPI5 (like XP) The default voice is stored in registrykey: HKCU\Software\Microsoft\Speech\Voices\DefaultTokenId corresponding to the entries in: HKLM\SOFTWARE\Microsoft\Speech\Voices\Tokens To change your favourite language manually execute: control "%commonprogramfiles%\Microsoft Shared\Speech\sapi.cpl" Downloadable voices are available only in: german, french and english You have to install MS Reader Improved version: _SpeakToWAV("Hello this is a test",@ScriptDir&"\TEST.wav") Func _SpeakToWAV($sText,$sFile) $ObjVoice=ObjCreate("Sapi.SpVoice") $ObjFile=ObjCreate("SAPI.SpFileStream.1") $objFile.Open($sFile,3) $objVoice.AudioOutputStream = $objFile $objVoice.voice = $objVoice.GetVoices("Language=409").Item(0) $objVoice.Speak ($sText) EndFuncSo you can change 409 only to 407 and 40C If you want other languages you need commercial 3rd party soft like cepstral SAPI4 http://www.text-reader.com/trspeaker_Engli...eechengines.htm here u can download the engines for the different languages.This is only the addon. Additonally you need this: American English British English Dutch French German Italian Japanese Korean Portuguese (Brazilian) Russian Spanish and the SAPI4a engine Both versions can coexist, but don't ask me to use SAPI4 and AutoIt3 under XP Learn more about SAPI4 with the SDK.
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