RapidAPI logo

Spoken Language Identifier

FREEMIUM
By translated
Updated 4 months ago
2.8/10
Popularity Score
270ms
Latency
50%
Success Rate

Spoken Language Identifier API Documentation

The spoken language identifier is a service that tries to determine the language spoken in an audio recording.

The model currently supports 8 languages: English, Spanish, Italian, French, German, Portuguese, Dutch, and Russian.

You can use it to classify recordings as short as 1 second and as long as a minute. Note that the longer the recording, the higher the accuracy of the prediction. For 20 second recordings the accuracy is about 95%, whereas for 5 second samples it is just over 80%.

Supported audio formats: WAV, FLAC, OGG.

View API Details
POSTidentify stream
POSTidentify
POSTidentify

Identify the language spoken in an audio file.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
contentBINARY
REQUIREDAudio file containing speech. Supported audio formats: WAV, FLAC, OGG.
Code Snippet
unirest.post("https://translated-spoken-language-identification-v1.p.rapidapi.com/identify")
.header("X-RapidAPI-Host", "translated-spoken-language-identification-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://translated-spoken-language-identification-v1.p.rapidapi.com/identify
Request Method: POST
Response Headers
Response Body
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.post("https://translated-spoken-language-identification-v1.p.rapidapi.com/identify")
.header("X-RapidAPI-Host", "translated-spoken-language-identification-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication