It’s easy to use the script directly from code.responsivevoice.org for non-commercial licenses. If you want to use ResponsiveVoice for a commercial project please see licensing.
SIMPLE TO USE
Add this code to your webpage (see license)
1 |
<script src="https://code.responsivevoice.org/responsivevoice.js?key=YOUR_UNIQUE_KEY"></script> |
Then use it on the page
1 |
<input onclick="responsiveVoice.speak('Hello World');" type="button" value="Play" /> |
Feel free to link to the files at code.responsivevoice.org. We maintain a fair usage policy on bandwidth, please contact us if you believe your usage may be high.
LATEST STABLE
The latest stable version of ResponsiveVoice is served from the root of code.responsivevoice.org:
https://code.responsivevoice.org/responsivevoice.js?key=YOUR_UNIQUE_KEY (minified)
https://code.responsivevoice.org/responsivevoice.src.js (readable src)
SPECIFIC VERSION
You’ll find a specific ResponsiveVoice version by appending the version number to the root level. You will need to load your API key before:
1 2 3 4 5 |
<script> var rvApiKey="YOUR_UNIQUE_KEY"; var rvApiEndpoint = "https://texttospeech.responsivevoice.org/v1/text:synthesize"; </script> <script src="https://code.responsivevoice.org/1.6.1/responsivevoice.js"></script> |
TRUNCATED VERSIONS
By truncating the version number you can load the latest stable release within the major version number. For example, 1.6 points to the latest stable 1.6.x, but when 1.7 or 2.0 are released, you will still load the latest release of 1.6.
1 2 3 4 5 |
<script> var rvApiKey="YOUR_UNIQUE_KEY"; var rvApiEndpoint = "https://texttospeech.responsivevoice.org/v1/text:synthesize"; </script> <script src="https://code.responsivevoice.org/1.6/responsivevoice.js"></script> |