Learn how to connect your CMS to BeyondWords using our text-to-speech API.
Before you start using our API, you will need to create a project in BeyondWords. This will give you access to a Project ID and API key. You can also set your default voices in the 'Settings (General)' section of the project dashboard.
Requests should include
Prior to using the API to create audio, you should make sure that your content is in a suitable format to be processed.
We recommend submitting
bodycontent in HTML. This is because HTML provides additional context that enables better conversion into speech synthesis markup language (SSML) and therefore better conversion into audio.
The HTML markup is submitted via a JSON request, so make sure it is valid JSON by escaping quotation marks and forward slashes:
<h4 class=\"line\" data-line=\"0\">h4 Heading<\/h4>
<p class=\"line\" data-line=\"2\"><strong>This is bold text<\/strong><\/p>
<p class=\"line\" data-line=\"4\"><em>This is italic text<\/em><\/p>
You can also submit content in markdown.
**This is bold text**
_This is italic text_
For plain text, use \n\n to signify a new paragraph.
This is bold text
This is italic text
The BeyondWords API uses API keys to authenticate requests. You can view the API key for your project by going to the 'Settings (General)' section of your project dashboard.
You can create audios using multiple voices by adding a
data-speechkit-voice=*data attribute to a
<p>element (when using HTML), where the
*is a Voice ID from our list of voices.
For example, the following HTML, BeyondWords data attributes, and voice IDs would produce the following audio:
<p data-speechkit-voice="492" class="line" data-line="1" >This is the first paragraph.</p>
<p data-speechkit-voice="453" class="line" data-line="2" >This is a sub heading.</p>
<p data-speechkit-voice="492" class="line" data-line="3" >This is the second paragraph.</p>