diff options
Diffstat (limited to 'morsecode/new 1.html')
| -rw-r--r-- | morsecode/new 1.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/morsecode/new 1.html b/morsecode/new 1.html new file mode 100644 index 0000000..6c834eb --- /dev/null +++ b/morsecode/new 1.html @@ -0,0 +1,19 @@ +<script> +<input id="text"> +<button onclick="talk()">Talk It!</button> +<button onclick="listen()">Voice</button> +<script src="../bower_components/platform/platform.js"></script> +<script src="../src/webspeech.js"></script> +<script> + var speaker = new webspeech.Speaker(); + var listener = new webspeech.Listener(); + function talk() { + speaker.speak("en", document.getElementById("text").value); + } + + function listen() { + listener.listen("en", function(text) { + document.getElementById("text").value = text; + }); + } +</script>
\ No newline at end of file |
