Transliteration
Transliteration converts text written in one script (such as Latin or Romanized text) into another script (such as Devanagari, Bengali, or Tamil) while preserving phonetic pronunciation.
Transliteration vs Translation
Transliteration changes the script/alphabet so words sound the same when spoken, whereas Translation converts the meaning into another language.
Example Conversion
Input (Latin / Romanized): namaste duniya
Output (Devanagari): नमस्ते दुनियाAPI Code Example
const response = await fetch("https://dhruva-api.bhashini.gov.in/services/inference/pipeline", {
method: "POST",
headers: {
"Accept": "*/*",
"Authorization": "<YOUR_INFERENCE_API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
pipelineTasks: [{
taskType: "transliteration",
config: {
language: { sourceLanguage: "en", targetLanguage: "hi" },
serviceId: "ai4bharat/indicxlit--gpu-t4"
}
}],
inputData: { input: [{ source: "namaste duniya" }] }
})
});
const data = await response.json();
console.log(data);Interactive Tryout
Test transliteration live in your browser using the runner below:
Try Transliteration
Convert Romanized text into Indic scripts phonetically
Request
Select model
English
हिन्दी | Hindi
Add an inference API key to run.
curl
Response
Send a request to see the live response here.