Speaker Diarization: get result
GET/api/technology/speaker-diarization/:task_id
Retrieve the result of a Speaker Diarization task.
In case of a multi-channel audio on input, each channel result contains unique speaker IDs.
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 Speaker Diarization 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 (auto)
- task done
- task rejected
- task failed
Schema
task objectrequired
result object
error object
{
"task": {
"task_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"state": "pending"
},
"result": {
"channels": [
{
"channel_number": 0,
"speakers_count": 0,
"segments": [
{
"speaker_id": 0,
"start_time": 0,
"end_time": 0
}
]
}
]
},
"error": {
"type": "internal",
"message": "string",
"detail": [
{
"location": [
0,
"string"
],
"message": "string",
"type": "string",
"context": {}
}
]
}
}
Speaker Diarization task done
{
"task": {
"task_id": "123e4567-e89b-12d3-a456-426614174000",
"state": "done"
},
"result": {
"channels": [
{
"channel_number": 0,
"speakers_count": 3,
"segments": [
{
"speaker_id": 0,
"start_time": 3.43,
"end_time": 7.4
},
{
"speaker_id": 1,
"start_time": 20.21,
"end_time": 24.98
},
{
"speaker_id": 2,
"start_time": 25.63,
"end_time": 34.29
},
{
"speaker_id": 1,
"start_time": 36.87,
"end_time": 41.87
},
{
"speaker_id": 0,
"start_time": 53.49,
"end_time": 60.43
},
{
"speaker_id": 2,
"start_time": 61.43,
"end_time": 74.32
},
{
"speaker_id": 0,
"start_time": 80.07,
"end_time": 86.43
},
{
"speaker_id": 1,
"start_time": 97.32,
"end_time": 103.19
},
{
"speaker_id": 0,
"start_time": 104.43,
"end_time": 111.73
}
]
},
{
"channel_number": 1,
"speakers_count": 2,
"segments": [
{
"speaker_id": 3,
"start_time": 8.93,
"end_time": 12.43
},
{
"speaker_id": 4,
"start_time": 14.89,
"end_time": 19.18
},
{
"speaker_id": 4,
"start_time": 24.78,
"end_time": 27.02
},
{
"speaker_id": 3,
"start_time": 43.69,
"end_time": 48.81
},
{
"speaker_id": 4,
"start_time": 87.43,
"end_time": 90.18
},
{
"speaker_id": 3,
"start_time": 92.4,
"end_time": 96.32
}
]
}
]
}
}
Speaker Diarization task rejected
{
"task": {
"task_id": "123e4567-e89b-12d3-a456-426614174000",
"state": "rejected"
},
"error": {
"type": "task.validation-error",
"message": "Task validation error.",
"detail": []
}
}
Speaker Diarization 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 (auto)
- request.invalid
Schema
Machine-readable error type.
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
]
Human-readable summary of the error.
detail object[]
{
"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 (auto)
- not found
Schema
Machine-readable error type.
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
]
Human-readable summary of the error.
detail object[]
{
"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 (auto)
- request validation error
Schema
Machine-readable error type.
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
]
Human-readable summary of the error.
detail object[]
{
"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
- application/json
- Schema
- Example (auto)
- request.rate-limit-exceeded
Schema
Machine-readable error type.
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
]
Human-readable summary of the error.
detail object[]
{
"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": []
}
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP