XY16 1 Posted May 9, 2011 hi guys, check out this little udf. it's not much, but at least it's not just sapi. ;speech udf ;uses either sapi or google speech. ;function ;name: _SpeechGet ;description: generates speech and outputs it to the speakers. ;usage: _SpeechGet($Text, $Engine) ;$Text = the text to speak. ;$Engine = the speech engine to use, 0 = microsoft speech API 5x, 1 = Google translation API. 0 is default. ;returns 0 if no errors, 1 for errors. Func _SpeechGet($Text, $Mode = "0") if $Text = "" then Return 1 if $Mode > 1 or $Mode < 0 then Return 1 if $Mode = "0" then ;create speech object Local $Voice = ObjCreate("Sapi.SpVoice") if not IsObj($Voice) then Return 1 EndIf if $Mode = "0" then ;speak the text $Voice.Speak($Text) Return 0 else ;use the google translation api to get the speech InetGet("http://translate.google.com/translate_tts?q=" & $Text, @TempDir & "\tempspeech.mp3", 1) ;play the downloaded speech SoundPlay(@TempDir & "\tempspeech.mp3", 1) ;delete the temporary file FileDelete(@TempDir & "\tempspeech.mp3") Return 0 EndIf EndFunc let me know if you enjoy it, or if you know of any other web based speech services i could add support for. 1 kid1232 reacted to this Please note: If you plan on submitting any code snippits to my posts, please refrain from using the code tags as i use a screen reader and can't read the code properly, let alone copy it the way it should be.Thanks for your understanding.Best regardsXY16 Share this post Link to post Share on other sites
kid1232 0 Posted August 30, 2013 Tks friend, but you should fix when get other language sound Share this post Link to post Share on other sites
JLogan3o13 1,640 Posted August 30, 2013 kid1232 please do not resurrect old threads, especially when not adding anything benefiicial. If you had bothered to look you would see that the OP has not been active on the forum in two years. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Share this post Link to post Share on other sites
EKY32 20 Posted August 30, 2013 Tks friend, but you should fix when get other language sound >This is a perfect example. [font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font] Share this post Link to post Share on other sites