Reverie API Documentation
  • Reverie APIs
  • Reference
    • Localization API
      • Setup
      • API Reference
      • Supported Languages
      • Supported Domains
      • API Messages
    • Transliteration API
      • Setup
      • API Reference
      • Language Codes
      • Supporting Domains
      • API Messages
    • Text to Speech API
      • Setup
      • API Reference
      • SSML (Speech Synthesis Markup Language)
      • Phoneme Reference
      • API Default Behaviour
      • Supporting Speaker Code
      • Supporting Sampling Rate
      • Supporting Audio Format
      • API Messages
    • Speech to Text | Streaming API
      • Setup
      • API Reference
      • Language Codes
      • Supporting Audio Format
      • Supporting Domains
      • API Messages
  • Speech to Text | File API
    • Setup
    • API Reference
    • Language Codes
    • Supporting Audio Format
    • API Messages
  • Speech to Text | Batch API
    • Setup
    • API Reference
    • Language Codes
    • Sample Request Responses
    • Supporting Audio Format
  • Language Identification API
    • Sample Code
    • API Reference
    • Language Codes
  • Reverie Products
    • Swalekh
    • Vachak
Powered by GitBook
On this page
  • Request URL
  • Header
  • Request
  • Response
  • Handling Errors
  1. Speech to Text | File API

API Reference

Request URL

Verb/Method

POST

URL Elements

https://(hostname)

Sample URL

https://revapi.reverieinc.com/

Header

Header Name
Description
Is Mandatory?
Value

REV-API-KEY

A unique key/token is provided by Reverie to identify the user using the STT API

Yes

-

REV-APP-ID

The unique account ID to identify the user and the default account settings

Yes

-

REV-APPNAME

The parameter to identify the API

Yes

stt_file

domain

Refer to the universe in which the STT API is used for transcribing the audio file

Example: Banking, Insurance, etc.

Yes

Specify the domain code.

src_lang

Indicates the language in which the audio is spoken

Yes

Specify the language code.

format

Indicates the supporting format of the audio file

No

Mention the audio sample rate and file format of the uploaded file.

Note:

  1. By default, the format = 16k_int16. (WAV, Signed 16 bit, 16,000 or 16K Hz).

  2. It is an optional parameter.

logging

Indicates the type of logging of data you can choose

No

Default value=true

Possible values are :

1. true - stores client’s audio and keeps transcript in logs.

2. no_audio - does not store client’s audio but keeps transcript in logs.

3. no_transcript - does not keep transcript in logs but stores client’s audio.

4. false - does not keep neither client’s audio nor transcript in log.

punctuate

Indicates whether capitalisation and punctuation is needed in the transcript

No

It will enable punctuation and capitalisation in the transcript.

The values it can take are true and false.

Supported languages: en, hi

Default value is true

Request

Element
Type
Description

audio_file

file

Upload the audio file to obtain the transcript.

Note - audio_file length should be equal to or less than 300 seconds (5 minutes).

file_url

file URL

The audio file’s public URL to obtain the transcript.

Note - file_url length should be equal to or less than 300 seconds (5 minutes).

Note - Either one of audio_file or file_url should be mandatory in the request.

Response

Element
Type
Description

id

string

API will auto-assign a unique identification number for each request.

success

boolean

Will indicate the functional status of the API:

  • If the success = true, then the API is functioning and ready to generate output.

  • If the success = false, then the API is not functional and has some errors.

final

boolean

Will report whether the received output is partial or final:

  • If the final = true, then the received text is the final output.

  • If the final = false, then the text received is partial and is still processing the file.

cause

string

Reason for obtaining the final output.

The cause will appear for both successful and failed requests.

text

string

The audio file transcribed into text format in the requested language.

Note: The field will remain empty in case of any error or on connect.

confidence

float

The level of confidence that Reverie STT API has in the accuracy of the transcription.

The Confidence score ranges from “0” to “1”. Higher scores indicate greater relevance to the transcription.

display_text

string

The beautified text of the final transcript.

If the final transcript consists of digits, URL, app names, it is quickly converted to a readable format for the user.

Note: The field will remain empty in case of any error or on connect.

Handling Errors

The STT API raises exceptions for many reasons, such as a failed connection, invalid parameters, authentication errors, and network unavailability. We provide more specific human-readable messages with an error response so that users can react to errors more.

{
    "id": "0ca5c7293d1d4eaaa5eb5ade8331dd3300443509daf8434b",
    "success": false,
    "text": "",
    "final": true,
    "confidence": 1.0,
    "cause": "no `domain` given",
    "display_text": ""
}
PreviousSetupNextLanguage Codes

Last updated 8 months ago

Refer to section for valid domain ID.

Refer to section for valid language code.

Refer to the section to know the supporting audio formats.

Refer to the section to view the list of messages/ cause and its description.

Refer to section to view the list of error messages and its description.

API Messages
Supporting Domain
Language Code
Supporting Audio Format
API Messages