Speech to Text: get result
GET/api/technology/speech-to-text/:task_id
Retrieve the result of a Speech to Text task.
Request
Path Parameters
ID of the task to get result of
Header Parameters
Correlation ID is a special type of request ID which is unique over a series of requests and responses, identifying a transaction in a distributed system. Correlation ID will be generated if not provided.
In distributed system architecture (microservices architecture) it is a unique ID of request and response combination throughout all components of a distributed system. Request ID will be generated if not provided.
Responses
- 200
- 400
- 404
- 422
- 429
Result response of Speech to Text task.
The response body contains task info in the task
field. Depending on the task processing outcome, either result
or error
field is populated.
- application/json
- Schema
- Example (from schema)
- task done
- task rejected
- task failed
Schema
- SpeechToTextPhonexiaResult
Array [
Array [
]
]
Array [
Array [
]
]
- TaskErrorResult
Array [
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD3
- MOD4
]
task
object
required
Possible values: [pending
, running
, rejected
, failed
, done
]
result
object
anyOf
Result of Speech to Text task.
one_best
object
required
One-best result of Speech to Text task.
segments
object[]
required
Channel number (0-base indexed).
Start time of the segment
End time of the segment
Transcription of the whole segment
words
object[]
required
Detailed per-word segmentation of the segment
Start time of the word (seconds)
End time of the word (seconds)
Transcription of the word
additional_words
object[]
required
Additional words extending the built-in vocabulary after having been processed by the technology. There are two possible results of processing. If you provided a spelling without an explicit pronunciation, the technology has generated a pronunciation for you. Alternatively, if you provided a new pronunciation for a word that was already part of the model's vocabulary, the result also contains built-in pronunciations along with the new one.
The written form of the word described by graphemes.
pronunciations
object[]
required
The word's pronunciation described by phonemes.
If false
, this pronunciation of the word is known to the language model. If true
, it is a new pronunciation that has extended the model's abilities.
error
object
anyOf
Result schema for a failed or rejected task.
Possible values: [internal
, task.validation-error
]
Machine-readable error type.
Human-readable summary of the error.
detail
object[]
Optional higher level of detail. It is intended for better understanding of the error or advanced error handling.
location
object[]
required
Location of the error.
anyOf
integer
string
Human-readable summary of the error.
Machine-readable error type.
context
object
Optional key-value object with additional context
property name*
object
anyOf
string
integer
number
boolean
{
"task": {
"task_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"state": "pending"
},
"result": {},
"error": {}
}
Speech to Text task done
{
"task": {
"task_id": "123e4567-e89b-12d3-a456-426614174000",
"state": "done"
},
"result": {
"one_best": {
"segments": [
{
"channel_number": 0,
"start_time": 0,
"end_time": 1,
"text": "hello world",
"words": [
{
"start_time": 0,
"end_time": 0.5,
"text": "hello"
},
{
"start_time": 0.5,
"end_time": 1,
"text": "world"
}
]
}
]
},
"additional_words": [
{
"spelling": "world",
"pronunciations": [
{
"pronunciation": "w @r l d",
"out_of_vocabulary": false
},
{
"pronunciation": "w O l d",
"out_of_vocabulary": true
}
]
}
]
}
}
Speech to Text task rejected
{
"task": {
"task_id": "123e4567-e89b-12d3-a456-426614174000",
"state": "rejected"
},
"error": {
"type": "task.validation-error",
"message": "Task validation error.",
"detail": []
}
}
Speech to Text task failed
{
"task": {
"task_id": "123e4567-e89b-12d3-a456-426614174000",
"state": "failed"
},
"error": {
"type": "internal",
"message": "Service error.",
"detail": []
}
}
Request payload data was invalid and could not be parsed.
- application/json
- Schema
- Example (from schema)
- request.invalid
Schema
Array [
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD3
- MOD4
]
Possible values: [internal
, resource.not-found
, method.invalid
, request.forbidden
, request.invalid
, request.validation-error
, request.rate-limit-exceeded
, request.size-limit-exceeded
, storage.capacity-exceeded
]
Machine-readable error type.
Human-readable summary of the error.
detail
object[]
Optional higher level of detail. It is intended for better understanding of the error or advanced error handling.
location
object[]
required
Location of the error.
anyOf
integer
string
Human-readable summary of the error.
Machine-readable error type.
context
object
Optional key-value object with additional context
property name*
object
anyOf
string
integer
number
boolean
{
"type": "internal",
"message": "string",
"detail": [
{
"location": [
0,
"string"
],
"message": "string",
"type": "string",
"context": {}
}
]
}
Invalid request.
{
"type": "request.invalid",
"message": "Invalid request.",
"detail": []
}
The requested task does not exist.
The provided task_id
may be wrong or the task may have expired already.
- application/json
- Schema
- Example (from schema)
- not found
Schema
Array [
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD3
- MOD4
]
Possible values: [internal
, resource.not-found
, method.invalid
, request.forbidden
, request.invalid
, request.validation-error
, request.rate-limit-exceeded
, request.size-limit-exceeded
, storage.capacity-exceeded
]
Machine-readable error type.
Human-readable summary of the error.
detail
object[]
Optional higher level of detail. It is intended for better understanding of the error or advanced error handling.
location
object[]
required
Location of the error.
anyOf
integer
string
Human-readable summary of the error.
Machine-readable error type.
context
object
Optional key-value object with additional context
property name*
object
anyOf
string
integer
number
boolean
{
"type": "internal",
"message": "string",
"detail": [
{
"location": [
0,
"string"
],
"message": "string",
"type": "string",
"context": {}
}
]
}
Task not found.
{
"type": "resource.not-found",
"message": "Resource not found.",
"detail": [
{
"location": [
"root"
],
"message": "Task not found.",
"type": "task.not-found",
"context": {
"task_id": "123e4567-e89b-12d3-a456-426614174000"
}
}
]
}
Error during validation of request payload data occurred.
- application/json
- Schema
- Example (from schema)
- request validation error
Schema
Array [
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD3
- MOD4
]
Possible values: [internal
, resource.not-found
, method.invalid
, request.forbidden
, request.invalid
, request.validation-error
, request.rate-limit-exceeded
, request.size-limit-exceeded
, storage.capacity-exceeded
]
Machine-readable error type.
Human-readable summary of the error.
detail
object[]
Optional higher level of detail. It is intended for better understanding of the error or advanced error handling.
location
object[]
required
Location of the error.
anyOf
integer
string
Human-readable summary of the error.
Machine-readable error type.
context
object
Optional key-value object with additional context
property name*
object
anyOf
string
integer
number
boolean
{
"type": "internal",
"message": "string",
"detail": [
{
"location": [
0,
"string"
],
"message": "string",
"type": "string",
"context": {}
}
]
}
Request validation error.
{
"type": "request.validation-error",
"message": "Request validation error.",
"detail": []
}
Request rate limit exceeded.
The request may be retried after a while. The following response headers may be checked for details: retry-after
, x-ratelimit-limit
, x-ratelimit-remaining
, x-ratelimit-reset
.
Response Headers
retry-after
number
Header indicates how long the user agent should wait before making a follow-up request.
x-ratelimit-limit
number
Size of the current rate limiting window.
x-ratelimit-remaining
number
Remaining number of requests in the current rate limiting window.
x-ratelimit-reset
number
Time at which the current rate limiting window resets (in UTC epoch).
- application/json
- Schema
- Example (from schema)
- request.rate-limit-exceeded
Schema
Array [
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD3
- MOD4
]
Possible values: [internal
, resource.not-found
, method.invalid
, request.forbidden
, request.invalid
, request.validation-error
, request.rate-limit-exceeded
, request.size-limit-exceeded
, storage.capacity-exceeded
]
Machine-readable error type.
Human-readable summary of the error.
detail
object[]
Optional higher level of detail. It is intended for better understanding of the error or advanced error handling.
location
object[]
required
Location of the error.
anyOf
integer
string
Human-readable summary of the error.
Machine-readable error type.
context
object
Optional key-value object with additional context
property name*
object
anyOf
string
integer
number
boolean
{
"type": "internal",
"message": "string",
"detail": [
{
"location": [
0,
"string"
],
"message": "string",
"type": "string",
"context": {}
}
]
}
Rate limit exceeded.
{
"type": "request.rate-limit-exceeded",
"message": "Rate limit exceeded: 1 per 5 second.",
"detail": []
}