Skip to content

STT Errors

All errors conform to the following schema:

Name Type Optional Description
status string false Unique identifier of the error
message string false Description of the error
context object true Additional values describing the error

Error Status Index

Status Schema
asr_model_not_found AsrModelNotFoundError
asr_request_file_too_large AsrRequestTooLargeError
asr_request_invalid_data InvalidBase64EncodedError
asr_request_invalid_uri InvalidUriError
asr_request_no_audio_data NoAudioProvidedError
asr_request_unsupported_media_type UnsupportedMediaTypeError
asr_request_uri_download_error DownloadError
asr_request_waiting_not_allowed AsrWaitingNotAllowedError
auth_invalid_api_key InvalidApiKeyError
auth_unauthorized UnauthorizedError
forbidden ForbiddenError
internal_server_error InternalServerError
job_cancellation_failure JobCancellationError
job_not_found JobNotFoundError
quota_empty OutOfQuotaError
quota_insufficient NotEnoughQuotaError
request_validation_error RequestValidationError

AsrModelNotFoundError

status: asr_model_not_found

The specified ASR model is not found.

Example

1
2
3
4
5
6
7
{
  "status": "asr_model_not_found",
  "message": "ASR model 'asr-general' not found",
  "context": {
    "model": "asr-general"
  }
}

Context

Name Type Optional Description
model string false The name of the model

AsrRequestTooLargeError

status: asr_request_file_too_large

The submitted request contains audio that is too large to be processed in a single request. Consider breaking up the audio into multiple smaller audio.

Example

1
2
3
4
5
6
7
8
{
  "status": "asr_request_file_too_large",
  "message": "Request too large: {duration} > {max_duration}",
  "context": {
    "duration": "string",
    "max_duration": "string"
  }
}

Context

Name Type Optional Description
duration string false Duration of the submitted audio
max_duration string false Allowed maximum duration in a single request

AsrWaitingNotAllowedError

status: asr_request_waiting_not_allowed

Waiting for short requests to complete is done by setting the value of config->wait in the request body to true. However, requests with URI in the request body is regarded as a long request and is therefore not allowed to be waited for.

Example

1
2
3
4
5
6
7
{
  "status": "asr_request_waiting_not_allowed",
  "message": "Cannot wait for URI-based request",
  "context": {
    "uri": "string"
  }
}

Context

Name Type Optional Description
uri string false Requested URI

DownloadError

status: asr_request_uri_download_error

Failed to download file from the submitted URI. This might be due to several reason, including but not limited to connection error.

Example

1
2
3
4
5
6
7
{
  "status": "asr_request_uri_download_error",
  "message": "Failed to download file from URI. Please try again later",
  "context": {
    "uri": "string"
  }
}

Context

Name Type Optional Description
uri string false The submitted URI

ForbiddenError

status: forbidden

The request is not authorized.

Example

1
2
3
4
{
  "status": "forbidden",
  "message": "Forbidden"
}

InvalidApiKeyError

status: auth_invalid_api_key

Header x-api-key does not contain valid api-key.

Example

1
2
3
4
{
  "status": "auth_invalid_api_key",
  "message": "Invalid x-api-key"
}

InvalidBase64EncodedError

status: asr_request_invalid_data

The value in request->data are not valid base64-encoded data.

Example

1
2
3
4
{
  "status": "asr_request_invalid_data",
  "message": "Invalid base64-encoded data"
}

InvalidUriError

status: asr_request_invalid_uri

The value in request->uri does not refer to valid audio data. This might occur if the URI is not accessible by the ASR service.

Example

1
2
3
4
5
6
7
{
  "status": "asr_request_invalid_uri",
  "message": "The URI is not supported",
  "context": {
    "uri": "string"
  }
}

Context

Name Type Optional Description
uri string false The requested URI

JobCancellationError

status: job_cancellation_failure

Unable to cancel a job because it is already in progress.

Example

1
2
3
4
5
6
7
{
  "status": "job_cancellation_failure",
  "message": "Unable to cancel job 2fec34e1efb146f7a7431cb35b64550d because it is already in progress",
  "context": {
    "job_id": "2fec34e1efb146f7a7431cb35b64550d"
  }
}

Context

Name Type Optional Description
job_id string(uuid) false Identifier of the job

JobNotFoundError

status: job_not_found

Example

1
2
3
4
5
6
7
{
  "status": "job_not_found",
  "message": "Job 2fec34e1efb146f7a7431cb35b64550d not found",
  "context": {
    "job_id": "2fec34e1efb146f7a7431cb35b64550d"
  }
}

Context

Name Type Optional Description
job_id string(uuid) false Identifier of the job

NoAudioProvidedError

status: asr_request_no_audio_data

No audio provided for the ASR request

Example

1
2
3
4
{
  "status": "asr_request_no_audio_data",
  "message": "No audio provided for the ASR request"
}

NotEnoughQuotaError

status: quota_insufficient

The base class to inherit errors from. The subclass is automatically generated as a Pydantic Model which can be returned as HTTP responses.

Example

1
2
3
4
5
6
7
8
{
  "status": "quota_insufficient",
  "message": "Insufficient quota. Current quota: {current} < {required}",
  "context": {
    "current": 0,
    "required": 0
  }
}

Context

Name Type Optional Description
current integer false The amount of quota you currently have
required integer false Required amount of quota for this operation

OutOfQuotaError

status: quota_empty

The base class to inherit errors from. The subclass is automatically generated as a Pydantic Model which can be returned as HTTP responses.

Example

1
2
3
4
{
  "status": "quota_empty",
  "message": "Out of quota"
}

UnauthorizedError

status: auth_unauthorized

The request is not authorized.

Example

1
2
3
4
{
  "status": "auth_unauthorized",
  "message": "Unauthorized"
}

UnsupportedMediaTypeError

status: asr_request_unsupported_media_type

The value in request->uri refers to a file of unsupported media type.

Example

1
2
3
4
5
6
7
{
  "status": "asr_request_unsupported_media_type",
  "message": "URI contains unsupported media type",
  "context": {
    "uri": "string"
  }
}

Context

Name Type Optional Description
uri string false The requested URI

RequestValidationError

status: request_validation_error

Returned when the request payload failed validation.

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
{
  "status": "request_validation_error",
  "message": "Failed to validate request",
  "context": [
    {
      "location": [
        "body",
        "config",
        "model"
      ],
      "message": "field required",
      "status": "value_error.missing"
    }
  ]
}

Context

Name Type Optional Description
Context [object] true -
Parameter object true -
» location [string] false Location of the error
» message string false The description of the error
» status string false The type of validation error that occurred

InternalServerError

status: internal_server_error

An unexpected error occurred. Please contact our support at support@prosa.ai.

Example

1
2
3
4
{
  "status": "internal_server_error",
  "message": "Internal Server Error"
}