Text-to-Speech

FREE
By voicerss
Updated 5 months ago
Media
9.5/10
Popularity Score
622ms
Latency
100%
Success Rate

Text-to-Speech API Documentation

The Voice RSS Text-to-Speech (TTS) API allows conversion of textual content to speech easier than ever. Just connect to our Text-to-Speech (TTS) API with a few lines of code and get verbal representation of a textual content.

View API Details
GETConvert text to speech via HTTP GET
POSTConvert text to speech via HTTP POST
GETConvert text to speech via HTTP GET

Converts textual content to audio content

Authorization:
Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
srcSTRING
REQUIREDThe textual content for converting to speech
hlSTRING
REQUIREDThe textual content language
keyQUERY
REQUIREDThe API key
Optional Parameters
rNUMBER
OPTIONALThe speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed)
cSTRING
OPTIONALThe speech audio codec
fSTRING
OPTIONALThe speech audio formats
Code Snippet
unirest.get("https://voicerss-text-to-speech.p.rapidapi.com/?r=0&c=mp3&f=8khz_8bit_mono&src=Hello%2C+world!&hl=en-us")
.header("X-RapidAPI-Host", "voicerss-text-to-speech.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://voicerss-text-to-speech.p.rapidapi.com/
Request Method: GET
Response Headers
Response Body

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://voicerss-text-to-speech.p.rapidapi.com/?r=0&c=mp3&f=8khz_8bit_mono&src=Hello%2C+world!&hl=en-us")
.header("X-RapidAPI-Host", "voicerss-text-to-speech.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