Speech
Generate speech (detailed)
Synthesizes speech from a text string and provides advanced information about the synthesis. Returns a JSON object that contains a base64-encoded audio file, the seed used in speech generation, and optionally an object detailing the duration of each spoken word.
POST
The output of this POST request is a JSON object from which you must extract and decode the base64-encoded audio data. Here is an example of how to do so in your terminal:
jq -r '.audio' lmnt-output.json | base64 --decode > lmnt-audio-output.mp3
The file format of your audio output depends on the format
specified in the inital request (this example assumes format=mp3
).
Authorizations
Your API key; get it from your LMNT account page.
Body
application/json
Response
200
application/json
OK
The response is of type object
.