0.0.1 • Published 9 years ago

get-voice-site v0.0.1

Weekly downloads
5
License
-
Repository
github
Last release
9 years ago

get-voice-site

Get human voice with http request

Based on fritx/get-voice

Current demo: http://voice.coding.io?q=check-it-out

API

GET {site}/?q=we-will-rock

Or: GET {site}/?q=we will rock

Or just safer: GET {site}/?q=we%20will%20rock

<audio controls type="audio/mp3" src="{site}/?q=bazinga"></audio>

Or with more fun:

function say(text){
  var query = encodeURIComponent(text)
  $('<audio autoplay type="audio/mp3">')
    .attr('src', '{site}/?q=' + query)
    .on('ended', function(){
      $(this).remove()
    })
    .appendTo(document.body)
}