--- openapi: 3.1.0 components: schemas: Script: type: string enum: - Devanagari - Bengali - Gurmukhi - Gujarati - Odia - Tamil - Telugu - Kannada - Malayalam - English - Urdu - OlChiki - Meitei Language: type: string enum: - English - Hindi - Bengali - Marathi - Telugu - Tamil - Gujarati - Urdu - Bhojpuri - Kannada - Odia - Malayalam - Punjabi - Chhattisgarhi - Assamese - Maithili - Magahi - Santali - Kashmiri - Kashmiri_Arabic - Nepali - Sindhi - Sindhi_Arabic - Dogri - Konkani - Manipuri - Manipuri_Bengali - Bodo - Sanskrit - Auto NormalizeInput: type: object required: - text - language description: Input needed for Text Normalization. properties: language: $ref: '#/components/schemas/Language' type: string examples: - English description: Language (Indic/English) of input-text text: type: string examples: - "While docking preparations are underway, SDX01 and SDX02 are 105 meters\ \ apart in orbit as of 12 January IST 3:10 a.m." description: Unicode text which needs to be normalized. TranslateInput: type: object required: - inputText - inputLanguage - outputLanguage description: Input needed for Transliteration. properties: outputLanguage: $ref: '#/components/schemas/Language' type: string examples: - Hindi description: Target language (Indic/English) in to which the inputText needs to be translated to inputLanguage: $ref: '#/components/schemas/Language' type: string examples: - English description: Source language (Indic/English) of input-text inputText: type: string examples: - Chandrayaan-3 is the third and most recent lunar Indian Space Research exploration mission under the Chandrayaan programme of ISRO. It consists of a lander named Vikram and a rover named Pragyan similar to Chandrayaan-2. Its propulsion module behaves like an Orbiter. The propulsion module carries the lander and rover configuration until the spacecraft is in a 100-kilometre (62 mi) lunar orbit. description: Unicode text which needs to be transliterated. TransliterateInput: type: object required: - inputText - outputScript description: Input needed for Transliteration. properties: inputLanguage: $ref: '#/components/schemas/Language' type: string examples: - Hindi description: Language of input text inputScript: $ref: '#/components/schemas/Script' type: string examples: - Devanagari description: Script in which input text is given outputScript: $ref: '#/components/schemas/Script' type: string examples: - Kannada description: Script in which the output text is expected inputText: type: string examples: - भारत का चंद्रयान-3 मिशन के तहत भेजा गया लैंडर चंद्रमा के दक्षिणी ध्रुव की सतह पर सफलतापूर्वक उतर गया। description: Unicode text which needs to be transliterated. TextToSpeechInput: type: object required: - text - language - voiceName description: Input needed for synthesizing speech. properties: voiceName: type: string examples: - Female1 description: "Voice Name: Female1, Male1 etc." language: $ref: '#/components/schemas/Language' type: string examples: - Hindi description: Language (Indic/English) of input-text text: type: string examples: - "सौर मंडल में सूर्य और वह खगोलीय पिंड सम्मलित हैं, जो इस मंडल में एक द\ ूसरे से गुरुत्वाकर्षण बल द्वारा बंधे हैं।" description: Unicode text for which speech needs to be synthesized. parameters: X-API-KEY: description: Specify your API key (consisting of 32 characters) for going beyond rate limits and/or getting access to premium voices in: header name: X-API-KEY schema: type: string maxLength: 32 version: description: API version (v1 or v2) in: path name: version required: true schema: enum: - v1 - v2 securitySchemes: IdToken: type: http scheme: bearer bearerFormat: JWT JWT: type: http scheme: bearer bearerFormat: JWT info: description: "These APIs provide access to Bhashini.ai Text-to-Speech (TTS), Speech-to-Text\ \ (STT), Translation and OCR services" title: Bhashini.ai REST APIs version: 1.0.0 paths: /authorize: post: responses: "200": description: OK security: - IdToken: [] /{version}/asr: post: summary: Run ASR description: Run ASR on the uploaded audio. parameters: - $ref: '#/components/parameters/X-API-KEY' - $ref: '#/components/parameters/version' requestBody: content: multipart/form-data: schema: type: object properties: file: type: - object - string format: binary language: $ref: '#/components/schemas/Language' description: Language of input-audio required: true responses: default: description: Recognized Text content: application/json: {} "200": description: Recognized text "400": description: Invalid audio file or unsupported language "401": description: Missing/Invalid X-API-KEY or JWT /{version}/normalize: post: summary: Indic Text Normalizer description: Expand numbers and abbreviations in English or Indian language text parameters: - $ref: '#/components/parameters/X-API-KEY' - $ref: '#/components/parameters/version' requestBody: content: application/json: schema: $ref: '#/components/schemas/NormalizeInput' required: true responses: default: description: Normalized text content: text/plain: {} "400": description: Invalid text/language in the request body "401": description: Missing/Invalid X-API-KEY or JWT /{version}/ocr: post: summary: Run Cloud OCR description: Run Cloud OCR on the uploaded document/image. parameters: - $ref: '#/components/parameters/X-API-KEY' - $ref: '#/components/parameters/version' requestBody: content: multipart/form-data: schema: type: object properties: file: type: - object - string format: binary required: true responses: default: description: Recognized Text content: application/xml: {} "400": description: Invalid file in the request body "401": description: Missing/Invalid X-API-KEY or JWT /{version}/synthesize: post: summary: Synthesize speech from text description: Use Bhashini.ai TTS to synthesize speech from Unicode text parameters: - $ref: '#/components/parameters/X-API-KEY' - $ref: '#/components/parameters/version' requestBody: content: application/json: schema: $ref: '#/components/schemas/TextToSpeechInput' required: true responses: default: description: Synthesized speech content: audio/mpeg: {} "400": description: Invalid language/voiceName/text in the request body "401": description: Missing/Invalid X-API-KEY or JWT /{version}/translate: post: summary: "Translate text: English->Indic or Indic->English or Indic->Indic" description: Translate text from English to Indian language or Indian language to English or from one Indian language to another. parameters: - $ref: '#/components/parameters/X-API-KEY' - $ref: '#/components/parameters/version' requestBody: content: application/json: schema: $ref: '#/components/schemas/TranslateInput' required: true responses: default: description: Text translated into target language content: text/plain: {} "400": description: Invalid inputText/inputLanguage/outputLanguage in the request body "401": description: Missing/Invalid X-API-KEY or JWT /{version}/transliterate: post: summary: Transliterate Indic text description: See Indic text in desired script parameters: - $ref: '#/components/parameters/X-API-KEY' - $ref: '#/components/parameters/version' requestBody: content: application/json: schema: $ref: '#/components/schemas/TransliterateInput' required: true responses: default: description: Text transliterated into target script content: text/plain: {} "400": description: Invalid inputText/inputScript/outputScript in the request body servers: - url: https://tts.bhashini.ai