RapidAPI logo

Microsoft Text Translation

FREEMIUM
By microsoft-azureOfficial
Updated 3 months ago
Translation
8.5/10
Popularity Score
642ms
Latency
98%
Success Rate

Microsoft Text Translation API Documentation

Microsoft Translator APIs can be seamlessly integrated into your applications, websites, tools, or other solutions to provide multi-language user experiences. Leveraging industry standards, it can be used on any hardware platform and with any operating system to perform language translation and other language-related operations such as text language detection or text to speech. Click Here for more information about the Microsoft Translator API.

View API Details
GETTranslate
GETSpeak
GETGet Translate Supported Languages
GETGet Speak Supported Languages
GETDetect Language
GETBreak Sentences
GETSpeak

Returns a wave or mp3 stream of the passed-in text being spoken in the desired language.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
textSTRING
REQUIREDA string containing a sentence or sentences of the specified language to be spoken for the wave stream. The size of the text to speak must not exceed 2000 characters.
languageSTRING
REQUIREDA string representing the supported language code to speak the text in. The code must be present in the list of codes returned from the method GetLanguagesForSpeak.
Optional Parameters
formatSTRING
OPTIONALA string specifying the content-type ID. Currently, audio/wav and audio/mp3 are available. The default value is audio/wav.
optionsSTRING
OPTIONALA string specifying properties of the synthesized speech: MaxQuality and MinSize are available to specify the quality of the audio signals. With MaxQuality, you can get voices with the highest quality, and with MinSize, you can get the voices with the smallest size. Default is MinSize. female and male are available to specify the desired gender of the voice. Default is female. Use the vertical bar | to include multiple options. For example MaxQuality|Male.
Code Snippet
unirest.get("https://microsoft-azure-translation-v1.p.rapidapi.com/Speak?text=Hello%2C+world!&language=en")
.header("X-RapidAPI-Host", "microsoft-azure-translation-v1.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://microsoft-azure-translation-v1.p.rapidapi.com/Speak
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://microsoft-azure-translation-v1.p.rapidapi.com/Speak?text=Hello%2C+world!&language=en")
.header("X-RapidAPI-Host", "microsoft-azure-translation-v1.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