Skip to main content

Voiceprint Comparison: get result

GET 

/api/technology/speaker-identification-voiceprint-comparison/:task_id

Retrieves task result for comparison of voiceprints.

How voiceprint comparison result is arranged

See Voiceprint comparison task request documentation for details on how the request is arranged.

The result of a voiceprint comparison task is a matrix of scores represented as a single vector in row-major order, expressed as follows:

[
vp_a_1 x vp_b_1, vp_a_2 x vp_b_1, ..., vp_a_M x vp_b_1,
vp_a_1 x vp_b_2, vp_a_2 x vp_b_2, ..., vp_a_M x vp_b_2,
...,
vp_a_1 x vp_b_N, vp_a_2 x vp_b_N, ..., vp_a_M x vp_b_N
]

where M = size of voiceprints_a set (columns_count) and N = size of voiceprints_b set (rows_count). In other words, going through the list of scores is the equivalent of traversing the matrix row by row.

The result also contains the number of matrix rows and columns. The columns_count and rows_count correspond to comparison's input request parameters voiceprints_a and voiceprints_b respectively.

For example, the following result data in the response:

{
"scores": {
"columns_count": 3,
"rows_count": 3,
"values": [
3, 1, 2,
8, 2, -6,
11, 2, 7
]
}
}

represent the following result matrix:

voiceprints_a set
vp_a_1vp_a_2vp_a_3
voiceprints_b setvp_b_1312
vp_b_282-6
vp_b_31127

Request

Path Parameters

    task_id uuidrequired

    ID of the task to get result of

Header Parameters

    x-correlation-id X-Correlation-Id

    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.

    x-request-id X-Request-Id

    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

Result response of Voiceprint Comparison task.

The response body contains task info in the task field. Depending on the task processing outcome, either result or error field is populated.

Schema

    task

    object

    required

    task_id uuidrequired
    state TaskInfoState (string)required

    Possible values: [pending, running, rejected, failed, done]

    result

    object

    anyOf

    scores

    object

    required

    Matrix of floating point score values formatted as a list of rows in row-major order.

    rows_count Rows Count (integer)required

    Possible values: >= 1

    Number of rows in the matrix

    columns_count Columns Count (integer)required

    Possible values: >= 1

    Number of columns in the matrix

    values float[]required

    Possible values: >= 1

    error

    object

    anyOf

    Result schema for a failed or rejected task.

    type TaskErrorType (string)required

    Possible values: [internal, task.validation-error]

    Machine-readable error type.

    message Message (string)required

    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.

  • Array [

  • location

    object[]

    required

    Location of the error.

  • Array [

  • anyOf

    integer

  • ]

  • message Message (string)required

    Human-readable summary of the error.

    type Type (string)required

    Machine-readable error type.

    context

    object

    Optional key-value object with additional context

    property name*

    object

    anyOf

    string

  • ]

Loading...