API Reference
Speech To Text Translate · REST
https://api.shabd.tech/v1/speech-to-text-translateConverts spoken audio into accurate written text and translates it into a target language, supporting multiple languages and accents. Optimized for transcription, accessibility, and voice-driven applications in diverse environments.
Headers
x-api-keystringrequiredAPI Key for authentication
- Example:
<your-api-key>
Content-TypestringrequiredContent type of the request body
- Example:
multipart/form-data
x-request-idstringrequiredUnique request ID in UUID format
- Example:
550e8400-e29b-41d4-a716-446655440000
Request bodymultipart/form-data
sourceLanguagestringrequiredSource language of the speech
- Example:
english
targetLanguagestringrequiredTarget language to translate text
- Example:
hindi
filefileoptionalAudio file in WAV format. Optional when
audioUrlis supplied.audioUrlstringoptionalPublic http(s) URL to fetch the audio from, as an alternative to uploading
file. Exactly one offileoraudioUrlis required; if both are sent the uploaded file wins. The URL must be publicly reachable and the downloaded audio is subject to the same size limit as an upload.- Example:
https://example.com/audio/sample.wav
sampleRatenumber or nulloptionalSample rate of the audio (e.g., 16000)
- Example:
16000
projectIdstringoptionalOptional project identifier
- Example:
<your-project-id-here>
stylestringoptionalTranslation style ("conversational" or "formal")
- Allowed:
conversationalformal- Default:
conversational
Responses
Transcription and Translated text
Bodyapplication/json
statusbooleanoptional- Example:
true
transcriptstringoptional- Example:
Transcription from the audio
translationstringoptional- Example:
Translation of the transcript
Example response
{ "status": true, "transcript": "Transcription from the audio", "translation": "Translation of the transcript"}Bad Request - The request is malformed or contains invalid parameters.
Bodyapplication/json
statusbooleanoptional- Example:
false
messagestringoptional- Example:
Invalid input parameters.
Example response
{ "status": false, "message": "Invalid input parameters."}Unauthorized Access - Authentication credentials are missing or invalid.
Bodyapplication/json
statusbooleanoptional- Example:
false
messagestringoptional- Example:
Unauthorized access.
Example response
{ "status": false, "message": "Unauthorized access."}Usage Limit Exceeded - The usage limit for the API has been exceeded.
Bodyapplication/json
statusbooleanoptional- Example:
false
messagestringoptional- Example:
Limit Exceeded
Example response
{ "status": false, "message": "Limit Exceeded"}Internal server error
Bodyapplication/json
statusbooleanoptional- Example:
false
messagestringoptional- Example:
An unexpected error occurred. Please try again later.
Example response
{ "status": false, "message": "An unexpected error occurred. Please try again later."}