How to download speech (audio) created from text using Text-to-speech responsivevoice.js?

mhlavacka picture mhlavacka · Apr 30, 2015 · Viewed 7.8k times · Source

I'm using responsivevoice.js JavaScript library to listen to articles online. It's the best free Text-to-speech I found, better then lots of paid ones I tried, but I need to download the audio as well and I have no idea on how to do that. Any ideas on how could I do that ? Or is there any other good Text-to-speech, with unlimited characters and download capabilities ?

I made a quick demo to better illustrate the situation.

Answer

user4109793 picture user4109793 · Aug 26, 2015

Use URL like: http://responsivevoice.org/responsivevoice/getvoice.php?t=Type%20text%20here&tl=en-US

This is the URL responsivevoice.js used to read text. Replace Type%20text%20here with your own text.

<a href="javascript:var text=escape(prompt('Type text here: '));
window.location.href = 'http://responsivevoice.org/responsivevoice/getvoice.php?t='+ text +'&tl=en-US';" id="a">Play</a>

Try it: http://jsfiddle.net/017mfce0/