Prab Posted December 14, 2009 Share Posted December 14, 2009 (edited) Found via techcrunch.Just a quick hack using an unofficial api. I could make it more pretty. It just doesn't play anything if you give it a string over 100 characters.textToSpeach("google is the best") Func textToSpeach($input) $temp = StringReplace($input, " ", "+") InetGet("http://translate.google.com/translate_tts?q=" & $temp, @TempDir & "\test.mp3") SoundPlay(@TempDir & "\test.mp3", 1) FileDelete(@TempDir & "\test.mp3") EndFuncEdit: Tested with over 100 characters Edited December 14, 2009 by Prab FolderLog GuiSpeech Assist Link to comment Share on other sites More sharing options...
Horrendous Posted December 16, 2009 Share Posted December 16, 2009 hehe, cool voice :-) i'll hope there would be other languages as well in future :-) Link to comment Share on other sites More sharing options...
trancexx Posted December 16, 2009 Share Posted December 16, 2009 Don't listen to Horrendous. textToSpeach(BinaryToString("0x6675636B2074686973207368697420697320636F6F6C2E204E69636520766F6963652E")) Func textToSpeach($input) $temp = StringReplace($input, " ", "+") InetGet("http://translate.google.com/translate_tts?q=" & $temp, @TempDir & "\test.mp3") SoundPlay(@TempDir & "\test.mp3", 1) FileDelete(@TempDir & "\test.mp3") EndFunc ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
happy2help Posted December 16, 2009 Share Posted December 16, 2009 (edited) Hi I have tried both of the above scripts from Scite and get the following error ERROR: Returning Failure - FileName - ..\..\src\EzdMP3SourceOutputPin.cpp Line - 370 It still plays also noticed i don't hear the first few letters/words when i play it from my work machine. it is a high end machine, so i don't think it is a speed issue. I have tried textToSpeach(".....I am the master and i am in charge") and only hear "master and i am in charge" and also textToSpeach("I am the master and i am in charge") same result Edited December 16, 2009 by happy2help Link to comment Share on other sites More sharing options...
Prab Posted December 16, 2009 Author Share Posted December 16, 2009 (edited) @happy2help - Don't know about the first error. As you can see, my code is only about 5 lines long so it must be something else that is crashing. For your second problem try getting rid of FileDelete(@TempDir & "\test.mp3")then find the file in your temp dir and play it in Itunes/Windows Media Player/VLC. If the mp3 doesn't have all the letters, its a problem with google translate, if it does, its a problem with soundplay(). Edited December 16, 2009 by Prab FolderLog GuiSpeech Assist 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