Path: /request
Method: POST
Go to "Create a request" endpoint documentation
Headers
apiKey string required
apiKey string requiredA 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
service_name string requiredThe service you want to use.
Possible values for recognition
- AMAZON
- MICROSOFT
- REVAI
- SPEECHMATICS
Possible values for alignment
- SPEECHMATICS
For example,
"service_name": "AMAZON"
request_type string required
request_type string requiredThe type of the request, corresponding to the job you want to do.
Possible values
- RECOGNITION
- ALIGNMENT
For example,
"request_type": "RECOGNITION"
input string required
input string requiredThe 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
data_uri string requiredA 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
region stringThis 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
config configuration objectThis 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]
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
get_wer booleanIndicates 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
endpoint stringOptionnal 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
request_id string requiredA 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
user_id string requiredA unique identifier assigned to each user. This parameter is equal to your API key.
service_name string required
service_name string requiredThe service you want to use.
Possible values
- AMAZON
- MICROSOFT
- REV_AI
- SPEECHMATICS
request_type string required
request_type string requiredThe type of the request, corresponding to the job you want to do.
Possible values
- RECOGNITION
- ALIGNMENT
request_status string required
request_status string requiredThe status of the request.
Possible values
- PENDING
- IN PROGRESS
- DONE
- ERROR
data_uri string
data_uri stringThe 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
endpoint stringOptionnal 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
creation_time stringDate 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"
}