An open-source javascript library for your NodeJS projects that enables speech translation. Inspired from goslate.
Install via npm
$ npm install --save @imshawan/gslate
param1
String (Your query)param2
String (Translation language)param3
String (From Language), Default:auto
- Returns a promise based object
Note: Keep the param3 (from Language) as auto, in order to auto-detect your query language
const Translator = require( '@imshawan/gslate' )
Translator.Translate("Hello", "hi") // "hi" is the language code for Hindi
.then((response) => {
console.log(response)
})
This method will help you in getting all the languages that are supported along with their language code in JSON format.
const Translator = require( '@imshawan/gslate' )
Translator.getLanguages()
.then((response) => {
console.log(response)
})
Copyright (c) 2021 Shawan Mandal.