RapidAPI logo

Sign Up

Log In

Text-to-speech

FREE
By ttsengine.com
Updated 3 months ago
Media
4/10
Popularity Score
661ms
Latency
100%
Success Rate

Text-to-speech API Documentation

This API instantly generates high quality speech from text. Simply send a request with the text you want read, and we'll instantly return a wav, mp3, or ogg with it been spoken!

View API Details
GET/v1/tts
GET/v1/tts/languages
GET/v1/tts/voices
GET/v1/tts

Converts text into high quality speech.

Authorization:

Either public key or HMAC authentication may be used

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
textSTRING
REQUIREDWhatever text you want to be converted into audio
formatSTRING
REQUIREDwav, mp3, and ogg file formats are supported
keyQUERY
REQUIREDYour public API key. Register on TTSEngine.com for a free API key
Optional Parameters
voiceSTRING
OPTIONALSee /v1/tts/voices for details on how to query the installed voices
languageSTRING
OPTIONALSee /v1/tts/languages to query the available languages
Request Snippet
unirest.get("https://tts.p.rapidapi.com/v1/tts?voice=The+name+of+the+voice+you+wish+to+use.&language=The+language+you+wish+to+use+(default+is+usenglish)&text=example&format=mp3")
.header("X-RapidAPI-Host", "tts.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://tts.p.rapidapi.com/v1/tts?voice=The+name+of+the+voice+you+wish+to+use.&language=The+language+you+wish+to+use+(default+is+usenglish)&text=example&format=mp3")
.header("X-RapidAPI-Host", "tts.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication