--- openapi: 3.1.0 components: schemas: 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: description: Input needed for Text Normalization. type: object required: - text - language properties: text: type: string description: Unicode text which needs to be normalized. examples: - "While docking preparations are underway, SDX01 and SDX02 are 105 meters\ \ apart in orbit as of 12 January IST 3:10 a.m." language: description: Language (Indic/English) of input-text type: string examples: - English $ref: '#/components/schemas/Language' Script: type: string enum: - Devanagari - Bengali - Gurmukhi - Gujarati - Odia - Tamil - Telugu - Kannada - Malayalam - English - Urdu - OlChiki - Meitei TextToSpeechInput: description: Input needed for synthesizing speech. type: object required: - text - language - voiceName properties: text: type: string description: Unicode text for which speech needs to be synthesized. examples: - "सौर मंडल में सूर्य और वह खगोलीय पिंड सम्मलित हैं, जो इस मंडल में एक द\ ूसरे से गुरुत्वाकर्षण बल द्वारा बंधे हैं।" language: description: Language (Indic/English) of input-text type: string examples: - Hindi $ref: '#/components/schemas/Language' voiceName: type: string description: "Voice Name: Female1, Male1 etc." examples: - Female1 voiceStyle: description: "Voice Style: Tone or speaking manner of the generated voice." type: string examples: - Neutral default: Neutral $ref: '#/components/schemas/VoiceStyle' TranslateInput: description: Input needed for Transliteration. type: object required: - inputText - inputLanguage - outputLanguage properties: inputText: type: string description: Unicode text which needs to be transliterated. 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. inputLanguage: description: Source language (Indic/English) of input-text type: string examples: - English $ref: '#/components/schemas/Language' outputLanguage: description: Target language (Indic/English) in to which the inputText needs to be translated to type: string examples: - Hindi $ref: '#/components/schemas/Language' TransliterateInput: description: Input needed for Transliteration. type: object required: - inputText - outputScript properties: inputText: type: string description: Unicode text which needs to be transliterated. examples: - भारत का चंद्रयान-3 मिशन के तहत भेजा गया लैंडर चंद्रमा के दक्षिणी ध्रुव की सतह पर सफलतापूर्वक उतर गया। inputScript: description: Script in which input text is given type: string examples: - Devanagari $ref: '#/components/schemas/Script' inputLanguage: description: Language of input text type: string examples: - Hindi $ref: '#/components/schemas/Language' outputScript: description: Script in which the output text is expected type: string examples: - Kannada $ref: '#/components/schemas/Script' VoiceStyle: description: "Voice Style: Tone or speaking manner of the generated voice. Possible\ \ values: Neutral, Conversational, Happy, Sad, News, Command, etc." type: string enum: - Neutral - News - Conversational - Book - Command - Happy - Sad - Fear - Disgust - Anger - Surprise - Custom 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: maxLength: 32 type: string version: description: API version (v1 or v2) in: path name: version required: true schema: default: v2 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