Pricing 
API Pricing

Try For Free Now

Dark

Light

LANGUAGES
Transcript Languages (Streaming)
Get languages supported by the transcript (Streaming) API.
Endpoint
Request details
GET
https://translate.rozetta-api.io/api/v1/stt-streaming-languages
Header
Header
Description
accessKey, nonce, signature
Please refer to the authentication section.
Request Sample
curl -H "nonce: Your Nonce" -H "accessKey: Your Access Key" -H "signature: Your Signature" https://translate.rozetta-api.io/api/v1/stt-streaming-languages
Response
Key
Description
status
For successfully getting of an entry, this field will be "success". For unsuccessful requests, this field will be "failure".
languages
A list of languages contain language code, language name and language description. Except for zh-CN, zh-TW and zh-HK, language codes use the ISO 639-1 code.

api/v1/stt-streaming-languages
Show the list of languages.
JavaScript
const https = require('https');

const authUtils = require('./utils/auth-utils');

const serverConfig = {
 protocol: 'https:',
 hostname: 'translate.rozetta-api.io',
 port: 443
};
const authConfig = {
 accessKey: 'YOUR_ACCESS_KEY',
 secretKey: 'YOUR_SECRET_KEY',
 nonce: new Date().getTime().toString()
};

const getLanguagesList = (serverConfig, authConfig) => {
 const path = '/api/v1/stt-streaming-languages';
 const signature = authUtils.generateSignature(
   path,
   authConfig.secretKey,
   authConfig.nonce
 );
 const requestOptions = {
   protocol: serverConfig.protocol,
   host: serverConfig.hostname,
   port: serverConfig.port,
   method: 'GET',
   path,
   headers: {
     accessKey: authConfig.accessKey,
     signature,
     nonce: authConfig.nonce
   }
 };

 return new Promise((resolve, reject) => {
   const request = https.request(requestOptions, (response) => {
     response.setEncoding('utf8');
     let data = '';
     response.on('data', (chunk) => {
       data += chunk;
     });
     response.on('end', () => {
       resolve(data);
     });
   });
   request.on('error', (error) => {
     reject(error);
   });
   request.end();
 });
};

const main = async () => {
 try {
   const response = await getLanguagesList(
     serverConfig,
     authConfig,
   );
   console.log('Server response:');
   console.log(response);
 } catch (error) {
   console.error(error);
 }
};

main();
About the authentication, please refer to the authentication section.
You can get a full version of sample codes here
©️ 2019 Rozetta API  ・  Powered by Rozetta

Rozetta Corp.

^