GET /speech/asrlive
Performs asynchronous live speech recognition using websocket
This resource establish a websocket with client and receives audio data using websocket. It will start transcribing the audio using state-of-the-art deep neural networks and returns the partial results on the websocket. This endpoint is designed for transcription of stream audio data upto 15 minute. It will send back partial (status=partial) result everytime it transcribes an endpoint. After client sends the close signal, it will receive a ASRResponseBody with status=done. Token should be passed in query string as jwt.
Using config object you can can specify audio configs such as audioEncoding and sampleRateHertz. We will support different languages so you can choose the languageCode. Using asrModel and languageModel in config you can use customized models. Refer to ASRLongRuning API for long audio speech recognition. Refer to ASR API for fast recognition for short audio files.
Responses
-
• 200
OK.
-
• 400
This response means that server could not understand the request due to invalid syntax.
-
• 401
Authentication is needed to get requested response. This is similar to 403, but in this case, authentication is possible.
-
• 403
Client does not have access rights to the content so server is rejecting to give proper response.
-
• 405
The request method is known by the server but has been disabled and cannot be used.
-
• 415
The media format of the requested data is not supported by the server, so the server is rejecting the request.
-
• 429
The user has sent too many requests in a given amount of time ("rate limiting").
-
• 500
The server has encountered a situation it doesn't know how to handle.
curl \
-X GET https://api.amerandish.com/v1/speech/asrlive?jwt=api_token_value
{
"transcriptionId": "string",
"duration": 42.0,
"inferenceTime": 42.0,
"status": "queued",
"results": [
{
"transcript": "string",
"confidence": 42.0,
"words": [
{
"startTime": 42.0,
"endTime": 42.0,
"word": "string",
"confidence": 42.0
}
]
}
]
}
{
"code": 400,
"message": "Bad Request. Invalid JSON object."
}
{
"code": 401,
"message": "Unautherized. Invalid Authorization Token."
}
{
"code": 403,
"message": "Forbidden. Do not have access right to resource."
}
{
"code": 405,
"message": "Method Not Allowed."
}
{
"code": 415,
"message": "Unsupported Media Type. Please change requested media type."
}
{
"code": 429,
"message": "Too Many Requests. Your request is blocked due to exceeding rate limiting."
}
{
"code": 500,
"message": "Internal Server Error. Please retry later."
}