API References
Speech-to-Text (Batch) API
The Speech-to-Text API powered by Reverie’s AI technology accurately converts speech into text. The solution can transcribe audio files of various Indian languages and audio formats.
How Does API Work?
The process to transcribe an audio file:
- Post the request by:
- Enter the valid
REV-APPNAME
,REV-APP-ID
, andREV-API-KEY
. - Define the Language Code and domain.
- Upload the audio file to transcribe.
- Define the audio format, if required.
- Enter the valid
- The API will return the text in the requested Indian language.
cURL for Integration
Step 1 : Upload the Audio File
Request : Transcribing Audio
Request: Transcribing Audio other than Default Format
Response: Success
Response: Error Message
Step 2 : Get the Status
Request: Get status of the transcription
Response: Success
Step 3 : Get the Transcript
Request: Get transcript of the transcription
Response: Success
API References
HTTP Request URL
URL Elements | Sample URL |
---|---|
https://(hostname) | https://revapi.reverieinc.com/upload |
Headers
API key shared by the Reverie team
APP ID shared by the Reverie team
Value if this string should always be stt_batch
- Specify the language code.
- Example:
hi
- Refer to section Language Codes for valid language code.
- This field identifies your use case type and set of the terminology defined for transcription.
- e.g. for general audio is ‘generic’
- It is only required for the first API i.e Upload File API.
- Mention the audio sample rate and file format of the uploaded file.
- Refer to section Supported Audio Formats for valid audio format code.
- It is only required for the first API i.e Upload File API
- Note:
- By default, the format =
16k_int16
. (WAV, Signed 16 bit, 16,000 or 16K Hz). - It is an optional parameter.
- By default, the format =
- Enables subtitling from the audio file.
Query Parameter
- An audio file for which the transcript is desired.
Response
- A unique Identity number auto-assigned by the API for each request, to be used to fetch job status and transcripts.
- Provides a message code which can be used to look up the nature of the response returned by the API.
- Provides a brief description about the response returned by the API.
Handling Errors
Our API raises errors when there is something wrong with certain aspects of the submitted file or any network issues. Some areas where errors might come up would be errors due to network related issues, file formats, incorrect domain names or language codes. Each response code provides a descriptive message about what has gone wrong.
API Response Message Codes
Code | Message |
---|---|
000 | Success. Request accepted |
001 | Language code is required |
002 | File type not supported. Upload only wav, flac or mp3 formats. Preferred format for transcription is wav files |
003 | Language and/or Domain not available |
004 | File type not supported. Upload only wav, flac or mp3 formats. Preferred format for transcription is wav files |
999 | Unknown error, please contact developer |
HTTP Status URL
URL Elements | Sample URL |
---|---|
https://(hostname) | https://revapi.reverieinc.com/status?job_id=<job_id> |
Query Parameter
job_id
received after uploading the file.
Status Query Response
- A unique Identity number auto-assigned by the API for each request
- Provides a message code which can be used to look up the nature of the response returned by the API
- Provides a brief description about the response returned by the API.
- status values:
queued
,processing
,failed
andcompleted
Status Types
Status | Description |
---|---|
queued | When the file is successfully validated, the request is queued for processing. |
processing | The transcript generation process is in progress. |
failed | Due to network issues, availability constraints, etc., the request might fail during processing. |
completed | Transcription was successfully completed. |
API Response Message Codes
Code | Message |
---|---|
000 | Transcript ready |
001 | Invalid JOB ID |
002 | Invalid JOB ID |
003 | Your request is in the queue and will be processed shortly |
004 | Your request is being processed |
005 | Job failed. Please contact the developers |
999 | Unknown error |
HTTP Transcript URL
URL Elements | Sample URL |
---|---|
https://(hostname) | https://revapi.reverieinc.com/transcript?job_id=<job_id> |
Query Parameter
job_id
received after uploading the file.
Transcript Query Response
- A unique Identity number auto-assigned by the API for each request.
- Provides a message code which can be used to look up the nature of the response returned by the API.
- Provides a brief description about the response returned by the API.
- An array of transcript objects including, channel_number, transcript, list of words with start time, end time and confidence.Please check the sample response.
API Response Message Codes
Code | Message |
---|---|
000 | Transcript ready |
001 | Invalid JOB ID |
002 | Invalid JOB ID |
003 | Your request is in the queue and will be processed shortly |
004 | Your request is being processed |
005 | Job failed. Please contact the developers |
999 | Unknown error |