> For the complete documentation index, see [llms.txt](https://docs.cloud.olakrutrim.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloud.olakrutrim.com/api-references/bhashik-speech-api.md).

# Bhashik Speech API

## Text to Speech

> Convert input text to an audio file in the specified language and speaker voice.

```json
{"openapi":"3.0.3","info":{"title":"Krutrim LanguageLabs APIs","version":"1.0.0"},"tags":[{"name":"Text-to-Speech"}],"servers":[{"url":"https://cloud.olakrutrim.com/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TTSRequest":{"type":"object","required":["input_text","input_language","input_speaker"],"properties":{"input_text":{"type":"string","description":"Input text to synthesize."},"input_language":{"$ref":"#/components/schemas/LanguageShort"},"input_speaker":{"$ref":"#/components/schemas/Speaker"}}},"LanguageShort":{"type":"string","description":"Language code","enum":["eng","guj","ben","hin","kan","mal","mar","tam","tel"]},"Speaker":{"type":"string","enum":["female","male"]},"TTSResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"audio_file":{"type":"string","description":"Download URL for the generated audio file."}}}}},"Error":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/languagelabs/tts":{"post":{"tags":["Text-to-Speech"],"summary":"Text to Speech","description":"Convert input text to an audio file in the specified language and speaker voice.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSRequest"}}}},"responses":{"200":{"description":"Audio file link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Text to Speech Translation

> Translate input text from source language to target language and return synthesized speech.

```json
{"openapi":"3.0.3","info":{"title":"Krutrim LanguageLabs APIs","version":"1.0.0"},"tags":[{"name":"Text-to-Speech"},{"name":"Translation"}],"servers":[{"url":"https://cloud.olakrutrim.com/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TTSTransRequest":{"type":"object","required":["input_text","src_lang_code","tgt_lang_code","input_speaker"],"properties":{"input_text":{"type":"string","description":"Input text to translate and synthesize."},"src_lang_code":{"$ref":"#/components/schemas/LanguageSrcOnlyEng"},"tgt_lang_code":{"$ref":"#/components/schemas/LanguageTarget"},"input_speaker":{"$ref":"#/components/schemas/Speaker"}}},"LanguageSrcOnlyEng":{"type":"string","enum":["eng"],"description":"Only 'eng' is supported as the source for certain translation endpoints."},"LanguageTarget":{"type":"string","description":"Target language code","enum":["eng","guj","ben","hin","kan","mal","mar","tam","tel"]},"Speaker":{"type":"string","enum":["female","male"]},"TTSTransResponse":{"allOf":[{"$ref":"#/components/schemas/TTSResponse"}]},"TTSResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"audio_file":{"type":"string","description":"Download URL for the generated audio file."}}}}},"Error":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/languagelabs/tts_trans":{"post":{"tags":["Text-to-Speech","Translation"],"summary":"Text to Speech Translation","description":"Translate input text from source language to target language and return synthesized speech.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSTransRequest"}}}},"responses":{"200":{"description":"Audio file link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSTransResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Speech to Text (upload)

> Upload a short audio file (mp3, wav) and get transcribed text.

```json
{"openapi":"3.0.3","info":{"title":"Krutrim LanguageLabs APIs","version":"1.0.0"},"tags":[{"name":"Speech-to-Text"}],"servers":[{"url":"https://cloud.olakrutrim.com/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"STTUploadRequest":{"type":"object","required":["file","lang_code"],"properties":{"file":{"type":"string","format":"binary","description":"Audio file (mp3 or wav)."},"lang_code":{"$ref":"#/components/schemas/LanguageShort"}}},"LanguageShort":{"type":"string","description":"Language code","enum":["eng","guj","ben","hin","kan","mal","mar","tam","tel"]},"STTResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"text":{"type":"array","items":{"type":"string"},"description":"Transcribed text segments."}}}}},"Error":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/languagelabs/transcribe/upload":{"post":{"tags":["Speech-to-Text"],"summary":"Speech to Text (upload)","description":"Upload a short audio file (mp3, wav) and get transcribed text.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/STTUploadRequest"}}}},"responses":{"200":{"description":"Transcribed text","content":{"application/json":{"schema":{"$ref":"#/components/schemas/STTResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Speech to Text Translation (upload)

> Upload a short audio file (mp3, wav) and get translated text.

```json
{"openapi":"3.0.3","info":{"title":"Krutrim LanguageLabs APIs","version":"1.0.0"},"tags":[{"name":"Speech-to-Text"},{"name":"Translation"}],"servers":[{"url":"https://cloud.olakrutrim.com/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"STTTransUploadRequest":{"type":"object","required":["file","src_lang_code","tgt_lang_code"],"properties":{"file":{"type":"string","format":"binary","description":"Audio file (mp3 or wav)."},"src_lang_code":{"$ref":"#/components/schemas/LanguageSrcOnlyEng"},"tgt_lang_code":{"$ref":"#/components/schemas/LanguageTarget"}}},"LanguageSrcOnlyEng":{"type":"string","enum":["eng"],"description":"Only 'eng' is supported as the source for certain translation endpoints."},"LanguageTarget":{"type":"string","description":"Target language code","enum":["eng","guj","ben","hin","kan","mal","mar","tam","tel"]},"STTTransResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"translated_text":{"type":"string","description":"Translated text."}}}}},"Error":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/languagelabs/stt_trans/upload":{"post":{"tags":["Speech-to-Text","Translation"],"summary":"Speech to Text Translation (upload)","description":"Upload a short audio file (mp3, wav) and get translated text.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/STTTransUploadRequest"}}}},"responses":{"200":{"description":"Translated text","content":{"application/json":{"schema":{"$ref":"#/components/schemas/STTTransResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Speech to Speech Translation (upload)

> Upload a short audio file and receive translated synthesized speech.

```json
{"openapi":"3.0.3","info":{"title":"Krutrim LanguageLabs APIs","version":"1.0.0"},"tags":[{"name":"Translation"}],"servers":[{"url":"https://cloud.olakrutrim.com/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"STSUploadRequest":{"type":"object","required":["file","src_lang_code","tgt_lang_code","input_speaker"],"properties":{"file":{"type":"string","format":"binary","description":"Audio file (mp3 or wav)."},"src_lang_code":{"$ref":"#/components/schemas/LanguageSrcOnlyEng"},"tgt_lang_code":{"$ref":"#/components/schemas/LanguageTarget"},"input_speaker":{"$ref":"#/components/schemas/Speaker"}}},"LanguageSrcOnlyEng":{"type":"string","enum":["eng"],"description":"Only 'eng' is supported as the source for certain translation endpoints."},"LanguageTarget":{"type":"string","description":"Target language code","enum":["eng","guj","ben","hin","kan","mal","mar","tam","tel"]},"Speaker":{"type":"string","enum":["female","male"]},"STSResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"audio_file":{"type":"string","description":"Download URL for the translated synthesized audio."}}}}},"Error":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/languagelabs/sts_trans/upload":{"post":{"tags":["Translation"],"summary":"Speech to Speech Translation (upload)","description":"Upload a short audio file and receive translated synthesized speech.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/STSUploadRequest"}}}},"responses":{"200":{"description":"Audio file link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/STSResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Long-duration Speech to Text (upload)

> Upload a longer audio file for asynchronous transcription; returns a request\_id that can be polled.

```json
{"openapi":"3.0.3","info":{"title":"Krutrim LanguageLabs APIs","version":"1.0.0"},"tags":[{"name":"Speech-to-Text"},{"name":"Long-Form"}],"servers":[{"url":"https://cloud.olakrutrim.com/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"STTUploadRequest":{"type":"object","required":["file","lang_code"],"properties":{"file":{"type":"string","format":"binary","description":"Audio file (mp3 or wav)."},"lang_code":{"$ref":"#/components/schemas/LanguageShort"}}},"LanguageShort":{"type":"string","description":"Language code","enum":["eng","guj","ben","hin","kan","mal","mar","tam","tel"]},"LongFormQueuedResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"request_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["QUEUED"]}}}}},"Error":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/languagelabs/transcribe/lf/upload":{"post":{"tags":["Long-Form","Speech-to-Text"],"summary":"Long-duration Speech to Text (upload)","description":"Upload a longer audio file for asynchronous transcription; returns a request_id that can be polled.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/STTUploadRequest"}}}},"responses":{"200":{"description":"Job queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LongFormQueuedResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Long-duration Speech to Text Translation (upload)

> Upload a longer audio file for asynchronous speech-to-text translation; returns a request\_id that can be polled.

```json
{"openapi":"3.0.3","info":{"title":"Krutrim LanguageLabs APIs","version":"1.0.0"},"tags":[{"name":"Translation"},{"name":"Long-Form"}],"servers":[{"url":"https://cloud.olakrutrim.com/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"STTTransLFUploadRequest":{"type":"object","required":["file","src_lang_code","tgt_lang_code"],"properties":{"file":{"type":"string","format":"binary","description":"Long audio file (mp3 or wav)."},"src_lang_code":{"$ref":"#/components/schemas/LanguageSrcOnlyEng"},"tgt_lang_code":{"$ref":"#/components/schemas/LanguageTarget"}}},"LanguageSrcOnlyEng":{"type":"string","enum":["eng"],"description":"Only 'eng' is supported as the source for certain translation endpoints."},"LanguageTarget":{"type":"string","description":"Target language code","enum":["eng","guj","ben","hin","kan","mal","mar","tam","tel"]},"LongFormQueuedResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"request_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["QUEUED"]}}}}},"Error":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/languagelabs/stt_trans/lf/upload":{"post":{"tags":["Long-Form","Translation"],"summary":"Long-duration Speech to Text Translation (upload)","description":"Upload a longer audio file for asynchronous speech-to-text translation; returns a request_id that can be polled.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/STTTransLFUploadRequest"}}}},"responses":{"200":{"description":"Job queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LongFormQueuedResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get long-duration job status

> Poll the status of a long-duration transcription/translation job and obtain the output link/text when available.

```json
{"openapi":"3.0.3","info":{"title":"Krutrim LanguageLabs APIs","version":"1.0.0"},"tags":[{"name":"Long-Form"}],"servers":[{"url":"https://cloud.olakrutrim.com/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"JobStatusResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"request_id":{"type":"string"},"file_name":{"type":"string"},"file_size_mb":{"type":"number","format":"float"},"service_type":{"type":"string","description":"Service handling the job (e.g., stttransservice)."},"status":{"type":"string","description":"Current job status (e.g., QUEUED, RUNNING, FAILED, SUCCESS)."},"output_file":{"type":"string","nullable":true,"description":"Download URL for output (e.g., .txt) if SUCCESS."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}},"Error":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/languagelabs/job_status/{request_id}":{"get":{"tags":["Long-Form"],"summary":"Get long-duration job status","description":"Poll the status of a long-duration transcription/translation job and obtain the output link/text when available.","parameters":[{"in":"path","name":"request_id","required":true,"schema":{"type":"string"},"description":"Request ID returned by the long-duration upload endpoint."}],"responses":{"200":{"description":"Job status payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request ID not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```
