Created
November 3, 2012 17:15
-
-
Save opsb/4007987 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function say(phrase, language){ | |
| return function(callback){ | |
| console.log("saying " + phrase); | |
| var audio = new Audio("http://tts.lingal.org/?tl=" + language + "&q=" + phrase); | |
| audio.addEventListener('ended', wrapped(callback)); | |
| audio.play(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment