📘

Path: /request
Method: POST

  1. Headers
  2. Body
  3. Response

Go to "Create a request" endpoint documentation


Headers

apiKey string required

A valid Hooho API key, with enough credit to perform the request.

For example,

curl --request POST \
  --url https://api.hooho.io/request \
  --header 'apiKey: your_api_key'
  --data '
{
  "service_name": "AMAZON",
  "request_type": "RECOGNITION",
  "input": {
    "audio": {
      "data": {
        "data_uri": "https://my-audio-bucket.s3.eu-west-3.amazonaws.com/example.wav"
      }
    }
  }
}
'

Body

service_name string required

The service you want to use.

Possible values for recognition

  • AMAZON
  • GOOGLE
  • MICROSOFT
  • REVAI
  • SPEECHMATICS

Possible values for alignment

  • SPEECHMATICS

For example,

"service_name": "AMAZON"

request_type string required

The type of the request, corresponding to the job you want to do.

Possible values

  • RECOGNITION
  • ALIGNMENT

For example,

"request_type": "RECOGNITION"

input string required

The input for a request will vary depending on the service and the request type.

The input must be of the following form

{
	"audio": {
    "data": {
      "data_uri": string,
      "region": string
    },
    "config": {
      ...
    }
  },
  "wer": {
    "transcripts": array[string],
    "get_wer": boolean
  }
}

data_uri string required

A URI pointing to the file you want to process. Look at the requirements on this file.
For example,

"data_uri": "https://my-audio-bucket.s3.eu-west-3.amazonaws.com/example.wav"

region string

This parameter is specific to Amazon
Indicates the region in which your file is stored.
Amazon Transcribe requires your file to be in a s3 bucket (see this) in the same region as the Amazon Transcribe client. For us to be able to run the client in the correct region, you can directly give the identifier of the region to us.
If you don't, we will try to get it from the URL you gave us. If we can't find it, we will try in the eu-west-3 (Paris) region.

Possible values
us-east-1, us-east-2, us-west-1, us-west-2, ap-east-1, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, cn-north-1, cn-northwest-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, me-south-1, sa-east-1, us-gov-east-1, us-gov-west-1

For example,

"region": "us-west-2"

config configuration object

This parameter should be changed based on the request you want to make. For more details on the available parameters, go to the parameters table
Contains the necessary parameters that will be passed down to the speech service to process your file.

For example, for an Amazon speech recognition request,

"config": {
	"language_code": "en-US",
	"media_format": "wav",
	"sample_rate_hertz": 8000,
	"max_alternatives": 1,
	"alternative_language_codes": [],
	"audio_channel_count": 2,
	"enable_speaker_diarization": true,
	"diarization_speaker_count": 2,
	"content_redaction": "redacted_and_unredacted"
}

transcripts array[string]

Reference transcripts used to calculate the WER (Word Error Rate) with the result of your request.
Each reference transcript will be compared to each recognized transcript to determine the quality of the transcription.

For example,

"transcripts": [
  "The second sentence has a spelling error that needs correction.",
  "A second sentence has a spelling error, that needs correction."
]

get_wer boolean

Indicates whether the WER should be calculated and returned in the response. If you don't specify this parameter or set it to false, the reference transcripts you might send will be ignored.

Possible values
true, false

For example,

"get_wer": true

endpoint string

Optionnal endpoint that will be called when the status of the request changes. A message similar to the GET /request/{requestId} response will be sent.

For example,

"endpoint": "http://my_endpoint.io"

Response

request_id string required

A unique identifier assigned at the creation of the request. You will be able to use this ID to interact with the request it refers to.


user_id string required

A unique identifier assigned to each user. This parameter is equal to your API key.


service_name string required

The service you want to use.

Possible values

  • AMAZON
  • GOOGLE
  • MICROSOFT
  • REV_AI
  • SPEECHMATICS

request_type string required

The type of the request, corresponding to the job you want to do.

Possible values

  • RECOGNITION
  • ALIGNMENT

request_status string required

The status of the request.

Possible values

  • PENDING
  • IN PROGRESS
  • DONE
  • ERROR

data_uri string

The data URI you provided to Hooho, that gives access to the file you want to process (which should follow these requirements)
While this parameter is returned, it is always undefined at this point of the request.


endpoint string

Optionnal endpoint that will be called when the status of the request changes. A message similar to the GET /request/{requestId} response will be sent.


creation_time string

Date of the creation of the request at the format dd/MM/yyyy hh:mm

For example,

{
  "request_id": "2c29b988-1a24-45b4-a096-2cec2e887aa6",
  "user_id": "your_api_key",
  "service_name": "AMAZON",
  "request_type": "RECOGNITION",
  "request_status": "PENDING",
  "endpoint": "http://my_endpoint.io",
  "creation_time": "18/08/2021 13:52"
}

Go to "Create a request" endpoint documentation