This document contains the reference documentation for Phonexia Speech Engine interface, version 3.17.3. Interface is designed for developers who want to integrate Phonexia speech technologies into their own desktop or web applications. API documentations for previous versions (formally named Phonexia REST API until version 3.2.1) are available here.

Introduction

Structure of queries

Phonexia Speech Engine interface provides access to operations via the URI path. The client application must create and submit a request and then receive and analyze the response from the server. Nowadays Phonexia uses the REST-like interface for entire communication protocol XML (or JSON) and standard HTTP methods GET, POST, DELETE and PUT.

Commands are divided into two basic types - synchronous and asynchronous. When request for a synchronous operation is sent, response is always in the reply. In terms of an asynchronous request an asynchronous request ID is sent back to the client. With this asynchronous request ID, client can monitor the state of asynchronous requests (Asynchronous request).

Response format

Response format can be specified in request header or in request query.

  • Setting response format in request HTTP header in parameter Accept (allowed values are application/json, application/xml, application/*, */*, *). If use asterisk notation, JSON will be used. Bad value causes HTTP error 406 (not acceptable)
  • Setting response format in request query in parameter format (allowed values are json or xml). Bad value causes HTTP error 400 (bad request)

Settings in request query has higher priority. If neither query or accepted property is not set, response format will be JSON.

Asynchronous request

Asynchronous request is used for time-consuming task processing. Each asynchronous request is marked with the asynchronous keyword in this documentation. Server allows two ways of receiving asynchronous request result:

Polling

  • Client sends an asynchronous request. For example:

    GET /technologies/speakerid?path=/recording.wav&speaker_model=david&model=S

  • Server returns a 202 HTTP status to the client. In header of the response, using the "Location" parameter, server imparts URI, which could be queried by client, to find out the status of the asynchronous operation.
    < HTTP/1.1 202 Accepted
    < Date: Sat, 06 Aug 2016 09:11:57 GMT
    < Connection: Close
    < Content-Type: application/json
    < Location: /pending/54048266-b694-440a-8a9e-0cef5668efea
    {
      "result": {
        "version": 2,
        "name": "PendingInfoResult",
        "info": {
          "id": "54048266-b694-440a-8a9e-0cef5668efea",
          "state": "waiting",
          "priority": 50
        }
      }
    }

    If result of asynchronous request is already in cache, final reply (HTTP status 200) is returned instead of redirecting to GET /pending/{id}.

  • Client repeatedly queries the status of the asynchronous operation until it obtains 303 HTTP status with URI of final result in "Location" parameter in header of the response. To obtain the latest asynchronous operation status, use pending request:

    GET /pending/54048266-b694-440a-8a9e-0cef5668efea

    Example response (operation has not been completed yet):

    < HTTP/1.1 200 OK
    < Date: Sat, 06 Aug 2016 09:12:00 GMT
    < Connection: Close
    < Content-Type: application/json
    {
      "result": {
        "version": 2,
        "name": "PendingInfoResult",
        "info": {
          "id": "54048266-b694-440a-8a9e-0cef5668efea",
          "state": "running",
          "priority": 50
        }
      }
    }

    Example response (operation has been completed):

    < HTTP/1.1 303 See Other
    < Date: Sat, 06 Aug 2016 09:12:03 GMT
    < Connection: Close
    < Content-Type: application/json
    < Location: /done/54048266-b694-440a-8a9e-0cef5668efea
    {
      "result": {
        "version": 2,
        "name": "PendingInfoResult",
        "info": {
          "id": "54048266-b694-440a-8a9e-0cef5668efea",
          "state": "finished",
          "priority": 50
        }
      }
    }
  • Client obtains the request result. To obtain the final asynchronous operation result, use done request:

    GET /done/54048266-b694-440a-8a9e-0cef5668efea

    < HTTP/1.1 200 OK
    < Date: Sat, 06 Aug 2016 09:12:06 GMT
    < Connection: Close
    < Content-Type: application/json
    {
      "result": {
        "version": 2,
        "name": "SpeakerIdentificationMultiResult",
        "model": "S",
        "speaker_group": "",
        "calibration_set": "",
        "max_fa_rate": 0,
        "results": [
          {
            "file": "/recording.wav",
            "speaker_model": "david",
            "channel_scores": [
              {
                "channel": 0,
                "scores": [
                  {
                    "score": -13.1162815
                  }
                ]
              }
            ]
          }
        ]
      }
    }
  • The result will be available for a limited time (by default 60 seconds, can be configured on server). Then the result will expire and requests GET /done/{id}, GET /pending/{id} with specific ID will return error (HTTP status 404). Result also will not be available after GET /done/{id} is successfully called.

WebSocket

Server allows open WebSocket for receiving result without repeated sending of GET /pending/{id} request.

  • Client sends an asynchronous request. For example:

    GET /technologies/speakerid?path=/recording.wav&speaker_model=david&model=S

  • Server returns a 202 HTTP status to the client. In header of the response, using the "Location" parameter, server imparts URI, which could be queried by client, to find out the status of the asynchronous operation.
    < HTTP/1.1 202 Accepted
    < Date: Sat, 06 Aug 2016 09:11:57 GMT
    < Connection: Close
    < Content-Type: application/json
    < Location: /pending/54048266-b694-440a-8a9e-0cef5668efea
    {
      "result": {
        "version": 2,
        "name": "PendingInfoResult",
        "info": {
          "id": "54048266-b694-440a-8a9e-0cef5668efea",
          "state": "waiting",
          "priority": 50
        }
      }
    }

    If result of asynchronous request is already in cache, final reply (HTTP status 200) is returned instead of redirecting to GET /pending/{id}.

  • Client sends a WebSocket handshake request on link given in Location of previous response header. WebSocket handshake request should contain following parameters in header: Upgrade, Connection, Sec-WebSocket-Version, Sec-WebSocket-Key and session parameter (X-SessionID) or basic authorization (Authorization).
    GET /pending/54048266-b694-440a-8a9e-0cef5668efea HTTP/1.1
    Host: server.example.com
    Upgrade: websocket
    Connection: Upgrade
    Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==
    Sec-WebSocket-Version: 13
    X-SessionID: 258f505c-a6fa-4c3f-8a87-b048874ac6aa
    Accept: application/json
  • WebSocket is opened until asynchronous operation is finished. When asynchronous operation finishes, result is sent through WebSocket's message and WebSocket is closed. For more info see also GET /pending/{id}.

Webhook

The server allows sending HTTP callback (webhook) when the asynchronous request is done. URL of the callback is specified in asynchronous request HTTP header in parameter X-WebhookTarget.

  • The client sends an asynchronous request and specifies callback target in HTTP header (X-WebhookTarget). For example:

    GET /technologies/speakerid?path=/recording.wav&speaker_model=david&model=S

    Complete example HTTP request header will look:
    > GET /technologies/speakerid?path=/recording.wav&speaker_model=david&model=S HTTP/1.1
    > Host: server.example.com:8600
    > Accept: application/json
    > X-SessionID: 27508c43-1f48-46c9-bdaa-f00cec181444
    > X-WebhookTarget: http://webhook-target.example.com:8601
  • The server returns a 202 HTTP status to the client. The header of the response contains parameter X-TaskID instead of Location.
    < HTTP/1.1 202 Accepted
    < Date: Wed, 29 Nov 2017 17:24:00 GMT
    < Connection: Close
    < Content-Type: application/json
    < X-TaskID: 1edbede9-c5af-4ec4-b457-81ba01a8472d
    {
      "result": {
        "version": 2,
        "name": "PendingInfoResult",
        "info": {
          "id": "1edbede9-c5af-4ec4-b457-81ba01a8472d",
          "state": "waiting",
          "priority": 50
        }
      }
    }

    Webhook callback is now registered and the result of the asynchronous request will be delivered to the webhook target address when it is done.

  • When the asynchronous request is done, server sends callback request with HTTP POST method. HTTP header of callback request contains parameter X-TaskID. This Task ID is the same as it is returned in reply of asynchronous request.

    The server expects HTTP status 2xx as reply. Any other information returned in the request headers or request body is ignored. All response codes outside this range will indicate that webhook was not recieved. In case of webhook fail it is still possible to get result by request GET /done/{id}.

    For asynchronous requests which has used Webhook is not possible to use WebSocket or Polling.


Example:

PHP + JS Asynchronous request example (polling)

This example demonstrates work with asynchronous requests. Requires jQuery v2+ and PHP 5.3.4 (or later).

Due to long time executing of asynchronous requests it is not appropriate to implement waiting cycle in PHP. In this sample the waiting cycle is implemented on client side (JavaScript). PHP server is used only for request forwarding from JS client to Phonexia Speech Engine.

File: example.php

<?php
$SERVER_ADDRESS = 'http://127.0.0.1:8600';
$SESSION_ID = '9b9de740-eb30-49c0-a2ff-2548491c328a'; // this example does not deal with user authentication. 

$options = array(
  'http' =>
  array (
    'method'          => $_SERVER['REQUEST_METHOD'],
    'header'          => 'X-SessionID: ' . $SESSION_ID . "\r\n" .
                         'Content-Type: application/json',
    'content'         => $_POST['content'],
    'max_redirects'   => 10,
    'follow_location' => 1,
    'ignore_error'    => true,
  )
);

$context = stream_context_create($options);

/** Get response **/
$response_body = @file_get_contents($SERVER_ADDRESS . $_GET['request'], false, $context);
$response_headers = isset($http_response_header) ? $http_response_header : array();

/** Set HTTP 500 if error ocurred **/
if (empty($response_headers) && !$response_body) {
  $response_headers[] = 'HTTP/1.0 500 Internal server error';
}

/** Set response headers **/
foreach ($response_headers as $header_string) {
  header($header_string);
}

/** Print response body **/
if (!is_null($response_body)) {
  print $response_body;
}

There are helper functions for working with asynchronous requests in JavaScript. Method async_request() begins asynchronous request. Object options and using example is shown below. Method pending() is used in async_request() and performs waiting cycle for result.

File: example.js

// example Asynchronous request support functions
var PENDING_TIMEOUT = 300; // 0.3 sec - waiting between pending requests

function async_request(options)
{
  // create request address from options.technology_params
  var request = options.uri_path + '?';
  for (var param in options.uri_params) {
    if (options.uri_params.hasOwnProperty(param)) {
      request += param + '=' + options.uri_params[param] + '&';
    }
  }

  // send ajax
  $.ajax({
    url: 'example.php?request=' + encodeURIComponent(request),
    method: options.method,
    data: { 
      request: request,
      content: (options.content !== undefined ? JSON.stringify(options.content) : "")
    },
    dataType: 'json',
    success: function(response) {
      if (is_pending(response)) { // result is not yet - do pending requests cycle
        pending(response.result.info.id, options.callback);
      } else { // result is available
        options.callback(response);
      }
    },
    error: function() {
      alert('Unable to get result.');
    }
  });
}

function is_pending(response) {
  return response.result.name == 'PendingInfoResult';
};

function pending(id, callback) {
  var pending_worker = function() {
    $.ajax({
      url: 'example.php',
      method: 'GET',
      data: { 
        request: '/pending/' + id
      },
      dataType: 'json',
      success: function(response) {
        if (is_pending(response)) { // result is not yet available
          setTimeout(pending_worker, PENDING_TIMEOUT);
        } else { // result is available
          callback(response);
        }
      },
      error: function() {
        alert('Unable to get pending result.');
      }
    });
  };
  pending_worker();
};

There is specific use case for Speaker Identification technology. Other asynchronous requests can be achieved by setting object options.

Object options paramaters description:

  • Parameter method determines HTTP Method of request (except request for preparing calibration set is usually GET)
  • Parameter uri_path determines path in url without parameters (e.g. /technologies/genderid)
  • Parameter uri_params contains object with parameters for specific technology (most often path, model and other)
  • Parameter callback contains function, which is called after asynchronous request is completed and result can be obtained from parameter result.

Speaker Identification asynchronous request example:

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="example.js"></script>
<script type="text/javascript">

var options = {
  method: 'GET',
  uri_path: '/technologies/speakerid',
  uri_params: {
    path: '/julia.wav',
    model: 'L',
    speaker_model: 'julia'
  },
  callback: function(result)
  {
    console.log(result); // work with result
    $('#output').text(JSON.stringify(result));
  }
}; 

$(function() {
  async_request(options);
});

</script>
<body>
<pre id="output"><pre>
</body>
</html>

Task prioritization

Phonexia Speech Engine allows configure priority of each asynchronous task (except streams). Priority is defined by number from 0 (highest priority) to 99 (lowest priority). Tasks are processed according to their priorities. If task with highest priority requires technology which is not available at that time, the task with lower priority may be launched. If two or more tasks have same priority, FIFO approach is used. Only users with prioritize role can change priority of tasks otherwise default priority is used. Default priority is 50 (it can be changed in configuration, you can use GET /server/info request to check current value).

Note: If user doesn't have role prioritize the task is created with default priority without any error.

Prioritization can be disabled in configuration (use GET /server/info request to check if server supports it).

Priority is set by HTTP header X-Priority:

> GET /technologies/speakerid?path=/recording.wav&speaker_model=david&model=S HTTP/1.1
> Host: server.example.com:8600
> Accept: application/json
> X-SessionID: 27508c43-1f48-46c9-bdaa-f00cec181444
> X-Priority: 28
{
  "result": {
    "version": 2,
    "name": "PendingInfoResult",
    "info": {
      "id": "54048266-b694-440a-8a9e-0cef5668efea",
      "state": "waiting",
      "priority": 28
    }
  }
}

Priority of the task is returned in PendingInfoResult result. You can also use GET /tasks to check tasks priorities.

Authentication

Authentication is the mechanism of associating an incoming request with a set of identifying credentials, such as the user the request came from, or the token X-SessionID as the signature of requests. The permission and throttling policies can then use these credentials to determine if the request should be permitted.

Phonexia Speech Engine provides two authentication methods: Token authentication and HTTP basic authentication.

Token authentication

Token authentication is intended do avoid mutual access of multiple clients with the same user account. It is performed in the following steps:
  • Client sends the login request and specifies his credentials by HTTP basic authentication. If the credentials are valid, server returns security token in X-SessionID parameter in HTTP header and in the body of the response. Token is valid until POST /login is used again. Each user can have only one token at the time. Tokens are saved to database and persist even restart of SPE.

    Example login request and response:

    > POST /login HTTP/1.1
    > Host: localhost:8600
    > Authorization: Basic YWRtaW46cGhvbmV4aWE=
    >
    < HTTP/1.1 200 OK
    < Date: Thu, 28 Jul 2016 08:04:24 GMT
    < Connection: Close
    < Content-Type: application/json
    < X-SessionID: 561b0b4c-3dd2-48e7-9353-ba5a73a554c1
    
    {"result":{"version":1,"name":"UserSessionResult","session":{"id":"561b0b4c-3dd2-48e7-9353-ba5a73a554c1"}}}
    
  • Client sending further requests should specify its security token as X-SessionID parameter in HTTP header of request.

    Example request header with session parameter:

    > GET /technologies HTTP/1.1
    > Host: localhost:8600
    > X-SessionID: 561b0b4c-3dd2-48e7-9353-ba5a73a554c1
    

Basic authentication

Server also supports basic authentification without token. This is disabled in settings file by default. If it is enabled then credentials should be specified in HTTP header of each request. In this case POST /login request returns HTTP 405 Method not allowed.

Example request header with basic authentication:

> GET /technologies HTTP/1.1
> Host: localhost:8600
> Authorization: Basic YWRtaW46cGhvbmV4aWE=

Parallel processing

You can use one user account for parallel processing, but you have to either use basic authentication or share X-SessionID between clients.

Audio requirements

Server supports following encodings:

  • WAVE (*.wav) container including any of:
    • signed 8-bit PCM (s8)
    • signed 16-bit PCM (s16le)
    • IEEE float 32-bit (f32le)
    • IEEE float 64-bit (f64le)
    • A-law (alaw)
    • µ-law (mulaw)
    • ADPCM
  • FLAC codec inside FLAC (*.flac) container
  • OPUS codec inside OGG (*.opus) container
  • other audio formats can be used only if audio converter is enabled and if audio converter supports specific format
For more information about uploading audio file to SPE server, see POST /audiofile

RTP/HTTP streams

  1. Open RTP/HTTP stream

    Send request to open RTP stream (POST /stream/rtp) or HTTP chunked stream (POST /stream/http).

    Response to this request should contain Steam ID and number of opened Port (only for RTP streams). Server has limited number of free ports for streams and if this count is exceed, HTTP status 403 (Forbidden) is returned. Stream is automatically closed, if no data is sent for longer than 10sec (default value, can be configured on server settings).

  2. Bind opened stream with technology

    Send request to bind technology to opened stream (e.g. POST /technologies/dictate). Response to this request should contain Task ID (used in request to get result).

    During the stream is opened is possible to unbind technology (e.g. DELETE /technologies/dictate). If technology is unbound, getting results (e.g. GET /technologies/dictate) will not be possible.

    It is possible to bind more technologies to one opened stream.

    Result modes

    Results of technologies can be obtained in different ways. Result mode can be set when binding technology to stream and can not be changed during task is running.

  3. Sending RTP/HTTP stream data

    If stream is successfully opened and client has Stream ID and port (given in step 1.), client can start process sending data.

    • RTP - data are being sent over RTP protocol. For more information, see RFC 3550.

      Supported RTP Payload types are:

      • 0 (PCMU, Little-Endian, 8000 Hz, 1 channel)
      • 8 (PCMA, Little-Endian, 8000 Hz, 1 channel)
      • 10 (L16, Little-Endian, 44100 Hz, 2 channels)
      • 11 (L16, Little-Endian, 44100 Hz, 1 channel)
      • 35 (L16, Little-Endian, 8000 Hz, 2 channels)
      • 36 (L16, Little-Endian, 8000 Hz, 1 channel)
    • HTTP - data are being sent by request PUT /stream/http.

      Supported format in HTTP chunked stream is RAW s16le. Frequency and number of channels is defined by request POST /stream/http

    Important notice: Multichannel stream can be used only in connection with Time Analysis Stream Technology. Other stream technologies does not currently support multichannel stream.

  4. Getting technology results

    Simultaneously with streaming data, it is possible to get current results (e.g. GET /technologies/dictate). Getting results is possible until the result contains flag is_last = true. Even if stream is closed, technologies can still process and results can be obtained.

  5. Close RTP/HTTP stream

    After stream is finished it is recommended to send request to close stream (DELETE /stream/rtp or DELETE /stream/http). Stream is automatically closed, if longer than 10sec (default value, can be configured on server settings) no data is sent.

Error responses

Responses with HTTP statuses 4xx/5xx (except 501) returns in content JSON/XML object with error code and message.

Error response example:

JSONXML
{
  "result" : {
    "version" : 2,
    "name" : "ErrorResult",
    "code" : 1003,
    "message" : "A required query parameter was not specified for this request"
  }
}
<?xml version='1.0' encoding='UTF-8'?>
<result>
  <version>2</version>
  <name>ErrorResult</name>
  <code>1003</code>
  <message>A required query parameter was not specified for this request</message>
</result>

Unknown server error

If unknown server error (HTTP code 500) happens, response header will contain additional property (X-ExceptionType). This property specifies type of exception which caused unknown error.

List of error codes

Error codeError messageHttp codeHttp status
1000Unknown server error.500Internal Server Error
1001The requested URI does not represent any resource on the server.400Bad Request
1002The URL in the request could not be parsed400Bad Request
1003A required query parameter was not specified for this request400Bad Request
1004An invalid value was specified for one of the query parameters in the request URI400Bad Request
1005The request requires user authentication401Unauthorized
1006The server not supported this request501Not Implemented
1007Unsupported audio format415Unsupported Media Type
1008File not found404Not Found
1009Technology is not supported by server405Method Not Allowed
1010Task not found404Not Found
1011Execute access forbidden403Forbidden
1012Keyword list not found404Not Found
1013Unsupported405Method Not Allowed
1014Size of uploaded file exceeds size limit413Request Entity Too Large
1015User model not found404Not Found
1016User model already exist400Bad Request
1017User model not ready400Bad Request
1018The requested URI requires content400Bad Request
1019An invalid data was specified in the request content400Bad Request
1020User does not exist404Not Found
1021User already exists400Bad Request
1023Exceed maximum count of users pending operation503Service Unavailable
1024Result not found404Not Found
1025An invalid value was specified for one of the header parameters in the request400Bad Request
1026RTP sessions limit exceeded403Forbidden
1027Task is not stream task404Not Found
1028Worker limit exceeded503Service Unavailable
1030Stream not found404Not Found
1031Resource not available503Service Unavailable
1032Unable to prepare calibration set406Not Acceptable
1033Unable to prepare speaker model406Not Acceptable
1034Unable to prepare group of speaker models406Not Acceptable
1035Invalid time range406Not Acceptable
1036Unsupported format was specified in header406Not Acceptable
1037Server license is not valid500Internal Server Error
1038Resource is locked400Bad Request
1039It was necessary to rename uploaded file but it could not be done, because file with same name already exists400Bad Request
1041Multichannel recording is not allowed400Bad Request
1042WebSocket has already been opened for this operation400Bad Request
1043Can't create WebSocket400Bad Request
1044Can't create WebSocket because user has registered webhook400Bad Request
1050Technology does not support multichannel stream400Bad Request
1051Invalid path syntax400Bad Request
1052Invalid keyword list400Bad Request
1053Connection to reporting server was lost500Internal Server Error
1054Unsupported Audio Source Profile format415Unsupported Media Type
1055Audio Source Profile already exists400Bad Request
1056Audio Source Profile hash mismatch400Bad Request
1057Audio Source Profile voiceprint version mismatch400Bad Request
1058Bad configuration of Audio Source Profile400Bad Request
1059Size of registered file exceeds size limit413Request Entity Too Large
1060The capacity for technology has been exceeded400Bad Request

Resource locker

Resource locker is used for locking resources during asynchronous request is executed. Asynchronous request locks all used resources (such as File, Speaker Model, etc.) until request finish. Resource can not be edited, moved or removed until it is locked. Locked resource is still accessible for reading and can be analyzed by another asynchronous request.

Resource locker can be disabled in server settings.

List of resource types:

  • File
  • Speaker Model
  • Speaker Group
  • Calibration Set
  • Keyword List

API Changes

Version 3.17

  • Changed result TechnologiesResult (v3 -> v4) - added parameter:
    • result->technologies->is_capacity_exceeded
    See: GET /technologies
  • Changed result SpeechRecognitionOnlineResult (v2 -> v3) - added parameter:
    • result->silence_length
    See: GET /technologies/dictate

Version 3.16

  • Added request POST /technologies/speakerid4/audiosourceprofiles/{name}/update for create child Audio Source Profile from an existing one
  • Default value for Max False Acceptance Rate changed to 1.0 in input of POST /technologies/speakerid4/audiosourceprofiles/{name}
  • Audio Source Profiles supports Mean normalization. For more information, see:
    POST /technologies/speakerid4/audiosourceprofiles/{name}
    POST /technologies/speakerid4/audiosourceprofiles/{name}/update
    • Changed result AudioSourceProfileInfo (v1 -> v2) - added parameter:
      • result->mean_normalization
      See: GET /technologies/speakerid4/audiosourceprofiles/{name}
  • Renamed technology SID4CALIBSET -> SID4CALIB. Affected endpoint: GET /technologies

Version 3.14

  • No changes

Version 3.13

  • Added Task prioritization
    • Changed result PendingInfoResult (v1 -> v2) – added parameter result->info->priority, see: GET /pending/{id}
    • Changed result TasksResult (v1 -> v2) – added parameter result->tasks[]->priority, see: GET /tasks
    • Changed result ServerInfoResult (v3 -> v4) – added parameters:
      • result->info->task_priorities_enabled
      • result->info->default_task_priority
      For more information, see: GET /server/info
  • Added request POST /technologies/speakerid/comparevpset – self-compares voiceprint set.
  • Deprecated usage of request POST /technologies/speakerid/comparevpsets for comparing one voiceprint set.
  • Changed result StatusResult (v1 -> v2) – added parameter result->reporting_service, see: GET /status
  • Changed result GraphemeResult (v1 -> v2) – added parameter result->word_separator, see: GET /technologies/keywordspotting/graphemes

Version 3.12

  • Added technology Denoiser – POST /technologies/denoiser
  • Added request POST /technologies/agestim – AGE processing from SID voiceprint
  • Added request POST /technologies/genderid – GID processing from SID voiceprint
  • Added request GET /technologies/speakerid/groups/{name}/voiceprints – get voiceprints from speaker group

Version 3.11

  • Added Webhooks
  • Dictate allows incremental result mode. See POST /technologies/dictate
  • Added request POST /technologies/speakerid/comparevpsets
  • Query parameter max_false_alarms is deprecated. Use max_fa_rate instead. This change affects following requests:
    • GET /technologies/speakerid
    • GET /technologies/speakerid/stream
    • GET /technologies/speakerid/comparevp
    • GET /technologies/speakerid/extractvp
  • Added possibility to prepare speaker model for specific calibration set. Added optional parameters calibset and max_fa_rate for request PUT /technologies/speakerid/speakermodels/{name}/prepare
  • Added possibility to prepare group for specific calibration set. Added optional parameters calibset and max_fa_rate for request PUT /technologies/speakerid/groups/{name}/prepare
  • Changed result SpeakerIdentificationModelInfo (v4 -> v5) - added result->is_calibrated, see: GET /technologies/speakerid/speakermodels/{name}
  • Changed result SpeakerIdentificationGroupResult (v2 -> v3) - added result->is_calibrated, see: GET /technologies/speakerid/groups/{name}

Version 3.10

  • Added request GET /tasks
  • Added request POST /technologies/speakerid/vpmerge
  • Changed result ServerInfoResult (v2 -> v3) - added parameter result->info->bsapi_version, see: GET /server/info
  • Changed result TechnologiesResult (v2 -> v3) - added parameter result->technologies->models[]->version, see: GET /technologies
  • Changed result SpeechRecognitionOnlineResult (v1 -> v2) - added parameter result->delete_n_words, see: GET /technologies/dictate
  • Changed result SpeakerIdentificationModelInfo (v3 -> v4) - added result->member_of_groups, see: GET /technologies/speakerid/speakermodels/{name}
  • Changed result SpeakerIdentificationCalibsetResult (v4 -> v5) - added result->files[]->is_ready, see: GET /technologies/speakerid/calibsets/{name}
  • Request PUT /technologies/speakerid/calibsets/{name}/prepare now allows prepare single file by specifying parameter path.

Version 3.9

  • Added Keyword Spotting benchmark - GET /technologies/keywordspotting/benchmark
  • Added Phoneme Recognition benchmark - GET /technologies/phnrec/benchmark
  • Request POST /technologies/keywordspotting/kwlists/{name} now checks if phonemes and graphemes in keywordlist are valid. Invalid grapheme or invalid phoneme causes HTTP status 400 (error code 1019).
  • BenchmarkResult (v2 -> v3) - added parameter dataset_version, see:
    • GET /technologies/agestim/benchmark
    • GET /technologies/diarization/benchmark
    • GET /technologies/genderid/benchmark
    • GET /technologies/languageid/benchmark
    • GET /technologies/speakerid/benchmark
    • GET /technologies/sqestim/benchmark
    • GET /technologies/stt/benchmark
    • GET /technologies/vad/benchmark
  • Speaker Identification Calibration Set now allows to attach metafiles. For more information, see: /technologies/speakerid/calibsets/{name}/metafile
  • Result SpeakerIdentificationCalibsetInfo (v3 -> v4) now contains array metafiles, see: GET /technologies/speakerid/calibsets/{name}
  • Added possibility to download voiceprint from SID Calibration Set. See GET /technologies/speakerid/calibsets/{name}/voiceprint for more information.
  • Request POST /admin/user no longer returns error 1022 (Maximum users count exceed). Checking of maximum count of users was removed.
  • Request GET /technologies no longer requires user authentication.
  • Added missing parameter name to results of following requests:
    • GET /user and GET /admin/user (name: UserResult, version: 2)
    • GET /admin/users (name: AdminUsersResult, version: 2)
    • Error responses (name: ErrorResult, version: 2)
  • Added property X-ExceptionType in response header when unknown error happens. See Error responses for more information.

Version 3.8

  • Added technology Phoneme Recognition - GET /technologies/phnrec
  • RTP stream now supports payload type 35 (L16, Little-Endian, 8000 Hz, 2 channels)
  • RTP stream now supports payload type 36 (L16, Little-Endian, 8000 Hz, 1 channel)
  • Request extract voiceprint GET /technologies/speakerid/extractvp now supports calibrations
    • Added query parameters calibset and max_false_alarms
    • VoiceprintResult (v2 -> v3) - added parameters calibration_set and max_fa_rate

Version 3.7

  • RTP stream now supports payload type 0 (PCMU, Little-Endian, 8000 Hz, 1 channel)
  • RTP stream now supports payload type 8 (PCMA, Little-Endian, 8000 Hz, 1 channel)

Version 3.6

  • Request POST /stream/http now accepts parameter 'n_channels'.
  • RTP stream now supports payload type 10 (L16, Little-Endian, 44100 Hz, 2 channels).
  • KeywordSpottingListResult (v1 -> v2) - added threshold, see GET /technologies/keywordspotting/kwlists/{name}
  • {technology_name}BenchmarkResult (v1 -> v2)
    • removed parameter cpu_info->codename
    • renamed benchmark_result->speech_length to benchmark_result->processed_length
    • see for example GET /technologies/agestim/benchmark
  • SpeechQualityEstimationResult (v2 -> v3) - added is_valid into statistics, see GET /technologies/sqestim

Version 3.5

  • Added parameter confidence in reply SpeechRecognitionOneBestResult(v3) on the request GET /technologies/stt. Results SpeechRecognitionNBestResult(v2), SpeechRecognitionCNResult(v2) remains unchanged.

Version 3.4

  • Time Analysis technology now optionally returns segmentation. Added optional parameter segmentation into the request GET /technologies/timeanalysis. Changed result version - TimeAnalysisResult(v3).

Version 3.3

  • Reply ServerInfoResult(v2) on request GET /server/info returns information about running plugins

  • Added error (1038) Resource is locked due to adding Resource locker.
  • Requests POST /audiofile, POST /technologies/speakerid/speakermodels/{name}/audiofile, POST /technologies/speakerid/calibsets/{name}/audiofile natively supports FLAC and OPUS formats (without using convertor). Due to this changes, new error (1039) can be obtained from this requests.

Version 3.2

  • Added technology Streamed Speaker Identification - GET /technologies/speakerid/stream
  • Added request GET /technologies/speakerid/speakermodels/{name}/voiceprint
  • Added parameter show_unregistered to request GET /directory
  • Added parameter is_registered to results:

    • DirectoryResult(v2) - affected request GET /directory
    • AudioFileInfoResult(v3) - affected requests:
      • GET /audiofile/info
      • POST /audiofile
      • PUT /audiofile
      • POST /utils/audiofile/concatenate
      • POST /utils/audiofile/cut
      • POST /utils/audiofile/merge
      • POST /technologies/speakerid/speakermodels/{name}/audiofile
      • DELETE /technologies/speakerid/speakermodels/{name}/metafile
      • POST /technologies/speakerid/calibsets/{name}/audiofile
    • AudioFileMultiInfoResult(v2) - request POST /utils/audiofile/split
    • SpeakerIdentificationModelInfo(v3) - request GET /technologies/speakerid/speakermodels/{name}
    • SpeakerIdentificationCalibsetInfo(v3) - request GET /technologies/speakerid/calibsets/{name}

  • Request GET /audiofile/metainfo on unregistered file returns HTTP error 404 instead of 500
  • Reply LoadStatisticsResult(v2) on request GET /loadstatistics reworked

    Removed actual_task_count, task_limit, added new statistics about current server load (see GET /loadstatistics)

  • Changes in GET /technologies

    TechnologiesResult(v2) - result->technologies->models now returns array of objects (containing name, n_total_instancies, n_busy_instancies) instead of array of model names.

  • Request PUT /audiofile allows copy/move audiofiles to speaker model and calibration set
  • Added request GET /admin/licenses
  • Header of requests now allows parameter Accept to specify output format
  • Added parameter cache_disable to all requests that uses cache (e.g. GET /technologies/speakerid)
  • Request GET /user/info has been changed to GET /user
  • Added request PUT /user - allows non-admin user to change password

Version 3.1

  • Added Time Analysis Technology

    • GET /technologies/timeanalysis

  • Added Utilities for manipulation with audio (cut, channel splitter, concatenate, merge)

    • POST /utils/audiofile/concatenate
    • POST /utils/audiofile/cut
    • POST /utils/audiofile/merge
    • POST /utils/audiofile/split

  • Allow save audio from stream to audio file

    • POST /stream/http accepts in query path to audio file
    • POST /stream/rtp accepts in query path to audio file

  • Added request for prepare Speaker Model and Speaker Model Group

    • PUT /technologies/speakerid/speakermodels/{name}/prepare
    • PUT /technologies/speakerid/groups/{name}/prepare

  • Changed parameter is_ready in result (SpeakerIdentificationCalibsetInfo) of request GET /technologies/speakerid/calibsets/{name}

    • parameter is_ready instead of boolean value returns array of technology models Calibration Set is prepared for.

  • Added parameter is_ready in result (SpeakerIdentificationModelInfo) of request GET /technologies/speakerid/speakermodels/{name}

    • parameter is_ready instead of boolean value returns array of technology models Speaker Model is prepared for.

  • Added parameter is_ready in result (SpeakerIdentificationGroupResult) of request GET /technologies/speakerid/groups/{name}

    • parameter is_ready instead of boolean value returns array of technology models Speaker Group is prepared for.

  • All technologies allow processing on specified range of time

    This change causes technologies has optional output parameter time_range in result. Also version of affected result is changed to version 2.

    List of affected results:

    • AudioFileInfoResult
    • GIDResult
    • AgeEstimationResult
    • DiarizationResult
    • KeywordSpottingResult
    • LanguageIdentificationResult
    • VoiceActivityDetectionResult
    • TimeAnalysisResult
    • SpeechRecognitionResult
    • SpeechRecognitionOneBestResult
    • SpeechRecognitionNBestResult
    • SpeechRecognitionCNResult
    • SpeechQualityEstimationResult
    • SpeakerIdentificationMultiResult
    • VoiceprintResult

  • Changes in requests for manipulation with Speaker model group

    Request POST /technologies/speakerid/groups/{name}/speakermodel has new behaviour. Original behaviour of this request is moved to PUT /technologies/speakerid/groups/{name}/speakermodel

    • POST /technologies/speakerid/groups/{name}/speakermodel - set speaker model(s)
    • PUT /technologies/speakerid/groups/{name}/speakermodel - add speaker model(s)
  • Added parameter version to error response result

  • Stream allows bind multiple technologies

    Related changes:

    • removed error 1029 (Stream already has task)
    • request POST /technologies/dictate now has result with assigned identification number of task
    • requests GET /technologies/dictate and DELETE /technologies/dictate instead of parameter stream accepts parameter task

  • Added file registration

    • /audiofile/registration

  • Changed AudioFileInfoResult - added parameter format

API Commands [Show all]

Administration

/admin/user – user administration
GET /admin/user information about exist user

Returns information about user selected by login. Access to this method is allowed only for users with "admin" role.

Parameters

NameParameter TypeData TypeRequiredDescription
loginquerystringyesUser login

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/admin/user?login=james"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$LOGIN = "james";  //= user's login

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/admin/user?login=$LOGIN",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 2,
    "name": "UserResult",
    "user": {
      "login": "james",
      "active": true,
      "max_pending_requests": 10,
      "roles": [
        "user",
        "admin"
      ]
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>2</version>
  <name>UserResult</name>
  <user>
    <login>james</login>
    <active>true</active>
    <max_pending_requests>10</max_pending_requests>
    <roles>
      <item>user</item>
      <item>admin</item>
    </roles>
  </user>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
403Forbidden
  • 1011Execute access forbidden
404Not Found
  • 1020User does not exist
POST /admin/user create new user

Create new user. Body of request has to contain user's data. It is possible to set the Content-Type parameter in the request header which is helpful in case the client wants to send input data in XML format. Access to this method is allowed only for users with "admin" role.

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content.
loginjson/xml contentstringyesnew user's login
passwordjson/xml contentstringyesnew user's password
activejson/xml contentbooleannonew user's active status
max_pending_requestsjson/xml contentbooleannonew user's count of maximal pending requests
rolesjson/xml contentlist of stringsnonew user's roles

Body

JSONXML
{
  "user": {
    "login": "james",
    "password": "password1234",
    "active": true,
    "max_pending_requests": 10,
    "roles": [
      "user",
      "admin"
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<user>
  <login>james</login>
  <password>password1234</password>
  <active>true</active>
  <max_pending_requests>10</max_pending_requests>
  <roles>
    <item>user</item>
    <item>admin</item>
  </roles>
</user>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -H "Content-Type:application/json" -X POST --data-binary @"new_user.json" "SERVER_ADDRESS:PORT/admin/user"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$user_data = array(
  'user' =>
  array (
    'login'    => 'james',
    'password' => 'password1234',
    'active'   => true,
    'max_pending_requests' => 10,
    'roles'    =>
    array (
      'user',
      'admin'
    )
  )
);

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: application/json',
    'content'       => json_encode($user_data),
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/admin/user",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1003A required query parameter was not specified for this request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1021User already exists
  • 1025An invalid value was specified for one of the header parameters in the request
  • 1019An invalid data was specified in the request content
401Unauthorized
  • 1005The request requires user authentication
403Forbidden
  • 1011Execute access forbidden
DELETE /admin/user Delete user from server

Delete user from server. All user's data (all recordings, results, settings) will be deleted. Access to this method is allowed only for users with "admin" role.

Parameters

NameParameter TypeData TypeRequiredDescription
loginquerystringyesselected user's login

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/admin/user?login=james"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$LOGIN = "james";  //= user's login

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/admin/user?login=$LOGIN",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
401Unauthorized
  • 1005The request requires user authentication
403Forbidden
  • 1011Execute access forbidden
404Not Found
  • 1020User does not exist

Resource locker

  • CHECK All user's Files
  • CHECK All user's Speaker models
  • CHECK All user's Speaker groups
  • CHECK All user's Calibration sets
  • CHECK All user's Keyword lists
  • CHECK All user's Audio Source Profiles
PUT /admin/user change user settings

Change user settings. Body of request contains changed user's settings. It is possible to set the Content-Type parameter in the request header which is helpful in case the client wants to send input data in XML format. Currently, it is not possible to change user's login. Access to this method is allowed only for users with "admin" role.

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content.
loginquerystringyesselected user's login
loginjson/xml contentstringyesuser's login - currently, it is not possible to change it
passwordjson/xml contentstringnochanged password
activejson/xml contentbooleannochanged active status
max_pending_requestsjson/xml contentbooleannochanged count of maximal pending requests
rolesjson/xml contentlist of stringsnochanged roles

Body

JSONXML
{
  "user": {
    "login": "james",
    "password": "newpassword",
    "active": true,
    "max_pending_requests": 10,
    "roles": [
      "user",
      "admin"
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<user>
  <login>james</login>
  <password>newpassword</password>
  <active>true</active>
  <max_pending_requests>10</max_pending_requests>
  <roles>
    <item>user</item>
    <item>admin</item>
  </roles>
</user>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -H "Content-Type:application/json" -X PUT --data-binary @"new_user.json" "SERVER_ADDRESS:PORT/admin/user?login=james"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$LOGIN = "james";  //= user's login

$user_data = array(
  'user' =>
  array (
    'login'    => $LOGIN,
    'password' => 'newpassword',
    'active'   => true,
    'max_pending_requests' => 20,
    'roles'    =>
    array (
      'user',
    )
  )
);

$options = array(
  'http' =>
  array (
    'method'        => 'PUT',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: application/json',
    'content'       => json_encode($user_data),
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/admin/user?login=$LOGIN",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1025An invalid value was specified for one of the header parameters in the request
401Unauthorized
  • 1005The request requires user authentication
403Forbidden
  • 1011Execute access forbidden
404Not Found
  • 1020User does not exist
/admin/users – returns list of all users
GET /admin/users list of all users

Returns list of all users. Access to this method is allowed only for users with "admin" role.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/admin/users?format=xml"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/admin/users",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 2,
    "name": "AdminUsersResult",
    "users": [
      {
        "login": "george",
        "active": true,
        "max_pending_requests": 10,
        "roles": [
          "user",
          "admin"
        ]
      },
      {
        "login": "john",
        "active": true,
        "max_pending_requests": 10,
        "roles": [
          "user"
        ]
      }
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>2</version>
  <name>AdminUsersResult</name>
  <users>
    <item>
      <login>george</login>
      <active>true</active>
      <max_pending_requests>10</max_pending_requests>
      <roles>
        <item>user</item>
        <item>admin</item>
      </roles>
    </item>
    <item>
      <login>john</login>
      <active>true</active>
      <max_pending_requests>10</max_pending_requests>
      <roles>
        <item>user</item>
      </roles>
    </item>
  </users>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
403Forbidden
  • 1011Execute access forbidden
/admin/roles – list of user roles
GET /admin/roles Information about user roles

Returns list of all user roles. Access to this method is allowed only for users with "admin" role.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/admin/roles"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/admin/roles",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 1,
    "name" : "RolesResult",
    "roles" : [
      "admin",
      "user"
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>RolesResult</name>
  <roles>
    <item>admin</item>
    <item>user</item>
  </roles>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
403Forbidden
  • 1011Execute access forbidden
/admin/licenses – list of licenses
GET /admin/licenses Information about licenses

For each technology returns total count of licenses, used licenses and hours to expire. Access to this method is allowed only for users with "admin" role.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/admin/licenses"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/admin/licenses",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 1,
    "name" : "LicensesResult",
    "licenses" : [
      {
        "technology_name" : "Server",
        "technology_abbreviation" : "SERVER",
        "model_name" : "",
        "license" : {
          "hours_to_expire" : 6483,
          "n_licenses" : 16,
          "n_used_licenses" : 2
        }
      },
      {
        "technology_name" : "Diarization",
        "technology_abbreviation" : "DIAR",
        "model_name" : "S",
        "license" : {
          "hours_to_expire" : 6483,
          "n_licenses" : 16,
          "n_used_licenses" : 2
        }
      },
      ...
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>LicensesResult</name>
  <licenses>
    <item>
      <technology_name>Server</technology_name>
      <technology_abbreviation>SERVER</technology_abbreviation>
      <model_name/>
      <license>
        <hours_to_expire>6483</hours_to_expire>
        <n_licenses>16</n_licenses>
        <n_used_licenses>2</n_used_licenses>
      </license>
    </item>
    <item>
      <technology_name>Diarization</technology_name>
      <technology_abbreviation>DIAR</technology_abbreviation>
      <model_name>S</model_name>
      <license>
        <hours_to_expire>6483</hours_to_expire>
        <n_licenses>16</n_licenses>
        <n_used_licenses>2</n_used_licenses>
      </license>
    </item>
    ...
  </licenses>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
403Forbidden
  • 1011Execute access forbidden

Basic Operations

/login – user authentication
POST /login Login user

Allows user to login with user's name and password. If user is successfully logged in, response contains session id. Given session id is necessary to use in other request headers (parameter X-SessionID). For more information, see Authentication chapter.

Body

empty content

Example

CURLPHP/JS
curl -u "LOGIN:PASSWORD" -X POST "SERVER_ADDRESS:PORT/login"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$ENCODE_CREDENTIALS = base64_encode("username:password");

$options = array(
'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'Authorization: Basic ' . $ENCODE_CREDENTIALS,
    'ignore_errors'  => true,
  )
);
$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/login",
  false,
  $context
);
$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 1,
    "name" : "UserSessionResult",
    "session": {
      "id": "258f505c-a6fa-4c3f-8a87-b048874ac6aa"
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>UserSessionResult</name>
  <session>
    <id>258f505c-a6fa-4c3f-8a87-b048874ac6aa</id>
  </session>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1013Unsupported
/directory – storage directory manipulation
GET /directory List of items in the directory

Returns the list of items in the directory.

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesPath to the server directory.
show_unregisteredquerybooleannoIf true, output will contain unregistered files. Default value is false

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/directory?path=/DIRECTORY_PATH"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/";  //= path to the server directory

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/directory?path=$PATH",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 2,
    "name": "DirectoryResult",
    "list": [
      {
        "name": "julia.wav",
        "last_modified": "2015-08-03T08:16:15Z",
        "created": "2015-08-03T08:16:15Z",
        "size": 474444,
        "is_directory": false,
        "is_registered": true
      },
      {
        "name": "david.wav",
        "last_modified": "2015-08-03T11:32:41Z",
        "created": "2015-08-03T11:32:41Z",
        "size": 492204,
        "is_directory": false,
        "is_registered": true
      },
      {
        "name": "test",
        "last_modified": "2015-07-29T14:20:38Z",
        "created": "2015-08-03T01:18:01Z",
        "size": 0,
        "is_directory": true,
        "is_registered": true
      }
    ]
  }
}
<?xml version="1.0"?>
<result>
  <version>2</version>
  <name>DirectoryResult</name>
  <list>
    <item>
      <name>julia.wav</name>
      <last_modified>2015-08-03T08:16:15Z</last_modified>
      <created>2015-08-03T08:16:15Z</created>
      <size>474444</size>
      <is_directory>false</is_directory>
      <is_registered>true</is_registered>
    </item>
    <item>
      <name>david.wav</name>
      <last_modified>2015-08-03T11:32:41Z</last_modified>
      <created>2015-08-03T11:32:41Z</created>
      <size>492204</size>
      <is_directory>false</is_directory>
      <is_registered>true</is_registered>
    </item>
    <item>
      <name>test</name>
      <last_modified>2015-07-29T14:20:38Z</last_modified>
      <created>2015-08-03T01:18:01Z</created>
      <size>0</size>
      <is_directory>true</is_directory>
      <is_registered>false</is_registered>
    </item>
  </list>
</result>
400Bad Request
  • 1003A required query parameter was not specified for this request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
POST /directory Create the directory

Create directory in current user's storage. All the required parent directories are created.

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesPath to the server directory.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST "SERVER_ADDRESS:PORT/directory?path=/DIRECTORY_PATH"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/my_directory";  //= path to the server directory

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/directory?path=$PATH",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1003A required query parameter was not specified for this request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
DELETE /directory Delete the directory

Delete the directory from the current user's storage. All files and sub-directories will be deleted.

If results from technologies are in the cache, all results assigned to deleted files will be deleted, too.

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesPath to the server directory.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/directory?path=/DIRECTORY_PATH"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/my_directory";  //= path to the server directory

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/directory?path=$PATH",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1003A required query parameter was not specified for this request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found

Resource locker

  • CHECK All files in the directory and sub-directories
/audiofile – audio file manipulation
GET /audiofile Download audio file from server

Download audio file from server.

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/audiofile?path=/AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= path to the audio file on the Phonexia Speech Engine

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/audiofile?path=$PATH",
  false,
  $context
);

file_put_contents('./audio.wav', $response); //= audio file saved on the PHP server
?>

Available responses

HTTP StatusOutput
200OK
AUDIO DATA
400Bad Request
  • 1003A required query parameter was not specified for this request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
POST /audiofile Upload audio file to server

Upload audio file to the current user's storage. The request body contains audio file data.

If a file with the same name already exists on the server, it will be overwritten with uploaded file (if results from technologies are in the cache, all results assigned to overwritten file will be deleted).

By default server allows uploading files with unlimited size. This behavior can be changed in server configuration file by setting server.upload_max_filesize.

Server supports following encodings:

  • WAVE (*.wav) container including any of:
    • signed 8-bit PCM (s8)
    • signed 16-bit PCM (s16le)
    • IEEE float 32-bit (f32le)
    • A-law (alaw)
    • µ-law (mulaw)
    • ADPCM
  • FLAC codec inside FLAC (*.flac) container
  • OPUS codec inside OGG (*.opus) container
  • other audio formats can be used only if audio converter is enabled and if audio converter supports specific format

Audio converter always convert audio file to WAVE format and change file's extension to ".wav". Server checks if file has proper extension and is able to change it (for example uploaded OPUS audio file with requested name julia.ogg will be saved as julia.opus). If server change extension file and file with changed extension already exists, operation will be aborted and error with code 1039 will be returned.

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file

Body

AUDIO DATA

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST --data-binary @"FILE_PATH" "SERVER_ADDRESS:PORT/audiofile?path=/AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= destination path to the audiofile on the Phonexia Speech Engine

$audio = file_get_contents("./audio.wav"); //= path to the source file on the PHP server

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: audio/wav',
    'content'       => $audio,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/audiofile?path=$PATH",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 3,
    "name": "AudioFileInfoResult",
    "info": {
      "name": "julia_1.wav",
      "last_modified": "2015-08-03T08:16:15Z",
      "created": "2015-08-03T08:16:15Z",
      "size": 474444,
      "is_directory": false,
      "is_registered": true,
      "frequency": 8000,
      "length": 29.65,
      "n_channels": 1,
      "format": "lin16"
    }
  }
}
<?xml version="1.0"?>
<result>
  <version>3</version>
  <name>AudioFileInfoResult</name>
  <info>
    <name>julia_1.wav</name>
    <last_modified>2015-08-03T08:16:15Z</last_modified>
    <created>2015-08-03T08:16:15Z</created>
    <size>474444</size>
    <is_directory>false</is_directory>
    <is_registered>true</is_registered>
    <frequency>8000</frequency>
    <length>29.65</length>
    <n_channels>1</n_channels>
    <format>lin16</format>
  </info>
</result>
400Bad Request
  • 1003A required query parameter was not specified for this request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1039It was necessary to rename uploaded file but it could not be done, because file with same name already exists
  • 1038Resource is locked
401Unauthorized
  • 1005The request requires user authentication
413Request Entity Too Large
  • 1014Size of uploaded file exceeds size limit
415Unsupported Media Type
  • 1007Unsupported audio format

Resource locker

  • CHECK Target file (specified by parameter path)
DELETE /audiofile Delete file from server

Delete the audio file from current user's storage. If results from technologies are in the cache, all results assigned to deleted file will be deleted.

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/audiofile?path=/AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= path to the audio file on the Phonexia Speech Engine

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/audiofile?path=$PATH",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1003A required query parameter was not specified for this request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found

Resource locker

  • CHECK Target file (specified by parameter path)
PUT /audiofile Move or copy audio file.

Move or copy audio file.

This request supports extended possibility for path addressing. In path and new_path can be addressed file in storage, speaker model or calibration set. Paths addressing files in speaker model or calibration set have to start with symbol @. Speaker model or calibration will be created if necessary.

Example path to audio file in user's storage:

path=/my_directory/audio.wav

Example path to audio file stored in Speaker Model:

path=@speakerid/speakermodels/{SPEAKER_MODEL_NAME}/{RECORDING_NAME}

or

path=@speakerid4/speakermodels/{SPEAKER_MODEL_NAME}/{RECORDING_NAME}

Due to sharing speaker models between SID and SID4, both paths are equivalent.
Example path to audio file stored in Calibration Set:

path=@speakerid/calibsets/{CALIBRATION_SET_NAME}/{RECORDING_NAME}

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesSource audio file path.
new_pathquerystringyesTarget audio file path.
copyquerystringnoWhen true, file is copied instead of moving. Default value is false.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X PUT "SERVER_ADDRESS:PORT/audiofile?path=/AUDIO_FILE.wav&new_path=/NEW/AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";         //= path to the original audio file on the Phonexia Speech Engine
$NEW_PATH = "/NEW/AUDIO_FILE.wav"; //= new path of audio file on the Phonexia Speech Engine
$COPY = "false";                   //= "true" for copying, "false" for moving

$options = array(
  'http' =>
  array (
    'method'        => 'PUT',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/audiofile?path=$PATH&new_path=$NEW_PATH&copy=$COPY",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 3,
    "name": "AudioFileInfoResult",
    "info": {
      "name": "julia_1.wav",
      "last_modified": "2015-08-03T08:16:15Z",
      "created": "2015-08-03T08:16:15Z",
      "size": 474444,
      "is_directory": false,
      "is_registered": true,
      "frequency": 8000,
      "length": 29.65,
      "n_channels": 1,
      "format": "lin16"
    }
  }
}
<?xml version="1.0"?>
<result>
  <version>3</version>
  <name>AudioFileInfoResult</name>
  <info>
    <name>julia_1.wav</name>
    <last_modified>2015-08-03T08:16:15Z</last_modified>
    <created>2015-08-03T08:16:15Z</created>
    <size>474444</size>
    <is_directory>false</is_directory>
    <is_registered>true</is_registered>
    <frequency>8000</frequency>
    <length>29.65</length>
    <n_channels>1</n_channels>
    <format>lin16</format>
  </info>
</result>
400Bad Request
  • 1003A required query parameter was not specified for this request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
415Unsupported Media Type
  • 1007Unsupported audio format

Resource locker

  • CHECK Source file (specified by parameter path) - when moving (parameter copy=false)
  • CHECK Target file (specified by parameter new_path) - if overwriting existing file
  • CHECK Speaker model - when moving from file from speaker model (path points to speaker model and parameter copy=false)
  • CHECK Speaker model - if target file is in speaker model (new_path points to speaker model)
  • CHECK Calibration set - when moving from file from calibration set (path points to calibration set and parameter copy=false)
  • CHECK Calibration set - if target file is in calibration set (new_path points to calibration set)
/audiofile/metainfo – audiofile's metainfo manipulation
GET /audiofile/metainfo Get meta-information

Get audio file's meta-information

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/audiofile/metainfo?path=/AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= path to the audio file on the Phonexia Speech Engine

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create($options);
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/audiofile/metainfo?path=$PATH",
  false,
  $context
);

var_dump($response);
?>

Available responses

HTTP StatusOutput
200OK
META DATA
400Bad Request
  • 1003A required query parameter was not specified for this request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
POST /audiofile/metainfo Set meta-information

Set meta-information to exist audio file in current user's storage. The request body contains custom data. If file already contains meta-information it will be overwritten with new meta-information

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file

Body

META DATA

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST --data-binary @"FILE_PATH" "SERVER_ADDRESS:PORT/audiofile/metainfo?path=/AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= destination path to the audiofile on the Phonexia Speech Engine

$content = "custom meta data";

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'content'       => $content,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create($options);
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/audiofile/metainfo?path=$PATH",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1003A required query parameter was not specified for this request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
413Request Entity Too Large
  • 1014Size of uploaded file exceeds size limit
DELETE /audiofile/metainfo Delete meta-information

Delete meta-information of audio file from current user's storage.

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/audiofile/metainfo?path=/AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= path to the audio file on the Phonexia Speech Engine

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/audiofile/metainfo?path=$PATH",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1003A required query parameter was not specified for this request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
/audiofile/info – information about audio file
GET /audiofile/info Information about audio file

Returns information about audio file (such as frequency, length, number of channels)

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/audiofile/info?path=/AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= path to the audio file on the server

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/audiofile/info?path=$PATH",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 3,
    "name": "AudioFileInfoResult",
    "info": {
      "name": "julia_1.wav",
      "last_modified": "2015-08-03T08:16:15Z",
      "created": "2015-08-03T08:16:15Z",
      "size": 474444,
      "is_directory": false,
      "is_registered": true,
      "frequency": 8000,
      "length": 29.65,
      "n_channels": 1,
      "format": "lin16"
    }
  }
}
<?xml version="1.0"?>
<result>
  <version>3</version>
  <name>AudioFileInfoResult</name>
  <info>
    <name>julia_1.wav</name>
    <last_modified>2015-08-03T08:16:15Z</last_modified>
    <created>2015-08-03T08:16:15Z</created>
    <size>474444</size>
    <is_directory>false</is_directory>
    <is_registered>true</is_registered>
    <frequency>8000</frequency>
    <length>29.65</length>
    <n_channels>1</n_channels>
    <format>lin16</format>
  </info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1003A required query parameter was not specified for this request
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
415Unsupported Media Type
  • 1007Unsupported audio format
/audiofile/registration – audiofile's registration to system
POST /audiofile/registration Register audio file to system.

This function registers file to system. It is useful if file wasn't uploaded via API (request POST /audiofile), for example file was copied to file system.

The file has to be in server storage folder (typically in {SERVER_PATH}/home/{USER_NAME}/storage).

By default server allows registering files with unlimited size. This behavior can be changed in server configuration file by setting server.upload_max_filesize.

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesPath to audio file on server.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST "SERVER_ADDRESS:PORT/audiofile/registration?path=/AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= path to the audio file on the server

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/audiofile/registration?path=$PATH",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1003A required query parameter was not specified for this request
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
413Request Entity Too Large
  • 1059Size of registered file exceeds size limit
415Unsupported Media Type
  • 1007Unsupported audio format
DELETE /audiofile/registration Unregister audio file from system.

This function unregister file from system. All associated data are removed (results, meta information etc.), but file itself stays in filesystem.

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/audiofile/registration?path=/AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= path to the audio file on the server

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/audiofile/registration?path=$PATH",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1003A required query parameter was not specified for this request
  • 1038Resource is locked
401Unauthorized
  • 1005The request requires user authentication

Resource locker

  • CHECK File - file can not be unregistered when is locked
/loadstatistics – information about server load statistics
GET /loadstatistics Information about server load

Returns information about server load statistics.

Result parameters description:

task_queue_countcount of tasks currently waiting in queue
task_queue_maximumtask queue size
streamed_task_runningactual count of tasks processing stream
streamed_task_maximummaximum of simultaneous tasks processing stream
worker_runningactual count of used workers
worker_countcount of initialized workers
http_stream_runningactual count of opened HTTP streams
rtp_stream_runningactual count of opened RTP streams
rtp_stream_maximummaximum count of opened RTP streams

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/loadstatistics"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/loadstatistics",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 2,
    "name" : "LoadStatisticResult",
    "load_statistics" : {
      "task_queue_count" : 0,
      "task_queue_maximum" : 1000,
      "streamed_task_running" : 0,
      "streamed_task_maximum" : 5,
      "worker_running" : 1,
      "worker_count" : 10,
      "http_stream_running" : 0,
      "rtp_stream_running" : 0,
      "rtp_stream_maximum" : 10
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>2</version>
  <name>LoadStatisticResult</name>
  <load_statistics>
    <task_queue_count>0</task_queue_count>
    <task_queue_maximum>1000</task_queue_maximum>
    <streamed_task_running>0</streamed_task_running>
    <streamed_task_maximum>5</streamed_task_maximum>
    <worker_running>1</worker_running>
    <worker_count>10</worker_count>
    <http_stream_running>0</http_stream_running>
    <rtp_stream_running>0</rtp_stream_running>
    <rtp_stream_maximum>10</rtp_stream_maximum>
  </load_statistics>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
/pending/{id} – information about asynchronous request
GET /pending/{id} Information about asynchronous request

Returns information about asynchronous request with the specified asynchronous request id. When operation is done, 303 returns status is used and HTTP header contains address for final result in "Location" parameter. For more information about asynchronous requests, see Asynchronous request.

WebSocket

This request can be used for opening WebSocket. In this case header of request should contain WebSocket handshake parameters (Upgrade, Connection, Sec-WebSocket-Version, Sec-WebSocket-Key). Header must also contain session parameter (X-SessionID) or basic authorization (Authorization). Supported Sec-WebSocket-Version is 13. When asynchronous operation finishes, result is sent through WebSocket's message and WebSocket is closed. Only one WebSocket can be opened for one asynchronous operation.

Example header for create WebSocket:

 GET /pending/ec563083-3d9b-457d-a0ac-24b197bc222f HTTP/1.1
 Host: server.example.com
 Upgrade: websocket
 Connection: Upgrade
 Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==
 Sec-WebSocket-Version: 13
 X-SessionID: 258f505c-a6fa-4c3f-8a87-b048874ac6aa
 Accept: application/json

Parameters

NameParameter TypeData TypeRequiredDescription
idpathstringyesDetermines the asynchronous request ID.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/pending/ASYNCHRONOUS_REQUEST_ID"
/* See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example */

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 2,
    "name": "PendingInfoResult",
    "info": {
      "id": "ec563083-3d9b-457d-a0ac-24b197bc222f",
      "state": "waiting",
      "priority": 50
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>2</version>
  <name>PendingInfoResult</name>
  <info>
    <id>a869ea70-980a-4497-99b4-3ef181f0b87d</id>
    <state>waiting</state>
    <priority>50</priority>
  </info>
</result>
303See Other JSONXML
{
  "result": {
    "version": 2,
    "name": "PendingInfoResult",
    "info": {
      "id": "ec563083-3d9b-457d-a0ac-24b197bc222f",
      "state": "finished",
      "priority": 50
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>2</version>
  <name>PendingInfoResult</name>
  <info>
    <id>ec563083-3d9b-457d-a0ac-24b197bc222f</id>
    <state>finished</state>
    <priority>50</priority>
  </info>
</result>
400Bad Request
  • 1042WebSocket has already been opened for this operation
  • 1043Can't create WebSocket
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1010Task not found
DELETE /pending/{id} Remove asynchronous request

Remove asynchronous request with the specified asynchronous request id. After this request, it is not guaranteed that the final result will be created and saved to the cache.

Parameters

NameParameter TypeData TypeRequiredDescription
idpathstringyesDetermines the asynchronous request ID.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/pending/ASYNCHRONOUS_REQUEST_ID"
/* See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example */

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1010Task not found
/done/{id} – result of finished pending request
GET /done/{id} Information about asynchronous request

Returns result of asynchronous request with the specified asynchronous request id. For more information about asynchronous requests, see Asynchronous request.

Parameters

NameParameter TypeData TypeRequiredDescription
idpathstringyesDetermines the asynchronous request ID.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/done/ASYNCHRONOUS_REQUEST_ID"
/* See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example */

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1010Task not found
/tasks – Information about current tasks
GET /tasks Information about current tasks

Return information about all registered tasks. Finished tasks are removed after a client pick it up or after timeout period.

This request does not require user authentication.

Body

empty content

Example

CURLPHP/JS
curl -X GET "SERVER_ADDRESS:PORT/tasks"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/tasks",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 2,
    "name": "TasksResult",
    "tasks": [
      {
        "id": "964b2969-396c-4e1c-b139-0ee1024bbab1",
        "state": "running",
        "priority": 50
      },
      {
        "id": "857d3674-045c-5a7b-b248-5ca9644dfab1",
        "state": "finished",
        "priority": 27
      },
      ...
    ]
  }
}
<?xml version='1.0' encoding='UTF-8'?>
<result>
  <version>2</version>
  <name>TasksResult</name>
  <tasks>
    <item>
      <id>964b2969-396c-4e1c-b139-0ee1024bbab1</id>
      <state>running</state>
      <priority>50</priority>
    </item>
    <item>
      <id>857d3674-045c-5a7b-b248-5ca9644dfab1</id>
      <state>finished</state>
      <priority>27</priority>
    </item>
  </tasks>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
/technologies – list of the server supported technologies
GET /technologies List of the server supported technologies

List of the server supported technologies. For each technology list of supported technology models is returned.

This request does not require user authentication.

Body

empty content

Example

CURLPHP/JS
curl -X GET "SERVER_ADDRESS:PORT/technologies"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;

$options = array(
  'http' =>
  array (
    'method'         => 'GET',
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 4,
    "name": "TechnologiesResult",
    "technologies": [
      {
        "name": "Age Estimation",
        "abbreviation": "AGE",
        "is_capacity_exceeded": false,
        "models": [
          {
            "name": "S",
            "version": "1.2.1",
            "n_total_instancies": 3,
            "n_busy_instancies": 0
          }
        ]
      },
      {
        "name": "Diarization",
        "abbreviation": "DIAR",
        "is_capacity_exceeded": true,
        "models": [
          {
            "name": "L",
            "version": "1.0.2",
            "n_total_instancies": 3,
            "n_busy_instancies": 0
          }
        ]
      },
      ...
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>4</version>
  <name>TechnologiesResult</name>
  <technologies>
    <item>
      <name>Age Estimation</name>
      <abbreviation>AGE</abbreviation>
      <is_capacity_exceeded>false</is_capacity_exceeded>
      <models>
        <item>
          <name>S</name>
          <version>1.2.1</version>
          <n_total_instancies>3</n_total_instancies>
          <n_busy_instancies>0</n_busy_instancies>
        </item>
      </models>
    </item>
    <item>
      <name>Diarization</name>
      <abbreviation>DIAR</abbreviation>
      <is_capacity_exceeded>true</is_capacity_exceeded>
      <models>
        <item>
          <name>L</name>
          <version>1.0.2</version>
          <n_total_instancies>3</n_total_instancies>
          <n_busy_instancies>0</n_busy_instancies>
        </item>
      </models>
    </item>
    ...
  </technologies>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
/user – user information
GET /user information about current user

Returns information about current user.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/user"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/user",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 2,
    "name": "UserResult",
    "user": {
      "login": "james",
      "active": true,
      "max_pending_requests": 10,
      "roles": [
        "user",
        "admin"
      ]
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>2</version>
  <name>UserResult</name>
  <user>
    <login>james</login>
    <active>true</active>
    <max_pending_requests>10</max_pending_requests>
    <roles>
      <item>user</item>
      <item>admin</item>
    </roles>
  </user>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
PUT /user Change password.

Allows changing user password.

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content.
passwordjson/xml contentstringyeschanged password

Body

JSONXML
{
  "user": {
    "password": "newpassword"
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<user>
  <password>newpassword</password>
</user>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -H "Content-Type:application/json" -X PUT --data-binary @"user_changes.json" "SERVER_ADDRESS:PORT/user"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$LOGIN = "james";  //= user's login

$user_data = array(
  'user_changes' =>
   array (
    'password' => 'newpassword'
  )
);

$options = array(
  'http' =>
  array (
    'method'        => 'PUT',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: application/json',
    'content'       => json_encode($user_data),
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/user",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1025An invalid value was specified for one of the header parameters in the request
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1020User does not exist
/status – server status
GET /status Server status

Returns server status. This method does not require user authentication.

Body

empty content

Example

CURLPHP/JS
curl -X GET "SERVER_ADDRESS:PORT/status"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/status",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 2,
    "name" : "StatusResult",
    "database" : "ok",
    "licenses" : "ok",
    "internal_services" : "ok",
    "reporting_service" : "ok"
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>2</version>
  <name>StatusResult</name>
  <database>ok</database>
  <licenses>ok</licenses>
  <internal_services>ok</internal_services>
  <reporting_service>ok</reporting_service>
</result>
500Internal Server Error JSONXML
{
  "result": {
    "version": 2,
    "name": "StatusResult",
    "database": "failed",
    "licenses": "failed",
    "internal_services": "failed",
    "reporting_service": "failed"
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>2</version>
  <name>StatusResult</name>
  <database>failed</database>
  <licenses>failed</licenses>
  <internal_services>failed</internal_services>
  <reporting_service>failed</reporting_service>
</result>
/server/info – information about the server
GET /server/info Information about the server

Returns information about the server

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/server/info"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/server/info",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 4,
    "name" : "ServerInfoResult",
    "info" : {
      "version" : "3.13.0",
      "build_number" : "1597",
      "bsapi_version": "Phonexia s.r.o., build Nov 23 2017, 09:43:51, v3.14.0 (r300)",
      "audio_converter_enabled" : true,
      "maximum_upload_file_size" : 0,
      "maximum_upload_meta_file_size" : 0,
      "rtp_streams_enabled" : true,
      "http_streams_enabled" : true,
      "task_priorities_enabled" : true,
      "default_task_priority" : 50
    },
    "plugin_info" : [
      {
        "name" : "VoiceBiometryServerPlugin",
        "version" : "1.0.0",
        "vendor" : "Phonexia"
      }
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>4</version>
  <name>ServerInfoResult</name>
  <info>
    <version>3.13.0</version>
    <build_number>1597</build_number>
    <bsapi_version>Phonexia s.r.o., build Nov 23 2017, 09:43:51, v3.14.0 (r300)</bsapi_version>
    <audio_converter_enabled>true</audio_converter_enabled>
    <maximum_upload_file_size>0</maximum_upload_file_size>
    <maximum_upload_meta_file_size>0</maximum_upload_meta_file_size>
    <rtp_streams_enabled>true</rtp_streams_enabled>
    <http_streams_enabled>true</http_streams_enabled>
    <task_priorities_enabled>true</task_priorities_enabled>
    <default_task_priority>50</default_task_priority>
  </info>
  <plugin_info>
    <item>
      <name>VoiceBiometryServerPlugin</name>
      <version>1.0.0</version>
      <vendor>Phonexia</vendor>
    </item>
  </plugin_info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication

Stream

/stream/rtp – RTP stream
POST /stream/rtp Open RTP stream for listening

Opens RTP stream for listening. Stream is opened on port, which is returned in result.

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringnoPath to file where streamed data will be saved. If path is not set file will not be saved. File will be overwritten if already exists.

Body

empty content

Example

CURL
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST "SERVER_ADDRESS:PORT/stream/rtp"

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 1,
    "name": "RtpStreamResult",
    "port": "5000",
    "stream": "ec563083-3d9b-457d-a0ac-24b197bc222f"
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>RtpSessionResult</name>
  <port>5000</port>
  <stream>a869ea70-980a-4497-99b4-3ef181f0b87d</stream>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
403Forbidden
  • 1026RTP sessions limit exceeded
405Method Not Allowed
  • 1009Technology is not supported by server
DELETE /stream/rtp Close opened RTP stream

Closes opened RTP stream.

Parameters

NameParameter TypeData TypeRequiredDescription
streamquerystringyesID of opened RTP stream.

Body

empty content

Example

CURL
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/stream/rtp?stream=OPENED_RTP_STREAM"

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1003A required query parameter was not specified for this request
  • 1004An invalid value was specified for one of the query parameters in the request URI
404Not Found
  • 1030Stream not found
405Method Not Allowed
  • 1009Technology is not supported by server
/stream/http – HTTP stream
POST /stream/http Open HTTP stream for listening

Opens HTTP stream for listening.

Parameters

NameParameter TypeData TypeRequiredDescription
frequencyquerystringnoFrequency of streamed data. Default value is 8000.
n_channelsquerystringnoNumber of channels. Default value is 1.
pathquerystringnoPath to file where streamed data will be saved. If path is not set file will not be saved. File will be overwritten if already exists.

Body

empty content

Example

CURL
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST "SERVER_ADDRESS:PORT/stream/http?frequency=8000"

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 1,
    "name": "HttpStreamResult",
    "stream": "ec563083-3d9b-457d-a0ac-24b197bc222f"
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>HttpStreamResult</name>
  <stream>a869ea70-980a-4497-99b4-3ef181f0b87d</stream>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
405Method Not Allowed
  • 1009Technology is not supported by server
PUT /stream/http Send data to stream via HTTP

Sends data to stream via HTTP request. Chunked HTTP stream is supported as well.

Parameters

NameParameter TypeData TypeRequiredDescription
streamquerystringyesID of opened HTTP stream.

Body

RAW AUDIO DATA (s16le, frequency and number of channels depends on request
POST /stream/http?frequency={FREQ}&n_channels={N})

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1003A required query parameter was not specified for this request
  • 1004An invalid value was specified for one of the query parameters in the request URI
404Not Found
  • 1030Stream not found
405Method Not Allowed
  • 1009Technology is not supported by server
DELETE /stream/http Close opened HTTP stream

Closes opened HTTP stream.

Parameters

NameParameter TypeData TypeRequiredDescription
streamquerystringyesID of opened HTTP stream.

Body

empty content

Example

CURL
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/stream/http?stream=OPENED_HTTP_STREAM"

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1003A required query parameter was not specified for this request
  • 1004An invalid value was specified for one of the query parameters in the request URI
404Not Found
  • 1030Stream not found
405Method Not Allowed
  • 1009Technology is not supported by server

Utils

/utils/audiofile/concatenate – concatenate two audio files
POST /utils/audiofile/concatenate (asynchronous)Concatenate two audio files to new one.

Concatenate two audio files with the same number of channels and the same frequency. Output file is always WAV. Function concatenate channels on channel level, so that target wav file will have the same number of channels as first file.

Audio file in path1:

channel 1
channel 2

Audio file in path2:

channel 1
channel 2

Audio file in target:

channel 1channel 1
channel 2channel 2

Parameters

NameParameter TypeData TypeRequiredDescription
path1querystringyesServer path to first audio file.
path2querystringyesServer path to second audio file.
targetquerystringyesServer path where will be stored new audio file. Extension .wav is automatically added.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST "SERVER_ADDRESS:PORT/utils/audiofile/concatenate?path1=/julia.wav&path2=/john.wav&target=/julia_john.wav"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'POST',
  uri_path: '/utils/audiofile/concatenate',
  uri_params: {
    path1: '/julia.wav',
    path2: '/john.wav',
    target: '/julia_john.wav'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 3,
    "name": "AudioFileInfoResult",
    "info": {
      "name": "julia_1.wav",
      "last_modified": "2015-08-03T08:16:15Z",
      "created": "2015-08-03T08:16:15Z",
      "size": 474444,
      "is_directory": false,
      "is_registered": true,
      "frequency": 8000,
      "length": 29.65,
      "n_channels": 1,
      "format": "lin16"
    }
  }
}
<?xml version="1.0"?>
<result>
  <version>3</version>
  <name>AudioFileInfoResult</name>
  <info>
    <name>julia_1.wav</name>
    <last_modified>2015-08-03T08:16:15Z</last_modified>
    <created>2015-08-03T08:16:15Z</created>
    <size>474444</size>
    <is_directory>false</is_directory>
    <is_registered>true</is_registered>
    <frequency>8000</frequency>
    <length>29.65</length>
    <n_channels>1</n_channels>
    <format>lin16</format>
  </info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
415Unsupported Media Type
  • 1007Unsupported audio format

Resource locker

  • LOCK File specified by path1
  • LOCK File specified by path2
  • CHECK File specified by target (if overwriting existing file)
/utils/audiofile/cut – audio file cutter
POST /utils/audiofile/cut (asynchronous)Cut audio file and create new one based on given segmentation

Create new file which will contain data determined by segmentation. Input time values are in 100ns units (value 10000000 is 1sec). Output file is always WAV.

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content
pathquerystringyesServer path to the audio file.
keep_original_lengthquerybooleanno If set to true, the new file will keep original length of audio file. Default false.
targetquerystringyesServer path where will be stored new audio file. Extension .wav is automatically added.

Body

JSONXML
{
  "cut_segments": [
    {
      "start": 0,
      "end": 10000000
    },
    {
      "start": 20000000,
      "end":  100000000
    }
    ...
  ]
}
<cut_segments>
  <item>
    <start>0</start>
    <end>1000000</end>
  </item>
  <item>
    <start>2000000</start>
    <end>10000000</end>
  </item>
  ...
</cut_segments>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -H "Content-Type:application/json" -X POST --data-binary @"segmentation.json" "SERVER_ADDRESS:PORT/utils/audiofile/cut?path=/julia.wav&target=/julia_cut.wav"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */

var segments = {
  "cut_segments": [
    {
      "start": 0,
      "end": 10000000
    },
    {
      "start": 20000000,
      "end":  100000000
    }
  ]
};

var options = {
  method: 'POST',
  content: segments,
  uri_path: '/utils/audiofile/cut',
  uri_params: {
    path: '/julia.wav',
    target: '/julia_cut.wav'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 3,
    "name": "AudioFileInfoResult",
    "info": {
      "name": "julia_1.wav",
      "last_modified": "2015-08-03T08:16:15Z",
      "created": "2015-08-03T08:16:15Z",
      "size": 474444,
      "is_directory": false,
      "is_registered": true,
      "frequency": 8000,
      "length": 29.65,
      "n_channels": 1,
      "format": "lin16"
    }
  }
}
<?xml version="1.0"?>
<result>
  <version>3</version>
  <name>AudioFileInfoResult</name>
  <info>
    <name>julia_1.wav</name>
    <last_modified>2015-08-03T08:16:15Z</last_modified>
    <created>2015-08-03T08:16:15Z</created>
    <size>474444</size>
    <is_directory>false</is_directory>
    <is_registered>true</is_registered>
    <frequency>8000</frequency>
    <length>29.65</length>
    <n_channels>1</n_channels>
    <format>lin16</format>
  </info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found

Resource locker

  • LOCK File specified by path
  • CHECK File specified by target (if overwriting existing file)
/utils/audiofile/merge – merging two audio files
POST /utils/audiofile/merge (asynchronous)Merge two audio files to new one.

Merge two audio files to new one. First are stored channels from first source file, then channels from second source file. Frequency of both files has to be identical. Output file is always WAV.

Audio file in path1:

channel 1
channel 2

Audio file in path2:

channel 1
channel 2

Audio file in target:

channel 1
channel 2
channel 3silent
channel 4silent

Parameters

NameParameter TypeData TypeRequiredDescription
path1querystringyesServer path to first audio file.
path2querystringyesServer path to second audio file.
targetquerystringyesServer path where will be stored new audio file. Extension .wav is automatically added.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST "SERVER_ADDRESS:PORT/utils/audiofile/merge?path1=/julia.wav&path2=/john.wav&target=/julia_john.wav"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'POST',
  uri_path: '/utils/audiofile/merge',
  uri_params: {
    path1: '/julia.wav',
    path2: '/john.wav',
    target: '/julia_john.wav'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 3,
    "name": "AudioFileInfoResult",
    "info": {
      "name": "julia_1.wav",
      "last_modified": "2015-08-03T08:16:15Z",
      "created": "2015-08-03T08:16:15Z",
      "size": 474444,
      "is_directory": false,
      "is_registered": true,
      "frequency": 8000,
      "length": 29.65,
      "n_channels": 1,
      "format": "lin16"
    }
  }
}
<?xml version="1.0"?>
<result>
  <version>3</version>
  <name>AudioFileInfoResult</name>
  <info>
    <name>julia_1.wav</name>
    <last_modified>2015-08-03T08:16:15Z</last_modified>
    <created>2015-08-03T08:16:15Z</created>
    <size>474444</size>
    <is_directory>false</is_directory>
    <is_registered>true</is_registered>
    <frequency>8000</frequency>
    <length>29.65</length>
    <n_channels>1</n_channels>
    <format>lin16</format>
  </info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
415Unsupported Media Type
  • 1007Unsupported audio format

Resource locker

  • LOCK File specified by path1
  • LOCK File specified by path2
  • CHECK File specified by target (if overwriting existing file)
/utils/audiofile/split – audio file channel splitter
POST /utils/audiofile/split (asynchronous)Split channels from record to new files. One new file for each channel.

Take audio file from parameter path and split its channels to separate files. Names will be generated by adding "_X.wav" to target parameter. X represent channel number.

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file to be splitted.
targetquerystringyesServer path which will be used as base for new files.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST "SERVER_ADDRESS:PORT/utils/audiofile/split?path=/julia.wav&target=/julia/channel"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'POST',
  uri_path: '/utils/audiofile/split',
  uri_params: {
    path: '/julia.wav',
    target: '/julia/channel'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 2,
    "name": "AudioFileMultiInfoResult",
    "info": [
      {
        "name": "julia_1.wav",
        "last_modified": "2015-08-03T08:16:15Z",
        "created": "2015-08-03T08:16:15Z",
        "size": 474444,
        "is_directory": false,
        "is_registered": true,
        "frequency": 8000,
        "length": 29.65,
        "n_channels": 1,
        "format": "lin16"
      }
      ...
    ]
  }
}
<?xml version="1.0"?>
<result>
  <version>2</version>
  <name>AudioFileMultiInfoResult</name>
  <info>
    <item>
      <name>julia_1.wav</name>
      <last_modified>2015-08-03T08:16:15Z</last_modified>
      <created>2015-08-03T08:16:15Z</created>
      <size>474444</size>
      <is_directory>false</is_directory>
      <is_registered>true</is_registered>
      <frequency>8000</frequency>
      <length>29.65</length>
      <n_channels>1</n_channels>
      <format>lin16</format>
    </item>
    ...
  </info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found

Resource locker

  • LOCK File specified by path
  • CHECK File(s) specified by target (if overwriting existing file)

Age Estimation

/technologies/agestim – age of speaker
GET /technologies/agestim (asynchronous)Age estimation - analyze recording

Returns estimated age of speaker in record. This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file
modelquerystringyesName of age estimation model
cache_onlyquerybooleannoIf true, cache_only ensures that the result is returned only if it is already in the cache (the result is stored in the cache if the file has already been processed by the technology). If the result isn't in cache yet, only 404 status is returned. This parameter is not mandatory and if it is not set by the user, the recording is processed by the given technology automatically if the result is not already in the cache. Parameters cache_only and cache_disable can not be used together.
cache_disablequerybooleannoIf true, the result cache is disabled. cache_disable ensures that the recording is always processed and the result is not stored in the cache. Parameters cache_only and cache_disable can not be used together.
from_timequerydoublenofrom_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed from the beginning. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.
to_timequerydoublenoto_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed to the end. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/agestim?path=/julia.wav&model=S"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/agestim',
  uri_params: {
    path: '/julia.wav',
    model: 'S'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
The time_range parameter in the output is serialized only when query parameters from_time or to_time are specified.
JSONXML
{
  "result": {
    "version": 2,
    "name": "AgeEstimationResult",
    "file": "julia_1.wav",
    "model": "L",
    "time_range": {
      "from_time": 2.5,
      "to_time": 5.5
    },
    "channel_scores": [
      {
        "channel": 0,
        "scores": [
          {
            "name": "0",
            "score": 0
          },
          {
            "name": "1",
            "score": 0
          },
          ...
        ]
      }
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>2</version>
  <name>AgeEstimationResult</name>
  <file>julia_1.wav</file>
  <model>L</model>
  <time_range>
    <from_time>2.5</from_time>
    <to_time>5.5</to_time>
  </time_range>
  <channel_scores>
    <item>
      <channel>0</channel>
      <scores>
        <item>
          <name>0</name>
          <score>0</score>
        </item>
        <item>
          <name>1</name>
          <score>0</score>
        </item>
        ...
      </scores>
    </item>
  </channel_scores>
</result>

Scores object description

channel_scores[]list of scores for each channel of recording
channel_scores[]->channelindex of channel
channel_scores[]->scores[]list of scores for each age class
channel_scores[]->scores[]->namename of age class (estimated number of years)
channel_scores[]->scores[]->scoreprobability of an estimated age. Only one age class has score = 1 and other classes are 0.
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1024Result not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1035Invalid time range
415Unsupported Media Type
  • 1007Unsupported audio format

Required technologies

  • Age Estimation (AGE)

Resource locker

  • LOCK Analyzed file
POST /technologies/agestim (asynchronous)Age estimation - analyze voiceprint

Returns estimated age of speaker in SID voiceprint. Use request GET /technologies/speakerid/extractvp to extract voiceprint from recording. It is necessary to use same name of AGE model as name of SID model used for voiceprint extraction (for example: voiceprint extracted with model XL3 must be processed only with AGE model XL3) otherwise server returns http error 500.

This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
modelquerystringyesName of age estimation model.
Use the same model name as used during the voiceprint extraction.
Content-Typeheaderstringyesapplication/json for JSON content (Default value)
application/xml for XML content
application/octet-stream for raw voiceprint content

Body

JSONXML
{
  "voiceprint": "<Base64 Data>"
}
<?xml version="1.0" encoding="UTF-8"?>
<voiceprint>[Base64 Data]</voiceprint>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -H "Content-Type:application/json" -X POST --data-binary @"voiceprint.json" "SERVER_ADDRESS:PORT/technologies/agestim?model=S"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */

var options = {
  method: 'POST',
  uri_path: '/technologies/agestim',
  uri_params: {
    model: 'S'
  },
  content: {
    "voiceprint": "VlBUIAYA//+pCQAAWAIAAAAAAABwMEofIAAAAKkJAABYAgAAAAAAAAA8HEYAPBxGAAAAAAYAAADL9Xw/UcsevyAbFD/iCuA/tmphP/TqzT8Sjx+/48ocPyme/D/RcrA+JNspP9c+iT+xBog+sEcuwAhV77/2f4+/DHG/PxnnCr8bYi++i6HEvrrOGr9zdLK+nUqTP7+ZGT4asAA/KDGNva4ynjxhphtAYmVFwCoxkL9ba+u+lbajPmc9wr/SzQ1AftyevwQoOz8o6Ya+9JCLP7mRyr8ZIlW/bQDnPZeXmr8RwhDA7VaSv6VfwT1YUcS/EqGMP92z2D/Rz4E/QktnP7ZrVD9rfpO+XapPvjbyCD8aabI+bcFUv7ho2r2ARg28eIilv0KYVb+0x8e+H0rdv613tj/5pay+4vpUvgAdcbu7H5A/0U/cPwV4E79AGmU/W1gUv8w5KsCcDDQ/vpBQPu1mhL9BBVQ/FecMvgxJq76e9ms9WJWPP2jZKL+WHfG+zuk9PrPQMz6cSxk/tc6nP5eREb8YIiU+NY8xP6M2mr8IIKq/qPWVPyl+3T8eNdI/0U6qv0N4+j+S9qU/KogNv3R7AsB+ghc/q8AFP/4iI76Z9s2/lgypPhmlkz9uJti/uvDtv8h2CL/iFgE/XHv8vvvzb789+68/peZgPrrdmr24teK/APQNOQS3BT+qdS8/Vxptv/z0677zkcA+v+jMvwJM3DyDbIa/R62TvpaLTr7KCRe/7cLZvnlVyj6gArQ+WKCpPna1770Qpg8/42l8vzlj4D/ACCi/QFc3v4U3Zr0z9yJA26BvP6ylO77Cgg/AQYrKvmF2iD+mABS+zoGNP/kRzL+zhR+/gryIP89Pcb8gAAAAqQkAAEAGAAAAAAAAADwcRgA8HEYAAAAAPAAAAFwDZb2irbc82pYLPSxOAbzlRAa8L6sSvXc0FDyHpFI9+QejPQw/Lr2cGJ69VPO/O1Wgzr0hSza9a83oPV+Qhb1kOAC9sPOeOzZeDrwHPQA+Wx6iPJTXlDwpgxs8tWqXvF2rYb2ejgG9QlNXPcMr+jwv0RQ8q5qXvZSFXrwrKZo9jC5mPTlQWbwvVZU7nJGyvea5kb1TsEo82SgbvTLaxLucciW8mPBjvRd06DyFzNs82OhGPTwkRbuJa1w9oviTO/fWGjwtlxM9Lsg1PUwDJb37imO91cjCO844wrtABpE9ZxAQvT3ACrzoBqU9zlwfvbCAvz3sAXC9o7raPOTqLD3C7q49sOhhOy7uAT2o3YA9SdfLPBKWgz0iqmU9vHX5PBIgPLw85LC9wrgCvVTg3DyEOko9eamvurK7rrwXtoU91oxBvbPS1b0FAta9ohUEu/mdWb2WMlA8aE8KPVxRtb0NOoI9Xe4FPQ+LqLzz7/q85pNqPbzOer3nkJu9A0y2ulXiXL3BneY7Vz8JvTbCMj15dae7wjowvXT+bby1Gv88ZeMQvBmgA70nLSE8f9IZPXN78jyJe8A8uz9LPQqdTb1KFpe9GycRPez5fTxGW4k8M/u1uuUB3r2dYGw8Uu/xvLd8ibvVYZs8soW0Pd8W8zs088A8KA0hvGLA+TqXHoA9FPuLvaX3Ij3HP9y57QqTPR18Azzs7ta7tuURPWv6IL35gyS9zMHtvETMprxvQC89YR2wPV21ET3t4gk8cqyOPSyTGj3t/GO9uwn6vES6Xz2KOSA8BBWSOwikeDz/84y9piQzvUkyMjtjNuM7A2Qbva2s77tPQHo9q58NPmqAHr0VdsQ9VJ2LPH4+zbudDYO9wEEQvdXzHj2iOY+9yuF1PcujDb3k3ro8xZ1APX878jwdf548Cew5vfKDST1RtWo9ayFwvdRxzzyIL2S7O+AvOidql71jlfS9cpLNPVG7GLzXInu8zLOwPemHHT4Sgi09ynCoPU9fjz2dOcQ8NoaBPS9E4rxrtUk9EK2zPa5ALT3u5DM9jvv7PE9ukLxADfw8wVMjPe6mULxmxms9dxtFvZwhj7338U285zg7PQXRrjuTYnO9y9j3PFZAHbxHDgc9Y5kVvApPMj1pC3Q6hDMpO3kDVLwQ5sq8gKsUvOJK8Dv5gC68mP8oPNV1QD1Q0ke7hBc/PI3qUr3Zp7g85RBzvah4yLwRwWa7WLmdvLb3ibuGrp68NlFNvDKC1Txx7VW9ngYOPb+8sTyuEEq8YwBzPV030TydMky97tAaPf+x4r1kxYE9VgWSPdcltTwjFVq9IxXhPFCchD1HrpI9f8OBPd8aAb359ba9zEAzvPWiwb0X5ws9DbvbvUpl4TxP98y8Y6SwOc1c7TxjBZ49KpMyO9cepzzeu8Q9/mRqPBKi+7vp4L28ldwavU03xT2Q1MW98gMrvb2DILwQctI8iLQOPYS5Zj2nT788CdCkPEdD7z0gDGo99oa4PNwkAjyHl/w8uRVQPeElaL2Uj607HreQPBYFSz3ifVG9LRSqO243Ur3ox2e8d4E5vQKn8DyrmL69Nwq6PEX3Dz3gMVu9BbCEvAhclry3sBS+WIKovFi1lz2EJrM86qLHPVmK1rz+xRS+hRcPPSLJZjypsWK7WbaCvB3TmT1M0+a9PAjAu+RFVzzVFwk+xSlmPDCgvD29XXA93bbqOeAd8LxTriQ9FK5xOyMNHjyBPQm5XaWGvZGolrwe97Y7QnUDPecDtrxr/qg89nZ/PXkAoz0zpDe6/Xc+vWunJz2Vhck9d3ItPWPfh71VAvw8ZGZuPTKLK7v0cqE98dEnPLcgcz0uCq283QyIPRE7kbq0O/U6JGmSPD8Ke7rVceO8zn0/PRy6WT1FBBU9XpsmPVOUK71dU9y8i0VvPS9Wgj2LAIE8ThOePBvAl7wUFTK8WCRcvRrYo7kNfa89eS4IvdF9wDy6Sdq73ADmvSU8+boFOFE8ao6fvbQVHr39zi09mqJVO1lcTr2ZCFO9Ae2DvTVpX73zufK8ES6nutk3vzwIWUw9GYGcPVIfOr1Rv0Y9QT0ZvXb3Dz25w4i7TePvvL4t97uqna889sOsvO5iQb1cWJ09vXwRvbSuAL4="
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 2,
    "name": "AgeEstimationResult",
    "file": "{voiceprint}",
    "model": "L",
    "channel_scores": [
      {
        "channel": 0,
        "scores": [
          {
            "name": "0",
            "score": 0
          },
          {
            "name": "1",
            "score": 0
          },
          ...
        ]
      }
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>2</version>
  <name>AgeEstimationResult</name>
  <file>{voiceprint}</file>
  <model>L</model>
  <channel_scores>
    <item>
      <channel>0</channel>
      <scores>
        <item>
          <name>0</name>
          <score>0</score>
        </item>
        <item>
          <name>1</name>
          <score>0</score>
        </item>
        ...
      </scores>
    </item>
  </channel_scores>
</result>

Scores object description

channel_scores[]list of scores for each channel of recording
channel_scores[]->channelindex of channel
channel_scores[]->scores[]list of scores for each age class
channel_scores[]->scores[]->namename of age class (estimated number of years)
channel_scores[]->scores[]->scoreprobability of an estimated age. Only one age class has score = 1 and other classes are 0.
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1025An invalid value was specified for one of the header parameters in the request
  • 1018The requested URI requires content
  • 1019An invalid data was specified in the request content
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Age Estimation (AGE)
/technologies/agestim/benchmark – age estimation technology benchmark
GET /technologies/agestim/benchmark (asynchronous)Age estimation technology Benchmark

Benchmark of Age Estimation technology with default set of recordings or specified recording (by parameter path).

Parameters

NameParameter TypeData TypeRequiredDescription
modelquerystringyesName of Age Estimation technology model.
pathquerystringnoServer path to the audio file. If not specified, default recordings will be used.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/agestim/benchmark?model=S"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/agestim/benchmark',
  uri_params: {
    model: 'S'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 3,
    "name" : "AgeEstimBenchmarkResult",
    "dataset_version" : "1.0",
    "model_name" : "S",
    "benchmark_result" : {
      "processed_length" : 21.31999969482422,
      "processing_time" : 0.502251,
      "faster_than_realtime" : 42.448894466759086
    },
    "cpu_info" : {
      "vendor" : "GenuineIntel",
      "brand" : "Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz",
      "n_cores" : 4,
      "n_logical_cores" : 4,
      "l1_data_cache" : 32768,
      "l1_instruction_cache" : 32768,
      "l2_cache" : 262144,
      "l3_cache" : 6291456
    },
    "memory_info" : {
      "total_ram" : 16623747072,
      "free_ram" : 5028855808,
      "total_swap" : 0,
      "free_swap" : 0
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>3</version>
  <name>AgeEstimBenchmarkResult</name>
  <dataset_version>1.0</dataset_version>
  <model_name>S</model_name>
  <benchmark_result>
    <processed_length>21.31999969482422</processed_length>
    <processing_time>0.502251</processing_time>
    <faster_than_realtime>42.448894466759086</faster_than_realtime>
  </benchmark_result>
  <cpu_info>
    <vendor>GenuineIntel</vendor>
    <brand>Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz</brand>
    <n_cores>4</n_cores>
    <n_logical_cores>4</n_logical_cores>
    <l1_data_cache>32768</l1_data_cache>
    <l1_instruction_cache>32768</l1_instruction_cache>
    <l2_cache>262144</l2_cache>
    <l3_cache>6291456</l3_cache>
  </cpu_info>
  <memory_info>
    <total_ram>16623747072</total_ram>
    <free_ram>4938498048</free_ram>
    <total_swap>0</total_swap>
    <free_swap>0</free_swap>
  </memory_info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Age Estimation (AGE)
  • Voice Activity Detection (VAD)

Resource locker

  • LOCK Analyzed file (if used parameter path)

Denoiser

/technologies/denoiser – denoise recording
POST /technologies/denoiser (asynchronous)Denoise recording

Create denoised recording from source recording.

Output audio file is always WAV. If file specified by parameter target has no extension or extension is other than .wav, then extension .wav is appended.

This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to source audio file
targetquerystringyesServer path to target audio file
modelquerystringyesName of Denoiser model
from_timequerydoublenofrom_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed from the beginning. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.
to_timequerydoublenoto_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed to the end. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST "SERVER_ADDRESS:PORT/technologies/denoiser?path=julia_1.wav&target=julia_1_denoised.wav&model=EN_US"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'POST',
  uri_path: '/technologies/denoiser',
  uri_params: {
    path: '/julia_1.wav',
    target: '/julia_1_denoised.wav',
    model: 'EN_US'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 3,
    "name": "AudioFileInfoResult",
    "info": {
      "name": "julia_1.wav",
      "last_modified": "2015-08-03T08:16:15Z",
      "created": "2015-08-03T08:16:15Z",
      "size": 474444,
      "is_directory": false,
      "is_registered": true,
      "frequency": 8000,
      "length": 29.65,
      "n_channels": 1,
      "format": "lin16"
    }
  }
}
<?xml version="1.0"?>
<result>
  <version>3</version>
  <name>AudioFileInfoResult</name>
  <info>
    <name>julia_1.wav</name>
    <last_modified>2015-08-03T08:16:15Z</last_modified>
    <created>2015-08-03T08:16:15Z</created>
    <size>474444</size>
    <is_directory>false</is_directory>
    <is_registered>true</is_registered>
    <frequency>8000</frequency>
    <length>29.65</length>
    <n_channels>1</n_channels>
    <format>lin16</format>
  </info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1035Invalid time range

Required technologies

  • Denoiser (DENOISER)

Resource locker

  • LOCK File specified by path
/technologies/denoiser/benchmark – denoiser technology benchmark
GET /technologies/denoiser/benchmark (asynchronous)Denoiser technology Benchmark

Benchmark of Denoiser technology with default set of recordings or specified recording (by parameter path).

Parameters

NameParameter TypeData TypeRequiredDescription
modelquerystringyesName of Denoiser technology model.
pathquerystringnoServer path to the audio file. If not specified, default recordings will be used.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/denoiser/benchmark?model=EN_US"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/denoiser/benchmark',
  uri_params: {
    model: 'EN_US'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 3,
    "name" : "DenoiserBenchmarkResult",
    "dataset_version" : "1.0",
    "model_name" : "EN_US",
    "benchmark_result" : {
      "processed_length" : 901.930118560791,
      "processing_time" : 191.034012,
      "faster_than_realtime" : 8.379610791963618
    },
    "cpu_info" : {
      "vendor" : "GenuineIntel",
      "brand" : "Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz",
      "n_cores" : 4,
      "n_logical_cores" : 4,
      "l1_data_cache" : 32768,
      "l1_instruction_cache" : 32768,
      "l2_cache" : 262144,
      "l3_cache" : 6291456
    },
    "memory_info" : {
      "total_ram" : 16623747072,
      "free_ram" : 5028855808,
      "total_swap" : 0,
      "free_swap" : 0
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>3</version>
  <name>DenoiserBenchmarkResult</name>
  <dataset_version>1.0</dataset_version>
  <model_name>EN_US</model_name>
  <benchmark_result>
    <processed_length>901.930118560791</processed_length>
    <processing_time>191.034012</processing_time>
    <faster_than_realtime>8.379610791963618</faster_than_realtime>
  </benchmark_result>
  <cpu_info>
    <vendor>GenuineIntel</vendor>
    <brand>Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz</brand>
    <n_cores>4</n_cores>
    <n_logical_cores>4</n_logical_cores>
    <l1_data_cache>32768</l1_data_cache>
    <l1_instruction_cache>32768</l1_instruction_cache>
    <l2_cache>262144</l2_cache>
    <l3_cache>6291456</l3_cache>
  </cpu_info>
  <memory_info>
    <total_ram>16623747072</total_ram>
    <free_ram>4938498048</free_ram>
    <total_swap>0</total_swap>
    <free_swap>0</free_swap>
  </memory_info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Denoiser (DENOISER)
  • Voice Activity Detection (VAD)

Resource locker

  • LOCK Analyzed file (if used parameter path)

Diarization

/technologies/diarization – diarization of recording
GET /technologies/diarization (asynchronous)Diarization - Analyze recording

Returns diarization of recording. By diarization it is possible to split recording by speakers. Diarization results can be improved by setting query parameters properly. Note that this technology does not identify found speakers. This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file
modelquerystringyesName of diarization model
max_speakersquerystringnoMaximal number of speakers. Default value is 2.
total_speakersquerystringnoTotal number of speakers
cache_onlyquerybooleannoIf true, cache_only ensures that the result is returned only if it is already in the cache (the result is stored in the cache if the file has already been processed by the technology). If the result isn't in cache yet, only 404 status is returned. This parameter is not mandatory and if it is not set by the user, the recording is processed by the given technology automatically if the result is not already in the cache. Parameters cache_only and cache_disable can not be used together.
cache_disablequerybooleannoIf true, the result cache is disabled. cache_disable ensures that the recording is always processed and the result is not stored in the cache. Parameters cache_only and cache_disable can not be used together.
from_timequerydoublenofrom_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed from the beginning. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.
to_timequerydoublenoto_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed to the end. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/diarization?path=julia_1.wav&model=S"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/diarization',
  uri_params: {
    path: '/julia.wav',
    model: 'S'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
The time_range parameter in the output is serialized only when query parameters from_time or to_time are specified.
JSONXML
{
  "result": {
    "version": 2,
    "name": "DiarizationResult",
    "file": "julia_1.wav",
    "model": "S",
    "max_speakers": 2,
    "total_speakers": 2,
    "time_range": {
      "from_time": 2.5,
      "to_time": 5.5
    },
    "segmentation": [
      {
        "channel_id": 0,
        "score": 0,
        "confidence": 0,
        "start": 0,
        "end": 6700000,
        "word": "silence"
      },
      {
        "channel_id": 0,
        "score": 0,
        "confidence": 0,
        "start": 6700000,
        "end": 10200000,
        "word": "1"
      },
      ...
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>2</version>
  <name>DiarizationResult</name>
  <file>julia_1.wav</file>
  <model>S</model>
  <max_speakers>2</max_speakers>
  <total_speakers>2</total_speakers>
  <time_range>
    <from_time>2.5</from_time>
    <to_time>5.5</to_time>
  </time_range>
  <segmentation>
    <item>
      <channel_id>0</channel_id>
      <score>0</score>
      <confidence>0</confidence>
      <start>0</start>
      <end>6700000</end>
      <word>silence</word>
    </item>
    <item>
      <channel_id>0</channel_id>
      <score>0</score>
      <confidence>0</confidence>
      <start>6700000</start>
      <end>10200000</end>
      <word>1</word>
    </item>
    ...
  </segmentation>
</result>

Result description

segmentation[]list of segments
segmentation[]->channel_idchannel index
segmentation[]->scorenot used, always 0
segmentation[]->confidencenot used, always 0
segmentation[]->startstart time of word (HTK time units - 100ns)
segmentation[]->endend time of word (HTK time units - 100ns)
segmentation[]->wordcontains number of speaker or silence
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1024Result not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1035Invalid time range
415Unsupported Media Type
  • 1007Unsupported audio format

Required technologies

  • Diarization (DIAR)

Resource locker

  • LOCK Analyzed file
/technologies/diarization/benchmark – diarization technology benchmark
GET /technologies/diarization/benchmark (asynchronous)Diarization technology Benchmark

Benchmark of Diarization technology with default set of recordings or specified recording (by parameter path).

Parameters

NameParameter TypeData TypeRequiredDescription
modelquerystringyesName of Diarization technology model.
pathquerystringnoServer path to the audio file. If not specified, default recordings will be used.
max_speakersquerystringnoMaximal number of speakers. Default value is 2.
total_speakersquerystringnoTotal number of speakers. Some technology models does not support this parameter. Default value is 0.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/diarization/benchmark?model=S"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/diarization/benchmark',
  uri_params: {
    model: 'S'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 3,
    "name" : "DiarizationBenchmarkResult",
    "dataset_version" : "1.0",
    "model_name" : "L",
    "benchmark_result" : {
      "processed_length" : 21.31999969482422,
      "processing_time" : 4.0397680000000005,
      "faster_than_realtime" : 5.277530713353889
    },
    "cpu_info" : {
      "vendor" : "GenuineIntel",
      "brand" : "Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz",
      "n_cores" : 4,
      "n_logical_cores" : 4,
      "l1_data_cache" : 32768,
      "l1_instruction_cache" : 32768,
      "l2_cache" : 262144,
      "l3_cache" : 6291456
    },
    "memory_info" : {
      "total_ram" : 16623747072,
      "free_ram" : 5028855808,
      "total_swap" : 0,
      "free_swap" : 0
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>3</version>
  <name>DiarizationBenchmarkResult</name>
  <dataset_version>1.0</dataset_version>
  <model_name>L</model_name>
  <benchmark_result>
    <processed_length>21.31999969482422</processed_length>
    <processing_time>4.0397680000000005</processing_time>
    <faster_than_realtime>5.277530713353889</faster_than_realtime>
  </benchmark_result>
  <cpu_info>
    <vendor>GenuineIntel</vendor>
    <brand>Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz</brand>
    <n_cores>4</n_cores>
    <n_logical_cores>4</n_logical_cores>
    <l1_data_cache>32768</l1_data_cache>
    <l1_instruction_cache>32768</l1_instruction_cache>
    <l2_cache>262144</l2_cache>
    <l3_cache>6291456</l3_cache>
  </cpu_info>
  <memory_info>
    <total_ram>16623747072</total_ram>
    <free_ram>4938498048</free_ram>
    <total_swap>0</total_swap>
    <free_swap>0</free_swap>
  </memory_info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Diarization (DIAR)
  • Voice Activity Detection (VAD)

Resource locker

  • LOCK Analyzed file (if used parameter path)
/technologies/diarization/split – make multi-channel file by diarization
POST /technologies/diarization/split (asynchronous)Make multi-channel file by diarization

Create new multi-channel file by diarization. Each channel in target file will correspond to one speaker in original recording.

Output audio file is always WAV. If file specified by parameter target has no extension or extension is other than .wav, then extension .wav is appended.

This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file
targetquerystringyesServer path to created audio file. The file must not exist
modelquerystringyesName of diarization model
max_speakersquerystringnoMaximal number of speakers. Default value is 2.
total_speakersquerystringnoTotal number of speakers
cache_disablequerybooleannoIf true, result cache will be disabled. Ensures that file will be always processed by diarization and result of diarization will not be stored in cache.
from_timequerydoublenofrom_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed from the beginning. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.
to_timequerydoublenoto_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed to the end. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST "SERVER_ADDRESS:PORT/technologies/diarization/split?path=julia_kelly_1.wav&target=splitted_by_diarization.wav&model=S"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/diarization/split',
  uri_params: {
    path: '/julia_kelly_1.wav',
    target: '/splitted_by_diarization.wav',
    model: 'S'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 3,
    "name": "AudioFileInfoResult",
    "info": {
      "name": "julia_1.wav",
      "last_modified": "2015-08-03T08:16:15Z",
      "created": "2015-08-03T08:16:15Z",
      "size": 474444,
      "is_directory": false,
      "is_registered": true,
      "frequency": 8000,
      "length": 29.65,
      "n_channels": 1,
      "format": "lin16"
    }
  }
}
<?xml version="1.0"?>
<result>
  <version>3</version>
  <name>AudioFileInfoResult</name>
  <info>
    <name>julia_1.wav</name>
    <last_modified>2015-08-03T08:16:15Z</last_modified>
    <created>2015-08-03T08:16:15Z</created>
    <size>474444</size>
    <is_directory>false</is_directory>
    <is_registered>true</is_registered>
    <frequency>8000</frequency>
    <length>29.65</length>
    <n_channels>1</n_channels>
    <format>lin16</format>
  </info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1041Multichannel recording is not allowed
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1024Result not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1035Invalid time range
415Unsupported Media Type
  • 1007Unsupported audio format

Required technologies

  • Diarization (DIAR)

Resource locker

  • LOCK Source file

Gender Identification

/technologies/genderid – gender of speaker
GET /technologies/genderid (asynchronous)Gender identification - analyze recording

Returns gender of speaker in record. Depending on available models even multichannel records can be processed. This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file
modelquerystringyesName of gender identification model
cache_onlyquerybooleannoIf true, cache_only ensures that the result is returned only if it is already in the cache (the result is stored in the cache if the file has already been processed by the technology). If the result isn't in cache yet, only 404 status is returned. This parameter is not mandatory and if it is not set by the user, the recording is processed by the given technology automatically if the result is not already in the cache. Parameters cache_only and cache_disable can not be used together.
cache_disablequerybooleannoIf true, the result cache is disabled. cache_disable ensures that the recording is always processed and the result is not stored in the cache. Parameters cache_only and cache_disable can not be used together.
from_timequerydoublenofrom_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed from the beginning. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.
to_timequerydoublenoto_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed to the end. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/genderid?model=DEFAULT&path=julia_1.wav"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/genderid',
  uri_params: {
    path: '/julia.wav',
    model: 'DEFUALT'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
The time_range parameter in the output is serialized only when query parameters from_time or to_time are specified.
JSONXML
{
  "result": {
    "version": 2,
    "name": "GenderIdentificationResult",
    "file": "julia_1.wav",
    "model": "DEFAULT",
    "time_range": {
      "from_time": 2.5,
      "to_time": 5.5
    },
    "channel_scores": [
      {
        "channel": 0,
        "scores": [
          {
            "name": "Female",
            "score": 0.52401793
          },
          {
            "name": "Male",
            "score": 0.4759821
          }
        ]
      }
    ]
  }
}
<result>
  <version>2</version>
  <name>GenderIdentificationResult</name>
  <file>julia_1.wav</file>
  <model>DEFAULT</model>
  <time_range>
    <from_time>2.5</from_time>
    <to_time>5.5</to_time>
  </time_range>
  <channel_scores>
    <item>
      <channel>0</channel>
      <scores>
        <item>
          <name>Female</name>
          <score>0.52401793</score>
        </item>
        <item>
          <name>Male</name>
          <score>0.4759821</score>
        </item>
      </scores>
    </item>
  </channel_scores>
</result>
400Bad Request
  • 1003A required query parameter was not specified for this request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1024Result not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1035Invalid time range
415Unsupported Media Type
  • 1007Unsupported audio format

Required technologies

  • Gender Identification (GID)

Resource locker

  • LOCK Analyzed file
POST /technologies/genderid (asynchronous)Gender identification - analyze voiceprint

Returns gender of speaker in SID voiceprint. Use request GET /technologies/speakerid/extractvp to extract voiceprint from recording. It is necessary to use same name of GID model as name of SID model used for voiceprint extraction (for example: voiceprint extracted with model XL3 must be processed only with GID model XL3) otherwise server returns http error 500.

This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
modelquerystringyesName of gender identification model.
Use the same model name as used during the voiceprint extraction.
Content-Typeheaderstringyesapplication/json for JSON content (Default value)
application/xml for XML content
application/octet-stream for raw voiceprint content

Body

JSONXML
{
  "voiceprint": "<Base64 Data>"
}
<?xml version="1.0" encoding="UTF-8"?>
<voiceprint>[Base64 Data]</voiceprint>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -H "Content-Type:application/json" -X POST --data-binary @"voiceprint.json" "SERVER_ADDRESS:PORT/technologies/genderid?model=XL3"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */

var options = {
  method: 'POST',
  uri_path: '/technologies/genderid',
  uri_params: {
    model: 'XL3'
  },
  content: {
    "voiceprint": "VlBUICgA\/\/+pCQAA6AMAAAAAAABRgSS6IAAAAKkJAADoAwAAAAAAAAA8HEYAPBxGAAAAACgAAAC9LLZAKIR0QIBYR0DmeYnAqrlsQOP3b7\/vP43AwUMhPy7O5T+Dbey+64AdwEQCkb89SkPA4OSlv5tOcsBbm0K\/Gk6gP86Ihb8vxdW\/55ARP+GogcBZeRhAibl\/P1vBrEAF6AA\/qmIyPnZcWD7kJbk\/6IbFPUp0K8B7v0m\/DvdgPrl4oT9h+as\/88CkQJE4PL+lD58\/D7ZcPTGWmT8x\/8Q\/9u2evkPRK79T+IbAmZB+Pzfwij8M+TNALXLuP0F1Nr+7VoY\/BkzrPgAX7L+qlRrAEmHIva2fFkC\/jWS\/iB1UvwKdOcCrkAtAJkYAvwhxlL8QbpS\/2EjOvI9EBkDzUjM\/kYmYv3uYoz\/y4pa\/F83JPhcTUr9DdWJAtNhAwKULtr\/IaWW\/mUnZPYHUHMCSzWvAfDseQI41qz+\/i6o+uccNvvxhKz99svS+ZlR7PsEu\/L+1IIG\/w\/a+P8DenT8jSFVAb5+xP4bBQz5mnwq9tcGGvdPoxT6+o6o+A5EOPk00Hb9N+4A\/Lh13P5nCIsCFbuU+ELo2QP4rTr9GawvASHKFv5O0kL88HQM\/UAXnv+VawD\/1BCdA\/CCkP4nb+7404HM\/hkAMQP5npz74KijA9+pAPnHzZj5hMYQ\/15Z3vq7kMEBPQQ3A9x0Yv8qWA0DfNos\/qV4PwDQcf7+GBXc\/FTWKvwlJfz1wM6i\/K03avy8HGMAD\/X4\/1arSP1i1sT+mTlu9CTbVPsnuI7\/4ui1AOKQSv1eQKb\/1gA5Aputvv1Hvij96T6u8S5mhvxI73L8qJxnASC0PwI59Cb\/mjo893ygJv1kf2DxVKz2\/31fsvinqAsC\/WCo\/zZKiv3g3Z78bL5a\/xbq\/v9PyhD9iG9c+wL\/IP2TmQb+bLXG\/Gpawv35eOj679gM\/hBYavwZeZcAjmTa\/xDxfPxpNtz9xyy1AmskTwEiWu79q9gxAGBP4vyLqBEBsDCFAJ6DeP5AVwD84ZUPA5Z3TP8uNvT\/w\/gfAm3gfv\/+QJ79Jzsi\/p59vP2JbFkAG08e8K\/7HPxek\/b6gqv2\/nIchwBckQEBqY0+\/nnBNQMb0rb8E1ENAnKKzvkYZBb8TFbI+ijaQQDorDcDwMwY+q0NWwBHJFcAqX9I+C5vfvzJ60r8DJtW+JX\/nv1W9Rj75J8G\/BWN3PxzIar\/DUwrAVX6hPQHRdD+4Auy+RoMDwLkVIMAmBqQ\/EVOcPx9zmT+Zaq49RFEqwEgF871Ec2RAeVWsPw6JBD+YnmpAvrxzPw46iz598ytAXLJgP8mxJj8Rej49MxgPQKsB8z4cGUW\/hBjPvwTXc72wq8G\/NAbVvumhvb\/tP2o\/IAAAAKkJAABgCQAAAAAAAAA8HEYAPBxGAAAAAJABAADOdYc\/LaH4P5bqTD\/A9Rc\/T9amP2UCaz7CQCvA3uYqwPtXUD8odXQ9AIYRPaTzLsBOEja+Ptc\/vyPWhT9BE0Q\/WDGNPkL6n74oRAU\/wU6VP5wkTT\/k2Fa\/r9E7QOK0FsA0RZ2+C2s9vwC5H7+PAo2++BtPv7wioL8Qo8i8QxpJvi+O37+iVdG\/aV6RP7J3CcBbIXy\/NkWXP+ZCx78HH7M\/YrJ+Phxauj0e2ZM\/uqP7vaxn5D8MXCU\/ilc8P5CLazzQ0YY\/Q3TlP+KSSb8IP3s+MFN5vzj+XD4GJNw+O3+1PTCwyryMBjY\/2OXmv34B6L7kscM9sO69PyrVEj58mipApfNCvoQ2rr+LZiy\/z0kTP3o8ob8QgT49EGNBwEbkm77LXQs\/jVlaPpkiSb9ag3W\/mjUVPu8Wp7+oD78+S+MQv5BOnj\/Yh8E9IiToP\/CP8D9MKf4+U37tPzw73b+cZfG9XD9ePzRAqL\/eWRE\/4DfAvqlRY7\/a8Uc\/lx\/CPzrxgr8AANk8TPdxvsf5rT\/wsAG\/c4xmP069+7+iiIm\/\/eWzv36AXz8SFWO\/sCtJvUDi9b5Vaze\/ziVKvYA+5r+s3Ws\/Cu9gP+IUAsBwrTu\/gqz1v9zfiT5qsSy\/ilVJPyIJ4j\/wEge++Bi3PyJZBsBVshDAo1l0vsV6N79gEdS\/mNquP0wvNkCmOG0\/\/I1iv6SBBkDHmAzA36Ngv3v\/o76+dei+5n3UvsLy4D5R0Jg\/TjmgvocBib\/w3A5A0BHYP0LxWz\/gZ8I9qLM3PZdaBL9y9lc+s\/YewFL0mr+4GifACVIFP7lz77+vk6U+HowYP423uz8akKq\/9JA8PqD5rT5bH8k\/kqUIwGBa7T\/f89e\/pbsRv2Qq8z\/GIla\/UEIrP+HlIL+d32U\/aAiKvarhg74qTzBAMFS1PK2zib8AoGM7iFX0v+hd0j+YeiHAYXj\/viwYy77k5Uo+LJF9Pzz1DkDwg3U9yJK+PxxEpbwnOaI\/nSc\/P7KOyr88iio+4OTTvGn8gL6rvmM\/OMhVv4Rgjj+N97w\/YKmTvKjxxj93TxS\/J++aP8jUDMCTPm8\/FhWoPydSxr4PMoU\/y8pXv1gIOD82iEW\/EZR1v7Ggjb6GkUu\/vygkvxS6wb+A4cu+j\/tuv3A8Qz\/AuRk\/acrMP7odmz\/qDxa\/Cq6iP6X7+L40HvI\/Hw8tQE6dT7+c5cE\/d4eJP+z9qb7a1AxASRONP\/0lT8BlIoW\/fBYgv1jiqz\/S2K6\/oqkKwAieSz1RkwFAUEIgPrRusT4IHqe\/nOwuv5JWBEAoJLc94MnlvFSbOj41kpW+0HQgvyowjT9nMgM\/bloyQBpeTj\/l+L4\/th74PoBcAcCeGJw\/TRyEP7zyBL64BW6\/rn0FQOhyDMByJP2\/MqaDv71umT\/M4Q8\/003Av5juyz\/UBAA+4GOePPOw9T+Kzso\/AGo1vJg8V7+cAEg\/pii8P6J6v7\/eiqm\/HdUwQGeQmj8+rsW\/kZguv3TBub7Y4Aa\/rZlvv9L1KL\/MXTrAMm+EP1banj5Xyse\/iu\/cPmhswz8+9Yw\/YOuNvVzXDcAZL4U\/AVsfP8EEi7\/kOTa+vhsQwCP8F8Bo+2+\/TqByv0BrRr5H5cW\/hrk9v0hJV76W5xa+sQEvQLY65z+Ozye\/ERu4Pyxxvb7Hos8\/CgJmPzXKB8BoF\/O\/5+zRv4QmlT\/w1aA8Y0uSP7YNOkDcYU2\/jLZVwP8KCkDT7ri+DiPqPgSyxL\/gQMu\/AhAyP8FTg79Btxy\/LVTRPmDwi79IpT4\/\/mMJv1hnZT\/qfxu\/Zt3SPt6+Qb9xEYg+bLHXPsp4v7\/U\/DBAfCeOP8bVuz7eTCa\/1ke2v8pFt7+YkWa++lUxv+v6vL9QIyi9QgEiwCTSjr+Y3Y8\/K1akPtaSmb\/ZLtA+pbsFQNAIsz\/2XFK\/inzrPiYOIz\/ylRVAx3i5vguVBkBKQug+rJcxvO5adj9mL42\/MbOGv67mhD7A2vk8knqaP4kXqz5F5eg\/0GgLv+t1rz+SAqW\/CxCuP3YxgT93Iao+1Mu4v27RGD\/ohZA\/B8O8P5wb2z+hYX0\/AY\/KPrNikj8453S\/UG6pvxPNo7\/OS7I\/dDGQPn4N9j2j8I6+iKqyv8RWH78R6h1AmiEkP\/CZzD\/O6Uy\/gKNCv+RppT9cBAY\/sCuAPpaFqD54Hmc\/vzxpv\/cH+z4tJh4\/wPmXPbxu0z9xaGC\/qnd2P8SPa7\/lajA\/ukVxP17Wh7+S6cy+GKPdP4BDUr9m95W\/eJjFvxjttD+Mp7E\/0tYNwOK4Fb9eXI+\/laVQv0ozMj8dYic\/eDFTvnQDHz9A2Iu9cbZsPy5OEsAaYAk\/sIccPyCVmD4P8y4\/+L8GPisnab8Yyh5Ay54UPy+Web+\/Qqq\/AHwev9Zl6T\/Jhfg\/\/pViP4GRAj+RNHy\/gtGAQGb+hz55MeQ\/ElDAP308EcBXz5Y\/x7oewGBmfL5KT\/Q+zDlnPyXHtD9A9Q+\/dYcqv0Y\/IT\/oEQ5ABaWNPTz09D\/44e+\/ya1FP5QOOD+QHoy\/6BbNP6rogz\/2vDw\/Ktzsv\/jGKD7YraG9gmxiP9zZ3b70ibW\/AM5TO9Z\/Pz+wsYs+0lEmv+qV8r44r8K\/GvL0Pw3xXz90+vu+zybOP\/9pzb75kxk\/27ASP78ziz8EJFK\/rp2av8u1tL95tyhAiBdcv8R9wj74NMC+lGdLvjT13z9+mdW\/guOzPgf3EEAAXQM\/0IRUvZR5sr8dz1i\/gSjrP80k4T9OCJA\/gjKOv8qoTz9A75U8jU24P940C8DWj1q+5TfHv586m791RqG\/GmsTP4T7mb8It2k+GE20vyApn78yxDXAkGxcvcJKMb74pRO\/BrqdPnlqvb\/gAR69GOtkP4xpfj8R2hJAmFckQBYlzj5AozC8F\/zXP5jMrT\/\/kwhAEFrmP3ybib90rec\/JaF6v8d5bz\/WziZAVC3aP5BYE8BGe62\/JD3KvkiXEL7M9YU+8uqivqDyDT8qYJs\/IQPOP4jCFL9OgA7ANZkFwCUCbz8qIRw\/HRtGvix5k7\/IZHO+AmEmv5BVNsCLMKy+oJi3vfCHNr96878+gEkewP57EsA8z8S\/d15GwMHViD4juEVAnO9dvvPL7L+o8nO\/tCcxv3ZB9D+uaRFAb9pqv3haA8A35JpAYCh0v7BKPTzB92tA9teFwFEj3kCwQq6\/N2uEP+AdsT8="
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 2,
    "name": "GenderIdentificationResult",
    "file": "{voiceprint}",
    "model": "XL3",
    "channel_scores": [
      {
        "channel": 0,
        "scores": [
          {
            "name": "Female",
            "score": 0.52401793
          },
          {
            "name": "Male",
            "score": 0.4759821
          }
        ]
      }
    ]
  }
}
<result>
  <version>2</version>
  <name>GenderIdentificationResult</name>
  <file>{voiceprint}</file>
  <model>XL3</model>
  <channel_scores>
    <item>
      <channel>0</channel>
      <scores>
        <item>
          <name>Female</name>
          <score>0.52401793</score>
        </item>
        <item>
          <name>Male</name>
          <score>0.4759821</score>
        </item>
      </scores>
    </item>
  </channel_scores>
</result>
400Bad Request
  • 1003A required query parameter was not specified for this request
  • 1025An invalid value was specified for one of the header parameters in the request
  • 1018The requested URI requires content
  • 1019An invalid data was specified in the request content
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Gender Identification (GID)
/technologies/genderid/benchmark – gender identification benchmark
GET /technologies/genderid/benchmark (asynchronous)Gender identification Benchmark

Benchmark of Gender Identification technology with default set of recordings or specified recording (by parameter path).

Parameters

NameParameter TypeData TypeRequiredDescription
modelquerystringyesName of Gender Identification technology model.
pathquerystringnoServer path to the audio file. If not specified, default recordings will be used.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/genderid/benchmark?model=DEFAULT"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/genderid/benchmark',
  uri_params: {
    model: 'DEFAULT'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 3,
    "name" : "GenderIdentificationBenchmarkResult",
    "dataset_version" : "1.0",
    "model_name" : "DEFAULT",
    "benchmark_result" : {
      "processed_length" : 21.31999969482422,
      "processing_time" : 0.094189,
      "faster_than_realtime" : 226.35339259174873
    },
    "cpu_info" : {
      "vendor" : "GenuineIntel",
      "brand" : "Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz",
      "n_cores" : 4,
      "n_logical_cores" : 4,
      "l1_data_cache" : 32768,
      "l1_instruction_cache" : 32768,
      "l2_cache" : 262144,
      "l3_cache" : 6291456
    },
    "memory_info" : {
      "total_ram" : 16623747072,
      "free_ram" : 5028855808,
      "total_swap" : 0,
      "free_swap" : 0
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>3</version>
  <name>GenderIdentificationBenchmarkResult</name>
  <dataset_version>1.0</dataset_version>
  <model_name>DEFAULT</model_name>
  <benchmark_result>
    <processed_length>21.31999969482422</processed_length>
    <processing_time>0.094189</processing_time>
    <faster_than_realtime>226.35339259174873</faster_than_realtime>
  </benchmark_result>
  <cpu_info>
    <vendor>GenuineIntel</vendor>
    <brand>Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz</brand>
    <n_cores>4</n_cores>
    <n_logical_cores>4</n_logical_cores>
    <l1_data_cache>32768</l1_data_cache>
    <l1_instruction_cache>32768</l1_instruction_cache>
    <l2_cache>262144</l2_cache>
    <l3_cache>6291456</l3_cache>
  </cpu_info>
  <memory_info>
    <total_ram>16623747072</total_ram>
    <free_ram>4938498048</free_ram>
    <total_swap>0</total_swap>
    <free_swap>0</free_swap>
  </memory_info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Gender Identification (GID)
  • Voice Activity Detection (VAD)

Resource locker

  • LOCK Analyzed file (if used parameter path)

Keyword Spotting

/technologies/keywordspotting – searching keywords
GET /technologies/keywordspotting (asynchronous)Searching keywords

Search for keywords in the given audio file. A list of searched keywords is determined by the kwlist parameter. Keyword spotting is language dependent technology and therefore has the model parameter that determines desired language (see model parameter description).

Returns list of found words. Every found word contains start and end time in the HTK units (hundreds of nanoseconds), raw score, confidence in the range from zero to one, channel id for identifying in which the word was said and text of word with suffix separate by the underscore character that contains either the number of the pronunciation or directly text of the pronunciation (see example output).

This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file.
modelquerystringyesName of keyword spotting model. For list of supported models use object /technologies/.
kwlistquerystringyesName of keyword list.
cache_onlyquerybooleannoIf true, cache_only ensures that the result is returned only if it is already in the cache (the result is stored in the cache if the file has already been processed by the technology). If the result isn't in cache yet, only 404 status is returned. This parameter is not mandatory and if it is not set by the user, the recording is processed by the given technology automatically if the result is not already in the cache. Parameters cache_only and cache_disable can not be used together.
cache_disablequerybooleannoIf true, the result cache is disabled. cache_disable ensures that the recording is always processed and the result is not stored in the cache. Parameters cache_only and cache_disable can not be used together.
from_timequerydoublenofrom_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed from the beginning. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.
to_timequerydoublenoto_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed to the end. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/keywordspotting?path=/julia.wav&model=ENGLISH&kwlist=test"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/keywordspotting',
  uri_params: {
    path: '/julia.wav',
    model: 'ENGLISH',
    kwlist: 'test'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
The time_range parameter in the output is serialized only when query parameters from_time or to_time are specified.
JSONXML
{
  "result": {
    "version": 2,
    "name": "KeywordSpottingResult",
    "file": "julia_1.wav",
    "keyword_list": "test",
    "model": "ENGLISH",
    "time_range": {
      "from_time": 2.5,
      "to_time": 5.5
    },
    "words": [
      {
        "channel_id": 0,
        "score": 0.7887516,
        "confidence": 0.6875632,
        "start": 94900000,
        "end": 96400000,
        "word": "this_1"
      },
      {
        "channel_id": 0,
        "score": 0.1522667,
        "confidence": 0.5379933,
        "start": 99900000,
        "end": 101900000,
        "word": "this_1"
      },
      ...
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>2</version>
  <name>KeywordSpottingResult</name>
  <file>julia_1.wav</file>
  <keyword_list>test</keyword_list>
  <model>ENGLISH</model>
  <time_range>
    <from_time>2.5</from_time>
    <to_time>5.5</to_time>
  </time_range>
  <words>
    <item>
      <channel_id>0</channel_id>
      <score>0.7887516</score>
      <confidence>0.6875632</confidence>
      <start>94900000</start>
      <end>96400000</end>
      <word>this_1</word>
    </item>
    <item>
      <channel_id>0</channel_id>
      <score>0.1522667</score>
      <confidence>0.5379933</confidence>
      <start>99900000</start>
      <end>101900000</end>
      <word>this_1</word>
    </item>
    ...
  </words>
</result>

Result description

keyword_listname of used keyword list
words[]list of detected keywords
words[]->channel_idchannel index
words[]->scoreraw score (log likelihood ratio in range (-∞, +∞) )
words[]->confidencekeyword confidence (probability in range [0, 1] )
words[]->startstart time of word (HTK time units - 100ns)
words[]->endend time of word (HTK time units - 100ns)
words[]->wordkeyword text
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1052Invalid keyword list
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1024Result not found
  • 1012Keyword list not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1035Invalid time range
415Unsupported Media Type
  • 1007Unsupported audio format

Required technologies

  • Keyword Spotting (KWS)

Resource locker

  • LOCK Analyzed file
  • LOCK Keyword list
/technologies/keywordspotting/benchmark – keyword spotting benchmark
GET /technologies/keywordspotting/benchmark (asynchronous)Keyword spotting Benchmark

Benchmark of Keyword Spotting technology with specified recording and keyword list.

Parameters

NameParameter TypeData TypeRequiredDescription
modelquerystringyesName of Keyword Spotting technology model.
kwlistquerystringyesName of keyword list.
pathquerystringyesServer path to the audio file.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/keywordspotting/benchmark?path=/julia.wav&model=ENGLISH&kwlist=test"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/keywordspotting/benchmark',
  uri_params: {
    path: '/julia.wav',
    model: 'ENGLISH',
    kwlist: 'test'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version": 1,
     "name": "KeywordSpottingBenchmarkResult",
     "model_name": "ENGLISH",
     "file": "julia_1.wav",
     "keyword_list": "test",
     "benchmark_result": {
       "processed_length": 31.44000244140625,
       "processing_time": 0.7222609999999999,
       "faster_than_realtime": 43.529973847966669
     },
    "cpu_info" : {
      "vendor" : "GenuineIntel",
      "brand" : "Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz",
      "n_cores" : 4,
      "n_logical_cores" : 4,
      "l1_data_cache" : 32768,
      "l1_instruction_cache" : 32768,
      "l2_cache" : 262144,
      "l3_cache" : 6291456
    },
    "memory_info" : {
      "total_ram" : 16623747072,
      "free_ram" : 5028855808,
      "total_swap" : 0,
      "free_swap" : 0
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>KeywordSpottingBenchmarkResult</name>
  <model_name>ENGLISH</model_name>
  <file>julia_1.wav</file>
  <keyword_list>test</keyword_list>
  <benchmark_result>
    <processed_length>31.44000244140625</processed_length>
    <processing_time>0.69201</processing_time>
    <faster_than_realtime>45.43287299519696</faster_than_realtime>
  </benchmark_result>
  <cpu_info>
    <vendor>GenuineIntel</vendor>
    <brand>Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz</brand>
    <n_cores>4</n_cores>
    <n_logical_cores>4</n_logical_cores>
    <l1_data_cache>32768</l1_data_cache>
    <l1_instruction_cache>32768</l1_instruction_cache>
    <l2_cache>262144</l2_cache>
    <l3_cache>6291456</l3_cache>
  </cpu_info>
  <memory_info>
    <total_ram>16623747072</total_ram>
    <free_ram>4938498048</free_ram>
    <total_swap>0</total_swap>
    <free_swap>0</free_swap>
  </memory_info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1052Invalid keyword list
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1012Keyword list not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Keyword Spotting (KWS)
  • Voice Activity Detection (VAD)

Resource locker

  • LOCK Analyzed file
  • LOCK Keyword list
/technologies/keywordspotting/stream – stream keyword spotting
GET /technologies/keywordspotting/stream Get partial result from stream task

Get partial result from task analyzing stream identified by task ID. A list of searched keywords is determined by the kwlist parameter in http POST for creating keyword spotting task. Keyword spotting is language dependent technology and therefore has the model parameter that determines desired language (see model parameter description).

Returns list of found words. Every found word contains start and end time in the HTK units (hundreds of nanoseconds), raw score, confidence in the range from zero to one, channel id for identifying in which the word was said and text of word with suffix separate by the underscore character that contains either the number of the pronunciation or directly text of the pronunciation (see example output).

Parameters

NameParameter TypeData TypeRequiredDescription
taskquerystringyesStream Task ID which the request will be attached to

Body

empty content

Example

CURL
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/keywordspotting/stream?task=STREAM_TASK_ID"

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 1,
    "name": "KeywordSpottingStreamResult",
    "model": "ENGLISH",
    "is_last": "false",
    "task_id": "42afa238-412b-4673-9bb7-170a762503c1",
    "task_execution_time": 32.4365,
    "stream_id": "fe9525ef-d18a-4826-869e-b5a31b1c57c5",
    "keyword_list" : "test_keywordlist",
    "words": [
      {
        "channel_id": 0,
        "score": 0.7887516,
        "confidence": 0.6875632,
        "start": 94900000,
        "end": 96400000,
        "word": "this_1"
      },
      {
        "channel_id": 0,
        "score": 0.1522667,
        "confidence": 0.5379933,
        "start": 99900000,
        "end": 101900000,
        "word": "this_1"
      },
      ...
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>KeywordSpottingStreamResult</name>
  <model>ENGLISH</model>
  <is_last>false</is_last>
  <task_id>42afa238-412b-4673-9bb7-170a762503c1</task_id>
  <task_execution_time>32.43656</task_execution_time>
  <stream_id>fe9525ef-d18a-4826-869e-b5a31b1c57c5</stream_id>
  <keyword_list>test_keywordlist</keyword_list>
  <words>
    <item>
      <channel_id>0</channel_id>
      <score>0.7887516</score>
      <confidence>0.6875632</confidence>
      <start>94900000</start>
      <end>96400000</end>
      <word>this_1</word>
    </item>
    <item>
      <channel_id>0</channel_id>
      <score>0.1522667</score>
      <confidence>0.5379933</confidence>
      <start>99900000</start>
      <end>101900000</end>
      <word>this_1</word>
    </item>
    ...
  </words>
</result>

Result description

is_lastif true, this is the last result of this stream
task_execution_timecurrent time of execution
stream_idStream ID
task_idTask ID
keyword_listname of used keyword list
words[]list of detected keywords
words[]->channel_idchannel index
words[]->scoreraw score (log likelihood ratio in range (-∞, +∞) )
words[]->confidencekeyword confidence (probability in range [0, 1] )
words[]->startstart time of word (HTK time units - 100ns)
words[]->endend time of word (HTK time units - 100ns)
words[]->wordkeyword text
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1050Technology does not support multichannel stream
  • 1052Invalid keyword list
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1010Task not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Keyword Spotting Stream (KWS_STREAM)
POST /technologies/keywordspotting/stream Start task analyzing stream

Start analyzing stream.

This technology can not be attached to multichannel stream.

Parameters

NameParameter TypeData TypeRequiredDescription
streamquerystringyesStream ID which the request will be attached to
modelquerystringyesName of KWS model. Not all KWS models support stream feature, you can check your server configuration by GET /technologies
kwlistquerystringyesName of keyword list.
result_modequerystringnoMode of getting result. Allowed modes are complete, incremental (default complete). See RTP/HTTP streams for more information.

Body

empty content

Example

CURL
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST "SERVER_ADDRESS:PORT/technologies/keywordspotting/stream?stream=STREAM_ID&model=ENGLISH&kwlist=test"

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 1,
    "name": "UserStreamTaskInfoResult",
    "stream_task_info": {
      "id": "8506180c-e87d-42f6-ac9a-c5ca3a3a3202",
      "state": "running",
      "stream_id": "29eae856-0004-46a2-a761-9e9a72bad719"
    }
  }
}
<result>
  <version>1</version>
  <name>UserStreamTaskInfoResult</name>
  <stream_task_info>
    <id>8506180c-e87d-42f6-ac9a-c5ca3a3a3202</id>
    <state>running</state>
    <stream_id>29eae856-0004-46a2-a761-9e9a72bad719</stream_id>
  </stream_task_info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1030Stream not found
405Method Not Allowed
  • 1009Technology is not supported by server
503Service Unavailable
  • 1028Worker limit exceeded
  • 1031Resource not available

Required technologies

  • Keyword Spotting Stream (KWS_STREAM)

Resource locker

  • LOCK Keyword list
DELETE /technologies/keywordspotting/stream Stop task analyzing stream

Stop task analyzing stream identified by task ID.

Parameters

NameParameter TypeData TypeRequiredDescription
taskquerystringyesStream Task ID which the request will be attached to

Body

empty content

Example

CURL
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/technologies/keywordspotting/stream?task=STREAM_TASK_ID"

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1010Task not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Keyword Spotting Stream (KWS_STREAM)
/technologies/keywordspotting/kwlists – list of keyword lists
GET /technologies/keywordspotting/kwlists List of keyword lists

Returns list of user's keyword lists. Technology model must be specified as keyword list depends on language.

Parameters

NameParameter TypeData TypeRequiredDescription
modelquerystringyesName of keyword spotting technology model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/keywordspotting/kwlists?model=ENGLISH"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$MODEL = "ENGLISH";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/keywordspotting/kwlists?model=$MODEL",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 1,
    "name": "KeywordSpottingListsResult",
    "model_name": "ENGLISH",
    "kwlists": [
      "test"
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
   <version>1</version>
   <name>KeywordSpottingListsResult</name>
   <model_name>ENGLISH</model_name>
   <kwlists>
      <item>test</item>
   </kwlists>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Keyword Spotting (KWS)
/technologies/keywordspotting/kwlists/{name} – keyword list
GET /technologies/keywordspotting/kwlists/{name} Get keyword list

Returns keyword list information.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesDetermines the name of keyword list.
modelquerystringyesName of keyword spotting model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/keywordspotting/kwlists/test?model=ENGLISH"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$MODEL = "ENGLISH";
$KWLIST_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/keywordspotting/kwlists/$KWLIST_NAME?model=$MODEL",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 2,
    "name" : "KeywordSpottingListResult",
    "model_name" : "ENGLISH",
    "keyword_list" : "test",
    "keywords" : [
      {
        "name" : "angels",
        "enabled" : true,
        "threshold": 0.5,
        "pronunciations" : [

        ]
      },
      {
        "name" : "there",
        "enabled" : true,
        "threshold": 0,
        "pronunciations" : [

        ]
      },
      {
        "name" : "test",
        "enabled" : true,
        "threshold": 0.4,
        "pronunciations" : [
          {
            "phonemes" : "t eh s t",
            "enabled" : true,
            "probability" : 0,
            "is_valid" : true
          }
        ]
      }
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>2</version>
  <name>KeywordSpottingListResult</name>
  <model_name>ENGLISH</model_name>
  <keyword_list>test</keyword_list>
  <keywords>
    <item>
      <name>angels</name>
      <enabled>true</enabled>
      <threshold>0.5</threshold>
      <pronunciations/>
    </item>
    <item>
      <name>there</name>
      <enabled>true</enabled>
      <threshold>0</threshold>
      <pronunciations/>
    </item>
    <item>
      <name>test</name>
      <enabled>true</enabled>
      <threshold>0.4</threshold>
      <pronunciations>
        <item>
          <phonemes>t eh s t</phonemes>
          <enabled>true</enabled>
          <probability>0</probability>
          <is_valid>true</is_valid>
        </item>
      </pronunciations>
    </item>
  </keywords>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Keyword Spotting (KWS)
POST /technologies/keywordspotting/kwlists/{name} Add keyword list

Add keyword list to server. If the keyword list with the same name already exists, it automatically overwrites the newly uploaded content. The request body contains keyword list. Each keyword may contain "threshold" property. The result of KWS will only contain keywords whose confindence is higher or equeal than the "threshold".

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringyesapplication/json for JSON content (Default value)
application/xml for XML content
namepathstringyesDetermines the name of keyword list.
modelquerystringyesName of keyword spotting model

Body

JSONXML
{
  "keywords": [
    {
      "name": "angels",
      "enabled": true,
      "threshold": 0.5
    },
    {
      "name": "there",
      "enabled": true,
      "threshold": 0
    },
    {
      "name": "test",
      "enabled": true,
      "threshold": 0.4,
      "pronunciations": [
        {
          "phonemes": "t eh s t",
          "enabled": true
        }
      ]
    }
  ]
}
<keywords>
  <item>
    <name>angels</name>
    <enabled>true</enabled>
    <threshold>0.5</threshold>
  </item>
  <item>
    <name>there</name>
    <enabled>true</enabled>
    <threshold>0</threshold>
  </item>
  <item>
    <name>test</name>
    <enabled>true</enabled>
    <threshold>0.4</threshold>
    <pronunciations>
      <item>
        <phonemes>t eh s t</phonemes>
        <enabled>true</enabled>
      </item>
    </pronunciations>
  </item>
</keywords>
keywords[]List of keywords
keywords[]->nameKeyword consist of graphemes. Use this request to obtain allowed graphemes. Using invalid graphemes in keyword causes HTTP error 400 (error code 1019)
keywords[]->enabledEnables or disables this keyword
keywords[]->thresholdIf the confidence of occurrence of the keyword is above the threshold, the occurrence is passed into the result.

Parameter is optional (default value is 0.0).
keywords[]->pronunciations[]Array of custom pronunciations of keyword.

Parameter is optional. If parameter is not specified, default pronunciation is used. See also this request to obtain default pronunciation.
keywords[]->pronunciations[]->phonemesPronunciation of keyword consist of phonemes separed by space. Use this request to obtain allowed phonemes. Using invalid phonemes in pronunciation causes HTTP error 400 (error code 1019)
keywords[]->pronunciations[]->enabledEnables or disables this pronunciation

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -H "Content-Type:application/json" -X POST --data-binary @"kwlist.json" "SERVER_ADDRESS:PORT/technologies/keywordspotting/kwlists/test?model=ENGLISH"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$MODEL = "ENGLISH";
$KWLIST_NAME = "test";

$keywords = array(
  'keywords' =>
  array (
    array (
      'name'    => "angels",
      'enabled' => true,
    ),
    array (
      'name'    => "there",
      'enabled' => true,
    ),
    array (
      'name'    => "test",
      'enabled' => true,
      'pronunciations' =>
      array (
        array (
          'phonemes' => "t eh s t",
          'enabled'  => true,
        )
      )
    ),
  )
);

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: application/json',
    'content'       => json_encode($keywords),
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/keywordspotting/kwlists/$KWLIST_NAME?model=$MODEL",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1025An invalid value was specified for one of the header parameters in the request
  • 1038Resource is locked
  • 1019An invalid data was specified in the request content
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Keyword Spotting (KWS)

Resource locker

  • CHECK Keyword list
DELETE /technologies/keywordspotting/kwlists/{name} Delete keyword list

Delete keyword list with specified name.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesDetermines the name of keyword list.
modelquerystringyesName of keyword spotting model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/technologies/keywordspotting/kwlists/test?model=ENGLISH"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$MODEL = "ENGLISH";
$KWLIST_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'content'       => json_encode($keywords),
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/keywordspotting/kwlists/$KWLIST_NAME?model=$MODEL",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Keyword Spotting (KWS)

Resource locker

  • CHECK Keyword list
/technologies/keywordspotting/graphemes – return graphemes for given model
GET /technologies/keywordspotting/graphemes Return supported graphames

Return supported graphames for given kws model.

Parameters

NameParameter TypeData TypeRequiredDescription
modelquerystringyesName of keyword spotting model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/keywordspotting/graphemes?model=ENGLISH"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$MODEL = "ENGLISH";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/keywordspotting/graphemes?model=$MODEL",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 2,
    "name": "GraphemeResult",
    "graphemes": [
        "a",
        "b",
        ...
    ],
    "word_separator": "+"
  }
}
<result>
  <version>2</version>
  <name>GraphemeResult</name>
  <graphemes>
    <item>a</item>
    <item>b</item>
    ...
  </graphemes>
  <word_separator>+</word_separator>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Keyword Spotting (KWS)
/technologies/keywordspotting/phonemes – return phonemes for given model
GET /technologies/keywordspotting/phonemes Return supported phonemes

Return supported phonemes for given kws model.

Parameters

NameParameter TypeData TypeRequiredDescription
modelquerystringyesName of keyword spotting model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/keywordspotting/phonemes?model=ENGLISH"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$MODEL = "ENGLISH";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/keywordspotting/phonemes?model=$MODEL",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 1,
    "name": "PhonemesListResult",
    "phonemes": [
        "a:",
        "b",
        ...
    ]
  }
}
<result>
  <version>1</version>
  <name>PhonemesListResult</name>
  <phonemes>
    <item>a:</item>
    <item>b</item>
    ...
  </phonemes>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Keyword Spotting (KWS)
/technologies/keywordspotting/pronunciation – pronunciation of keyword
GET /technologies/keywordspotting/pronunciation (asynchronous)Pronunciation of keyword

Returns pronunciation list for keyword. This request is asynchronous, after first call returns pending operation path in header of reply. By sending request with this path is possible to acquire result of operation (see Asynchronous request).

Important notice: The + sign (used in phrases to separate words) in the URL must be encoded as %2B. For example if you want pronunciation of hello+world phrase you have to use: keyword=hello%2Bworld

Parameters

NameParameter TypeData TypeRequiredDescription
keywordquerystringyesKeyword.
modelquerystringyesName of keyword spotting model

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/keywordspotting/pronunciation?keyword=hello%2Bworld&model=ENGLISH"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/keywordspotting/pronunciation',
  uri_params: {
    keyword: 'hello%2Bworld',
    model: 'ENGLISH'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 1,
    "name": "KeywordSpottingPronunciationResult",
    "model": "ENGLISH",
    "keyword": "hello+world",
    "pronunciations": [
      "hh eh l ow sil w er l d"
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>KeywordSpottingPronunciationResult</name>
  <model>ENGLISH</model>
  <keyword>hello+world</keyword>
  <pronunciations>
    <item>hh eh l ow sil w er l d</item>
  </pronunciations>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Keyword Spotting (KWS)
/technologies/phnrec – phoneme transcription
GET /technologies/phnrec (asynchronous)Phoneme transcription - Analyze record

Returns phoneme transcription for specified audio file. This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file
modelquerystringyesName of technology model
cache_onlyquerybooleannoIf true, cache_only ensures that the result is returned only if it is already in the cache (the result is stored in the cache if the file has already been processed by the technology). If the result isn't in cache yet, only 404 status is returned. This parameter is not mandatory and if it is not set by the user, the recording is processed by the given technology automatically if the result is not already in the cache. Parameters cache_only and cache_disable can not be used together.
cache_disablequerybooleannoIf true, the result cache is disabled. cache_disable ensures that the recording is always processed and the result is not stored in the cache. Parameters cache_only and cache_disable can not be used together.
from_timequerydoublenofrom_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed from the beginning. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.
to_timequerydoublenoto_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed to the end. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/phnrec?path=julia.wav&model=ENGLISH"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/phnrec',
  uri_params: {
    path: '/julia.wav',
    model: 'ENGLISH'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
Parameter time_range in output is present only when query parameters from_time or to_time are specified.
JSONXML
{
  "result": {
    "version": 1,
    "name": "PhonemeRecognitionResult",
    "file": "julia_1.wav",
    "model": "ENGLISH",
    "time_range": {
      "from_time": 2.5,
      "to_time": 5.5
    },
    "segmentation": [
      {
        "channel_id": 0,
        "score": -10.173214,
        "confidence": -10.173214,
        "start": 300000,
        "end": 1100000,
        "word": "sil"
      },
      {
        "channel_id": 0,
        "score": -28.361546,
        "confidence": -28.361546,
        "start": 1100000,
        "end": 2500000,
        "word": "ah"
      },
      ...
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>PhonemeRecognitionResult</name>
  <file>julia_1.wav</file>
  <model>ENGLISH</model>
  <time_range>
    <from_time>2.5</from_time>
    <to_time>5.5</to_time>
  </time_range>
  <segmentation>
    <item>
      <channel_id>0</channel_id>
      <score>-10.173214</score>
      <confidence>-10.173214</confidence>
      <start>300000</start>
      <end>1100000</end>
      <word>sil</word>
    </item>
    <item>
      <channel_id>0</channel_id>
      <score>-28.361546</score>
      <confidence>-28.361546</confidence>
      <start>1100000</start>
      <end>2500000</end>
      <word>ah</word>
    </item>
    ...
  </segmentation>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1024Result not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1035Invalid time range
415Unsupported Media Type
  • 1007Unsupported audio format

Required technologies

  • Phoneme Recognition (PHNREC)

Resource locker

  • LOCK Analyzed file
/technologies/phnrec/benchmark – phoneme transcription benchmark
GET /technologies/phnrec/benchmark (asynchronous)Phoneme Transcription Benchmark

Benchmark of Phoneme Transcription technology with default set of recordings or specified recording (by parameter path).

Parameters

NameParameter TypeData TypeRequiredDescription
modelquerystringyesName of Phoneme Transcription technology model.
pathquerystringnoServer path to the audio file. If not specified, default recordings will be used.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/phnrec/benchmark?model=ENGLISH"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/phnrec/benchmark',
  uri_params: {
    model: 'ENGLISH'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 3,
    "name" : "PhonemeRecognitionBenchmarkResult",
    "dataset_version" : "1.0",
    "model_name" : "ENGLISH",
    "benchmark_result" : {
      "processed_length": 1017.0399360656738,
      "processing_time": 25.795139,
      "faster_than_realtime": 39.42758114486896
    },
    "cpu_info" : {
      "vendor" : "GenuineIntel",
      "brand" : "Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz",
      "n_cores" : 4,
      "n_logical_cores" : 4,
      "l1_data_cache" : 32768,
      "l1_instruction_cache" : 32768,
      "l2_cache" : 262144,
      "l3_cache" : 6291456
    },
    "memory_info" : {
      "total_ram" : 16623747072,
      "free_ram" : 5028855808,
      "total_swap" : 0,
      "free_swap" : 0
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>3</version>
  <name>PhonemeRecognitionBenchmarkResult</name>
  <dataset_version>1.0</dataset_version>
  <model_name>ENGLISH</model_name>
  <benchmark_result>
    <processed_length>1017.0399360656738</processed_length>
    <processing_time>25.279305</processing_time>
    <faster_than_realtime>40.23211619408341</faster_than_realtime>
  </benchmark_result>
  <cpu_info>
    <vendor>GenuineIntel</vendor>
    <brand>Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz</brand>
    <n_cores>4</n_cores>
    <n_logical_cores>4</n_logical_cores>
    <l1_data_cache>32768</l1_data_cache>
    <l1_instruction_cache>32768</l1_instruction_cache>
    <l2_cache>262144</l2_cache>
    <l3_cache>6291456</l3_cache>
  </cpu_info>
  <memory_info>
    <total_ram>16623747072</total_ram>
    <free_ram>4938498048</free_ram>
    <total_swap>0</total_swap>
    <free_swap>0</free_swap>
  </memory_info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Phoneme Recognition (PHNREC)
  • Voice Activity Detection (VAD)

Language Identification

/technologies/languageid – analyze record
GET /technologies/languageid (asynchronous)Analyze record

Returns language identification scores for specified audio file. This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file.
modelquerystringyesName of LID model.
language_packquerystringyesName of language pack.
cache_onlyquerybooleannoIf true, cache_only ensures that the result is returned only if it is already in the cache (the result is stored in the cache if the file has already been processed by the technology). If the result isn't in cache yet, only 404 status is returned. This parameter is not mandatory and if it is not set by the user, the recording is processed by the given technology automatically if the result is not already in the cache. Parameters cache_only and cache_disable can not be used together.
cache_disablequerybooleannoIf true, the result cache is disabled. cache_disable ensures that the recording is always processed and the result is not stored in the cache. Parameters cache_only and cache_disable can not be used together.
from_timequerydoublenofrom_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed from the beginning. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.
to_timequerydoublenoto_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed to the end. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/languageid?path=/julia.wav&model=L&language_pack=default"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/languageid',
  uri_params: {
    path: '/julia.wav',
    model: 'L',
    language_pack: 'default'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
The time_range parameter in the output is serialized only when query parameters from_time or to_time are specified.
JSONXML
{
  "result": {
    "version": 2,
    "name": "LanguageIdentificationResult",
    "file": "julia_1.wav",
    "language_pack": "default",
    "model": "L",
    "time_range": {
      "from_time": 2.5,
      "to_time": 5.5
    },
    "channel_scores": [
      {
        "channel": 0,
        "scores": [
          {
            "name": "Afan_Oromo",
            "score": -8.212487
          },
          {
            "name": "Albanian",
            "score": -7.554749
          },
          ...
        ]
      }
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>2</version>
  <name>LanguageIdentificationResult</name>
  <file>julia_1.wav</file>
  <language_pack>default</language_pack>
  <model>L</model>
  <time_range>
    <from_time>2.5</from_time>
    <to_time>5.5</to_time>
  </time_range>
  <channel_scores>
    <item>
      <channel>0</channel>
      <scores>
        <item>
          <name>Afan_Oromo</name>
          <score>-8.212487</score>
        </item>
        <item>
          <name>Albanian</name>
          <score>-7.554749</score>
        </item>
        ...
      </scores>
    </item>
  </channel_scores>
</result>

Scores object description

channel_scores[]list of scores for each channel of recording
channel_scores[]->channelindex of channel
channel_scores[]->scores[]list of scores for each language
channel_scores[]->scores[]->namename of language
channel_scores[]->scores[]->scoreprobability of an estimated language.
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1024Result not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1035Invalid time range
415Unsupported Media Type
  • 1007Unsupported audio format

Required technologies

  • Language Identification LanguagePrint Extractor (LIDE)
  • Language Identification LanguagePrint Comparator (LIDC)

Resource locker

  • LOCK Analyzed file
  • LOCK Language pack
/technologies/languageid/benchmark – language identification benchmark
GET /technologies/languageid/benchmark (asynchronous)Language identification Benchmark

Benchmark of Language Identification technology with default set of recordings or specified recording (by parameter path).

Parameters

NameParameter TypeData TypeRequiredDescription
modelquerystringyesName of Language Identification technology model.
pathquerystringnoServer path to the audio file. If not specified, default recordings will be used.
language_packquerystringnoName of language pack. If not specified, language pack 'default' will be used.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/languageid/benchmark?model=L"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/languageid/benchmark',
  uri_params: {
    model: 'L'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 3,
    "name" : "LanguageIdentificationBenchmarkResult",
    "dataset_version" : "1.0",
    "model_name" : "L",
    "benchmark_result" : {
      "processed_length" : 21.31999969482422,
      "processing_time" : 1.348421,
      "faster_than_realtime" : 15.811085480591164
    },
    "cpu_info" : {
      "vendor" : "GenuineIntel",
      "brand" : "Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz",
      "n_cores" : 4,
      "n_logical_cores" : 4,
      "l1_data_cache" : 32768,
      "l1_instruction_cache" : 32768,
      "l2_cache" : 262144,
      "l3_cache" : 6291456
    },
    "memory_info" : {
      "total_ram" : 16623747072,
      "free_ram" : 5028855808,
      "total_swap" : 0,
      "free_swap" : 0
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>3</version>
  <name>LanguageIdentificationBenchmarkResult</name>
  <dataset_version>1.0</dataset_version>
  <model_name>L</model_name>
  <benchmark_result>
    <processed_length>21.31999969482422</processed_length>
    <processing_time>1.348421</processing_time>
    <faster_than_realtime>15.811085480591164</faster_than_realtime>
  </benchmark_result>
  <cpu_info>
    <vendor>GenuineIntel</vendor>
    <brand>Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz</brand>
    <n_cores>4</n_cores>
    <n_logical_cores>4</n_logical_cores>
    <l1_data_cache>32768</l1_data_cache>
    <l1_instruction_cache>32768</l1_instruction_cache>
    <l2_cache>262144</l2_cache>
    <l3_cache>6291456</l3_cache>
  </cpu_info>
  <memory_info>
    <total_ram>16623747072</total_ram>
    <free_ram>4938498048</free_ram>
    <total_swap>0</total_swap>
    <free_swap>0</free_swap>
  </memory_info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Language Identification LanguagePrint Extractor (LIDE)
  • Language Identification LanguagePrint Comparator (LIDC)
  • Voice Activity Detection (VAD)

Resource locker

  • LOCK Analyzed file (if used parameter path)
/technologies/languageid/extractlp – extract language print
GET /technologies/languageid/extractlp (asynchronous)Extract language print from audio file

Extract language print(s) from audio file. This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file.
modelquerystringyesName of LID model.
from_timequerydoublenofrom_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed from the beginning. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.
to_timequerydoublenoto_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed to the end. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/languageid/extractlp?path=julia_1.wav&model=L"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/languageid/extractlp',
  uri_params: {
    path: '/julia.wav',
    model: 'L',
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
The time_range parameter in the output is serialized only when query parameters from_time or to_time are specified.
JSONXML
{
  "result" : {
    "version" : 1,
    "name" : "LanguagePrintResult",
    "file" : "/kelly_julia.wav",
    "model" : "S",
    "time_range": {
      "from_time": 2.5,
      "to_time": 5.5
    },
    "languageprints" : [
      {
        "languageprint" : <Base64 Data>
      },
      {
        "languageprint" : <Base64 Data>
      },
      ...
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>LanguagePrintResult</name>
  <file>/kelly_julia.wav</file>
  <model>S</model>
  <time_range>
    <from_time>2.5</from_time>
    <to_time>5.5</to_time>
  </time_range>
  <languageprints>
    <item>
      <languageprint>[Base64 Data]</languageprint>
    </item>
    <item>
      <languageprint>[Base64 Data]</languageprint>
    </item>
    ...
  </languageprints>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1035Invalid time range
415Unsupported Media Type
  • 1007Unsupported audio format

Required technologies

  • Language Identification LanguagePrint Extractor (LIDE)

Resource locker

  • LOCK Analyzed file
/technologies/languageid/comparelp – compare language print
POST /technologies/languageid/comparelp (asynchronous)Compare languageprint to language pack

Compare languageprint in POST body to defined language pack in parameter.

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content
modelquerystringyesName of LID model.
language_packquerystringyesName of language pack.

Body

JSONXML
{
  "languageprint" : <Base64 Data>
}
<languageprint>[Base64 Data]</languageprint>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST -H "Content-Type:application/json" --data-binary @"lprint.json" "SERVER_ADDRESS:PORT/technologies/languageid/comparelp?model=L&language_pack=default"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'POST',
  uri_path: '/technologies/speakerid/comparevp',
  uri_params: {
    model: 'L'
  },
  content: {
      "languageprint" : <Base64 Data>
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 1,
    "name": "LanguagePrintCompareToLanguagePackResult",
    "language_pack": "default",
    "model": "L",
    "scores": [
        {
          "name": "Afan_Oromo",
          "score": -8.212487
        },
        {
          "name": "Albanian",
          "score": -7.554749
        },
        ...
      ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>LanguagePrintCompareToLanguagePackResult</name>
  <language_pack>default</language_pack>
  <model>L</model>
  <scores>
    <item>
      <name>Afan_Oromo</name>
      <score>-8.212487</score>
    </item>
    <item>
      <name>Albanian</name>
      <score>-7.554749</score>
    </item>
      ...
  </scores>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1025An invalid value was specified for one of the header parameters in the request
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Language Identification LanguagePrint Comparator (LIDC)

Resource locker

  • LOCK Language pack
/technologies/languageid/languagepacks – list of language packs
GET /technologies/languageid/languagepacks List of language packs

Returns list of language packs for specific model for language identification.

Parameters

NameParameter TypeData TypeRequiredDescription
modelquerystringyesName of LID model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/languageid/languagepacks?model=l"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$MODEL = "L";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/languageid/languagepacks?model=$MODEL",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 1,
    "name": "LanguageIdentificationPacksResult",
    "language_packs": [
      "default"
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>LanguageIdentificationPacksResult</name>
  <language_packs>
    <item>default</item>
  </language_packs>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Language Identification LanguagePrint Comparator (LIDC)
/technologies/languageid/languagepacks/{name} – information about the model
GET /technologies/languageid/languagepacks/{name} Information about the model

Returns the list of languages in specific language pack for language identification.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of language pack.
modelquerystringyesName of LID model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/languageid/languagepacks/default?model=l"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$MODEL = "L";
$LANGUAGE_PACK = "default";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/languageid/languagepacks/$LANGUAGE_PACK?model=$MODEL",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 1,
    "name": "LanguageIdentificationPackResult",
    "language_pack": "default",
    "languages": [
      "Afan_Oromo",
      "Albanian",
      ...
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>LanguageIdentificationPackResult</name>
  <language_pack>default</language_pack>
  <languages>
    <item>Afan_Oromo</item>
    <item>Albanian</item>
    ...
  </languages>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Language Identification LanguagePrint Comparator (LIDC)

Speaker Identification

/technologies/speakerid – analyze recording or voiceprint
GET /technologies/speakerid (asynchronous)Analyze recording

Speaker Identification compares a recording with either a speaker model or speaker group. A speaker model consists of recordings of one speaker. A speaker group consists of several speaker models. Optionally, an calibration set can be specified with max_fa_rate parameter to set maximum false acceptance rate. This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file.
modelquerystringyesName of SID model.
speaker_modelquerystringyes if group is not specifiedName of the speaker model.
groupquerystringyes if speaker_model is not specifiedDetermines the speaker group. To select all speaker models use the virtual group "all".
calibsetquerystringnoDetermines the calibration set for speaker identification.
max_false_alarmsDeprecatedquerynumberyes if calibset is specifiedPlease use parameter max_fa_rate instead of max_false_alarms.
max_fa_ratequerydoubleyes if calibset is specifiedSets maximum false acceptance rate for which the voiceprint(s) will be calibrated. Value in range 0.0 to 100.0. Adjusts score in such way that for score 0.0 the user gets given percentage of false positive detections. The percentage of false positives is measured on provided calibration audio set.
cache_onlyquerybooleannoIf true, cache_only ensures that the result is returned only if it is already in the cache (the result is stored in the cache if the file has already been processed by the technology). If the result isn't in cache yet, only 404 status is returned. This parameter is not mandatory and if it is not set by the user, the recording is processed by the given technology automatically if the result is not already in the cache. Parameters cache_only and cache_disable can not be used together.
cache_disablequerybooleannoIf true, the result cache is disabled. cache_disable ensures that the recording is always processed and the result is not stored in the cache. Parameters cache_only and cache_disable can not be used together.
from_timequerydoublenofrom_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed from the beginning. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.
to_timequerydoublenoto_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed to the end. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid?path=julia.wav&model=L&group=group1"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/speakerid',
  uri_params: {
    path: '/julia.wav',
    model: 'L',
    group: 'group1'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
The time_range parameter in the output is serialized only when query parameters from_time or to_time are specified.

Parameter score is LLR (Log-likelihood ratio) based on natural logarithm.

JSONXML
{
  "result" : {
    "version" : 2,
    "name" : "SpeakerIdentificationMultiResult",
    "model" : "S",
    "speaker_group" : "group1",
    "calibration_set" : "",
    "max_fa_rate" : 0,
    "time_range": {
      "from_time": 2.5,
      "to_time": 5.5
    },
    "results" : [
      {
        "file" : "julia_1.wav",
        "speaker_model" : "test1",
        "channel_scores" : [
          {
            "channel" : 0,
            "scores" : [
              {
                "score" : 15.753671
              }
            ]
          }
        ]
      },
      {
        "file" : "julia_1.wav",
        "speaker_model" : "test2",
        "channel_scores" : [
          {
            "channel" : 0,
            "scores" : [
              {
                "score" : -14.8087845
              }
            ]
          }
        ]
      }
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>2</version>
  <name>SpeakerIdentificationMultiResult</name>
  <model>S</model>
  <speaker_group>group1</speaker_group>
  <calibration_set/>
  <max_fa_rate>0</max_fa_rate>
  <time_range>
    <from_time>2.5</from_time>
    <to_time>5.5</to_time>
  </time_range>
  <results>
    <item>
      <file>julia_1.wav</file>
      <speaker_model>test1</speaker_model>
      <channel_scores>
        <item>
          <channel>0</channel>
          <scores>
            <item>
              <score>15.753671</score>
            </item>
          </scores>
        </item>
      </channel_scores>
    </item>
    <item>
      <file>julia_1.wav</file>
      <speaker_model>test2</speaker_model>
      <channel_scores>
        <item>
          <channel>0</channel>
          <scores>
            <item>
              <score>-14.8087845</score>
            </item>
          </scores>
        </item>
      </channel_scores>
    </item>
  </results>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1017User model not ready
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1015User model not found
  • 1024Result not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1035Invalid time range
415Unsupported Media Type
  • 1007Unsupported audio format

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Comparator (SIDC)
  • Speaker Identification VoicePrint Calibration (SIDCALIBSET) Required if parameter calibset is used

Resource locker

  • LOCK Analyzed file
  • LOCK Speaker model (if parameter speaker_model is used)
  • LOCK Speaker group (if parameter group is used). Also all speaker models contained in group are locked as well.
  • LOCK Calibration set (if parameter calibset is used)
POST /technologies/speakerid (asynchronous)Analyze voiceprint

Speaker Identification compares a voiceprint with a speaker model or speaker group. A speaker model consists of recordings of one speaker. A speaker group consists of several speaker models. The speaker model or speaker group has to be prepared first (see speaker model or groups)

It is necessary to use the same SID model used for processing as the SID model used for voiceprint extraction otherwise the server returns HTTP error 500.

Optionally, an calibration set can be specified with max_fa_rate parameter to set maximum false acceptance rate. This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
modelquerystringyesName of SID model.
speaker_modelquerystringyes if group is not specifiedName of the speaker model.
groupquerystringyes if speaker_model is not specifiedDetermines the speaker group. To select all speaker models use the virtual group "all".
calibsetquerystringnoDetermines the calibration set for speaker identification.
max_fa_ratequerydoubleyes if calibset is specifiedSets maximum false acceptance rate for which the voiceprint(s) will be calibrated. Value in range 0.0 to 100.0.
Content-Typeheaderstringyesapplication/json for JSON content (Default value)
application/xml for XML content
application/octet-stream for raw voiceprint content

Body

JSONXML
{
  "voiceprint": "<Base64 Data>"
}
<?xml version="1.0" encoding="UTF-8"?>
<voiceprint>[Base64 Data]</voiceprint>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -H "Content-Type:application/json" -X POST --data-binary @"voiceprint.json" "SERVER_ADDRESS:PORT/technologies/speakerid?model=S&group=group1"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'POST',
  uri_path: '/technologies/speakerid',
  uri_params: {
    model: 'S',
    group: 'group1'
  },
  content: {
    "voiceprint": "VlBUIAYA//+pCQAAWAIAAAAAAABwMEofIAAAAKkJAABYAgAAAAAAAAA8HEYAPBxGAAAAAAYAAADL9Xw/UcsevyAbFD/iCuA/tmphP/TqzT8Sjx+/48ocPyme/D/RcrA+JNspP9c+iT+xBog+sEcuwAhV77/2f4+/DHG/PxnnCr8bYi++i6HEvrrOGr9zdLK+nUqTP7+ZGT4asAA/KDGNva4ynjxhphtAYmVFwCoxkL9ba+u+lbajPmc9wr/SzQ1AftyevwQoOz8o6Ya+9JCLP7mRyr8ZIlW/bQDnPZeXmr8RwhDA7VaSv6VfwT1YUcS/EqGMP92z2D/Rz4E/QktnP7ZrVD9rfpO+XapPvjbyCD8aabI+bcFUv7ho2r2ARg28eIilv0KYVb+0x8e+H0rdv613tj/5pay+4vpUvgAdcbu7H5A/0U/cPwV4E79AGmU/W1gUv8w5KsCcDDQ/vpBQPu1mhL9BBVQ/FecMvgxJq76e9ms9WJWPP2jZKL+WHfG+zuk9PrPQMz6cSxk/tc6nP5eREb8YIiU+NY8xP6M2mr8IIKq/qPWVPyl+3T8eNdI/0U6qv0N4+j+S9qU/KogNv3R7AsB+ghc/q8AFP/4iI76Z9s2/lgypPhmlkz9uJti/uvDtv8h2CL/iFgE/XHv8vvvzb789+68/peZgPrrdmr24teK/APQNOQS3BT+qdS8/Vxptv/z0677zkcA+v+jMvwJM3DyDbIa/R62TvpaLTr7KCRe/7cLZvnlVyj6gArQ+WKCpPna1770Qpg8/42l8vzlj4D/ACCi/QFc3v4U3Zr0z9yJA26BvP6ylO77Cgg/AQYrKvmF2iD+mABS+zoGNP/kRzL+zhR+/gryIP89Pcb8gAAAAqQkAAEAGAAAAAAAAADwcRgA8HEYAAAAAPAAAAFwDZb2irbc82pYLPSxOAbzlRAa8L6sSvXc0FDyHpFI9+QejPQw/Lr2cGJ69VPO/O1Wgzr0hSza9a83oPV+Qhb1kOAC9sPOeOzZeDrwHPQA+Wx6iPJTXlDwpgxs8tWqXvF2rYb2ejgG9QlNXPcMr+jwv0RQ8q5qXvZSFXrwrKZo9jC5mPTlQWbwvVZU7nJGyvea5kb1TsEo82SgbvTLaxLucciW8mPBjvRd06DyFzNs82OhGPTwkRbuJa1w9oviTO/fWGjwtlxM9Lsg1PUwDJb37imO91cjCO844wrtABpE9ZxAQvT3ACrzoBqU9zlwfvbCAvz3sAXC9o7raPOTqLD3C7q49sOhhOy7uAT2o3YA9SdfLPBKWgz0iqmU9vHX5PBIgPLw85LC9wrgCvVTg3DyEOko9eamvurK7rrwXtoU91oxBvbPS1b0FAta9ohUEu/mdWb2WMlA8aE8KPVxRtb0NOoI9Xe4FPQ+LqLzz7/q85pNqPbzOer3nkJu9A0y2ulXiXL3BneY7Vz8JvTbCMj15dae7wjowvXT+bby1Gv88ZeMQvBmgA70nLSE8f9IZPXN78jyJe8A8uz9LPQqdTb1KFpe9GycRPez5fTxGW4k8M/u1uuUB3r2dYGw8Uu/xvLd8ibvVYZs8soW0Pd8W8zs088A8KA0hvGLA+TqXHoA9FPuLvaX3Ij3HP9y57QqTPR18Azzs7ta7tuURPWv6IL35gyS9zMHtvETMprxvQC89YR2wPV21ET3t4gk8cqyOPSyTGj3t/GO9uwn6vES6Xz2KOSA8BBWSOwikeDz/84y9piQzvUkyMjtjNuM7A2Qbva2s77tPQHo9q58NPmqAHr0VdsQ9VJ2LPH4+zbudDYO9wEEQvdXzHj2iOY+9yuF1PcujDb3k3ro8xZ1APX878jwdf548Cew5vfKDST1RtWo9ayFwvdRxzzyIL2S7O+AvOidql71jlfS9cpLNPVG7GLzXInu8zLOwPemHHT4Sgi09ynCoPU9fjz2dOcQ8NoaBPS9E4rxrtUk9EK2zPa5ALT3u5DM9jvv7PE9ukLxADfw8wVMjPe6mULxmxms9dxtFvZwhj7338U285zg7PQXRrjuTYnO9y9j3PFZAHbxHDgc9Y5kVvApPMj1pC3Q6hDMpO3kDVLwQ5sq8gKsUvOJK8Dv5gC68mP8oPNV1QD1Q0ke7hBc/PI3qUr3Zp7g85RBzvah4yLwRwWa7WLmdvLb3ibuGrp68NlFNvDKC1Txx7VW9ngYOPb+8sTyuEEq8YwBzPV030TydMky97tAaPf+x4r1kxYE9VgWSPdcltTwjFVq9IxXhPFCchD1HrpI9f8OBPd8aAb359ba9zEAzvPWiwb0X5ws9DbvbvUpl4TxP98y8Y6SwOc1c7TxjBZ49KpMyO9cepzzeu8Q9/mRqPBKi+7vp4L28ldwavU03xT2Q1MW98gMrvb2DILwQctI8iLQOPYS5Zj2nT788CdCkPEdD7z0gDGo99oa4PNwkAjyHl/w8uRVQPeElaL2Uj607HreQPBYFSz3ifVG9LRSqO243Ur3ox2e8d4E5vQKn8DyrmL69Nwq6PEX3Dz3gMVu9BbCEvAhclry3sBS+WIKovFi1lz2EJrM86qLHPVmK1rz+xRS+hRcPPSLJZjypsWK7WbaCvB3TmT1M0+a9PAjAu+RFVzzVFwk+xSlmPDCgvD29XXA93bbqOeAd8LxTriQ9FK5xOyMNHjyBPQm5XaWGvZGolrwe97Y7QnUDPecDtrxr/qg89nZ/PXkAoz0zpDe6/Xc+vWunJz2Vhck9d3ItPWPfh71VAvw8ZGZuPTKLK7v0cqE98dEnPLcgcz0uCq283QyIPRE7kbq0O/U6JGmSPD8Ke7rVceO8zn0/PRy6WT1FBBU9XpsmPVOUK71dU9y8i0VvPS9Wgj2LAIE8ThOePBvAl7wUFTK8WCRcvRrYo7kNfa89eS4IvdF9wDy6Sdq73ADmvSU8+boFOFE8ao6fvbQVHr39zi09mqJVO1lcTr2ZCFO9Ae2DvTVpX73zufK8ES6nutk3vzwIWUw9GYGcPVIfOr1Rv0Y9QT0ZvXb3Dz25w4i7TePvvL4t97uqna889sOsvO5iQb1cWJ09vXwRvbSuAL4="
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
Parameter score is LLR (Log-likelihood ratio) based on natural logarithm.
JSONXML
{
  "result" : {
    "version" : 2,
    "name" : "SpeakerIdentificationMultiResult",
    "model" : "S",
    "speaker_group" : "group1",
    "calibration_set" : "",
    "max_fa_rate" : 0,
    "results" : [
      {
        "file" : "{voiceprint}",
        "speaker_model" : "test1",
        "channel_scores" : [
          {
            "channel" : 0,
            "scores" : [
              {
                "score" : 15.753671
              }
            ]
          }
        ]
      },
      {
        "file" : "{voiceprint}",
        "speaker_model" : "test2",
        "channel_scores" : [
          {
            "channel" : 0,
            "scores" : [
              {
                "score" : -14.8087845
              }
            ]
          }
        ]
      }
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>2</version>
  <name>SpeakerIdentificationMultiResult</name>
  <model>S</model>
  <speaker_group>group1</speaker_group>
  <calibration_set/>
  <max_fa_rate>0</max_fa_rate>
  <results>
    <item>
      <file>{voiceprint}</file>
      <speaker_model>test1</speaker_model>
      <channel_scores>
        <item>
          <channel>0</channel>
          <scores>
            <item>
              <score>15.753671</score>
            </item>
          </scores>
        </item>
      </channel_scores>
    </item>
    <item>
      <file>{voiceprint}</file>
      <speaker_model>test2</speaker_model>
      <channel_scores>
        <item>
          <channel>0</channel>
          <scores>
            <item>
              <score>-14.8087845</score>
            </item>
          </scores>
        </item>
      </channel_scores>
    </item>
  </results>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1017User model not ready
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Comparator (SIDC)
  • Speaker Identification VoicePrint Calibration (SIDCALIBSET) Required if parameter calibset is used

Resource locker

  • LOCK Speaker model (if parameter speaker_model is used)
  • LOCK Speaker group (if parameter group is used). Also all speaker models contained in group are locked as well.
  • LOCK Calibration set (if parameter calibset is used)
/technologies/speakerid/stream – analyze stream
GET /technologies/speakerid/stream Get partial result from stream task

Get partial result from task analyzing stream identified by task ID.

Parameters

NameParameter TypeData TypeRequiredDescription
taskquerystringyesStream Task ID which the request will be attached to

Body

empty content

Example

CURL
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid/stream?task=STREAM_TASK_ID"

Available responses

HTTP StatusOutput
200OK
Parameter score is LLR (Log-likelihood ratio) based on natural logarithm.
JSONXML
{
  "result" : {
  "version" : 1,
  "name" : "SpeakerIdentificationStreamMultiResult",
  "model" : "S",
  "is_last" : "true",
  "task_id" : "bfc641a4-37a4-4983-8276-5f63dcc70fd0",
  "task_execution_time" : 19.28692,
  "stream_id" : "6fdb15f6-4c01-48fc-ba4e-832c9da69acd",
  "stream_port_is_open" : false,
  "speaker_group" : "all",
  "speaker_model" : "",
  "utterance_length" : 9.9,
  "min_utterance_length_limit" : 0,
  "min_utterance_limit_reached" : true,
  "calibration_set" : "",
  "max_fa_rate" : 0,
  "results" : [
    {
      "file" : "",
      "speaker_model" : "david_1",
      "channel_scores" : [
        {
          "channel" : 0,
          "scores" : [
            {
              "score" : 14.225391
            }
          ]
        }
      ]
    },
    {
      "file" : "",
      "speaker_model" : "david_2",
      "channel_scores" : [
        {
          "channel" : 0,
          "scores" : [
            {
              "score" : 8.92917
            }
          ]
        }
      ]
    },
    ...
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>SpeakerIdentificationStreamMultiResult</name>
  <model>S</model>
  <is_last>true</is_last>
  <task_id>dcae1de7-341e-40ac-a868-864e6f671181</task_id>
  <task_execution_time>6.008333</task_execution_time>
  <stream_id>1f693724-9183-45d7-8051-829887d47c75</stream_id>
  <stream_port_is_open>false</stream_port_is_open>
  <speaker_group>all</speaker_group>
  <speaker_model/>
  <utterance_length>1.11</utterance_length>
  <min_utterance_length_limit>0</min_utterance_length_limit>
  <min_utterance_limit_reached>true</min_utterance_limit_reached>
  <calibration_set/>
  <max_fa_rate>0</max_fa_rate>
  <results>
    <item>
      <file/>
      <speaker_model>david_1</speaker_model>
      <channel_scores>
        <item>
          <channel>0</channel>
          <scores>
            <item>
              <score>2.6890395</score>
            </item>
          </scores>
        </item>
      </channel_scores>
    </item>
    <item>
      <file/>
      <speaker_model>david_2</speaker_model>
      <channel_scores>
        <item>
          <channel>0</channel>
          <scores>
            <item>
              <score>1.9447069</score>
            </item>
          </scores>
        </item>
      </channel_scores>
    </item>
    ...
  </results>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1050Technology does not support multichannel stream
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1010Task not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Stream Extractor (SIDE_STREAM)
  • Speaker Identification VoicePrint Stream Comparator (SIDC_STREAM)
  • Speaker Identification VoicePrint Stream Calibration (SIDCALIBSET_STREAM) Required if parameter calibset is used
POST /technologies/speakerid/stream Start task analyzing stream

Start analyzing stream. Stream speaker identification compares stream identified by ID with speaker model or speaker group.

Speaker model consists of recordings of one speaker. Speaker group consists of several speaker models. Speaker model and Speaker group have to be prepared before analyzing starts (see PUT /technologies/speakerid/speakermodels/{name}/prepare and PUT /technologies/speakerid/groups/{name}/prepare). Prepare requests requires Speaker Identification VoicePrint Extractor (SIDE) technology.

Optionally, calibration set can be specified with parameter max_fa_rate to set maximum false acceptance rate. Calibration set has to be prepared before analyzing starts (see PUT /technologies/speakerid/calibsets/{name}/prepare). Prepare of calibration set requires Speaker Identification VoicePrint Calibration (SIDCALIBSET) technology.

This technology can not be attached to multichannel stream.

Parameters

NameParameter TypeData TypeRequiredDescription
streamquerystringyesStream ID which the request will be attached to
modelquerystringyesName of SID model.
speaker_modelquerystringyes if group is not specifiedName of the speaker model.
groupquerystringyes if speaker_model is not specifiedDetermines the speaker group. For select all speaker models use virtual group "all".
calibsetquerystringnoDetermines the calibration set for speaker identification.
max_false_alarmsDeprecatedquerynumberyes if calibset is specifiedPlease use parameter max_fa_rate instead of max_false_alarms.
max_fa_ratequerynumberyes if calibset is specifiedSets maximum false acceptance rate for which the voice-prints will be calibrated. Value in range 0 to 100.

Body

empty content

Example

CURL
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST "SERVER_ADDRESS:PORT/technologies/speakerid/stream?stream=STREAM_ID&model=L&group=GROUP_NAME"

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 1,
    "name": "UserStreamTaskInfoResult",
    "stream_task_info": {
      "id": "8506180c-e87d-42f6-ac9a-c5ca3a3a3202",
      "state": "running",
      "stream_id": "29eae856-0004-46a2-a761-9e9a72bad719"
    }
  }
}
<result>
  <version>1</version>
  <name>UserStreamTaskInfoResult</name>
  <stream_task_info>
    <id>8506180c-e87d-42f6-ac9a-c5ca3a3a3202</id>
    <state>running</state>
    <stream_id>29eae856-0004-46a2-a761-9e9a72bad719</stream_id>
  </stream_task_info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1017User model not ready
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1030Stream not found
405Method Not Allowed
  • 1009Technology is not supported by server
503Service Unavailable
  • 1028Worker limit exceeded
  • 1031Resource not available

Required technologies

  • Speaker Identification VoicePrint Stream Extractor (SIDE_STREAM)
  • Speaker Identification VoicePrint Stream Comparator (SIDC_STREAM)
  • Speaker Identification VoicePrint Stream Calibration (SIDCALIBSET_STREAM) Required if parameter calibset is used
DELETE /technologies/speakerid/stream Stop task analyzing stream

Stop task analyzing stream identified by task ID.

Parameters

NameParameter TypeData TypeRequiredDescription
taskquerystringyesStream Task ID which the request will be attached to

Body

empty content

Example

CURL
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/technologies/speakerid/stream?task=STREAM_TASK_ID"

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1010Task not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Stream Extractor (SIDE_STREAM)
  • Speaker Identification VoicePrint Stream Comparator (SIDC_STREAM)
  • Speaker Identification VoicePrint Stream Calibration (SIDCALIBSET_STREAM) Required if parameter calibset is used
/technologies/speakerid/benchmark – speaker identification benchmark
GET /technologies/speakerid/benchmark (asynchronous)Speaker identification Benchmark

Benchmark the Speaker Identification technology with the default set of recordings or a user-specified recording (by parameter path). Only speed of extraction is measured.

Parameters

NameParameter TypeData TypeRequiredDescription
modelquerystringyesName of Speaker Identification technology model.
pathquerystringnoServer path to the audio file. If not specified, default recordings will be used.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid/benchmark?model=L"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/speakerid/benchmark',
  uri_params: {
    model: 'L'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 3,
    "name" : "SpeakerIdentificationBenchmarkResult",
    "dataset_version" : "1.0",
    "model_name" : "S",
    "benchmark_result" : {
      "processed_length" : 21.31999969482422,
      "processing_time" : 0.48091199999999995,
      "faster_than_realtime" : 44.549944615190896
    },
    "cpu_info" : {
      "vendor" : "GenuineIntel",
      "brand" : "Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz",
      "n_cores" : 4,
      "n_logical_cores" : 4,
      "l1_data_cache" : 32768,
      "l1_instruction_cache" : 32768,
      "l2_cache" : 262144,
      "l3_cache" : 6291456
    },
    "memory_info" : {
      "total_ram" : 16623747072,
      "free_ram" : 5028855808,
      "total_swap" : 0,
      "free_swap" : 0
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>3</version>
  <name>SpeakerIdentificationBenchmarkResult</name>
  <dataset_version>1.0</dataset_version>
  <model_name>S</model_name>
  <benchmark_result>
    <processed_length>21.31999969482422</processed_length>
    <processing_time>0.48091199999999995</processing_time>
    <faster_than_realtime>44.549944615190896</faster_than_realtime>
  </benchmark_result>
  <cpu_info>
    <vendor>GenuineIntel</vendor>
    <brand>Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz</brand>
    <n_cores>4</n_cores>
    <n_logical_cores>4</n_logical_cores>
    <l1_data_cache>32768</l1_data_cache>
    <l1_instruction_cache>32768</l1_instruction_cache>
    <l2_cache>262144</l2_cache>
    <l3_cache>6291456</l3_cache>
  </cpu_info>
  <memory_info>
    <total_ram>16623747072</total_ram>
    <free_ram>4938498048</free_ram>
    <total_swap>0</total_swap>
    <free_swap>0</free_swap>
  </memory_info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Voice Activity Detection (VAD)

Resource locker

  • LOCK Analyzed file (if parameter path is used)
/technologies/speakerid/speakermodels – list of speaker models
GET /technologies/speakerid/speakermodels List of speaker models

Returns the list of speaker models and groups available for speaker identification.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid/speakermodels"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/speakermodels",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 1,
    "name" : "SpeakerIdentificationModelsResult",
    "models" : [
      "model1",
      "model2"
    ],
    "groups" : [
      "all",
      "group1"
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>SpeakerIdentificationModelsResult</name>
  <models>
    <item>model1</item>
    <item>model2</item>
  </models>
  <groups>
    <item>all</item>
    <item>group1</item>
  </groups>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Comparator (SIDC)
/technologies/speakerid/speakermodels/{name} – information about the model
GET /technologies/speakerid/speakermodels/{name} Information about speaker model

Returns the list of recordings and metafiles included in a speaker model.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesDetermines the speaker model for speaker identification.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid/speakermodels/SPEAKER_MODEL_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_MODEL_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/speakermodels/$SPEAKER_MODEL_NAME",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 5,
    "name" : "SpeakerIdentificationModelInfo",
    "speaker_model" : "model1",
    "is_ready" : [
      "S",
      "L"
    ],
    "is_calibrated" : [
      {
        "model" : "S",
        "calibration_set" : "calibset",
        "max_fa_rate" : 0.1
      }
    ],
    "member_of_groups" : [
      "all",
      "group1"
    ],
    "files" : [
      {
        "name": "david_1.wav",
        "last_modified": "2016-01-22T08:36:00Z",
        "created": "2016-01-22T08:36:00Z",
        "size": 492204,
        "is_directory": false,
        "is_registered": true,
        "frequency": 8000,
        "length": 30.76,
        "n_channels": 1,
        "format": "lin16"
      }
    ],
    "metafiles" : [
      {
        "name" : "david_1.txt",
        "last_modified" : "2015-09-15T12:33:02Z",
        "created" : "2015-09-15T12:33:02Z",
        "size" : 100,
        "is_directory" : false,
        "is_registered": true
      }
    ]
  }
}
<?xml version="1.0"?>
<result>
  <version>5</version>
  <name>SpeakerIdentificationModelInfo</name>
  <speaker_model>model1</speaker_model>
  <is_ready>
    <item>S</item>
    <item>L</item>
  </is_ready>
  <is_calibrated>
    <item>
      <model>S</model>
      <calibration_set>calibset</calibration_set>
      <max_fa_rate>0.1</max_fa_rate>
    </item>
  </is_calibrated>
  <member_of_groups>
    <item>all</item>
    <item>group1</item>
  </member_of_groups>
  <files>
    <item>
      <name>david_1.wav</name>
      <last_modified>2016-01-22T08:36:00Z</last_modified>
      <created>2016-01-22T08:36:00Z</created>
      <size>492204</size>
      <is_directory>false</is_directory>
      <is_registered>true</is_registered>
      <frequency>8000</frequency>
      <length>30.76</length>
      <n_channels>1</n_channels>
      <format>lin16</format>
    </item>
  </files>
  <metafiles>
    <item>
      <name>david_1.txt</name>
      <last_modified>2015-09-15T12:33:02Z</last_modified>
      <created>2015-09-15T12:33:02Z</created>
      <size>100</size>
      <is_directory>false</is_directory>
      <is_registered>true</is_registered>
    </item>
  </metafiles>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Comparator (SIDC)
POST /technologies/speakerid/speakermodels/{name} Add new speaker model

Creates a new empty speaker model.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesDetermines the speaker model for speaker identification.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST "SERVER_ADDRESS:PORT/technologies/speakerid/speakermodels/SPEAKER_MODEL_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_MODEL_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/speakermodels/$SPEAKER_MODEL_NAME",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1051Invalid path syntax
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Comparator (SIDC)
DELETE /technologies/speakerid/speakermodels/{name} Remove speaker model

Removes a speaker model. All contained recordings, metafiles and related results are deleted.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesDetermines the speaker model for speaker identification.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/technologies/speakerid/speakermodels/SPEAKER_MODEL_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_MODEL_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/speakermodels/$SPEAKER_MODEL_NAME",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1016User model already exist
  • 1038Resource is locked
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Comparator (SIDC)

Resource locker

  • CHECK Speaker model specified by name in request path
/technologies/speakerid/speakermodels/{name}/prepare – prepares speaker model
PUT /technologies/speakerid/speakermodels/{name}/prepare (asynchronous)Prepares speaker model

Prepare speaker models. It is necessary to prepare a speaker model before comparing it with voiceprint or using it in stream. A speaker model is prepared automatically when used in the GET /technologies/speakerid request. This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the speaker model.
modelquerystringyesName of SID model.
calibsetquerystringnoDetermines the calibration set name for calibrate speaker model voiceprint.
max_fa_ratequerynumberyes if calibset is specifiedSets maximum false acceptance rate for which the voiceprint(s) will be calibrated. Value in range 0 to 100.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X PUT "SERVER_ADDRESS:PORT/technologies/speakerid/speakermodels/SPEAKERMODEL_NAME/prepare?model=L"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 */
var speakermodel_name = 'test';
var options = {
  method: 'PUT',
  uri_path: '/technologies/speakerid/speakermodels/' + speakermodel_name + '/prepare',
  uri_params: {
    model: 'L',
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1017User model not ready
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1033Unable to prepare speaker model

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)

Resource locker

  • LOCK Speaker model specified by name in request path
  • LOCK Calibration set (if parameter calibset is used)
/technologies/speakerid/speakermodels/{name}/audiofile – speaker model audio file
GET /technologies/speakerid/speakermodels/{name}/audiofile Download recording from model

Downloads recording from speaker model. Specific recording is determined by the path parameter. Note that query parameter path here does not refer to the location of the recording on server, but it is the name of your recording within the speaker model. Therefore, the name of the recording should not contain any slash characters ('/').

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of speaker model.
pathquerystringyesName of recording in speaker model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid/speakermodels/SPEAKER_MODEL_NAME/audiofile?path=AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= path to the audio file on the Phonexia Speech Engine
$SPEAKER_MODEL_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/speakermodels/$SPEAKER_MODEL_NAME/audiofile?path=$PATH",
  false,
  $context
);

file_put_contents('./audio.wav', $response); //= audio file saved on the PHP server
?>

Available responses

HTTP StatusOutput
200OK
AUDIO DATA
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Comparator (SIDC)
POST /technologies/speakerid/speakermodels/{name}/audiofile Add audio file to speaker model

Uploads audio file to speaker model. Body of request contains audio file data. Speaker model is automatically created if it does not exist. Note that query parameter path here does not refer to the location of the recording on server, but it is the name of your recording within the speaker model. Therefore, the name of the recording should not contain any slash characters ('/').

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of speaker model.
pathquerystringyesName of recording in speaker model.

Body

AUDIO DATA

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST --data-binary @FILE_PATH "SERVER_ADDRESS:PORT/technologies/speakerid/speakermodels/SPEAKER_MODEL_NAME/audiofile?path=AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= destination path to the audiofile on the Phonexia Speech Engine
$SPEAKER_MODEL_NAME = "test";

$audio = file_get_contents("./audio.wav"); //= path to the source file on the PHP server

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: audio/wav',
    'content'       => $audio,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/speakermodels/$SPEAKER_MODEL_NAME/audiofile?path=$PATH",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 3,
    "name": "AudioFileInfoResult",
    "info": {
      "name": "julia_1.wav",
      "last_modified": "2015-08-03T08:16:15Z",
      "created": "2015-08-03T08:16:15Z",
      "size": 474444,
      "is_directory": false,
      "is_registered": true,
      "frequency": 8000,
      "length": 29.65,
      "n_channels": 1,
      "format": "lin16"
    }
  }
}
<?xml version="1.0"?>
<result>
  <version>3</version>
  <name>AudioFileInfoResult</name>
  <info>
    <name>julia_1.wav</name>
    <last_modified>2015-08-03T08:16:15Z</last_modified>
    <created>2015-08-03T08:16:15Z</created>
    <size>474444</size>
    <is_directory>false</is_directory>
    <is_registered>true</is_registered>
    <frequency>8000</frequency>
    <length>29.65</length>
    <n_channels>1</n_channels>
    <format>lin16</format>
  </info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1039It was necessary to rename uploaded file but it could not be done, because file with same name already exists
  • 1038Resource is locked
  • 1051Invalid path syntax
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server
413Request Entity Too Large
  • 1014Size of uploaded file exceeds size limit
415Unsupported Media Type
  • 1007Unsupported audio format

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Comparator (SIDC)

Resource locker

  • CHECK Speaker model specified by name in request path
DELETE /technologies/speakerid/speakermodels/{name}/audiofile Remove recording from speaker model

Removes recording from speaker model. Recording is determined by the path parameter. Speaker model is automatically removed after the removal of the last recording. Note that query parameter path here does not refer to the location of the recording on server, but it is the name of your recording within the speaker model. Therefore, the name of the recording should not contain any slash characters ('/').

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesName of recording in speaker model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/technologies/speakerid/speakermodels/SPEAKER_MODEL_NAME/audiofile?path=AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= path to the audio file on the Phonexia Speech Engine
$SPEAKER_MODEL_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/speakermodels/$SPEAKER_MODEL_NAME/audiofile?path=$PATH",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Comparator (SIDC)

Resource locker

  • CHECK Speaker model specified by name in request path
/technologies/speakerid/speakermodels/{name}/metafile – speaker model metafile
GET /technologies/speakerid/speakermodels/{name}/metafile Download metafile from speaker model

Downloads a metafile from a speaker model. The metafile is determined by the path parameter. Note that the path parameter in the request does not refer to the location of the metafile on the server, but it is the name of the metafile within the speaker model. Therefore the name of the metafile should not contain any slashes ('/').

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of speaker model.
pathquerystringyesName of the metafile in the speaker model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid/speakermodels/SPEAKER_MODEL_NAME/metafile?path=METAFILE"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/METAFILE";  //= path to the meta file on the Phonexia Speech Engine
$SPEAKER_MODEL_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/speakermodels/$SPEAKER_MODEL_NAME/metafile?path=$PATH",
  false,
  $context
);

file_put_contents('./METAFILE', $response); //= audio file saved on the PHP server
?>

Available responses

HTTP StatusOutput
200OK
METADATA
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Comparator (SIDC)
POST /technologies/speakerid/speakermodels/{name}/metafile Add metafile to speaker model

Uploads a metafile to speaker model. The request body contains metafile data. Note that the path parameter in the request does not refer to the location of the metafile on the server, but it is the name of the metafile within the speaker model. Therefore the name of the metafile should not contain any slashes ('/').

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of speaker model.
pathquerystringyesName of the metafile in the speaker model.

Body

metafile

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST --data-binary "@FILE_PATH" "SERVER_ADDRESS:PORT/technologies/speakerid/speakermodels/SPEAKER_MODEL_NAME/metafile?path=METAFILE"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/METAFILE";  //= destination path to the meta file on the Phonexia Speech Engine
$SPEAKER_MODEL_NAME = "test";

$audio = file_get_contents("./METAFILE"); //= path to the source file on the PHP server

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: audio/wav',
    'content'       => $audio,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/speakermodels/$SPEAKER_MODEL_NAME/metafile?path=$PATH",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server
413Request Entity Too Large
  • 1014Size of uploaded file exceeds size limit

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Comparator (SIDC)
DELETE /technologies/speakerid/speakermodels/{name}/metafile Remove metafile from speaker model

Removes metafile from speaker model. The metafile is determined by path parameter. Note that the path parameter in the request does not refer to the location of the metafile on the server, but it is the name of the metafile within the speaker model. Therefore the name of the metafile should not contain any slashes ('/').

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of speaker model.
pathquerystringyesName of the metafile in the speaker model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/technologies/speakerid/speakermodels/SPEAKER_MODEL_NAME/metafile?path=METAFILE"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/METAFILE";  //= path to the meta file on the Phonexia Speech Engine
$SPEAKER_MODEL_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/speakermodels/$SPEAKER_MODEL_NAME/metafile?path=$PATH",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 3,
    "name": "AudioFileInfoResult",
    "info": {
      "name": "julia_1.wav",
      "last_modified": "2015-08-03T08:16:15Z",
      "created": "2015-08-03T08:16:15Z",
      "size": 474444,
      "is_directory": false,
      "is_registered": true,
      "frequency": 8000,
      "length": 29.65,
      "n_channels": 1,
      "format": "lin16"
    }
  }
}
<?xml version="1.0"?>
<result>
  <version>3</version>
  <name>AudioFileInfoResult</name>
  <info>
    <name>julia_1.wav</name>
    <last_modified>2015-08-03T08:16:15Z</last_modified>
    <created>2015-08-03T08:16:15Z</created>
    <size>474444</size>
    <is_directory>false</is_directory>
    <is_registered>true</is_registered>
    <frequency>8000</frequency>
    <length>29.65</length>
    <n_channels>1</n_channels>
    <format>lin16</format>
  </info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Comparator (SIDC)
/technologies/speakerid/speakermodels/{name}/voiceprint – voiceprint in speaker model
GET /technologies/speakerid/speakermodels/{name}/voiceprint Get voiceprint from speaker model.

Gets a voiceprint from a prepared speaker model. The speaker model can be prepared by calling PUT /technologies/speakerid/speakermodels/{name}/prepare

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the speaker model.
modelquerystringyesName of SID model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid/speakermodels/kelly/voiceprint?model=L"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_MODEL_NAME = "kelly";
$TECHNOLOGY_MODEL = "L";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/speakermodels/$SPEAKER_MODEL_NAME/voiceprint?model=$TECHNOLOGY_MODEL",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 1,
    "name" : "SpeakerModelVoiceprintResult",
    "speaker_model" : "kelly",
    "model" : "L",
    "voiceprint" : <Base64 Data>
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>SpeakerModelVoiceprintResult</name>
  <speaker_model>kelly</speaker_model>
  <model>L</model>
  <voiceprint>[Base64 Data]</voiceprint>
</result>
400Bad Request
  • 1017User model not ready
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server
/technologies/speakerid/groups/{name} – speaker groups
GET /technologies/speakerid/groups/{name} Get speaker models in group

Returns information about a speaker model group.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the speaker model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid/groups/SPEAKER_GROUP_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_GROUP_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/groups/$SPEAKER_GROUP_NAME",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 3,
    "name" : "SpeakerIdentificationGroupResult",
    "group" : "group1",
    "is_ready" : [
      "S",
      "L"
    ],
    "is_calibrated" : [
      {
        "model" : "S",
        "calibration_set" : "calibset",
        "max_fa_rate" : 0.1
      }
    ],
    "speaker_models" : [
      "model1",
      "model2",
      ...
    ]
  }
}
<result>
  <version>3</version>
  <name>SpeakerIdentificationGroupResult</name>
  <group>group1</group>
  <is_ready>
    <item>S</item>
    <item>L</item>
  </is_ready>
  <is_calibrated>
    <item>
      <model>S</model>
      <calibration_set>calibset</calibration_set>
      <max_fa_rate>0.1</max_fa_rate>
    </item>
    ...
  </is_calibrated>
  <speaker_models>
    <item>model1</item>
    <item>model2</item>
    ...
  </speaker_models>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Comparator (SIDC)
POST /technologies/speakerid/groups/{name} Create empty group

Creates a new empty speaker model group.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the speaker model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST "SERVER_ADDRESS:PORT/technologies/speakerid/groups/SPEAKER_GROUP_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_GROUP_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/groups/$SPEAKER_GROUP_NAME",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1016User model already exist
  • 1038Resource is locked
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Comparator (SIDC)

Resource locker

  • CHECK Speaker Group specified by name in request path
DELETE /technologies/speakerid/groups/{name} Remove group

Removes an existing speaker model group.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the speaker model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/technologies/speakerid/groups/SPEAKER_GROUP_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_GROUP_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/speakermodels/$SPEAKER_GROUP_NAME",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Comparator (SIDC)

Resource locker

  • CHECK Speaker Group specified by name in request path
/technologies/speakerid/groups/{name}/speakermodel – speaker model in group
POST /technologies/speakerid/groups/{name}/speakermodel Create group containing existing speaker model(s)

Specifies the existing speaker model(s) to be included in a speaker group. If the speaker group does not exist, it is automatically created. If the speaker group already exists, it gets overwritten. It is possible to set the Content-Type parameter in the request header, which is helpful in case the client wants to send input data in XML format.

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content
namepathstringyesName of the speaker model.

Body

JSONXML
{
   "speaker_models" : [
     "speaker_1",
     "speaker_2",
     ...
   ]
}
<?xml version="1.0" encoding="UTF-8"?>
<speaker_models>
  <item>speaker_1</item>
  <item>speaker_2</item>
  ...
</speaker_models>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -H "Content-Type:application/json" -X POST --data-binary "@speaker_models.json" "SERVER_ADDRESS:PORT/technologies/speakerid/groups/SPEAKER_GROUP_NAME/speakermodel"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_GROUP_NAME = "test";

$speakers = array(
  'speaker_models' =>
  array (
    "speaker_1",
    "speaker_2"
  )
);

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: application/json',
    'content'       => json_encode($speakers),
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/groups/$SPEAKER_GROUP_NAME/speakermodel",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Comparator (SIDC)

Resource locker

  • CHECK Speaker group specified by name in request path
PUT /technologies/speakerid/groups/{name}/speakermodel Add speaker model(s) to group

Adds existing speaker model(s) into an existing speaker group. It is possible to set the Content-Type parameter in the request header which is helpful in case the client wants to send input data in XML format.

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content
namepathstringyesName of the speaker model.

Body

JSONXML
{
   "speaker_models" : [
     "speaker_1",
     "speaker_2",
     ...
   ]
}
<?xml version="1.0" encoding="UTF-8"?>
<speaker_models>
  <item>speaker_1</item>
  <item>speaker_2</item>
  ...
</speaker_models>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -H "Content-Type:application/json" -X PUT --data-binary "@speaker_models.json" "SERVER_ADDRESS:PORT/technologies/speakerid/groups/SPEAKER_GROUP_NAME/speakermodel"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_GROUP_NAME = "test";

$speakers = array(
  'speaker_models' =>
  array (
    "speaker_1",
    "speaker_2"
  )
);

$options = array(
  'http' =>
  array (
    'method'        => 'PUT',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: application/json',
    'content'       => json_encode($speakers),
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/groups/$SPEAKER_GROUP_NAME/speakermodel",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1018The requested URI requires content
  • 1038Resource is locked
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Comparator (SIDC)

Resource locker

  • CHECK Speaker group specified by name in request path
DELETE /technologies/speakerid/groups/{name}/speakermodel Remove speaker model(s) from group

Removes speaker model(s) from a speaker group. The request body contains a list of speaker models to be removed from the speaker group. It is possible to set the Content-Type parameter in the request headerwhich is helpful in case the client wants to send input data in XML format.

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content.
namepathstringyesName of the speaker model.

Body

JSONXML
{
   "speaker_models" : [
     "speaker_1",
     "speaker_2",
     ...
   ]
}
<?xml version="1.0" encoding="UTF-8"?>
<speaker_models>
  <item>speaker_1</item>
  <item>speaker_2</item>
  ...
</speaker_models>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -H "Content-Type:application/json" -X DELETE --data-binary "@speaker_models.json" "SERVER_ADDRESS:PORT/technologies/speakerid/groups/SPEAKER_GROUP_NAME/speakermodel"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$SPEAKER_GROUP_NAME = "test";

$speakers = array(
  'speaker_models' =>
  array (
    "speaker_1",
    "speaker_2"
  )
);

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: application/json',
    'content'       => json_encode($speakers),
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/groups/$SPEAKER_GROUP_NAME/speakermodel",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1018The requested URI requires content
  • 1038Resource is locked
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Comparator (SIDC)

Resource locker

  • CHECK Speaker group specified by name in request path
/technologies/speakerid/groups/{name}/prepare – prepares group of speaker models
PUT /technologies/speakerid/groups/{name}/prepare (asynchronous)Prepare group of speaker models

Prepares a group of speaker models. It is necessary to prepare a group before using it in stream

The group is prepared automatically when used in the GET /technologies/speakerid request.

This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of group.
modelquerystringyesName of SID model.
calibsetquerystringnoDetermines the calibration set name for calibrate speaker model voiceprint.
max_fa_ratequerynumberyes if calibset is specifiedSets maximum false acceptance rate for which the voiceprint(s) will be calibrated. Value in range 0 to 100.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X PUT "SERVER_ADDRESS:PORT/technologies/speakerid/groups/GROUP_NAME/prepare?model=L"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 */
var group_name = 'test';
var options = {
  method: 'PUT',
  uri_path: '/technologies/speakerid/groups/' + group_name + '/prepare',
  uri_params: {
    model: 'L',
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1017User model not ready
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1034Unable to prepare group of speaker models

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)

Resource locker

  • LOCK Speaker Group specified by name in request path
  • LOCK Calibration set (if parameter calibset is used)
/technologies/speakerid/groups/{name}/voiceprints – voiceprints of all speaker models in group
GET /technologies/speakerid/groups/{name}/voiceprints Get voiceprints from speaker group.

Returns the list of voiceprints of all speaker models belonging to the speaker group. All speaker models must be prepared first. A speaker model can be prepared by calling PUT /technologies/speakerid/speakermodels/{name}/prepare. All speaker models in a group can be prepared by calling PUT /technologies/speakerid/groups/{name}/prepare.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of speaker group.
modelquerystringyesName of SID model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid/groups/group1/voiceprints?model=S"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_GROUP_NAME = "group1";
$TECHNOLOGY_MODEL = "S";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/groups/$SPEAKER_GROUP_NAME/voiceprints?model=$TECHNOLOGY_MODEL",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 1,
    "name" : "SpeakerGroupVoiceprintsResult",
    "speaker_group" : "group1",
    "model" : "L",
    "voiceprint_set" : [
      {
        "speaker_model": "kelly",
        "voiceprint": <Base64 Data>
      },
      {
        "speaker_model": "julia",
        "voiceprint": <Base64 Data>
      },
      ...
    ]
  }
}
<?xml version='1.0' encoding='UTF-8'?>
<result>
  <version>1</version>
  <name>SpeakerGroupVoiceprintsResult</name>
  <speaker_group>group1</speaker_group>
  <model>L</model>
  <voiceprint_set>
    <item>
      <speaker_model>kelly</speaker_model>
      <voiceprint>[Base64 Data]</voiceprint>
    </item>
    <item>
      <speaker_model>julia</speaker_model>
      <voiceprint>[Base64 Data]</voiceprint>
    </item>
    ...
  </voiceprint_set>
</result>
400Bad Request
  • 1017User model not ready
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server
/technologies/speakerid/calibsets – list of calibration sets
GET /technologies/speakerid/calibsets List of calibration sets

Returns list of calibration sets for speaker identification.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid/calibsets"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/calibsets",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 1,
    "name" : "SpeakerIdentificationCalibsetsResult",
    "calibsets" : [
      "test"
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>SpeakerIdentificationCalibsetsResult</name>
  <calibsets>
    <item>test</item>
  </calibsets>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server
/technologies/speakerid/calibsets/{name} – calibration set manipulation
GET /technologies/speakerid/calibsets/{name} Information about calibration set

Returns list of recordings and metafiles included in calibration set.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesDetermines the calibration set.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid/calibsets/CALIBRATION_SET_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$CALIBRATION_SET_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/calibsets/$CALIBRATION_SET_NAME",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 5,
    "name" : "SpeakerIdentificationCalibsetInfo",
    "calibration_set" : "set1",
    "is_ready" : [
      "S",
      "L"
    ],
    "files" : [
      {
        "name" : "rec_001.wav",
        "last_modified" : "2015-09-14T15:09:32Z",
        "created" : "2015-09-14T15:09:32Z",
        "size" : 952154,
        "is_directory" : false,
        "is_registered" : true,
        "frequency": 8000,
        "length": 30.76,
        "n_channels": 1,
        "format": "lin16",
        "is_valid" : true,
        "is_ready" : [
          "S",
          "L"
        ]
      }
      ...
    ],
    "metafiles" : [
      {
        "name" : "david_1.txt",
        "last_modified" : "2015-09-15T12:33:02Z",
        "created" : "2015-09-15T12:33:02Z",
        "size" : 100,
        "is_directory" : false,
        "is_registered": true
      }
    ]
  }
}
<?xml version="1.0"?>
<result>
  <version>5</version>
  <name>SpeakerIdentificationCalibsetInfo</name>
  <calibration_set>set1</calibration_set>
  <is_ready>
    <item>S</item>
    <item>L</item>
  </is_ready>
  <files>
    <item>
      <name>rec_001.wav</name>
      <last_modified>2015-09-14T15:09:32Z</last_modified>
      <created>2015-09-14T15:09:32Z</created>
      <size>952154</size>
      <is_directory>false</is_directory>
      <is_registered>true</is_registered>
      <frequency>8000</frequency>
      <length>30.76</length>
      <n_channels>1</n_channels>
      <format>lin16</format>
      <is_valid>true</is_valid>
      <is_ready>
        <item>S</item>
        <item>L</item>
      </is_ready>
    </item>
    ...
  </files>
  <metafiles>
    <item>
      <name>david_1.txt</name>
      <last_modified>2015-09-15T12:33:02Z</last_modified>
      <created>2015-09-15T12:33:02Z</created>
      <size>100</size>
      <is_directory>false</is_directory>
      <is_registered>true</is_registered>
    </item>
  </metafiles>
</result>

Result description

calibration_setname of the calibration set
is_readylist of technology model names for which is calibration set prepared
files[]list of files used in calibration set
files[]->namefile name
files[]->last_modifiedtime and date when the file was last modified
files[]->createdtime and date when the file was created
files[]->sizefile size (in bytes)
files[]->is_directoryif true, this flag specifies that file is directory
files[]->is_registeredif true, this flag specifies that file is correctly registered
files[]->frequencyrecording frequency (Hz)
files[]->lengthrecording length (in seconds)
files[]->n_channelsnumber of channels in recording
files[]->formatrecording format
files[]->is_validspecifies that recording is appropriate to use in calibration set. This flag is always 'true' when recording is created and can be changed during prepare process. Calibration set can't be used until contains any invalid recording.
files[]->is_readylist of technology model names for which is that file prepared. Use this request with parameter path to prepare specific file.
metafiles[]list of metafiles used in calibration set
metafiles[]->namefile name
metafiles[]->last_modifiedtime and date when the file was last modified
metafiles[]->createdtime and date when the file was created
metafiles[]->sizefile size (in bytes)
metafiles[]->is_directoryif true, this flag specifies that file is directory
metafiles[]->is_registeredif true, this flag specifies that file is correctly registered
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Calibration (SIDCALIBSET)
POST /technologies/speakerid/calibsets/{name} Create calibration set

Create new empty calibration set.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesDetermines the calibration set.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST "SERVER_ADDRESS:PORT/technologies/speakerid/calibsets/CALIBRATION_SET_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$CALIBRATION_SET_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/calibsets/$CALIBRATION_SET_NAME",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1016User model already exist
  • 1051Invalid path syntax
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Calibration (SIDCALIBSET)
DELETE /technologies/speakerid/calibsets/{name} Remove calibration set

Remove calibration set.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesDetermines the calibration set.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/technologies/speakerid/calibsets/CALIBRATION_SET_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$CALIBRATION_SET_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/calibsets/$CALIBRATION_SET_NAME",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Calibration (SIDCALIBSET)

Resource locker

  • CHECK Calibration set specified by name in request path
/technologies/speakerid/calibsets/{name}/prepare – prepares calibration set
PUT /technologies/speakerid/calibsets/{name}/prepare (asynchronous)Prepare calibration set

Prepares calibration set. Each file in calibration set must contain enough speech (typically 120 seconds). When some file does not contain enough speech, this request finish with HTTP code 406. To determine which files does not contain enough speech, use GET /technologies/speakerid/calibsets/{name}. Parameter "is_valid" in each file object defines if file has enough speech. Parameter "is_valid" is set during prepare process. This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the calibration set.
pathquerystringnoName of recording in calibration set. If it is set only this file will be prepared instead of prepare whole calibration set.
modelquerystringyesName of SID model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X PUT "SERVER_ADDRESS:PORT/technologies/speakerid/calibsets/CALIBSET_NAME/prepare?model=L"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 */
var calibset_name = 'test';
var options = {
  method: 'PUT',
  uri_path: '/technologies/speakerid/calibsets/' + calibset_name + '/prepare',
  uri_params: {
    model: 'L',
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
  • 1008File not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1032Unable to prepare calibration set

Required technologies

  • Speaker Identification VoicePrint Calibration (SIDCALIBSET)

Resource locker

  • LOCK Calibration set specified by name in request path
/technologies/speakerid/calibsets/{name}/audiofile – calibration set audio file
GET /technologies/speakerid/calibsets/{name}/audiofile Download recording from calibration set

Download recording from calibration set. Recording is determined by the path parameter.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the calibration set.
pathquerystringyesName of recording in calibration set.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid/calibsets/CALIBSET_NAME/audiofile?path=/AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= path to the audio file on the Phonexia Speech Engine
$CALIBSET_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/calibsets/$CALIBSET_NAME/audiofile?path=$PATH",
  false,
  $context
);

file_put_contents('./audio.wav', $response); //= audio file saved on the PHP server
?>

Available responses

HTTP StatusOutput
200OK
AUDIO DATA
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Calibration (SIDCALIBSET)
POST /technologies/speakerid/calibsets/{name}/audiofile Add audio file to calibration set

Upload audio file to calibration set. The request body contains audio file data. Each file in calibration set must contain enough speech (typically 120 seconds). When some file does not contain enough speech, prepare calibration set finish with HTTP code 406. To determine which files does not contain enough speech, use GET /technologies/speakerid/calibsets/{name}. Parameter "is_valid" in each file object defines if file has enough speech. Parameter "is_valid" is set during prepare process.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the calibration set.
pathquerystringyesName of recording in calibration set.

Body

AUDIO DATA

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST --data-binary @"FILE_PATH" "SERVER_ADDRESS:PORT/technologies/speakerid/calibsets/CALIBSET_NAME/audiofile?path=/AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= destination path to the audiofile on the Phonexia Speech Engine
$CALIBSET_NAME = "test";

$audio = file_get_contents("./audio.wav"); //= path to the source file on the PHP server

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: audio/wav',
    'content'       => $audio,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/calibsets/$CALIBSET_NAME/audiofile?path=$PATH",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 3,
    "name": "AudioFileInfoResult",
    "info": {
      "name": "julia_1.wav",
      "last_modified": "2015-08-03T08:16:15Z",
      "created": "2015-08-03T08:16:15Z",
      "size": 474444,
      "is_directory": false,
      "is_registered": true,
      "frequency": 8000,
      "length": 29.65,
      "n_channels": 1,
      "format": "lin16"
    }
  }
}
<?xml version="1.0"?>
<result>
  <version>3</version>
  <name>AudioFileInfoResult</name>
  <info>
    <name>julia_1.wav</name>
    <last_modified>2015-08-03T08:16:15Z</last_modified>
    <created>2015-08-03T08:16:15Z</created>
    <size>474444</size>
    <is_directory>false</is_directory>
    <is_registered>true</is_registered>
    <frequency>8000</frequency>
    <length>29.65</length>
    <n_channels>1</n_channels>
    <format>lin16</format>
  </info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1039It was necessary to rename uploaded file but it could not be done, because file with same name already exists
  • 1038Resource is locked
  • 1051Invalid path syntax
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server
413Request Entity Too Large
  • 1014Size of uploaded file exceeds size limit
415Unsupported Media Type
  • 1007Unsupported audio format

Required technologies

  • Speaker Identification VoicePrint Calibration (SIDCALIBSET)

Resource locker

  • CHECK Calibration set specified by name in request path
DELETE /technologies/speakerid/calibsets/{name}/audiofile Remove recording from calibration set

Remove recording from Calibration set. Recording is determined by the path parameter.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the calibration set.
pathquerystringyesName of recording in calibration set.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/technologies/speakerid/calibsets/CALIBSET_NAME/audiofile?path=/AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= path to the audio file on the Phonexia Speech Engine
$CALIBSET_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/calibsets/$CALIBSET_NAME/audiofile?path=$PATH",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Calibration (SIDCALIBSET)

Resource locker

  • CHECK Calibration set specified by name in request path
/technologies/speakerid/calibsets/{name}/metafile – calibration set metafile
GET /technologies/speakerid/calibsets/{name}/metafile Download metafile from calibration set

Downloads a metafile from a calibration set. The metafile is determined by the path parameter. Note that the path parameter in the request does not refer to the location of the metafile on the server, but it is the name of the metafile within the calibration set. Therefore the name of the metafile should not contain any slashes ('/') as it has no efect on the metafile location in the server's storage.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the calibration set.
pathquerystringyesName of the metafile in the calibration set.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid/calibsets/CALIBRATION_SET_NAME/metafile?path=METAFILE"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/METAFILE";  //= path to the meta file on the Phonexia Speech Engine
$CALIBRATION_SET_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/calibsets/$CALIBRATION_SET_NAME/metafile?path=$PATH",
  false,
  $context
);

file_put_contents('./METAFILE', $response); //= audio file saved on the PHP server
?>

Available responses

HTTP StatusOutput
200OK
METADATA
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Calibration (SIDCALIBSET)
POST /technologies/speakerid/calibsets/{name}/metafile Add metafile to calibration set

Upload metafile to calibration set. The request body contains the metafile data. Note that the path parameter in the request does not refer to the location of the metafile on the server, but it is the name of the metafile within the calibration set. Therefore the name of the metafile should not contain any slashes ('/') as it has no efect on the metafile location in the server's storage.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the calibration set.
pathquerystringyesName of the metafile in the calibration set.

Body

metafile

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST --data-binary "@FILE_PATH" "SERVER_ADDRESS:PORT/technologies/speakerid/calibsets/CALIBRATION_SET_NAME/metafile?path=METAFILE"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/METAFILE";  //= destination path to the meta file on the Phonexia Speech Engine
$CALIBRATION_SET_NAME = "test";

$content = file_get_contents("./METAFILE"); //= path to the source file on the PHP server

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: text/plain',
    'content'       => $content,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/calibsets/$CALIBRATION_SET_NAME/metafile?path=$PATH",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server
413Request Entity Too Large
  • 1014Size of uploaded file exceeds size limit

Required technologies

  • Speaker Identification VoicePrint Calibration (SIDCALIBSET)
DELETE /technologies/speakerid/calibsets/{name}/metafile Remove metafile from calibration set

Removes a metafile from a calibration set. The metafile is determined by the path parameter. Note that the path parameter in the request does not refer to the location of the metafile on the server, but it is the name of the metafile within the calibration set. Therefore the name of the metafile should not contain any slashes ('/') as it has no efect on the metafile location in the server's storage.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the calibration set.
pathquerystringyesName of the metafile in the calibration set.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/technologies/speakerid/calibsets/CALIBRATION_SET_NAME/metafile?path=METAFILE"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/METAFILE";  //= path to the meta file on the Phonexia Speech Engine
$CALIBRATION_SET_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/calibsets/$CALIBRATION_SET_NAME/metafile?path=$PATH",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Calibration (SIDCALIBSET)
/technologies/speakerid/calibsets/{name}/voiceprint – voice-print from calibration set's audiofile
GET /technologies/speakerid/calibsets/{name}/voiceprint Get calibration voice-print from calibration file.

Get calibration voice-print from calibration set's audiofile. File has to have extracted voice-print for model (you can check it by calling GET /technologies/speakerid/calibsets/{name}). Extraction of voice-prints can be done by calling PUT /technologies/speakerid/calibsets/{name}/prepare.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the calibration set.
pathquerystringyesName of file in calibration set.
modelquerystringyesName of SID model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid/calibsets/cailibset_1/voiceprint?path=kelly_1.wav&model=L"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$FILE_PATH = "kelly_1.wav"
$CALIBSET_NAME = "cailibset_1";
$TECHNOLOGY_MODEL = "L";

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/calibsets/$CALIBSET_NAME/voiceprint?path=$FILE_PATH&model=$TECHNOLOGY_MODEL",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 1,
    "name" : "CalibsetVoiceprintResult",
    "file" : "kelly_1.wav",
    "calibration_set" : "calibset_1",
    "model" : "L",
    "voiceprint" : <Base64 Data>
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>CalibsetVoiceprintResult</name>
  <file>kelly_1.wav</file>
  <calibration_set>calibset_1</calibration_set>
  <model>L</model>
  <voiceprint>[Base64 Data]</voiceprint>
</result>
400Bad Request
  • 1017User model not ready
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
  • 1008File not found
405Method Not Allowed
  • 1009Technology is not supported by server
/technologies/speakerid/extractvp – extract voiceprint
GET /technologies/speakerid/extractvp (asynchronous)Extract voiceprints from audio file

Extracts the voiceprint from an audio file. This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file.
modelquerystringyesName of SID model.
calibsetquerystringnoDetermines the calibration set for calibration of voiceprint(s).
max_false_alarmsDeprecatedquerynumberyes if calibset is specifiedPlease use parameter max_fa_rate instead of max_false_alarms.
max_fa_ratequerynumberyes if calibset is specifiedSets maximum false acceptance rate for which the voiceprint(s) will be calibrated. Value in range 0 to 100.
from_timequerydoublenofrom_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed from the beginning. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.
to_timequerydoublenoto_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed to the end. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid/extractvp?path=julia_1.wav&model=L"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/speakerid/extractvp',
  uri_params: {
    path: '/julia.wav',
    model: 'L',
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
The time_range parameter in the output is serialized only when query parameters from_time or to_time are specified. voiceprint_set may contains more than one voiceprint when input recording is multi-channel. Each voiceprint is extracted from one channel, and voiceprint_set is sorted by channel order.
JSONXML
{
  "result" : {
    "version" : 3,
    "name" : "VoiceprintResult",
    "file" : "\/kelly_julia.wav",
    "model" : "S",
    "calibration_set" : "",
    "max_fa_rate" : 0,
    "time_range": {
      "from_time": 2.5,
      "to_time": 5.5
    },
    "voiceprint_set" : [
      {
        "voiceprint" : <Base64 Data>
      },
      {
        "voiceprint" : <Base64 Data>
      },
      ...
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>3</version>
  <name>VoiceprintResult</name>
  <file>/kelly_julia.wav</file>
  <model>S</model>
  <calibration_set/>
  <max_fa_rate>0</max_fa_rate>
  <time_range>
    <from_time>2.5</from_time>
    <to_time>5.5</to_time>
  </time_range>
  <voiceprint_set>
    <item>
      <voiceprint>[Base64 Data]</voiceprint>
    </item>
    <item>
      <voiceprint>[Base64 Data]</voiceprint>
    </item>
    ...
  </voiceprint_set>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1035Invalid time range
415Unsupported Media Type
  • 1007Unsupported audio format

Required technologies

  • Speaker Identification VoicePrint Extractor (SIDE)
  • Speaker Identification VoicePrint Calibration (SIDCALIBSET) Required if parameter calibset is used

Resource locker

  • LOCK Analyzed file
  • LOCK Calibration set (if parameter calibset is used)
/technologies/speakerid/comparevp – compare voiceprints
POST /technologies/speakerid/comparevp (asynchronous)Analyze two voiceprints

Compares two voiceprints. This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content
modelquerystringyesName of SID model.
calibsetquerystringnoDetermines the calibration set for calibration of voiceprint(s).
max_false_alarmsDeprecatedquerynumberyes if calibset is specifiedPlease use parameter max_fa_rate instead of max_false_alarms.
max_fa_ratequerynumberyes if calibset is specifiedSets maximum false acceptance rate for which the voiceprint(s) will be calibrated. Value in range 0 to 100.

Body

JSONXML
{
  "voiceprints": [
    <Base64 Data>,
    <Base64 Data>
  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<voiceprints>
  <item>
    [Base64 Data]
  </item>
  <item>
    [Base64 Data]
  </item>
</voiceprints>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST -H "Content-Type:application/json" --data-binary @"voiceprints.json" "SERVER_ADDRESS:PORT/technologies/speakerid/comparevp?model=L"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'POST',
  uri_path: '/technologies/speakerid/comparevp',
  uri_params: {
    model: 'L'
  },
  content: {
    "voiceprints": [
      "VlBUIAcAAAD9CAAA6AMAAAAAAAD3vHKT8LtfPk373b\/gMhG\/BAyNvXDZjD86XH0\/0FyCP1e6iD8zjba+OAAgv\/Jj3z0TL54+bm+0PiwUVb\/g6ErAE7jXPos6Mb8xYRy\/UEcAQGgoZT8eb+Q\/oGxIP88EBT5YrYY\/8WqWP\/0WrD\/xa44\/lomHP+yqjz+soYI\/RRgZPdoFtj9ZCmQ\/qKIEP7nuhL4Bl4O\/g9kJv1\/erb8gA1q+CsSRPzNga78qMo6\/kISNvwykbD9P+Jq\/zUWGPiVKAUDwvIq\/E6yPv8WYpr\/SpAa\/wbaJvXgpHL4QwJu95Wk5Pj5mXb7n8+49Xz2bPy3SSj+6Uvw+5ZgDP\/Fqsb\/KgiC+yadGP4lmFj53iwE\/ZpeRP9SwOD9tQWU+8yKRvW8RFz\/Jryy\/pgQnvxN4zb6GCCs\/rmQiP51l3z4hRp0\/JVOYv+oVE76B6gM+oLErv6imh7war3E\/zS\/OP4BF0r\/QAZA+IMgEPvM5hj\/dWYg+HRa5P+RkMr9I0rY+MEdWPrifzL+vmBi\/ihuNvjjj4b8yzEI\/17JnP78GvT9ZSgG\/rNqbvwD6Iz66ZRlAguRbPjwv9T7OE5o\/ok6Lvhdso79bJO+\/noI5vz\/xWb+Udvi8cfAdP3b6pD440NS+tTUdwMhpAjxSTH+\/DjDJPT4Lez2b7y0\/o3IYP8AHKT+rvRy\/YLigvBGtfb\/IUBe+KL3gv6mV2z+8g9G\/tFXdPppkKb0NeQA\/g\/oJQPTrbjweV7M+rbJqv\/IXv78oRE8+ET54v0uXs7\/8TIi\/RESXP48LjD8lN25AulqTv2LrtL\/6J6W+5QRrv971Zb9S1hnA+t1TPzOJED5GOTe\/di+6Pq7cQL\/tLCk+5IsBPt3n374WlqG\/t0Udvv9W9b8SyAo\/p343vylLSb8z4UO\/kttMv4ZwrD\/d7Hq\/WPo6Pz4bRz1kycM\/AGA3O5DIZb7Eqjc\/lYDnPejvH0D0d9G\/wvvCv1bu3j5uhKI\/CMK0PMX3RT9bUI2\/OJnSPcBppr5sGd0+IYtIv6o4ar+oxyG+tXTMPqkCmD+ty6a\/f+PyPmKR3r6ML+G\/rNxevgvMED8bS4A\/U\/oevp6Nar+UPR0\/1EYiwAovzj5O3ry\/teVFPu9Nk781WUO\/tQQ9QMQWGL+4LMe99A+hv\/67SD7kfD7ApnkWv\/TZnj4K2IE\/JyOev5qAz75dJ2e\/vp4Wv3OlXT8rO2a\/Hiz2P3olHb3nLgO\/uQpjP+02Rj8hGmg\/tsi6PdKfKD\/JHVQ\/zPsHv9YZjL1eVTs\/Y8Olv\/kNez61bb6\/7aICP9oqX7\/2BDu+sIGevy\/e+z4MwxQ+vThJvhqC4r84fdi\/SvSJvw==",
      "VlBUIAcAAABIDAAA6AMAAAAAAAD4FigbpNHSPk1S2b\/4upC\/Jhv\/vliBYz82X1M\/LYy5P9BDMz90Izm\/oGe1PdWMlb7J2OG9CFQsv6H9Q79rIAzAjLFdP8Ra2b70OhXA+jK+PiT3hD\/e\/q4\/s8SHP8CyGD\/jzDw\/X+\/OPxSJHz8GWWM84v7DPyKyAj3ls+M+YDTDvk3UUz+R4D8\/4mesPgGjtT3mJ4e\/X9t0vxa8bz0hlYg+UbMEQNykDb+3ZUq\/m0mAv9i+tr1FrlG\/pIl\/PXZPJ0BPb+092GUMwEEnyr+igHU\/f43fPSkK8L3eZBa\/jG0bvzKBWb+JbVK\/obVlP4Z4dD\/0y8o8xEIQvqVdgr87EhBAIhsRQGbwL7+ePvg+dqBdPqw7JD+uzwQ\/cP\/Cvn+zrj8sgPe\/2LocvtNrhr90q3E\/i36iP+gHC77bQTO+Ji2MPt0nt76OY7q+1VHYPU3LSz4ePSa\/WSBEP0A6+r8Op4c\/3jQaP56PIb\/BvZa\/kFSuPyw33D4d0oK\/L\/4KP\/vfKL\/5aaS\/VIKXPxHj5T6RaJm+HUuPviNq1z82Jcs+DFtJP5X+JL\/f97k\/CLkYOlUMBb8IxZS+Gb9Xv9QVqr\/IN82\/L7MFP9cslzyvyKA\/k57gPhycQD64Fx4+RTlgPchBLjza3J2\/Tbsvv9IE1D4T9W4+AH4xv65yqr7adq68b+ZKPrJzrb1U\/\/a+0Jo2vhuVbj\/JZ\/i\/YNAdP9bONb\/3rNQ+EMJfP2YT+j5PRUU\/AHKRvwxnG7\/\/fio\/Xbndv3dEf78QOZG\/G2gsQPDLiT+Au\/A\/UdIrP9pn3b5JeQa\/3PaLvzh3tz7rTCrAWucWvWJk2j\/Nky4\/ez+EP2CWyb9Dc4U\/6aQpP+hPiD6UwE++7AS6P4dQB8BMOmc\/Qbu4Pz77U77SVoc\/6BcFP2afCz9ZbSi\/+z6UPzLRh72G2cM\/t9mPvuWDcr9qRFE+S5UcQDvrxj+PrpA\/5uOdv3vcSz+R2Aw\/12WUvCScIb\/vxJO\/8++tP2I4gr5fUkM\/vGqCv\/hcB0BLT8y9aX6ov9kOLT5koZW\/6ehyvep6pjyVJ6O\/vfRoPmoOab8R6vk\/biEAP6EDA0BQ+1g+Yq2+vyEjNUAxb4W\/xo5SP3w4nL7caIu+l+LqP14XPL4Ocdm+miuiP43SnD9BJFLAsHSrvwelOL17B7C\/yRbTvirTZT\/a7x+\/JxTpPWf6aT0mlmO\/85AgP4rLmj9cw6K\/zZChP\/ym6T4W3jA\/ligQwPF7n7\/Ewj0\/yK+gPhrjL78IKYY+H2jpP3gncj05e5++GHcrP3vK\/L4usla+ZFMDvVho4r4w2Ls\/lEfVP9p\/nL6mvdu\/gyGDvg=="
    ]
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
 "result" : {
   "version" : 1,
    "name" : "SpeakerIdentificationMultiResult",
    "model" : "L",
    "speaker_group" : "",
    "calibration_set" : "",
    "max_fa_rate" : 0,
    "results" : [
      {
        "file" : "",
        "speaker_model" : "",
        "channel_scores" : [
          {
            "channel" : 0,
            "scores" : [
              {
                "score" : 13.249981
              }
            ]
          }
        ]
      }
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>SpeakerIdentificationMultiResult</name>
  <model>L</model>
  <speaker_group/>
  <calibration_set/>
  <max_fa_rate>0</max_fa_rate>
  <results>
    <item>
      <file/>
      <speaker_model/>
      <channel_scores>
        <item>
          <channel>0</channel>
          <scores>
            <item>
              <score>13.249981</score>
            </item>
          </scores>
        </item>
      </channel_scores>
    </item>
  </results>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1017User model not ready
  • 1025An invalid value was specified for one of the header parameters in the request
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Comparator (SIDC)
  • Speaker Identification VoicePrint Calibration (SIDCALIBSET) Required if parameter calibset is used

Resource locker

  • LOCK Calibration set (if parameter calibset is used)
/technologies/speakerid/comparevpset – compare voiceprint set
POST /technologies/speakerid/comparevpset (asynchronous)Analyze one voiceprint set

Compares the voiceprint set with itself. This request is asynchronous (see Asynchronous request).

The request body must contain only one voiceprint set.

To compare two different voiceprint sets use POST /technologies/speakerid/comparevpsets

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content
modelquerystringyesName of SID model.
calibsetquerystringnoDetermines the calibration set for calibration of voiceprint(s).
max_fa_ratequerynumberyes if calibset is specifiedSets maximum false acceptance rate for which the voiceprint(s) will be calibrated. Value in range 0 to 100.
prune_matrixquerystringnoabove (results above and on diagonal will be 0)
below (results below and on diagonal will be 0)

Body

JSONXML
{
  "voiceprint_set": [
    {
      "voiceprint": <Base64 Data>
    },
    {
      "voiceprint": <Base64 Data>
    },
    ...
  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<voiceprint_set>
  <item>
    <voiceprint>[Base64 Data]</voiceprint>
  </item>
  <item>
    <voiceprint>[Base64 Data]</voiceprint>
  </item>
  ...
</voiceprint_set>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST -H "Content-Type:application/json" --data-binary @"voiceprint_set.json" "SERVER_ADDRESS:PORT/technologies/speakerid/comparevpset?model=L"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'POST',
  uri_path: '/technologies/speakerid/comparevpset',
  uri_params: {
    model: 'L'
  },
  content: {
    "voiceprint_set": [
      {
        "voiceprint": "VlBUIAcAAAD9CAAA6AMAAAAAAAD3vHKT8LtfPk373b\/gMhG\/BAyNvXDZjD86XH0\/0FyCP1e6iD8zjba+OAAgv\/Jj3z0TL54+bm+0PiwUVb\/g6ErAE7jXPos6Mb8xYRy\/UEcAQGgoZT8eb+Q\/oGxIP88EBT5YrYY\/8WqWP\/0WrD\/xa44\/lomHP+yqjz+soYI\/RRgZPdoFtj9ZCmQ\/qKIEP7nuhL4Bl4O\/g9kJv1\/erb8gA1q+CsSRPzNga78qMo6\/kISNvwykbD9P+Jq\/zUWGPiVKAUDwvIq\/E6yPv8WYpr\/SpAa\/wbaJvXgpHL4QwJu95Wk5Pj5mXb7n8+49Xz2bPy3SSj+6Uvw+5ZgDP\/Fqsb\/KgiC+yadGP4lmFj53iwE\/ZpeRP9SwOD9tQWU+8yKRvW8RFz\/Jryy\/pgQnvxN4zb6GCCs\/rmQiP51l3z4hRp0\/JVOYv+oVE76B6gM+oLErv6imh7war3E\/zS\/OP4BF0r\/QAZA+IMgEPvM5hj\/dWYg+HRa5P+RkMr9I0rY+MEdWPrifzL+vmBi\/ihuNvjjj4b8yzEI\/17JnP78GvT9ZSgG\/rNqbvwD6Iz66ZRlAguRbPjwv9T7OE5o\/ok6Lvhdso79bJO+\/noI5vz\/xWb+Udvi8cfAdP3b6pD440NS+tTUdwMhpAjxSTH+\/DjDJPT4Lez2b7y0\/o3IYP8AHKT+rvRy\/YLigvBGtfb\/IUBe+KL3gv6mV2z+8g9G\/tFXdPppkKb0NeQA\/g\/oJQPTrbjweV7M+rbJqv\/IXv78oRE8+ET54v0uXs7\/8TIi\/RESXP48LjD8lN25AulqTv2LrtL\/6J6W+5QRrv971Zb9S1hnA+t1TPzOJED5GOTe\/di+6Pq7cQL\/tLCk+5IsBPt3n374WlqG\/t0Udvv9W9b8SyAo\/p343vylLSb8z4UO\/kttMv4ZwrD\/d7Hq\/WPo6Pz4bRz1kycM\/AGA3O5DIZb7Eqjc\/lYDnPejvH0D0d9G\/wvvCv1bu3j5uhKI\/CMK0PMX3RT9bUI2\/OJnSPcBppr5sGd0+IYtIv6o4ar+oxyG+tXTMPqkCmD+ty6a\/f+PyPmKR3r6ML+G\/rNxevgvMED8bS4A\/U\/oevp6Nar+UPR0\/1EYiwAovzj5O3ry\/teVFPu9Nk781WUO\/tQQ9QMQWGL+4LMe99A+hv\/67SD7kfD7ApnkWv\/TZnj4K2IE\/JyOev5qAz75dJ2e\/vp4Wv3OlXT8rO2a\/Hiz2P3olHb3nLgO\/uQpjP+02Rj8hGmg\/tsi6PdKfKD\/JHVQ\/zPsHv9YZjL1eVTs\/Y8Olv\/kNez61bb6\/7aICP9oqX7\/2BDu+sIGevy\/e+z4MwxQ+vThJvhqC4r84fdi\/SvSJvw=="
      },
      {
        "voiceprint": "VlBUIAcAAABIDAAA6AMAAAAAAAD4FigbpNHSPk1S2b\/4upC\/Jhv\/vliBYz82X1M\/LYy5P9BDMz90Izm\/oGe1PdWMlb7J2OG9CFQsv6H9Q79rIAzAjLFdP8Ra2b70OhXA+jK+PiT3hD\/e\/q4\/s8SHP8CyGD\/jzDw\/X+\/OPxSJHz8GWWM84v7DPyKyAj3ls+M+YDTDvk3UUz+R4D8\/4mesPgGjtT3mJ4e\/X9t0vxa8bz0hlYg+UbMEQNykDb+3ZUq\/m0mAv9i+tr1FrlG\/pIl\/PXZPJ0BPb+092GUMwEEnyr+igHU\/f43fPSkK8L3eZBa\/jG0bvzKBWb+JbVK\/obVlP4Z4dD\/0y8o8xEIQvqVdgr87EhBAIhsRQGbwL7+ePvg+dqBdPqw7JD+uzwQ\/cP\/Cvn+zrj8sgPe\/2LocvtNrhr90q3E\/i36iP+gHC77bQTO+Ji2MPt0nt76OY7q+1VHYPU3LSz4ePSa\/WSBEP0A6+r8Op4c\/3jQaP56PIb\/BvZa\/kFSuPyw33D4d0oK\/L\/4KP\/vfKL\/5aaS\/VIKXPxHj5T6RaJm+HUuPviNq1z82Jcs+DFtJP5X+JL\/f97k\/CLkYOlUMBb8IxZS+Gb9Xv9QVqr\/IN82\/L7MFP9cslzyvyKA\/k57gPhycQD64Fx4+RTlgPchBLjza3J2\/Tbsvv9IE1D4T9W4+AH4xv65yqr7adq68b+ZKPrJzrb1U\/\/a+0Jo2vhuVbj\/JZ\/i\/YNAdP9bONb\/3rNQ+EMJfP2YT+j5PRUU\/AHKRvwxnG7\/\/fio\/Xbndv3dEf78QOZG\/G2gsQPDLiT+Au\/A\/UdIrP9pn3b5JeQa\/3PaLvzh3tz7rTCrAWucWvWJk2j\/Nky4\/ez+EP2CWyb9Dc4U\/6aQpP+hPiD6UwE++7AS6P4dQB8BMOmc\/Qbu4Pz77U77SVoc\/6BcFP2afCz9ZbSi\/+z6UPzLRh72G2cM\/t9mPvuWDcr9qRFE+S5UcQDvrxj+PrpA\/5uOdv3vcSz+R2Aw\/12WUvCScIb\/vxJO\/8++tP2I4gr5fUkM\/vGqCv\/hcB0BLT8y9aX6ov9kOLT5koZW\/6ehyvep6pjyVJ6O\/vfRoPmoOab8R6vk\/biEAP6EDA0BQ+1g+Yq2+vyEjNUAxb4W\/xo5SP3w4nL7caIu+l+LqP14XPL4Ocdm+miuiP43SnD9BJFLAsHSrvwelOL17B7C\/yRbTvirTZT\/a7x+\/JxTpPWf6aT0mlmO\/85AgP4rLmj9cw6K\/zZChP\/ym6T4W3jA\/ligQwPF7n7\/Ewj0\/yK+gPhrjL78IKYY+H2jpP3gncj05e5++GHcrP3vK\/L4usla+ZFMDvVho4r4w2Ls\/lEfVP9p\/nL6mvdu\/gyGDvg=="
      }
    ]
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
Example of a result matrix without using parameter prune_matrix

VP1VP2VPn
VP113.4584.455-11.751
VP24.45514.3982.785
VPn-11.7512.78516.492

Example of a result matrix with parameter prune_matrix=above

VP1VP2VPn
VP1000
VP24.45500
VPn-11.7512.7850

Example of a result matrix with parameter prune_matrix=below

VP1VP2VPn
VP104.455-11.751
VP2002.785
VPn000

JSONXML
{
   "result":{
     "version":1,
     "name":"VoiceprintSetsCompareResult",
     "model":"S",
     "calibration_set" : "",
     "max_fa_rate" : 0,
     "matrix":[
       [
         <vp1 x vp1>, <vp1 x vp2>, <vp1 x vp3>
       ],
       [
         <vp2 x vp1>, <vp2 x vp2>, <vp2 x vp3>
       ],
       [
         4.455456, -11.751356, 14.43781
       ]
     ]
   }
 }
<?xml version='1.0' encoding='UTF-8'?>
 <result>
   <version>1</version>
   <name>VoiceprintSetsCompareResult</name>
   <model>S</model>
   <calibration_set/>
   <max_fa_rate>0</max_fa_rate>
   <matrix>
     <item>
       <item>[vpset1_vp1 x vpset2_vp1]</item>
       <item>[vpset1_vp1 x vpset2_vp2]</item>
     </item>
     <item>
       <item>[vpset1_vp2 x vpset2_vp1]</item>
       <item>[vpset1_vp2 x vpset2_vp2]</item>
     </item>
     <item>
       <item>4.455456</item>
       <item>-11.751356</item>
     </item>
     ...
   </matrix>
 </result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1025An invalid value was specified for one of the header parameters in the request
  • 1019An invalid data was specified in the request content
  • 1017User model not ready
401Unauthorized
  • 1005The request requires user authentication
403Forbidden
  • 1011Execute access forbidden
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Comparator (SIDC)
  • Speaker Identification VoicePrint Calibration (SIDCALIBSET) Required if parameter calibset is used

Resource locker

  • LOCK Calibration set (if parameter calibset is used)
/technologies/speakerid/comparevpsets – compare voiceprint sets
POST /technologies/speakerid/comparevpsets (asynchronous)Analyze two voiceprint sets

Compares two voiceprint sets with each other. This request is asynchronous (see Asynchronous request).

The request body should contain two voiceprint sets.

To compare one voiceprint set to itself use POST /technologies/speakerid/comparevpset

Deprecated usage: Due to backward compatibility this endpoint still allows compare one voiceprint sets to itself and result is equal to POST /technologies/speakerid/comparevpset?prune_matrix=above

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content
modelquerystringyesName of SID model.
calibsetquerystringnoDetermines the calibration set for calibration of voiceprint(s).
max_fa_ratequerynumberyes if calibset is specifiedSets maximum false acceptance rate for which the voiceprint(s) will be calibrated. Value in range 0 to 100.

Body

JSONXML
{
  "voiceprint_sets": [
    {
      "voiceprint_set": [
        {
          "voiceprint": <Base64 Data>
        },
        {
          "voiceprint": <Base64 Data>
        },
        ...
      ]
    },
    {
      "voiceprint_set": [
        {
          "voiceprint": <Base64 Data>
        },
        {
          "voiceprint": <Base64 Data>
        },
        ...
      ]
    }
  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<voiceprint_sets>
  <item>
    <voiceprint_set>
      <item>
        <voiceprint>[Base64 Data]</voiceprint>
      </item>
      <item>
        <voiceprint>[Base64 Data]</voiceprint>
      </item>
      ...
    </voiceprint_set>
  </item>
  <item>
    <voiceprint_set>
      <item>
        <voiceprint>[Base64 Data]</voiceprint>
      </item>
      <item>
        <voiceprint>[Base64 Data]</voiceprint>
      </item>
      ...
    </voiceprint_set>
  </item>
</voiceprint_sets>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST -H "Content-Type:application/json" --data-binary @"voiceprint_sets.json" "SERVER_ADDRESS:PORT/technologies/speakerid/comparevpsets?model=L"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'POST',
  uri_path: '/technologies/speakerid/comparevpsets',
  uri_params: {
    model: 'L'
  },
  content: {
    "voiceprint_sets": [
      {
        "voiceprint_set": [
          {
            "voiceprint": "VlBUIAcAAAD9CAAA6AMAAAAAAAD3vHKT8LtfPk373b\/gMhG\/BAyNvXDZjD86XH0\/0FyCP1e6iD8zjba+OAAgv\/Jj3z0TL54+bm+0PiwUVb\/g6ErAE7jXPos6Mb8xYRy\/UEcAQGgoZT8eb+Q\/oGxIP88EBT5YrYY\/8WqWP\/0WrD\/xa44\/lomHP+yqjz+soYI\/RRgZPdoFtj9ZCmQ\/qKIEP7nuhL4Bl4O\/g9kJv1\/erb8gA1q+CsSRPzNga78qMo6\/kISNvwykbD9P+Jq\/zUWGPiVKAUDwvIq\/E6yPv8WYpr\/SpAa\/wbaJvXgpHL4QwJu95Wk5Pj5mXb7n8+49Xz2bPy3SSj+6Uvw+5ZgDP\/Fqsb\/KgiC+yadGP4lmFj53iwE\/ZpeRP9SwOD9tQWU+8yKRvW8RFz\/Jryy\/pgQnvxN4zb6GCCs\/rmQiP51l3z4hRp0\/JVOYv+oVE76B6gM+oLErv6imh7war3E\/zS\/OP4BF0r\/QAZA+IMgEPvM5hj\/dWYg+HRa5P+RkMr9I0rY+MEdWPrifzL+vmBi\/ihuNvjjj4b8yzEI\/17JnP78GvT9ZSgG\/rNqbvwD6Iz66ZRlAguRbPjwv9T7OE5o\/ok6Lvhdso79bJO+\/noI5vz\/xWb+Udvi8cfAdP3b6pD440NS+tTUdwMhpAjxSTH+\/DjDJPT4Lez2b7y0\/o3IYP8AHKT+rvRy\/YLigvBGtfb\/IUBe+KL3gv6mV2z+8g9G\/tFXdPppkKb0NeQA\/g\/oJQPTrbjweV7M+rbJqv\/IXv78oRE8+ET54v0uXs7\/8TIi\/RESXP48LjD8lN25AulqTv2LrtL\/6J6W+5QRrv971Zb9S1hnA+t1TPzOJED5GOTe\/di+6Pq7cQL\/tLCk+5IsBPt3n374WlqG\/t0Udvv9W9b8SyAo\/p343vylLSb8z4UO\/kttMv4ZwrD\/d7Hq\/WPo6Pz4bRz1kycM\/AGA3O5DIZb7Eqjc\/lYDnPejvH0D0d9G\/wvvCv1bu3j5uhKI\/CMK0PMX3RT9bUI2\/OJnSPcBppr5sGd0+IYtIv6o4ar+oxyG+tXTMPqkCmD+ty6a\/f+PyPmKR3r6ML+G\/rNxevgvMED8bS4A\/U\/oevp6Nar+UPR0\/1EYiwAovzj5O3ry\/teVFPu9Nk781WUO\/tQQ9QMQWGL+4LMe99A+hv\/67SD7kfD7ApnkWv\/TZnj4K2IE\/JyOev5qAz75dJ2e\/vp4Wv3OlXT8rO2a\/Hiz2P3olHb3nLgO\/uQpjP+02Rj8hGmg\/tsi6PdKfKD\/JHVQ\/zPsHv9YZjL1eVTs\/Y8Olv\/kNez61bb6\/7aICP9oqX7\/2BDu+sIGevy\/e+z4MwxQ+vThJvhqC4r84fdi\/SvSJvw=="
          },
          {
            "voiceprint": "VlBUIAcAAABIDAAA6AMAAAAAAAD4FigbpNHSPk1S2b\/4upC\/Jhv\/vliBYz82X1M\/LYy5P9BDMz90Izm\/oGe1PdWMlb7J2OG9CFQsv6H9Q79rIAzAjLFdP8Ra2b70OhXA+jK+PiT3hD\/e\/q4\/s8SHP8CyGD\/jzDw\/X+\/OPxSJHz8GWWM84v7DPyKyAj3ls+M+YDTDvk3UUz+R4D8\/4mesPgGjtT3mJ4e\/X9t0vxa8bz0hlYg+UbMEQNykDb+3ZUq\/m0mAv9i+tr1FrlG\/pIl\/PXZPJ0BPb+092GUMwEEnyr+igHU\/f43fPSkK8L3eZBa\/jG0bvzKBWb+JbVK\/obVlP4Z4dD\/0y8o8xEIQvqVdgr87EhBAIhsRQGbwL7+ePvg+dqBdPqw7JD+uzwQ\/cP\/Cvn+zrj8sgPe\/2LocvtNrhr90q3E\/i36iP+gHC77bQTO+Ji2MPt0nt76OY7q+1VHYPU3LSz4ePSa\/WSBEP0A6+r8Op4c\/3jQaP56PIb\/BvZa\/kFSuPyw33D4d0oK\/L\/4KP\/vfKL\/5aaS\/VIKXPxHj5T6RaJm+HUuPviNq1z82Jcs+DFtJP5X+JL\/f97k\/CLkYOlUMBb8IxZS+Gb9Xv9QVqr\/IN82\/L7MFP9cslzyvyKA\/k57gPhycQD64Fx4+RTlgPchBLjza3J2\/Tbsvv9IE1D4T9W4+AH4xv65yqr7adq68b+ZKPrJzrb1U\/\/a+0Jo2vhuVbj\/JZ\/i\/YNAdP9bONb\/3rNQ+EMJfP2YT+j5PRUU\/AHKRvwxnG7\/\/fio\/Xbndv3dEf78QOZG\/G2gsQPDLiT+Au\/A\/UdIrP9pn3b5JeQa\/3PaLvzh3tz7rTCrAWucWvWJk2j\/Nky4\/ez+EP2CWyb9Dc4U\/6aQpP+hPiD6UwE++7AS6P4dQB8BMOmc\/Qbu4Pz77U77SVoc\/6BcFP2afCz9ZbSi\/+z6UPzLRh72G2cM\/t9mPvuWDcr9qRFE+S5UcQDvrxj+PrpA\/5uOdv3vcSz+R2Aw\/12WUvCScIb\/vxJO\/8++tP2I4gr5fUkM\/vGqCv\/hcB0BLT8y9aX6ov9kOLT5koZW\/6ehyvep6pjyVJ6O\/vfRoPmoOab8R6vk\/biEAP6EDA0BQ+1g+Yq2+vyEjNUAxb4W\/xo5SP3w4nL7caIu+l+LqP14XPL4Ocdm+miuiP43SnD9BJFLAsHSrvwelOL17B7C\/yRbTvirTZT\/a7x+\/JxTpPWf6aT0mlmO\/85AgP4rLmj9cw6K\/zZChP\/ym6T4W3jA\/ligQwPF7n7\/Ewj0\/yK+gPhrjL78IKYY+H2jpP3gncj05e5++GHcrP3vK\/L4usla+ZFMDvVho4r4w2Ls\/lEfVP9p\/nL6mvdu\/gyGDvg=="
          }
        ]
      }
    ]
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
Example result matrix:

VP Set2
VP1VP2VPm
VP Set1VP1-3.421-1.531-7.218
VP24.455-0.972-2.141
VP3-1.305-2.371-5.714
VPn-11.751-2.785-6.159


JSONXML
{
   "result":{
     "version":1,
     "name":"VoiceprintSetsCompareResult",
     "model":"S",
     "calibration_set" : "",
     "max_fa_rate" : 0,
     "matrix":[
       [
         <vpset1_vp1 x vpset2_vp1>,
         <vpset1_vp1 x vpset2_vp2>
       ],
       [
         <vpset1_vp2 x vpset2_vp1>,
         <vpset1_vp2 x vpset2_vp2>
       ],
       [
         4.455456,
         -11.751356
       ],
       ...
     ]
   }
 }
<?xml version='1.0' encoding='UTF-8'?>
 <result>
   <version>1</version>
   <name>VoiceprintSetsCompareResult</name>
   <model>S</model>
   <calibration_set/>
   <max_fa_rate>0</max_fa_rate>
   <matrix>
     <item>
       <item>[vpset1_vp1 x vpset2_vp1]</item>
       <item>[vpset1_vp1 x vpset2_vp2]</item>
     </item>
     <item>
       <item>[vpset1_vp2 x vpset2_vp1]</item>
       <item>[vpset1_vp2 x vpset2_vp2]</item>
     </item>
     <item>
       <item>4.455456</item>
       <item>-11.751356</item>
     </item>
     ...
   </matrix>
 </result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1025An invalid value was specified for one of the header parameters in the request
  • 1019An invalid data was specified in the request content
  • 1017User model not ready
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
403Forbidden
  • 1011Execute access forbidden
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Comparator (SIDC)
  • Speaker Identification VoicePrint Calibration (SIDCALIBSET) Required if parameter calibset is used

Resource locker

  • LOCK Calibration set (if parameter calibset is used)
/technologies/speakerid/vpinfo – information about voiceprint
POST /technologies/speakerid/vpinfo Information about voiceprint

Returns information about the voiceprint posted in the request body. The voiceprint can contain multiple sub-voiceprints. For each sub-voiceprint the server returns version, speech_length (in seconds) and user_data (base64 encoded).

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringyesapplication/json for JSON content (Default value)
application/xml for XML content
application/octet-stream for raw voiceprint content

Body

JSONXML
{
  "voiceprint": "<Base64 Data>"
}
<?xml version="1.0" encoding="UTF-8"?>
<voiceprint>[Base64 Data]</voiceprint>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -H "Content-Type:application/json" -X POST --data-binary @"voiceprint.json" "SERVER_ADDRESS:PORT/technologies/speakerid/vpinfo"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$voiceprint = array(
  'voiceprint' => 'VlBUIAcAAAD9CAAA6AMAAAAAAAD3vHKT8LtfPk373b/gMhG/BAyNvXDZjD86XH0/0FyCP1e6iD8zjba+OAAgv/Jj3z0TL54+bm+0PiwUVb/g6ErAE7jXPos6Mb8xYRy/UEcAQGgoZT8eb+Q/oGxIP88EBT5YrYY/8WqWP/0WrD/xa44/lomHP+yqjz+soYI/RRgZPdoFtj9ZCmQ/qKIEP7nuhL4Bl4O/g9kJv1/erb8gA1q+CsSRPzNga78qMo6/kISNvwykbD9P+Jq/zUWGPiVKAUDwvIq/E6yPv8WYpr/SpAa/wbaJvXgpHL4QwJu95Wk5Pj5mXb7n8+49Xz2bPy3SSj+6Uvw+5ZgDP/Fqsb/KgiC+yadGP4lmFj53iwE/ZpeRP9SwOD9tQWU+8yKRvW8RFz/Jryy/pgQnvxN4zb6GCCs/rmQiP51l3z4hRp0/JVOYv+oVE76B6gM+oLErv6imh7war3E/zS/OP4BF0r/QAZA+IMgEPvM5hj/dWYg+HRa5P+RkMr9I0rY+MEdWPrifzL+vmBi/ihuNvjjj4b8yzEI/17JnP78GvT9ZSgG/rNqbvwD6Iz66ZRlAguRbPjwv9T7OE5o/ok6Lvhdso79bJO+/noI5vz/xWb+Udvi8cfAdP3b6pD440NS+tTUdwMhpAjxSTH+/DjDJPT4Lez2b7y0/o3IYP8AHKT+rvRy/YLigvBGtfb/IUBe+KL3gv6mV2z+8g9G/tFXdPppkKb0NeQA/g/oJQPTrbjweV7M+rbJqv/IXv78oRE8+ET54v0uXs7/8TIi/RESXP48LjD8lN25AulqTv2LrtL/6J6W+5QRrv971Zb9S1hnA+t1TPzOJED5GOTe/di+6Pq7cQL/tLCk+5IsBPt3n374WlqG/t0Udvv9W9b8SyAo/p343vylLSb8z4UO/kttMv4ZwrD/d7Hq/WPo6Pz4bRz1kycM/AGA3O5DIZb7Eqjc/lYDnPejvH0D0d9G/wvvCv1bu3j5uhKI/CMK0PMX3RT9bUI2/OJnSPcBppr5sGd0+IYtIv6o4ar+oxyG+tXTMPqkCmD+ty6a/f+PyPmKR3r6ML+G/rNxevgvMED8bS4A/U/oevp6Nar+UPR0/1EYiwAovzj5O3ry/teVFPu9Nk781WUO/tQQ9QMQWGL+4LMe99A+hv/67SD7kfD7ApnkWv/TZnj4K2IE/JyOev5qAz75dJ2e/vp4Wv3OlXT8rO2a/Hiz2P3olHb3nLgO/uQpjP+02Rj8hGmg/tsi6PdKfKD/JHVQ/zPsHv9YZjL1eVTs/Y8Olv/kNez61bb6/7aICP9oqX7/2BDu+sIGevy/e+z4MwxQ+vThJvhqC4r84fdi/SvSJvw=='
);

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: application/json',
    'content'       => json_encode($voiceprint),
    'ignore_errors' => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid/vpinfo",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 1,
    "name" : "VoiceprintInfoResult",
    "voiceprint_info" : [
      {
        "index" : 1,
        "version" : 37,
        "speech_length" : 119.49997,
        "user_data" : "<Base64 encoded user data>"
      }
      ...
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>VoiceprintInfoResult</name>
  <voiceprint_info>
    <item>
      <index>1</index>
      <version>37</version>
      <speech_length>119.49997</speech_length>
      <user_data>[Base64 encoded user data]</user_data>
    </item>
    ...
  </voiceprint_info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1025An invalid value was specified for one of the header parameters in the request
  • 1018The requested URI requires content
  • 1019An invalid data was specified in the request content
401Unauthorized
  • 1005The request requires user authentication
/technologies/speakerid/vpmerge – merge set of voiceprints
POST /technologies/speakerid/vpmerge Merge set of the voiceprints to new one.

Merges a set of voiceprints to a single new voiceprint. The new voiceprint is a combination of all voiceprints in the set. All voiceprints in the set have to be of the same type (SID model, calibration/normal voiceprint) It uses a weighted arithmetic mean. It is accomplished by weighting a particular voiceprint by its speech length. Keep in mind that the resulting voiceprint is not the same as the voiceprint extracted from a file created by concatenating all individual audio files into one, but it is very similar to it.

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content

Body

JSONXML
{
  "voiceprint_set": [
    {
      "voiceprint": <Base64 Data>
    },
    {
      "voiceprint": <Base64 Data>
    },
    ...
  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<voiceprint_set>
  <voiceprint>
    [Base64 Data]
  </voiceprint>
  <voiceprint>
    [Base64 Data]
  </voiceprint>
  ...
</voiceprint_set>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST -H "Content-Type:application/json" --data-binary @"voiceprint_set.json" "SERVER_ADDRESS:PORT/technologies/speakerid/vpmerge"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'POST',
  uri_path: '/technologies/speakerid/vpmerge',
  content: {
    "voiceprint_set": [
      {
        "voiceprint": "VlBUIAcAAAD9CAAA6AMAAAAAAAD3vHKT8LtfPk373b\/gMhG\/BAyNvXDZjD86XH0\/0FyCP1e6iD8zjba+OAAgv\/Jj3z0TL54+bm+0PiwUVb\/g6ErAE7jXPos6Mb8xYRy\/UEcAQGgoZT8eb+Q\/oGxIP88EBT5YrYY\/8WqWP\/0WrD\/xa44\/lomHP+yqjz+soYI\/RRgZPdoFtj9ZCmQ\/qKIEP7nuhL4Bl4O\/g9kJv1\/erb8gA1q+CsSRPzNga78qMo6\/kISNvwykbD9P+Jq\/zUWGPiVKAUDwvIq\/E6yPv8WYpr\/SpAa\/wbaJvXgpHL4QwJu95Wk5Pj5mXb7n8+49Xz2bPy3SSj+6Uvw+5ZgDP\/Fqsb\/KgiC+yadGP4lmFj53iwE\/ZpeRP9SwOD9tQWU+8yKRvW8RFz\/Jryy\/pgQnvxN4zb6GCCs\/rmQiP51l3z4hRp0\/JVOYv+oVE76B6gM+oLErv6imh7war3E\/zS\/OP4BF0r\/QAZA+IMgEPvM5hj\/dWYg+HRa5P+RkMr9I0rY+MEdWPrifzL+vmBi\/ihuNvjjj4b8yzEI\/17JnP78GvT9ZSgG\/rNqbvwD6Iz66ZRlAguRbPjwv9T7OE5o\/ok6Lvhdso79bJO+\/noI5vz\/xWb+Udvi8cfAdP3b6pD440NS+tTUdwMhpAjxSTH+\/DjDJPT4Lez2b7y0\/o3IYP8AHKT+rvRy\/YLigvBGtfb\/IUBe+KL3gv6mV2z+8g9G\/tFXdPppkKb0NeQA\/g\/oJQPTrbjweV7M+rbJqv\/IXv78oRE8+ET54v0uXs7\/8TIi\/RESXP48LjD8lN25AulqTv2LrtL\/6J6W+5QRrv971Zb9S1hnA+t1TPzOJED5GOTe\/di+6Pq7cQL\/tLCk+5IsBPt3n374WlqG\/t0Udvv9W9b8SyAo\/p343vylLSb8z4UO\/kttMv4ZwrD\/d7Hq\/WPo6Pz4bRz1kycM\/AGA3O5DIZb7Eqjc\/lYDnPejvH0D0d9G\/wvvCv1bu3j5uhKI\/CMK0PMX3RT9bUI2\/OJnSPcBppr5sGd0+IYtIv6o4ar+oxyG+tXTMPqkCmD+ty6a\/f+PyPmKR3r6ML+G\/rNxevgvMED8bS4A\/U\/oevp6Nar+UPR0\/1EYiwAovzj5O3ry\/teVFPu9Nk781WUO\/tQQ9QMQWGL+4LMe99A+hv\/67SD7kfD7ApnkWv\/TZnj4K2IE\/JyOev5qAz75dJ2e\/vp4Wv3OlXT8rO2a\/Hiz2P3olHb3nLgO\/uQpjP+02Rj8hGmg\/tsi6PdKfKD\/JHVQ\/zPsHv9YZjL1eVTs\/Y8Olv\/kNez61bb6\/7aICP9oqX7\/2BDu+sIGevy\/e+z4MwxQ+vThJvhqC4r84fdi\/SvSJvw=="
      },
      {
        "voiceprint": "VlBUIAcAAABIDAAA6AMAAAAAAAD4FigbpNHSPk1S2b\/4upC\/Jhv\/vliBYz82X1M\/LYy5P9BDMz90Izm\/oGe1PdWMlb7J2OG9CFQsv6H9Q79rIAzAjLFdP8Ra2b70OhXA+jK+PiT3hD\/e\/q4\/s8SHP8CyGD\/jzDw\/X+\/OPxSJHz8GWWM84v7DPyKyAj3ls+M+YDTDvk3UUz+R4D8\/4mesPgGjtT3mJ4e\/X9t0vxa8bz0hlYg+UbMEQNykDb+3ZUq\/m0mAv9i+tr1FrlG\/pIl\/PXZPJ0BPb+092GUMwEEnyr+igHU\/f43fPSkK8L3eZBa\/jG0bvzKBWb+JbVK\/obVlP4Z4dD\/0y8o8xEIQvqVdgr87EhBAIhsRQGbwL7+ePvg+dqBdPqw7JD+uzwQ\/cP\/Cvn+zrj8sgPe\/2LocvtNrhr90q3E\/i36iP+gHC77bQTO+Ji2MPt0nt76OY7q+1VHYPU3LSz4ePSa\/WSBEP0A6+r8Op4c\/3jQaP56PIb\/BvZa\/kFSuPyw33D4d0oK\/L\/4KP\/vfKL\/5aaS\/VIKXPxHj5T6RaJm+HUuPviNq1z82Jcs+DFtJP5X+JL\/f97k\/CLkYOlUMBb8IxZS+Gb9Xv9QVqr\/IN82\/L7MFP9cslzyvyKA\/k57gPhycQD64Fx4+RTlgPchBLjza3J2\/Tbsvv9IE1D4T9W4+AH4xv65yqr7adq68b+ZKPrJzrb1U\/\/a+0Jo2vhuVbj\/JZ\/i\/YNAdP9bONb\/3rNQ+EMJfP2YT+j5PRUU\/AHKRvwxnG7\/\/fio\/Xbndv3dEf78QOZG\/G2gsQPDLiT+Au\/A\/UdIrP9pn3b5JeQa\/3PaLvzh3tz7rTCrAWucWvWJk2j\/Nky4\/ez+EP2CWyb9Dc4U\/6aQpP+hPiD6UwE++7AS6P4dQB8BMOmc\/Qbu4Pz77U77SVoc\/6BcFP2afCz9ZbSi\/+z6UPzLRh72G2cM\/t9mPvuWDcr9qRFE+S5UcQDvrxj+PrpA\/5uOdv3vcSz+R2Aw\/12WUvCScIb\/vxJO\/8++tP2I4gr5fUkM\/vGqCv\/hcB0BLT8y9aX6ov9kOLT5koZW\/6ehyvep6pjyVJ6O\/vfRoPmoOab8R6vk\/biEAP6EDA0BQ+1g+Yq2+vyEjNUAxb4W\/xo5SP3w4nL7caIu+l+LqP14XPL4Ocdm+miuiP43SnD9BJFLAsHSrvwelOL17B7C\/yRbTvirTZT\/a7x+\/JxTpPWf6aT0mlmO\/85AgP4rLmj9cw6K\/zZChP\/ym6T4W3jA\/ligQwPF7n7\/Ewj0\/yK+gPhrjL78IKYY+H2jpP3gncj05e5++GHcrP3vK\/L4usla+ZFMDvVho4r4w2Ls\/lEfVP9p\/nL6mvdu\/gyGDvg=="
      }
    ]
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 1,
    "name" : "VoiceprintMergeResult",
    "voiceprint" : <Base64 Data>
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>VoiceprintMergeResult</name>
  <voiceprint>[Base64 Data]</voiceprint>
</result>
400Bad Request
  • 1018The requested URI requires content
  • 1025An invalid value was specified for one of the header parameters in the request
  • 1019An invalid data was specified in the request content
401Unauthorized
  • 1005The request requires user authentication

Speaker Identification 4

/technologies/speakerid4 – analyze recording or voiceprint
GET /technologies/speakerid4 (asynchronous)Analyze recording

Speaker Identification 4 compares a recording with either a speaker model or speaker group. A speaker model consists of recordings of one speaker. A speaker group consists of several speaker models. Optionally, an Audio Source Profile can be used for the analyzed recording (parameter audio_source_profile_1) as well as for the speaker model / group (parameter audio_source_profile_2) to ensure that the results are optimized for your data. This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file.
modelquerystringyesName of the SID4 model.
speaker_modelquerystringyes if group is not specifiedName of the speaker model.
groupquerystringyes if speaker_model is not specifiedDetermines the speaker group. To select all speaker models use the virtual group "all".
audio_source_profile_1querystringnoName of the Audio Source Profile for the recording.
audio_source_profile_2querystringnoName of the Audio Source Profile for the speaker model (or speaker group).
cache_onlyquerybooleannoIf true, cache_only ensures that the result is returned only if it is already in the cache (the result is stored in the cache if the file has already been processed by the technology). If the result isn't in the cache yet, 404 status is returned. This parameter is not mandatory and if it is not set by the user, the recording is processed by the given technology automatically if the result is not already in the cache. Parameters cache_only and cache_disable can not be used together.
cache_disablequerybooleannoIf true, the result cache is disabled. cache_disable ensures that the recording is always processed and the result is not stored in the cache. Parameters cache_only and cache_disable can not be used together.
from_timequerydoublenofrom_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed from the beginning. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.
to_timequerydoublenoto_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed to the end. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid4?path=julia.wav&model=L4&group=group1&audio_source_profile_1=test_profile_1&audio_source_profile_2=test_profile_2"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/speakerid4',
  uri_params: {
    path: '/julia.wav',
    model: 'L4',
    group: 'group1',
    audio_source_profile_1: 'test_profile_1',
    audio_source_profile_2: 'test_profile_2'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
Parameter time_range in output is serialized only when query parameters from_time or to_time are specified.

Parameter score is LLR (Log-likelihood ratio) based on natural logarithm.

JSONXML
{
  "result" : {
    "version" : 1,
    "name" : "SpeakerIdentification4MultiResult",
    "model" : "L4",
    "speaker_group" : "group1",
    "time_range": {
      "from_time": 2.5,
      "to_time": 5.5
    },
    "results" : [
      {
        "file" : "julia_1.wav",
        "speaker_model" : "test1",
        "audio_source_profile_1" : "test_profile_1",
        "audio_source_profile_2" : "test_profile_2",
        "channel_scores" : [
          {
            "channel" : 0,
            "scores" : [
              {
                "score" : 15.753671
              }
            ]
          }
        ]
      },
      {
        "file" : "julia_1.wav",
        "speaker_model" : "test2",
        "audio_source_profile_1" : "test_profile_1",
        "audio_source_profile_2" : "test_profile_2",
        "channel_scores" : [
          {
            "channel" : 0,
            "scores" : [
              {
                "score" : -14.8087845
              }
            ]
          }
        ]
      }
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>SpeakerIdentification4MultiResult</name>
  <model>L4</model>
  <speaker_group>group1</speaker_group>
  <time_range>
    <from_time>2.5</from_time>
    <to_time>5.5</to_time>
  </time_range>
  <results>
    <item>
      <file>julia_1.wav</file>
      <speaker_model>test1</speaker_model>
      <audio_source_profile_1>test_profile_1</audio_source_profile_1>
      <audio_source_profile_2>test_profile_2</audio_source_profile_2>
      <channel_scores>
        <item>
          <channel>0</channel>
          <scores>
            <item>
              <score>15.753671</score>
            </item>
          </scores>
        </item>
      </channel_scores>
    </item>
    <item>
      <file>julia_1.wav</file>
      <speaker_model>test2</speaker_model>
      <audio_source_profile_1>test_profile_1</audio_source_profile_1>
      <audio_source_profile_2>test_profile_2</audio_source_profile_2>
      <channel_scores>
        <item>
          <channel>0</channel>
          <scores>
            <item>
              <score>-14.8087845</score>
            </item>
          </scores>
        </item>
      </channel_scores>
    </item>
  </results>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1017User model not ready
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1015User model not found
  • 1024Result not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1035Invalid time range
415Unsupported Media Type
  • 1007Unsupported audio format

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Speaker Identification 4 VoicePrint Comparator (SID4C)

Resource locker

  • LOCK Analyzed file
  • LOCK Speaker model (if parameter speaker_model is used)
  • LOCK Speaker group (if parameter group is used). Also all speaker models contained in group are locked as well.
  • LOCK Audio Source Profile (if parameters audio_source_profile_1 or audio_source_profile_2 is used)
POST /technologies/speakerid4 (asynchronous)Analyze voiceprint

Speaker Identification 4 compares a voiceprint with a speaker model or speaker group. A speaker model consists of recordings of one speaker. A speaker group consists of several speaker models. The speaker model or speaker group has to be prepared first (see speaker model or groups)

It is necessary to use the same SID4 model for processing as the SID4 model used for voiceprint extraction otherwise the server returns HTTP error 500.

Optionally, an Audio Source Profile for analyzed voceprint (parameter audio_source_profile_1) and for speaker model / group (audio_source_profile_2) can be specified, to ensure that provided system results are the best for your data. This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
modelquerystringyesName of the SID4 model.
speaker_modelquerystringyes if group is not specifiedName of the speaker model.
groupquerystringyes if speaker_model is not specifiedDetermines the speaker group. To select all speaker models use the virtual group "all".
audio_source_profile_1querystringfalseName of the Audio Source Profile for the analyzed voiceprint
audio_source_profile_2querystringfalseName of the Audio Source Profile for the speaker model (or speaker group)
Content-Typeheaderstringyesapplication/json for JSON content (Default value)
application/xml for XML content
application/octet-stream for raw voiceprint content

Body

JSONXML
{
  "voiceprint": "<Base64 Data>"
}
<?xml version="1.0" encoding="UTF-8"?>
<voiceprint>[Base64 Data]</voiceprint>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -H "Content-Type:application/json" -X POST --data-binary @"voiceprint.json" "SERVER_ADDRESS:PORT/technologies/speakerid4?model=L4&group=group1&audio_source_profile_1=test_profile_1&audio_source_profile_2=test_profile_2"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'POST',
  uri_path: '/technologies/speakerid4',
  uri_params: {
    model: 'L4',
    group: 'group1',
    audio_source_profile_1: 'test_profile_1',
    audio_source_profile_2: 'test_profile_2'
  },
  content: {
    "voiceprint": "VlBUIP4BAACJCQAAAAgAAAAAAAAHyZdwk4qWvwNxD8A6LFW/DMgPwGj+CUCC8kfAGGZlv+4djr+A9OG/yU08wPOfLMBdIA8/UwB2P6rCGcCTbDDA/CoAwN+IF8DEfhdAhgAswN12L8CN5iQ/mWWBwMlukMBtsXzAnTQqwP5Ntz8vWTfAb7N1vU+lCECt3InAcXinvxPb6j5Mv0HARHgzvzT4nD8sphpArDjWv0qpaD+W5p0/1T7RvyTvNsCOpdW/02r1v/sOur/o1jxA0E2ov1aUV8AGWwPAnAnrvyRJsb/OjQNAJ55hwER2PMB4JLc/e1C+Pz4b1r2nITTAwALzPnhxuj84LwbAehiDQMISKsA+ZIS/I2DEv9R0kz/O+RPARHRfQFoHXT9eIq2/pNMDQMI/FEDqtCjAvXZBwO+ATsClLE9AfHzhu+5CgL+c/njANobSP1sutz/IMGhA6AfCPe48DUAAB8c+NysJP5xXfkARt5w/2VtFv/cMiMASnodAOdb+vmMTD8CXONi+GmAMvnRFtz8GqiPAj/4FQOqzIkAFydE/+PEKwOb60j/CJt8/Sp1AQFkm5TwQ+RfAviwtQCjsEUA53Xo/CFHDP21zvr/dYPY/hEYqwAzS5D9w5/a/646KwCeKQ8DaSQNAkuviP/4XC0AaUBdAksI7Pmb7OEBwhExA912iPwNriUBWDJc/WPoMwLA8MMC9pWo/8kJdvzx9GsBNogNAfIxHwL/Q+L+Loi/A/iKkPxCDHkDAFTI/YlNUQDjwvj/ThBxALWr5P31H0z835Bc/FzEpwBO0HcB6PKA/ivGAwKrZj79P+J2/l0h/wFpcUkCJTK6//ccFwM98IMAaO/Y+MtsDwJt0776GxBw/WXEMwPHUHr/NLg6+xtoLQDCcd76/Fp0/rEtuwLwTGj30/p8/Qq6IwPQkbL/hYTrAbgY9QL+ROcCv26I+zyc9P113nj1F0qO/pbqdwKbEzD89ghxALSJ4P8j4Lj+/ZHLAKPTPP4Qovb8o0sy+UZeMvq4OhkD1qCpAfOg9Ph8IjT8twD3AWv4zQK87lj8aTS3Ax/Z0v0sWqr2Qp00/SzcdQKB/ID2oRN8/S9RcQC36kz9E6JW+sGJ6QJGJHsAKsm0+kJXCP2/FST777/g/+g1RwFokrj+uE6G/qUZnP+2ueMB7v1RAF9QdQPYH4z94Oz3Ak8EbP1uLicDiXR1AGSc+QDnLJEDgdarAh9tawLLACMAwI/4/wFQ0wKP7msB//JC/qIStwB5jOD/T/n/AMimhPrprA0D256Y/4UoBwNeOjz+ev+g/AEeVwFit/z/zjxVAzD2SPylGr79HHgPALOVTwFIvA0DhzlzAIudLwLvbwT8hxlQ+jSFEwO7Ekz8YPq0+s7+fwFsWasAu+SZAKvqFP9q9WECIvP4/KlWavyCtCcASE/i+JgX0P5ZW679oWUpAodU6Pu4/HcBMOEK/cNmTP36Wab98+Sw/fO2+P5QV0L/vLZM/TDFQP+DNSr8LG0HAMGBRQNTLjcDd2U3ADvrjPxyvAMCVRiRADvmcP21tgsASYZk/0a4WwEYp17/P8Gu/vktKwD3lNMDlxWzAtLwiwBZTfsBVxSFAwVWUv91hcsDmkX4/Fk2Ivw48lD2j8N2+s5GoP6c+IMC48HtAm0xVwB2QdcBxeRfAKLfdP1abJMDpNda+EY0rwN0ZvD8yDklAcFITQPFRMcBEdxY/CvKXPyzFDL8tPwlA+bllv/R0LsCm08E/pt9PvXCH9j6bzzW/MKdZP3kzbkAvftA/FS0KQCHS/D6ydknARZMjwBsOCMDrRkBA8APtPxE9NUB1qThAl5WbwIxT3D/gwB1APTkWwKtl+z8LyPW+O8mOPwi4H8Acv+Q/S6SLvjdsEL8ePzhA8FJLvzVdGsDFndQ/5dOPPkAdM78NUBDADbVRwEFbij/NiCJA6Gg5QNqsX8Bf6z4+z59qPvAzzD+lrIw/akYVvxarQMAiaIJAWm7hvyOpjcAqktQ/oPNoP6xMKcBvWp4/fpQewBNwSMDe+8s/ME6kP1ipvT+oSANAanwvv4kFTsAoz+2/8IQmQBMqCECFgpg+PQ0IwNGz+r7xoDbAZGWNP3vtor5Usi7AUX0lwG+HRcCm8xK/LIeDQAvst8C/m6Q/WlANQIF/IcBhuS5ArUsJv5XoxD7YPo/ARtfWPnsEYkD50eu+hooZP52T8r9RUWM+arh4v1YhkT/e/hvAixDMP8kk0MC0jEhAFNqGwILOM0AT3AdAo7I4wBysFMCjowI/X10WwHFJ4b1y+KM/F8D1Ph5aAsAeIjfAP5n9v+Hnzz/6FE/A0vM+QKq9Yr97OUvAXW9bwCr1ZsCwO9k/yNPOv8rXH75lE6w/VcTgv45pV0BbFxo+3lrnv89vYb8Zq4S/9mccQJqumj/G26A/BBgePlvz7L4zD7++FeQjQC52pDz4wzLAWgZgQPcENMBRtc6/bJEBQKowSD5ajRLAUkMgQL4cdT/hdFJAnOaNPib4BD+f9CC/y1tCv0wO27/Q6SbA20MpwIswFsBjIa+/65XavQXlTsAUFSbA8H/kvw68AMBQTZ2/eYSIQD0mX8Bnvu8/6P+tviXLH7/fnQbAiAoZQJQagMC3FXTAPphEPvrvIcDIMDNAatxiwDsnMcB9eUzAv4wswO8cjD4xRVbAn7kZwH6fVb7NeRW/mM7Ov1RWh7+VfzhAEGeFPyOwV70Xp1zAy252wE/qVD/dlhs/QZt1P2FN9b4="
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
Parameter score is LLR (Log-likelihood ratio) based on natural logarithm.
JSONXML
{
  "result" : {
    "version" : 1,
    "name" : "SpeakerIdentification4MultiResult",
    "model" : "L4",
    "speaker_group" : "group1",
    "results" : [
      {
        "file" : "{voiceprint}",
        "speaker_model" : "test1",
        "audio_source_profile_1" : "test_profile_1",
        "audio_source_profile_2" : "test_profile_2",
        "channel_scores" : [
          {
            "channel" : 0,
            "scores" : [
              {
                "score" : 15.753671
              }
            ]
          }
        ]
      },
      {
        "file" : "{voiceprint}",
        "speaker_model" : "test2",
        "audio_source_profile_1" : "test_profile_1",
        "audio_source_profile_2" : "test_profile_2",
        "channel_scores" : [
          {
            "channel" : 0,
            "scores" : [
              {
                "score" : -14.8087845
              }
            ]
          }
        ]
      }
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>SpeakerIdentification4MultiResult</name>
  <model>S</model>
  <speaker_group>group1</speaker_group>
  <results>
    <item>
      <file>{voiceprint}</file>
      <speaker_model>test1</speaker_model>
      <audio_source_profile_1>test_profile_1</audio_source_profile_1>
      <audio_source_profile_2>test_profile_2</audio_source_profile_2>
      <channel_scores>
        <item>
          <channel>0</channel>
          <scores>
            <item>
              <score>15.753671</score>
            </item>
          </scores>
        </item>
      </channel_scores>
    </item>
    <item>
      <file>{voiceprint}</file>
      <speaker_model>test2</speaker_model>
      <audio_source_profile_1>test_profile_1</audio_source_profile_1>
      <audio_source_profile_2>test_profile_2</audio_source_profile_2>
      <channel_scores>
        <item>
          <channel>0</channel>
          <scores>
            <item>
              <score>-14.8087845</score>
            </item>
          </scores>
        </item>
      </channel_scores>
    </item>
  </results>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1017User model not ready
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Comparator (SID4C)

Resource locker

  • LOCK Speaker model (if parameter speaker_model is used)
  • LOCK Speaker group (if parameter group is used). Also all speaker models contained in group are locked as well.
  • LOCK Audio Source Profile (if parameters audio_source_profile_1 or audio_source_profile_2 is used)
/technologies/speakerid4/stream – analyze stream
GET /technologies/speakerid4/stream Get partial result from stream task

Get partial result from task analyzing stream identified by task ID.

Parameters

NameParameter TypeData TypeRequiredDescription
taskquerystringyesStream Task ID which the request will be attached to

Body

empty content

Example

CURL
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid4/stream?task=STREAM_TASK_ID"

Available responses

HTTP StatusOutput
200OK
Parameter score is LLR (Log-likelihood ratio) based on natural logarithm.
JSONXML
{
  "result" : {
  "version" : 1,
  "name" : "SpeakerIdentification4StreamMultiResult",
  "model" : "L4",
  "is_last" : "true",
  "task_id" : "bfc641a4-37a4-4983-8276-5f63dcc70fd0",
  "task_execution_time" : 19.28692,
  "stream_id" : "6fdb15f6-4c01-48fc-ba4e-832c9da69acd",
  "speaker_group" : "all",
  "utterance_length" : 9.9,
  "min_utterance_length_limit" : 0,
  "results" : [
    {
      "file" : "",
      "speaker_model" : "david_1",
      "audio_source_profile_1" : "",
      "audio_source_profile_2" : "",
      "channel_scores" : [
        {
          "channel" : 0,
          "scores" : [
            {
              "score" : 14.225391
            }
          ]
        }
      ]
    },
    {
      "file" : "",
      "speaker_model" : "david_2",
      "audio_source_profile_1" : "",
      "audio_source_profile_2" : "",
      "channel_scores" : [
        {
          "channel" : 0,
          "scores" : [
            {
              "score" : 8.92917
            }
          ]
        }
      ]
    },
    ...
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>SpeakerIdentification4StreamMultiResult</name>
  <model>L4</model>
  <is_last>true</is_last>
  <task_id>dcae1de7-341e-40ac-a868-864e6f671181</task_id>
  <task_execution_time>6.008333</task_execution_time>
  <stream_id>1f693724-9183-45d7-8051-829887d47c75</stream_id>
  <speaker_group>all</speaker_group>
  <utterance_length>1.11</utterance_length>
  <min_utterance_length_limit>0</min_utterance_length_limit>
  <results>
    <item>
      <file/>
      <speaker_model>david_1</speaker_model>
      <audio_source_profile_1></audio_source_profile_1>
      <audio_source_profile_2></audio_source_profile_2>
      <channel_scores>
        <item>
          <channel>0</channel>
          <scores>
            <item>
              <score>2.6890395</score>
            </item>
          </scores>
        </item>
      </channel_scores>
    </item>
    <item>
      <file/>
      <speaker_model>david_2</speaker_model>
      <audio_source_profile_1></audio_source_profile_1>
      <audio_source_profile_2></audio_source_profile_2>
      <channel_scores>
        <item>
          <channel>0</channel>
          <scores>
            <item>
              <score>1.9447069</score>
            </item>
          </scores>
        </item>
      </channel_scores>
    </item>
    ...
  </results>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1050Technology does not support multichannel stream
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1010Task not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Stream Extractor (SID4E_STREAM)
  • Speaker Identification 4 VoicePrint Stream Comparator (SID4C_STREAM)
POST /technologies/speakerid4/stream Start task analyzing stream

Start analyzing stream. Stream speaker identification compares stream identified by ID with speaker model or speaker group.

Speaker model consists of recordings of one speaker. Speaker group consists of several speaker models. Speaker model and Speaker group have to be prepared before analyzing starts (see PUT /technologies/speakerid4/speakermodels/{name}/prepare and PUT /technologies/speakerid4/groups/{name}/prepare). Prepare requests requires Speaker Identification 4 VoicePrint Extractor (SID4E) technology.

Optionally, an Audio Source Profile can be used for the analyzed stream (parameter audio_source_profile_1) as well as for the speaker model / group (parameter audio_source_profile_2) to ensure that the results are optimized for your data.

This technology can not be attached to multichannel stream.

Parameters

NameParameter TypeData TypeRequiredDescription
streamquerystringyesStream ID which the request will be attached to
modelquerystringyesName of SID4 model.
speaker_modelquerystringyes if group is not specifiedName of the speaker model.
groupquerystringyes if speaker_model is not specifiedDetermines the speaker group. For select all speaker models use virtual group "all".
audio_source_profile_1querystringnoName of the Audio Source Profile for the stream.
audio_source_profile_2querystringnoName of the Audio Source Profile for the speaker model (or speaker group).

Body

empty content

Example

CURL
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST "SERVER_ADDRESS:PORT/technologies/speakerid4/stream?stream=STREAM_ID&model=L4&group=GROUP_NAME"

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 1,
    "name": "UserStreamTaskInfoResult",
    "stream_task_info": {
      "id": "8506180c-e87d-42f6-ac9a-c5ca3a3a3202",
      "state": "running",
      "stream_id": "29eae856-0004-46a2-a761-9e9a72bad719"
    }
  }
}
<result>
  <version>1</version>
  <name>UserStreamTaskInfoResult</name>
  <stream_task_info>
    <id>8506180c-e87d-42f6-ac9a-c5ca3a3a3202</id>
    <state>running</state>
    <stream_id>29eae856-0004-46a2-a761-9e9a72bad719</stream_id>
  </stream_task_info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1017User model not ready
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1030Stream not found
405Method Not Allowed
  • 1009Technology is not supported by server
503Service Unavailable
  • 1028Worker limit exceeded
  • 1031Resource not available

Required technologies

  • Speaker Identification 4 VoicePrint Stream Extractor (SID4E_STREAM)
  • Speaker Identification 4 VoicePrint Stream Comparator (SID4C_STREAM)

Resource locker

  • LOCK Speaker model (if parameter speaker_model is used)
  • LOCK Speaker group (if parameter group is used). Also all speaker models contained in group are locked as well.
  • LOCK Audio Source Profile (if parameters audio_source_profile_1 or audio_source_profile_2 is used)
DELETE /technologies/speakerid4/stream Stop task analyzing stream

Stop task analyzing stream identified by task ID.

Parameters

NameParameter TypeData TypeRequiredDescription
taskquerystringyesStream Task ID which the request will be attached to

Body

empty content

Example

CURL
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/technologies/speakerid4/stream?task=STREAM_TASK_ID"

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1010Task not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Stream Extractor (SID4E_STREAM)
  • Speaker Identification 4 VoicePrint Stream Comparator (SID4C_STREAM)
/technologies/speakerid4/benchmark – speaker identification 4 benchmark
GET /technologies/speakerid4/benchmark (asynchronous)Speaker identification 4 Benchmark

Benchmark the Speaker Identification 4 technology with the default set of recordings or a user-specified recording (by parameter path). Only speed of extraction is measured.

Parameters

NameParameter TypeData TypeRequiredDescription
modelquerystringyesName of Speaker Identification 4 technology model.
pathquerystringnoServer path to the audio file. If not specified, default recordings will be used.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid4/benchmark?model=L4"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/speakerid/benchmark',
  uri_params: {
    model: 'L4'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 3,
    "name" : "SpeakerIdentification4BenchmarkResult",
    "dataset_version" : "1.0",
    "model_name" : "S",
    "benchmark_result" : {
      "processed_length" : 21.31999969482422,
      "processing_time" : 0.48091199999999995,
      "faster_than_realtime" : 44.549944615190896
    },
    "cpu_info" : {
      "vendor" : "GenuineIntel",
      "brand" : "Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz",
      "n_cores" : 4,
      "n_logical_cores" : 4,
      "l1_data_cache" : 32768,
      "l1_instruction_cache" : 32768,
      "l2_cache" : 262144,
      "l3_cache" : 6291456
    },
    "memory_info" : {
      "total_ram" : 16623747072,
      "free_ram" : 5028855808,
      "total_swap" : 0,
      "free_swap" : 0
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>3</version>
  <name>SpeakerIdentification4BenchmarkResult</name>
  <dataset_version>1.0</dataset_version>
  <model_name>S</model_name>
  <benchmark_result>
    <processed_length>21.31999969482422</processed_length>
    <processing_time>0.48091199999999995</processing_time>
    <faster_than_realtime>44.549944615190896</faster_than_realtime>
  </benchmark_result>
  <cpu_info>
    <vendor>GenuineIntel</vendor>
    <brand>Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz</brand>
    <n_cores>4</n_cores>
    <n_logical_cores>4</n_logical_cores>
    <l1_data_cache>32768</l1_data_cache>
    <l1_instruction_cache>32768</l1_instruction_cache>
    <l2_cache>262144</l2_cache>
    <l3_cache>6291456</l3_cache>
  </cpu_info>
  <memory_info>
    <total_ram>16623747072</total_ram>
    <free_ram>4938498048</free_ram>
    <total_swap>0</total_swap>
    <free_swap>0</free_swap>
  </memory_info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Voice Activity Detection (VAD)

Resource locker

  • LOCK Analyzed file (if parameter path is used)
/technologies/speakerid4/speakermodels – list of speaker models
GET /technologies/speakerid4/speakermodels List of speaker models

Returns the list of speaker models and groups available for speaker identification. Speaker models and groups are shared by both SID and SID4.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid4/speakermodels"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/speakermodels",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 1,
    "name" : "SpeakerIdentificationModelsResult",
    "models" : [
      "model1",
      "model2"
    ],
    "groups" : [
      "all",
      "group1"
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>SpeakerIdentificationModelsResult</name>
  <models>
    <item>model1</item>
    <item>model2</item>
  </models>
  <groups>
    <item>all</item>
    <item>group1</item>
  </groups>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Speaker Identification 4 VoicePrint Comparator (SID4C)
/technologies/speakerid4/speakermodels/{name} – information about the model
GET /technologies/speakerid4/speakermodels/{name} Information about speaker model

Returns the list of recordings and metafiles included in a speaker model. Speaker models are shared by both SID and SID4.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesDetermines the speaker model name.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid4/speakermodels/SPEAKER_MODEL_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_MODEL_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/speakermodels/$SPEAKER_MODEL_NAME",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 5,
    "name" : "SpeakerIdentificationModelInfo",
    "speaker_model" : "model1",
    "is_ready" : [
      "S",
      "L"
    ],
    "is_calibrated" : [
      {
        "model" : "S",
        "calibration_set" : "calibset",
        "max_fa_rate" : 0.1
      }
    ],
    "member_of_groups" : [
      "all",
      "group1"
    ],
    "files" : [
      {
        "name": "david_1.wav",
        "last_modified": "2016-01-22T08:36:00Z",
        "created": "2016-01-22T08:36:00Z",
        "size": 492204,
        "is_directory": false,
        "is_registered": true,
        "frequency": 8000,
        "length": 30.76,
        "n_channels": 1,
        "format": "lin16"
      }
    ],
    "metafiles" : [
      {
        "name" : "david_1.txt",
        "last_modified" : "2015-09-15T12:33:02Z",
        "created" : "2015-09-15T12:33:02Z",
        "size" : 100,
        "is_directory" : false,
        "is_registered": true
      }
    ]
  }
}
<?xml version="1.0"?>
<result>
  <version>5</version>
  <name>SpeakerIdentificationModelInfo</name>
  <speaker_model>model1</speaker_model>
  <is_ready>
    <item>S</item>
    <item>L</item>
  </is_ready>
  <is_calibrated>
    <item>
      <model>S</model>
      <calibration_set>calibset</calibration_set>
      <max_fa_rate>0.1</max_fa_rate>
    </item>
  </is_calibrated>
  <member_of_groups>
    <item>all</item>
    <item>group1</item>
  </member_of_groups>
  <files>
    <item>
      <name>david_1.wav</name>
      <last_modified>2016-01-22T08:36:00Z</last_modified>
      <created>2016-01-22T08:36:00Z</created>
      <size>492204</size>
      <is_directory>false</is_directory>
      <is_registered>true</is_registered>
      <frequency>8000</frequency>
      <length>30.76</length>
      <n_channels>1</n_channels>
      <format>lin16</format>
    </item>
  </files>
  <metafiles>
    <item>
      <name>david_1.txt</name>
      <last_modified>2015-09-15T12:33:02Z</last_modified>
      <created>2015-09-15T12:33:02Z</created>
      <size>100</size>
      <is_directory>false</is_directory>
      <is_registered>true</is_registered>
    </item>
  </metafiles>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Speaker Identification 4 VoicePrint Comparator (SID4C)
POST /technologies/speakerid4/speakermodels/{name} Add new speaker model

Creates a new empty speaker model. Speaker models are shared by both SID and SID4.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesDetermines the speaker model name

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST "SERVER_ADDRESS:PORT/technologies/speakerid4/speakermodels/SPEAKER_MODEL_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_MODEL_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/speakermodels/$SPEAKER_MODEL_NAME",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1051Invalid path syntax
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Speaker Identification 4 VoicePrint Comparator (SID4C)
DELETE /technologies/speakerid4/speakermodels/{name} Remove speaker model

Removes a speaker model. All contained recordings, metafiles and related results are deleted. Speaker models are shared by both SID and SID4.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesDetermines the speaker model name.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/technologies/speakerid4/speakermodels/SPEAKER_MODEL_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_MODEL_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/speakermodels/$SPEAKER_MODEL_NAME",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Speaker Identification 4 VoicePrint Comparator (SID4C)

Resource locker

  • CHECK Speaker model specified by name in request path
/technologies/speakerid4/speakermodels/{name}/prepare – prepares speaker model
PUT /technologies/speakerid4/speakermodels/{name}/prepare (asynchronous)Prepare speaker model

Prepares the speaker model. It is necessary to prepare a speaker model before comparing it with voiceprints or using it in stream. A speaker model is prepared automatically when it is used in the GET /technologies/speakerid4 request. This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the speaker model.
modelquerystringyesName of the SID4 model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X PUT "SERVER_ADDRESS:PORT/technologies/speakerid4/speakermodels/SPEAKERMODEL_NAME/prepare?model=L4"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 */
var speakermodel_name = 'test';
var options = {
  method: 'PUT',
  uri_path: '/technologies/speakerid4/speakermodels/' + speakermodel_name + '/prepare',
  uri_params: {
    model: 'L4',
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1017User model not ready
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1033Unable to prepare speaker model

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)

Resource locker

  • LOCK Speaker model specified by name in request path
/technologies/speakerid4/speakermodels/{name}/audiofile – speaker model audio file
GET /technologies/speakerid4/speakermodels/{name}/audiofile Download recording from model

Downloads recording from a speaker model. Specific recording is determined by the path parameter. Note that query parameter path here does not refer to the location of the recording on server, but it is the name of your recording within the speaker model. Therefore, the name of the recording should not contain any slash characters ('/').

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the speaker model.
pathquerystringyesName of recording in speaker model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid4/speakermodels/SPEAKER_MODEL_NAME/audiofile?path=AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= path to the audio file on the Phonexia Speech Engine
$SPEAKER_MODEL_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/speakermodels/$SPEAKER_MODEL_NAME/audiofile?path=$PATH",
  false,
  $context
);

file_put_contents('./audio.wav', $response); //= audio file saved on the PHP server
?>

Available responses

HTTP StatusOutput
200OK
AUDIO DATA
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Speaker Identification 4 VoicePrint Comparator (SID4C)
POST /technologies/speakerid4/speakermodels/{name}/audiofile Add audio file to speaker model

Uploads audio file to speaker model. The request body contains audio file data. Speaker model is automatically created if it does not exist. Note that query parameter path here does not refer to the location of the recording on server, but it is the name of your recording within the speaker model. Therefore, the name of the recording should not contain any slash characters ('/').

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the speaker model.
pathquerystringyesName of recording in speaker model.

Body

AUDIO DATA

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST --data-binary "@FILE_PATH" "SERVER_ADDRESS:PORT/technologies/speakerid4/speakermodels/SPEAKER_MODEL_NAME/audiofile?path=AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= destination path to the audiofile on the Phonexia Speech Engine
$SPEAKER_MODEL_NAME = "test";

$audio = file_get_contents("./audio.wav"); //= path to the source file on the PHP server

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: audio/wav',
    'content'       => $audio,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/speakermodels/$SPEAKER_MODEL_NAME/audiofile?path=$PATH",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 3,
    "name": "AudioFileInfoResult",
    "info": {
      "name": "julia_1.wav",
      "last_modified": "2015-08-03T08:16:15Z",
      "created": "2015-08-03T08:16:15Z",
      "size": 474444,
      "is_directory": false,
      "is_registered": true,
      "frequency": 8000,
      "length": 29.65,
      "n_channels": 1,
      "format": "lin16"
    }
  }
}
<?xml version="1.0"?>
<result>
  <version>3</version>
  <name>AudioFileInfoResult</name>
  <info>
    <name>julia_1.wav</name>
    <last_modified>2015-08-03T08:16:15Z</last_modified>
    <created>2015-08-03T08:16:15Z</created>
    <size>474444</size>
    <is_directory>false</is_directory>
    <is_registered>true</is_registered>
    <frequency>8000</frequency>
    <length>29.65</length>
    <n_channels>1</n_channels>
    <format>lin16</format>
  </info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1039It was necessary to rename uploaded file but it could not be done, because file with same name already exists
  • 1038Resource is locked
  • 1051Invalid path syntax
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server
413Request Entity Too Large
  • 1014Size of uploaded file exceeds size limit
415Unsupported Media Type
  • 1007Unsupported audio format

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Speaker Identification 4 VoicePrint Comparator (SID4C)

Resource locker

  • CHECK Speaker model specified by name in request path
DELETE /technologies/speakerid4/speakermodels/{name}/audiofile Remove recording from speaker model

Removes recording from speaker model. Recording is determined by the path parameter. Speaker model is automatically removed after the removal of the last recording. Note that query parameter path here does not refer to the location of the recording on server, but it is the name of your recording within the speaker model. Therefore, the name of the recording should not contain any slash characters ('/'), as it has no effect on the recording location in server's storage.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the speaker model.
pathquerystringyesName of recording in speaker model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/technologies/speakerid4/speakermodels/SPEAKER_MODEL_NAME/audiofile?path=AUDIO_FILE.wav"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/AUDIO_FILE.wav";  //= path to the audio file on the Phonexia Speech Engine
$SPEAKER_MODEL_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/speakermodels/$SPEAKER_MODEL_NAME/audiofile?path=$PATH",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Speaker Identification 4 VoicePrint Comparator (SID4C)

Resource locker

  • CHECK Speaker model specified by name in request path
/technologies/speakerid4/speakermodels/{name}/metafile – speaker model metafile
GET /technologies/speakerid4/speakermodels/{name}/metafile Download metafile from speaker model

Downloads a metafile from a speaker model. The metafile is determined by the path parameter. Note that the parameter path in the request does not refer to the location of the metafile on the server, but it is the name of the metafile within the speaker model. Therefore, the name of the metafile must not contain any slashes ('/').

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the speaker model.
pathquerystringyesName of metafile in speaker model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid4/speakermodels/SPEAKER_MODEL_NAME/metafile?path=METAFILE"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/METAFILE";  //= path to the meta file on the Phonexia Speech Engine
$SPEAKER_MODEL_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/speakermodels/$SPEAKER_MODEL_NAME/metafile?path=$PATH",
  false,
  $context
);

file_put_contents('./METAFILE', $response); //= audio file saved on the PHP server
?>

Available responses

HTTP StatusOutput
200OK
METADATA
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Speaker Identification 4 VoicePrint Comparator (SID4C)
POST /technologies/speakerid4/speakermodels/{name}/metafile Add metafile to speaker model

Uploads a metafile to a speaker model. The request body contains the metafile data. Note that the parameter path in the request does not refer to the location of the metafile on the server, but it is the name of the metafile within the speaker model. Therefore, the name of the metafile must not contain any slashes ('/').

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the speaker model.
pathquerystringyesName of the metafile in speaker model.

Body

metafile

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST --data-binary "@FILE_PATH" "SERVER_ADDRESS:PORT/technologies/speakerid4/speakermodels/SPEAKER_MODEL_NAME/metafile?path=METAFILE"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/METAFILE";  //= destination path to the meta file on the Phonexia Speech Engine
$SPEAKER_MODEL_NAME = "test";

$audio = file_get_contents("./METAFILE"); //= path to the source file on the PHP server

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: audio/wav',
    'content'       => $audio,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/speakermodels/$SPEAKER_MODEL_NAME/metafile?path=$PATH",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server
413Request Entity Too Large
  • 1014Size of uploaded file exceeds size limit

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Speaker Identification 4 VoicePrint Comparator (SID4C)
DELETE /technologies/speakerid4/speakermodels/{name}/metafile Remove metafile from speaker model

Removes a metafile from a speaker model. The metafile is determined by the path parameter. Note that the parameter path in the request does not refer to the location of the metafile on the server, but it is the name of the metafile within the speaker model. Therefore, the name of the metafile must not contain any slashes ('/').

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the speaker model.
pathquerystringyesName of the metafile in speaker model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/technologies/speakerid4/speakermodels/SPEAKER_MODEL_NAME/metafile?path=METAFILE"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/METAFILE";  //= path to the meta file on the Phonexia Speech Engine
$SPEAKER_MODEL_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/speakermodels/$SPEAKER_MODEL_NAME/metafile?path=$PATH",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result": {
    "version": 3,
    "name": "AudioFileInfoResult",
    "info": {
      "name": "julia_1.wav",
      "last_modified": "2015-08-03T08:16:15Z",
      "created": "2015-08-03T08:16:15Z",
      "size": 474444,
      "is_directory": false,
      "is_registered": true,
      "frequency": 8000,
      "length": 29.65,
      "n_channels": 1,
      "format": "lin16"
    }
  }
}
<?xml version="1.0"?>
<result>
  <version>3</version>
  <name>AudioFileInfoResult</name>
  <info>
    <name>julia_1.wav</name>
    <last_modified>2015-08-03T08:16:15Z</last_modified>
    <created>2015-08-03T08:16:15Z</created>
    <size>474444</size>
    <is_directory>false</is_directory>
    <is_registered>true</is_registered>
    <frequency>8000</frequency>
    <length>29.65</length>
    <n_channels>1</n_channels>
    <format>lin16</format>
  </info>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Speaker Identification 4 VoicePrint Comparator (SID4C)
/technologies/speakerid4/speakermodels/{name}/voiceprint – voiceprint in speaker model
GET /technologies/speakerid4/speakermodels/{name}/voiceprint Get voiceprint from speaker model.

Gets a voiceprint from a prepared speaker model. The speaker model can be prepared by calling PUT /technologies/speakerid4/speakermodels/{name}/prepare

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the speaker model.
modelquerystringyesName of the SID4 model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid4/speakermodels/kelly/voiceprint?model=L4"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_MODEL_NAME = "kelly";
$TECHNOLOGY_MODEL = "L4";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/speakermodels/$SPEAKER_MODEL_NAME/voiceprint?model=$TECHNOLOGY_MODEL",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 1,
    "name" : "SpeakerModelVoiceprintResult",
    "speaker_model" : "kelly",
    "model" : "L",
    "voiceprint" : <Base64 Data>
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>SpeakerModelVoiceprintResult</name>
  <speaker_model>kelly</speaker_model>
  <model>L</model>
  <voiceprint>[Base64 Data]</voiceprint>
</result>
400Bad Request
  • 1017User model not ready
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server
/technologies/speakerid4/groups/{name} – speaker groups
GET /technologies/speakerid4/groups/{name} Get speaker models in group

Returns information about a speaker model group.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the speaker model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid4/groups/SPEAKER_GROUP_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_GROUP_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/groups/$SPEAKER_GROUP_NAME",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 3,
    "name" : "SpeakerIdentificationGroupResult",
    "group" : "group1",
    "is_ready" : [
      "S",
      "L"
    ],
    "is_calibrated" : [
      {
        "model" : "S",
        "calibration_set" : "calibset",
        "max_fa_rate" : 0.1
      }
    ],
    "speaker_models" : [
      "model1",
      "model2",
      ...
    ]
  }
}
<result>
  <version>3</version>
  <name>SpeakerIdentificationGroupResult</name>
  <group>group1</group>
  <is_ready>
    <item>S</item>
    <item>L</item>
  </is_ready>
  <is_calibrated>
    <item>
      <model>S</model>
      <calibration_set>calibset</calibration_set>
      <max_fa_rate>0.1</max_fa_rate>
    </item>
    ...
  </is_calibrated>
  <speaker_models>
    <item>model1</item>
    <item>model2</item>
    ...
  </speaker_models>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Speaker Identification 4 VoicePrint Comparator (SID4C)
POST /technologies/speakerid4/groups/{name} Create empty group

Creates a new empty speaker model group.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the speaker model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST "SERVER_ADDRESS:PORT/technologies/speakerid4/groups/SPEAKER_GROUP_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_GROUP_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/groups/$SPEAKER_GROUP_NAME",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1016User model already exist
  • 1038Resource is locked
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Speaker Identification 4 VoicePrint Comparator (SID4C)

Resource locker

  • CHECK Speaker Group specified by name in request path
DELETE /technologies/speakerid4/groups/{name} Remove group

Removes an existing speaker model group.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the speaker model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/technologies/speakerid4/groups/SPEAKER_GROUP_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_GROUP_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/speakermodels/$SPEAKER_GROUP_NAME",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Speaker Identification 4 VoicePrint Comparator (SID4C)

Resource locker

  • CHECK Speaker Group specified by name in request path
/technologies/speakerid4/groups/{name}/speakermodel – speaker model in group
POST /technologies/speakerid4/groups/{name}/speakermodel Create group containing existing speaker model(s)

Specifies the existing speaker model(s) to be included in a speaker group. If the speaker group does not exist, it is automatically created. If the speaker group already exists, it gets overwritten. It is possible to set the Content-Type parameter in the request header, which is helpful in case the client wants to send input data in XML format.

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content
namepathstringyesName of the speaker model.

Body

JSONXML
{
   "speaker_models" : [
     "speaker_1",
     "speaker_2",
     ...
   ]
}
<?xml version="1.0" encoding="UTF-8"?>
<speaker_models>
  <item>speaker_1</item>
  <item>speaker_2</item>
  ...
</speaker_models>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -H "Content-Type:application/json" -X POST --data-binary "@speaker_models.json" "SERVER_ADDRESS:PORT/technologies/speakerid4/groups/SPEAKER_GROUP_NAME/speakermodel"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_GROUP_NAME = "test";

$speakers = array(
  'speaker_models' =>
  array (
    "speaker_1",
    "speaker_2"
  )
);

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: application/json',
    'content'       => json_encode($speakers),
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/groups/$SPEAKER_GROUP_NAME/speakermodel",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Speaker Identification 4 VoicePrint Comparator (SID4C)

Resource locker

  • CHECK Speaker group specified by name in request path
PUT /technologies/speakerid4/groups/{name}/speakermodel Add speaker model(s) to group

Adds existing speaker model(s) into an existing speaker group. It is possible to set the Content-Type parameter in the request header which is helpful in case the client wants to send input data in XML format.

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content
namepathstringyesName of the speaker model.

Body

JSONXML
{
   "speaker_models" : [
     "speaker_1",
     "speaker_2",
     ...
   ]
}
<?xml version="1.0" encoding="UTF-8"?>
<speaker_models>
  <item>speaker_1</item>
  <item>speaker_2</item>
  ...
</speaker_models>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -H "Content-Type:application/json" -X PUT --data-binary "@speaker_models.json" "SERVER_ADDRESS:PORT/technologies/speakerid4/groups/SPEAKER_GROUP_NAME/speakermodel"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_GROUP_NAME = "test";

$speakers = array(
  'speaker_models' =>
  array (
    "speaker_1",
    "speaker_2"
  )
);

$options = array(
  'http' =>
  array (
    'method'        => 'PUT',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: application/json',
    'content'       => json_encode($speakers),
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/groups/$SPEAKER_GROUP_NAME/speakermodel",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1018The requested URI requires content
  • 1038Resource is locked
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Speaker Identification 4 VoicePrint Comparator (SID4C)

Resource locker

  • CHECK Speaker group specified by name in request path
DELETE /technologies/speakerid4/groups/{name}/speakermodel Remove speaker model(s) from group

Removes speaker model(s) from a speaker group. The request body contains a list of speaker models to be removed from the speaker group. It is possible to set the Content-Type parameter in the request headerwhich is helpful in case the client wants to send input data in XML format.

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content
namepathstringyesName of the speaker model.

Body

JSONXML
{
   "speaker_models" : [
     "speaker_1",
     "speaker_2",
     ...
   ]
}
<?xml version="1.0" encoding="UTF-8"?>
<speaker_models>
  <item>speaker_1</item>
  <item>speaker_2</item>
  ...
</speaker_models>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -H "Content-Type:application/json" -X DELETE --data-binary "@speaker_models.json" "SERVER_ADDRESS:PORT/technologies/speakerid4/groups/SPEAKER_GROUP_NAME/speakermodel"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$SPEAKER_GROUP_NAME = "test";

$speakers = array(
  'speaker_models' =>
  array (
    "speaker_1",
    "speaker_2"
  )
);

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: application/json',
    'content'       => json_encode($speakers),
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/groups/$SPEAKER_GROUP_NAME/speakermodel",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1018The requested URI requires content
  • 1038Resource is locked
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)
  • Speaker Identification 4 VoicePrint Comparator (SID4C)

Resource locker

  • CHECK Speaker group specified by name in request path
/technologies/speakerid4/groups/{name}/prepare – prepares group of speaker models
PUT /technologies/speakerid4/groups/{name}/prepare (asynchronous)Prepare group of speaker models

Prepares a group of speaker models. It is necessary to prepare a group before comparing voiceprints with it.

The group is prepared automatically when used in the GET /technologies/speakerid4 request.

This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of group.
modelquerystringyesName of the SID4 model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X PUT "SERVER_ADDRESS:PORT/technologies/speakerid4/groups/GROUP_NAME/prepare?model=L4"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 */
var group_name = 'test';
var options = {
  method: 'PUT',
  uri_path: '/technologies/speakerid4/groups/' + group_name + '/prepare',
  uri_params: {
    model: 'L4',
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1017User model not ready
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1034Unable to prepare group of speaker models

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)

Resource locker

  • LOCK Speaker Group specified by name in request path
/technologies/speakerid4/groups/{name}/voiceprints – voiceprints of all speaker models in group
GET /technologies/speakerid4/groups/{name}/voiceprints Get voiceprints from speaker group.

Returns the list of voiceprints of all speaker models belonging to the speaker group. All speaker models must be prepared first. A speaker model can be prepared by calling PUT /technologies/speakerid4/speakermodels/{name}/prepare. All speaker models in a group can be prepared by calling PUT /technologies/speakerid4/groups/{name}/prepare.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of speaker group.
modelquerystringyesName of the SID4 model.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid4/groups/group1/voiceprints?model=L4"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$SPEAKER_GROUP_NAME = "group1";
$TECHNOLOGY_MODEL = "L4";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/groups/$SPEAKER_GROUP_NAME/voiceprints?model=$TECHNOLOGY_MODEL",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 1,
    "name" : "SpeakerGroupVoiceprintsResult",
    "speaker_group" : "group1",
    "model" : "L",
    "voiceprint_set" : [
      {
        "speaker_model": "kelly",
        "voiceprint": <Base64 Data>
      },
      {
        "speaker_model": "julia",
        "voiceprint": <Base64 Data>
      },
      ...
    ]
  }
}
<?xml version='1.0' encoding='UTF-8'?>
<result>
  <version>1</version>
  <name>SpeakerGroupVoiceprintsResult</name>
  <speaker_group>group1</speaker_group>
  <model>L</model>
  <voiceprint_set>
    <item>
      <speaker_model>kelly</speaker_model>
      <voiceprint>[Base64 Data]</voiceprint>
    </item>
    <item>
      <speaker_model>julia</speaker_model>
      <voiceprint>[Base64 Data]</voiceprint>
    </item>
    ...
  </voiceprint_set>
</result>
400Bad Request
  • 1017User model not ready
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server
/technologies/speakerid4/audiosourceprofiles – list of Audio Source Profiles
GET /technologies/speakerid4/audiosourceprofiles List of Audio Source Profiles

Returns the list of Audio Source Profiles for Speaker Identification 4.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid4/audiosourceprofiles"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/audiosourceprofiles",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 1,
    "name" : "AudioSourceProfilesResult",
    "audio_source_profiles" : [
      {
        "name" : "Profile1",
        "hash" : "ffecae4fedd92147992a77e7f555d113a012c5bb9b26e1a0f4537ba77affab4d",
        "model" : "L4"
      },
      {
        "name" : "Profile2",
        "hash" : "bae838c29f979f9f56214a8e0e318d342d26cbf13248c4db451c7314983dcf98",
        "model" : "L4"
      }
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>AudioSourceProfilesResult</name>
  <audio_source_profiles>
    <item>
       <name>Profile1</name>
       <hash>bae838c29f979f9f56214a8e0e318d342d26cbf13248c4db451c7314983dcf98</hash>
       <model>L4</model>
    </item>
    <item>
       <name>Profile2</name>
       <hash>bae838c29f979f9f56214a8e0e318d342d26cbf13248c4db451c7314983dcf98</hash>
       <model>L4</model>
    </item>
  </audio_source_profiles>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
/technologies/speakerid4/audiosourceprofiles/{name} – Audio Source Profile manipulation
GET /technologies/speakerid4/audiosourceprofiles/{name} Information about Audio Source Profile

Returns details about an Audio Source Profile

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesDetermines the Audio Source Profile.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid4/audiosourceprofiles/AUDIO_SOURCE_PROFILE_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$AUDIO_SOURCE_PROFILE_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/audiosourceprofiles/$AUDIO_SOURCE_PROFILE_NAME",
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 2,
    "name" : "AudioSourceProfileInfo",
    "audio_source_profile_name" : "ProfileName",
    "model" : "L4",
    "voiceprint_count" : 1000,
    "voiceprint_version" : 510,
    "hash" : "ffecae4fedd92147992a77e7f555d113a012c5bb9b26e1a0f4537ba77affab4d",
    "parent_hash" : "bae838c29f979f9f56214a8e0e318d342d26cbf13248c4db451c7314983dcf98",
    "is_hash_valid" : true,
    "user_comment" : "My user comment",
    "created" : "2019-01-22T08:36:00Z",
    "size" : 14285714,
    "false_acceptance_calibration" : {
      "max_false_acceptance_rate" : 1.5,
      "enabled" : true
    },
    "user_calibration" : {
      "scale" : 1.2,
      "shift" : 1.8,
      "enabled" : false
    },
    "mean_normalization" : {
      "enabled" : true
    },
    "metafiles" : [
      {
        "name" : "metafile_1.txt",
        "last_modified" : "2015-09-15T12:33:02Z",
        "created" : "2015-09-15T12:33:02Z",
        "size" : 100,
        "is_directory" : false,
        "is_registered": true
      }
    ]
  }
}
<?xml version="1.0"?>
<result>
  <version>2</version>
  <name>AudioSourceProfileInfo</name>
  <audio_source_profile_name>ProfileName</audio_source_profile_name>
  <model>L4</model>
  <voiceprint_count>1000</voiceprint_count>
  <voiceprint_version>510</voiceprint_version>
  <hash>ffecae4fedd92147992a77e7f555d113a012c5bb9b26e1a0f4537ba77affab4d</hash>
  <parent_hash>bae838c29f979f9f56214a8e0e318d342d26cbf13248c4db451c7314983dcf98</parent_hash>
  <is_hash_valid>true</is_hash_valid>
  <user_comment>My user comment</user_comment>
  <created>2019-01-22T08:36:00Z</created>
  <size>14285714</size>
  <false_acceptance_calibration>
    <false_acceptance_calibration>1.5</false_acceptance_calibration>
    <enabled>true</enabled>
  </false_acceptance_calibration>
  <user_calibration>
    <scale>1.2</scale>
    <shift>1.8</shift>
    <enabled>false</enabled>
  </user_calibration>
  <mean_normalization>
    <enabled>true</enabled>
  </mean_normalization>
  <metafiles>
    <item>
      <name>metafile_1.txt</name>
      <last_modified>2015-09-15T12:33:02Z</last_modified>
      <created>2015-09-15T12:33:02Z</created>
      <size>100</size>
      <is_directory>false</is_directory>
      <is_registered>true</is_registered>
    </item>
  </metafiles>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found

Required technologies

  • Speaker Identification 4 VoicePrint Calibration (SID4CALIB)
POST /technologies/speakerid4/audiosourceprofiles/{name} (asynchronous)Create Audio Source Profile

Creates a new Audio Source Profile from a directory containing typical source audio.

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content
namepathstringyesAudio Source Profile name.
source_directoryquerystringyesPath to the directory containing the audio files from which the Audio Source Profile is created. Only files in this directory are taken into account, any sub-directories are ignored.
modelquerystringyesName of the SID4 model
max_files_countquerynumbernoMaximum number of files for the creation of the new Audio Source Profile. Default is 1000.

Body

JSONXML
{
 "audio_source_profile_config" : {
   "false_acceptance_calibration" : {
     "enabled" : true,
     "max_false_acceptance_rate" : 1.5
   },
   "user_calibration" : {
     "enabled" : false,
     "scale" : 1.2,
     "shift" : 1.8
   },
   "mean_normalization" : {
     "enabled" : true,
   },
   "user_comment" : "Some user comment"
 }
}
<?xml version="1.0"?>
<audio_source_profile_config>
  <false_acceptance_calibration>
    <enabled>true</enabled>
    <false_acceptance_calibration>1.5</false_acceptance_calibration>
  </false_acceptance_calibration>
  <user_calibration>
    <enabled>false</enabled>
    <scale>1.2</scale>
    <shift>1.8</shift>
  </user_calibration>
  <mean_normalization>
    <enabled>true</enabled>
  </mean_normalization>
  <user_comment>Some user comment</user_comment>
</audio_source_profile_config>
audio_source_profile_config Configuration of the Audio Source Profile that will be created.
The audio Source Profile encapsulates several calibration/normalization techniques that can improve precision of Speaker Identification 4 for your specific scenario. Some of these techniques require samples of your typical source audio.
Each of these techniques can be configured as disabled initially ("is_enabled": false) even if its parameters are set.
User calibration and false acceptance calibration are mutually exclusive (if both are enabled in the configuration, only false acceptance calibration is enabled in the created profile).
audio_source_profile_config
->false_acceptance_calibration
If enabled, false acceptance calibration adjusts score in such a way that for the score threshold 0.0 only the given percentage of different-speaker comparisons are false positive detections. The score shifts for false acceptance calibration are calculated from the audio files provided in the source_directory.
Optional (by default not enabled).
audio_source_profile_config
->false_acceptance_calibration->is_enabled
If true, false acceptance calibration is enabled.
audio_source_profile_config
->false_acceptance_calibration
->max_false_acceptance_rate
Float value in range 0.0 to 100.0. Optional, default value is 1.0.
audio_source_profile_config->user_calibration If enabled, uses the scale and shift parameters and allows the user to compute the final score as final_score = scale * score + shift.
Optional (by default not enabled).
audio_source_profile_config
->user_calibration->is_enabled
If true, user calibration is enabled.
audio_source_profile_config
->user_calibration->shift
Scale parameter. Optional, default value is 1.0.
audio_source_profile_config
->user_calibration->scale
Shift parameter. Optional, default value is 0.0.
audio_source_profile_config->mean_normalization If enabled, compensates audio source channel characteristics so as to achieve lowest possible equal error rate. Optional (enabled by default).
audio_source_profile_config
->mean_normalization->is_enabled
If true, user calibration is enabled.
audio_source_profile_config->user_commentUser specified comment. Optional.

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID"  -H "Content-Type:application/json" -X POST --data-binary @"audio_source_profile_config.json" "SERVER_ADDRESS:PORT/technologies/speakerid4/audiosourceprofiles/AUDIO_SOURCE_PROFILE_NAME?source_directory=/audio_source_profile_src&model=L4"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 */

$user_data = array(
  'audio_source_profile_config' =>
  array (
    'false_acceptance_calibration'    =>
    array (
      'enabled' => true,
      'max_false_acceptance_rate' => 1.5
    ),
    'user_calibration'    =>
    array (
      'enabled' => false,
      'scale' => 1.2,
      'shift' => 1.8
    ),
    'mean_normalization'    =>
    array (
      'enabled' => true
    )
  )
);

var audio_source_profile_name = 'test';
var options = {
  method: 'POST',
  uri_path: '/technologies/speakerid4/audiosourceprofiles/' + audio_source_profile_name,
  uri_params: {
    source_directory: '/audio_source_profile_src',
    model: 'L4'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1019An invalid data was specified in the request content
  • 1025An invalid value was specified for one of the header parameters in the request
  • 1051Invalid path syntax
  • 1055Audio Source Profile already exists
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Calibration (SID4CALIB)

Resource locker

  • LOCK Files in source_directory
DELETE /technologies/speakerid4/audiosourceprofiles/{name} Remove Audio Source Profile

Removes an Audio Source Profile.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesAudio Source Profile name.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/technologies/speakerid4/audiosourceprofiles/AUDIO_SOURCE_PROFILE_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$AUDIO_SOURCE_PROFILE_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/audiosourceprofiles/$AUDIO_SOURCE_PROFILE_NAME",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1038Resource is locked
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification VoicePrint Calibration (SIDCALIBSET)

Resource locker

  • CHECK Audio Source Profile specified by name in request path
/technologies/speakerid4/audiosourceprofiles/{name}/update – Audio Source Profile update
POST /technologies/speakerid4/audiosourceprofiles/{name}/update (asynchronous)Update Audio Source Profile

Updates existing (parent) Audio Source Profile with provided JSON configuration and creates child Audio Source Profile. This allows user to modify used calibration techniques without need to process all the audio contained in parental Audio Source Profile again.

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content
namepathstringyesAudio Source Profile name.
child_namequerystringyesName of the created Audio Source Profile that will be updated version of parental Audio Source Profile specified by path.
source_directoryquerystringnoPath to the directory containing the audio files to be added to the child Audio Source Profile.
max_files_countquerynumbernoMaximum number of files in the child Audio Source Profile. Number of voicepritns in the parent Audio Source Profile is also included in the limit. Default is 1000.
modelquerystringyesName of the SID4 model

Body

JSONXML
{
 "audio_source_profile_config" : {
   "false_acceptance_calibration" : {
     "enabled" : true,
     "max_false_acceptance_rate" : 1.5
   },
   "user_calibration" : {
     "enabled" : false,
     "scale" : 1.2,
     "shift" : 1.8
   },
   "mean_normalization" : {
     "enabled" : true,
   },
   "user_comment" : "Some user comment"
 }
}
<?xml version="1.0"?>
<audio_source_profile_config>
  <false_acceptance_calibration>
    <enabled>true</enabled>
    <false_acceptance_calibration>1.5</false_acceptance_calibration>
  </false_acceptance_calibration>
  <user_calibration>
    <enabled>false</enabled>
    <scale>1.2</scale>
    <shift>1.8</shift>
  </user_calibration>
  <mean_normalization>
    <enabled>true</enabled>
  </mean_normalization>
  <user_comment>Some user comment</user_comment>
</audio_source_profile_config>
audio_source_profile_config Configuration of the child Audio Source Profile that will be created (child_name).
All of the settings are optional and override settings in parental Audio Source Profile (specified by path).
The audio Source Profile encapsulates several calibration/normalization techniques that can improve precision of Speaker Identification 4 for your specific scenario. Some of these techniques require samples of your typical source audio.
Each of these techniques can be configured as disabled initially ("is_enabled": false) even if its parameters are set.
User calibration and false acceptance calibration are mutually exclusive (if both are enabled in the configuration, only false acceptance calibration is enabled in the child profile).
audio_source_profile_config
->false_acceptance_calibration
Optional, if present and enabled, false acceptance calibration adjusts score in such a way that for the score threshold 0.0 only the given percentage of different-speaker comparisons are false positive detections. The score shifts for false acceptance calibration are calculated from the audio files provided in the source_directory.
audio_source_profile_config
->false_acceptance_calibration->is_enabled
If true, false acceptance calibration is enabled.
audio_source_profile_config
->false_acceptance_calibration
->max_false_acceptance_rate
Float value in range 0.0 to 100.0. Optional, default value is inherited from parent.
audio_source_profile_config->user_calibration Optional, if present and enabled, uses the scale and shift parameters and allows the user to compute the final score as final_score = scale * score + shift.
audio_source_profile_config
->user_calibration->is_enabled
If true, user calibration is enabled.
audio_source_profile_config
->user_calibration->shift
Scale parameter. Optional, default value is inherited from parent.
audio_source_profile_config
->user_calibration->scale
Shift parameter. Optional, default value is inherited from parent.
audio_source_profile_config->mean_normalization Optional, if present and enabled, compensates audio source channel characteristics so as to achieve lowest possible equal error rate.
audio_source_profile_config
->mean_normalization->is_enabled
If true, user calibration is enabled.
audio_source_profile_config->user_commentUser specified comment.

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID"  -H "Content-Type:application/json" -X POST --data-binary @"audio_source_profile_onfig.json" "SERVER_ADDRESS:PORT/technologies/speakerid4/audiosourceprofiles/AUDIO_SOURCE_PROFILE_NAME/update?child_name=AUDIO_SOURCE_PROFILE_NAME_UPDATED&model=L4"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 */

$user_data = array(
  'audio_source_profile_config' =>
  array (
    'false_acceptance_calibration'    =>
    array (
      'enabled' => true,
      'max_false_acceptance_rate' => 1.5
    ),
    'user_calibration'    =>
    array (
      'enabled' => false,
      'scale' => 1.2,
      'shift' => 1.8
    ),
    'mean_normalization'    =>
    array (
      'enabled' => true
    )
  )
);

var audio_source_profile_name = 'test';
var options = {
  method: 'POST',
  uri_path: '/technologies/speakerid4/audiosourceprofiles/' + audio_source_profile_name + '/update',
  uri_params: {
    child_name: 'test_updated',
    model: 'L4'
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1019An invalid data was specified in the request content
  • 1025An invalid value was specified for one of the header parameters in the request
  • 1051Invalid path syntax
  • 1055Audio Source Profile already exists
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server

Required technologies

  • Speaker Identification 4 VoicePrint Calibration (SID4CALIB)

Resource locker

  • LOCK Parental Audio Source Profile specified by path
  • LOCK Files in source_directory
/technologies/speakerid4/audiosourceprofiles/{name}/file – Audio Source Profile file manipulation
GET /technologies/speakerid4/audiosourceprofiles/{name}/file Download Audio Source Profile from server

Downloads an Audio Source Profile from the server.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesAudio Source Profile name.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid4/audiosourceprofiles/AUDIO_SOURCE_PROFILE_NAME/file"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$AUDIO_SOURCE_PROFILE_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/audiosourceprofiles/&AUDIO_SOURCE_PROFILE_NAME/file"
  false,
  $context
);

file_put_contents('./test_profile', $response); //= Audio Source Profile saved on the PHP server
?>

Available responses

HTTP StatusOutput
200OK
AUDIO SOURCE PROFILE DATA
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1015User model not found
POST /technologies/speakerid4/audiosourceprofiles/{name}/file Upload Audio Source Profile file to server

Uploads an Audio Source Profile to the current user's storage. The request body contains the Audio Source Profile data.

If an Audio Source Profile with the same name already exists on the server, the corresponding error is returned.

If an existing Audio Source Profile should be replaced it needs to be deleted first. In such a case all associated metafiles are deleted as well.

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesAudio Source Profile name.
modelquerystringyesName of the SID4 model.

Body

AUDIO SOURCE PROFILE DATA

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST --data-binary @"FILE_PATH" "SERVER_ADDRESS:PORT/technologies/speakerid4/audiosourceprofiles/AUDIO_SOURCE_PROFILE_NAME/file?model=MODEL_NAME"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request

$profile_data = file_get_contents("./profile.profile"); //= path to the source file on the PHP server

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: application/octet-stream',
    'content'       => $profile_data,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/audiosourceprofiles/AUDIO_SOURCE_PROFILE_NAME/file?model=L4"
  false,
  $context
);

$response = json_decode( $response );
var_dump($response);
/** Work with $response **/
?>

Available responses

HTTP StatusOutput
200OK JSONXML
{
  "result" : {
    "version" : 2,
    "name" : "AudioSourceProfileInfo",
    "audio_source_profile_name" : "ProfileName",
    "model" : "L4",
    "voiceprint_count" : 1000,
    "voiceprint_version" : 510,
    "hash" : "ffecae4fedd92147992a77e7f555d113a012c5bb9b26e1a0f4537ba77affab4d",
    "parent_hash" : "bae838c29f979f9f56214a8e0e318d342d26cbf13248c4db451c7314983dcf98",
    "is_hash_valid" : true,
    "user_comment" : "My user comment",
    "created" : "2019-01-22T08:36:00Z",
    "size" : 14285714,
    "false_acceptance_calibration" : {
      "max_false_acceptance_rate" : 1.5,
      "enabled" : true
    },
    "user_calibration" : {
      "scale" : 1.2,
      "shift" : 1.8,
      "enabled" : false
    },
    "mean_normalization" : {
      "enabled" : true
    },
    "metafiles" : [
      {
        "name" : "metafile_1.txt",
        "last_modified" : "2015-09-15T12:33:02Z",
        "created" : "2015-09-15T12:33:02Z",
        "size" : 100,
        "is_directory" : false,
        "is_registered": true
      }
    ]
  }
}
<?xml version="1.0"?>
<result>
  <version>2</version>
  <name>AudioSourceProfileInfo</name>
  <audio_source_profile_name>ProfileName</audio_source_profile_name>
  <model>L4</model>
  <voiceprint_count>1000</voiceprint_count>
  <voiceprint_version>510</voiceprint_version>
  <hash>ffecae4fedd92147992a77e7f555d113a012c5bb9b26e1a0f4537ba77affab4d</hash>
  <parent_hash>bae838c29f979f9f56214a8e0e318d342d26cbf13248c4db451c7314983dcf98</parent_hash>
  <is_hash_valid>true</is_hash_valid>
  <user_comment>My user comment</user_comment>
  <created>2019-01-22T08:36:00Z</created>
  <size>14285714</size>
  <false_acceptance_calibration>
    <false_acceptance_calibration>1.5</false_acceptance_calibration>
    <enabled>true</enabled>
  </false_acceptance_calibration>
  <user_calibration>
    <scale>1.2</scale>
    <shift>1.8</shift>
    <enabled>false</enabled>
  </user_calibration>
  <mean_normalization>
    <enabled>true</enabled>
  </mean_normalization>
  <metafiles>
    <item>
      <name>metafile_1.txt</name>
      <last_modified>2015-09-15T12:33:02Z</last_modified>
      <created>2015-09-15T12:33:02Z</created>
      <size>100</size>
      <is_directory>false</is_directory>
      <is_registered>true</is_registered>
    </item>
  </metafiles>
</result>
400Bad Request
  • 1003A required query parameter was not specified for this request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1055Audio Source Profile already exists
  • 1056Audio Source Profile hash mismatch
  • 1057Audio Source Profile voiceprint version mismatch
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
405Method Not Allowed
  • 1009Technology is not supported by server
415Unsupported Media Type
  • 1054Unsupported Audio Source Profile format

Required technologies

  • Speaker Identification 4 VoicePrint Comparator (SID4C)
/technologies/speakerid4/audiosourceprofiles/{name}/metafile – Audio Source Profile metafile
GET /technologies/speakerid4/audiosourceprofiles/{name}/metafile Download metafile from Audio Source Profile

Downloads a metafile from an Audio Source Profile. The The metafile is determined by the path parameter. Note that the path parameter in the request does not refer to the location of the metafile on the server, but it is the name of the metafile within the Audio Source Profile. Therefore the name of the metafile should not contain any slashes ('/').

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the Audio Source Profile.
pathquerystringyesName of the metafile in the Audio Source Profile.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid4/audiosourceprofiles/AUDIO_SOURCE_PROFILE_NAME/metafile?path=METAFILE"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/METAFILE";  //= path to the meta file on the Phonexia Speech Engine
$AUDIO_SOURCE_PROFILE_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'GET',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/audiosourceprofiles/$AUDIO_SOURCE_PROFILE_NAME/metafile?path=$PATH",
  false,
  $context
);

file_put_contents('./METAFILE', $response); //= audio file saved on the PHP server
?>

Available responses

HTTP StatusOutput
200OK
METADATA
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1015User model not found
POST /technologies/speakerid4/audiosourceprofiles/{name}/metafile Add metafile to Audio Source Profile

Uploads a metafile to Audio Source Profile. The request body contains the metafile data. Note that the path parameter in the request does not refer to the location of the metafile on the server, but it is the name of the metafile within the Audio Source Profile. Therefore the name of the metafile should not contain any slashes ('/').

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the Audio Source Profile.
pathquerystringyesName of the metafile in the Audio Source Profile.

Body

metafile

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST --data-binary "@FILE_PATH" "SERVER_ADDRESS:PORT/technologies/speakerid4/audiosourceprofiles/AUDIO_SOURCE_PROFILE_NAME/metafile?path=METAFILE"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/METAFILE";  //= destination path to the meta file on the Phonexia Speech Engine
$AUDIO_SOURCE_PROFILE_NAME = "test";

$content = file_get_contents("./METAFILE"); //= path to the source file on the PHP server

$options = array(
  'http' =>
  array (
    'method'        => 'POST',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID . "\r\n" .
                       'Content-Type: text/plain',
    'content'       => $content,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/audiosourceprofiles/$AUDIO_SOURCE_PROFILE_NAME/metafile?path=$PATH",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
413Request Entity Too Large
  • 1014Size of uploaded file exceeds size limit
DELETE /technologies/speakerid4/audiosourceprofiles/{name}/metafile Removes metafile from Audio Source Profile

Remove metafile from Audio Source Profile. The metafile is determined by the path parameter. Note that the path parameter in the request does not refer to the location of the metafile on the server, but it is the name of the metafile within the Audio Source Profile. Therefore the name of the metafile should not contain any slashes ('/').

Parameters

NameParameter TypeData TypeRequiredDescription
namepathstringyesName of the Audio Source Profile.
pathquerystringyesName of the metafile in the Audio Source Profile.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X DELETE "SERVER_ADDRESS:PORT/technologies/speakerid4/audiosourceprofiles/AUDIO_SOURCE_PROFILE_NAME/metafile?path=METAFILE"
<?php
/**
 * Set variables according to your server.
 */
$SERVER_ADDRESS = 'http://127.0.0.1';
$PORT = 8600;
$YOUR_SESSION_ID = '39db96cc-f11e-4d34-afae-33635cf9c4c1';	//= get it from login request
$PATH = "/METAFILE";  //= path to the meta file on the Phonexia Speech Engine
$AUDIO_SOURCE_PROFILE_NAME = "test";

$options = array(
  'http' =>
  array (
    'method'        => 'DELETE',
    'header'        => 'X-SessionID: ' . $YOUR_SESSION_ID,
    'ignore_errors'  => true,
  )
);

$context = stream_context_create( $options );
$response = file_get_contents(
  "$SERVER_ADDRESS:$PORT/technologies/speakerid4/audiosourceprofiles/$AUDIO_SOURCE_PROFILE_NAME/metafile?path=$PATH",
  false,
  $context
);

$matches = array();
preg_match('/HTTP\/\d+\.\d+ (\d+)/', $http_response_header[0], $matches);
$http_code = $matches[1];

if($http_code == 200)
{
  // OK
}
?>

Available responses

HTTP StatusOutput
200OK
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1015User model not found
/technologies/speakerid4/extractvp – extract voiceprint
GET /technologies/speakerid4/extractvp (asynchronous)Extract voiceprints from audio file

Extracts the voiceprint from an audio file. This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
pathquerystringyesServer path to the audio file.
modelquerystringyesName of the SID4 model.
from_timequerydoublenofrom_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed from the beginning. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.
to_timequerydoublenoto_time specifies the time range of the recording to be processed. If the parameter is not specified or equals "0" the recording is processed to the end. Using this parameter causes that the result is not saved to the cache. Time is given in seconds.

Body

empty content

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X GET "SERVER_ADDRESS:PORT/technologies/speakerid4/extractvp?path=julia_1.wav&model=L4"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'GET',
  uri_path: '/technologies/speakerid4/extractvp',
  uri_params: {
    path: '/julia.wav',
    model: 'L4',
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK
The time_range parameter in the output is serialized only when query parameters from_time or to_time are specified. voiceprint_set may contains more than one voiceprint when input recording is multi-channel. Each voiceprint is extracted from one channel, and voiceprint_set is sorted by channel order.
JSONXML
{
  "result" : {
    "version" : 1,
    "name" : "SpeakerIdentification4VoiceprintResult",
    "file" : "\/kelly_julia.wav",
    "model" : "L4",
    "time_range": {
      "from_time": 2.5,
      "to_time": 5.5
    },
    "voiceprint_set" : [
      {
        "voiceprint" : <Base64 Data>
      },
      {
        "voiceprint" : <Base64 Data>
      },
      ...
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>SpeakerIdentification4VoiceprintResult</name>
  <file>/kelly_julia.wav</file>
  <model>L4</model>
  <time_range>
    <from_time>2.5</from_time>
    <to_time>5.5</to_time>
  </time_range>
  <voiceprint_set>
    <item>
      <voiceprint>[Base64 Data]</voiceprint>
    </item>
    <item>
      <voiceprint>[Base64 Data]</voiceprint>
    </item>
    ...
  </voiceprint_set>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1008File not found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server
406Not Acceptable
  • 1035Invalid time range
415Unsupported Media Type
  • 1007Unsupported audio format

Required technologies

  • Speaker Identification 4 VoicePrint Extractor (SID4E)

Resource locker

  • LOCK Analyzed file
/technologies/speakerid4/comparevp – compare voiceprints
POST /technologies/speakerid4/comparevp (asynchronous)Analyze two voiceprints

Compares two voiceprints. This request is asynchronous (see Asynchronous request).

Parameters

NameParameter TypeData TypeRequiredDescription
Content-Typeheaderstringnoapplication/json for JSON content (Default value)
application/xml for XML content
modelquerystringyesName of the SID4 model.
audio_source_profile_1querystringnoName of the Audio Source Profile for the first voiceprint
audio_source_profile_2querystringnoName of the Audio Source Profile for the second voiceprint

Body

JSONXML
{
  "voiceprints": [
    <Base64 Data>,
    <Base64 Data>
  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<voiceprints>
  <item>
    [Base64 Data]
  </item>
  <item>
    [Base64 Data]
  </item>
</voiceprints>

Example

CURLPHP/JS
curl -H "X-SessionID:YOUR_SESSION_ID" -X POST -H "Content-Type:application/json" --data-binary @"voiceprints.json" "SERVER_ADDRESS:PORT/technologies/speakerid4/comparevp?model=L4&audio_source_profile_1=test_profile_1&audio_source_profile_2=test_profile_2"
/*
 * See above to chapter Asynchronous request - Example: PHP + JS Asynchronous request example
 *
 * There is specific options applicable for async_request() method from PHP + JS Example
 *
 * JavaScript code:
 */
var options = {
  method: 'POST',
  uri_path: '/technologies/speakerid4/comparevp',
  uri_params: {
    model: 'L4',
    audio_source_profile_1: 'test_profile_1',
    audio_source_profile_2: 'test_profile_2'
  },
  content: {
    "voiceprints": [
      "VlBUIAcAAAD9CAAA6AMAAAAAAAD3vHKT8LtfPk373b\/gMhG\/BAyNvXDZjD86XH0\/0FyCP1e6iD8zjba+OAAgv\/Jj3z0TL54+bm+0PiwUVb\/g6ErAE7jXPos6Mb8xYRy\/UEcAQGgoZT8eb+Q\/oGxIP88EBT5YrYY\/8WqWP\/0WrD\/xa44\/lomHP+yqjz+soYI\/RRgZPdoFtj9ZCmQ\/qKIEP7nuhL4Bl4O\/g9kJv1\/erb8gA1q+CsSRPzNga78qMo6\/kISNvwykbD9P+Jq\/zUWGPiVKAUDwvIq\/E6yPv8WYpr\/SpAa\/wbaJvXgpHL4QwJu95Wk5Pj5mXb7n8+49Xz2bPy3SSj+6Uvw+5ZgDP\/Fqsb\/KgiC+yadGP4lmFj53iwE\/ZpeRP9SwOD9tQWU+8yKRvW8RFz\/Jryy\/pgQnvxN4zb6GCCs\/rmQiP51l3z4hRp0\/JVOYv+oVE76B6gM+oLErv6imh7war3E\/zS\/OP4BF0r\/QAZA+IMgEPvM5hj\/dWYg+HRa5P+RkMr9I0rY+MEdWPrifzL+vmBi\/ihuNvjjj4b8yzEI\/17JnP78GvT9ZSgG\/rNqbvwD6Iz66ZRlAguRbPjwv9T7OE5o\/ok6Lvhdso79bJO+\/noI5vz\/xWb+Udvi8cfAdP3b6pD440NS+tTUdwMhpAjxSTH+\/DjDJPT4Lez2b7y0\/o3IYP8AHKT+rvRy\/YLigvBGtfb\/IUBe+KL3gv6mV2z+8g9G\/tFXdPppkKb0NeQA\/g\/oJQPTrbjweV7M+rbJqv\/IXv78oRE8+ET54v0uXs7\/8TIi\/RESXP48LjD8lN25AulqTv2LrtL\/6J6W+5QRrv971Zb9S1hnA+t1TPzOJED5GOTe\/di+6Pq7cQL\/tLCk+5IsBPt3n374WlqG\/t0Udvv9W9b8SyAo\/p343vylLSb8z4UO\/kttMv4ZwrD\/d7Hq\/WPo6Pz4bRz1kycM\/AGA3O5DIZb7Eqjc\/lYDnPejvH0D0d9G\/wvvCv1bu3j5uhKI\/CMK0PMX3RT9bUI2\/OJnSPcBppr5sGd0+IYtIv6o4ar+oxyG+tXTMPqkCmD+ty6a\/f+PyPmKR3r6ML+G\/rNxevgvMED8bS4A\/U\/oevp6Nar+UPR0\/1EYiwAovzj5O3ry\/teVFPu9Nk781WUO\/tQQ9QMQWGL+4LMe99A+hv\/67SD7kfD7ApnkWv\/TZnj4K2IE\/JyOev5qAz75dJ2e\/vp4Wv3OlXT8rO2a\/Hiz2P3olHb3nLgO\/uQpjP+02Rj8hGmg\/tsi6PdKfKD\/JHVQ\/zPsHv9YZjL1eVTs\/Y8Olv\/kNez61bb6\/7aICP9oqX7\/2BDu+sIGevy\/e+z4MwxQ+vThJvhqC4r84fdi\/SvSJvw==",
      "VlBUIAcAAABIDAAA6AMAAAAAAAD4FigbpNHSPk1S2b\/4upC\/Jhv\/vliBYz82X1M\/LYy5P9BDMz90Izm\/oGe1PdWMlb7J2OG9CFQsv6H9Q79rIAzAjLFdP8Ra2b70OhXA+jK+PiT3hD\/e\/q4\/s8SHP8CyGD\/jzDw\/X+\/OPxSJHz8GWWM84v7DPyKyAj3ls+M+YDTDvk3UUz+R4D8\/4mesPgGjtT3mJ4e\/X9t0vxa8bz0hlYg+UbMEQNykDb+3ZUq\/m0mAv9i+tr1FrlG\/pIl\/PXZPJ0BPb+092GUMwEEnyr+igHU\/f43fPSkK8L3eZBa\/jG0bvzKBWb+JbVK\/obVlP4Z4dD\/0y8o8xEIQvqVdgr87EhBAIhsRQGbwL7+ePvg+dqBdPqw7JD+uzwQ\/cP\/Cvn+zrj8sgPe\/2LocvtNrhr90q3E\/i36iP+gHC77bQTO+Ji2MPt0nt76OY7q+1VHYPU3LSz4ePSa\/WSBEP0A6+r8Op4c\/3jQaP56PIb\/BvZa\/kFSuPyw33D4d0oK\/L\/4KP\/vfKL\/5aaS\/VIKXPxHj5T6RaJm+HUuPviNq1z82Jcs+DFtJP5X+JL\/f97k\/CLkYOlUMBb8IxZS+Gb9Xv9QVqr\/IN82\/L7MFP9cslzyvyKA\/k57gPhycQD64Fx4+RTlgPchBLjza3J2\/Tbsvv9IE1D4T9W4+AH4xv65yqr7adq68b+ZKPrJzrb1U\/\/a+0Jo2vhuVbj\/JZ\/i\/YNAdP9bONb\/3rNQ+EMJfP2YT+j5PRUU\/AHKRvwxnG7\/\/fio\/Xbndv3dEf78QOZG\/G2gsQPDLiT+Au\/A\/UdIrP9pn3b5JeQa\/3PaLvzh3tz7rTCrAWucWvWJk2j\/Nky4\/ez+EP2CWyb9Dc4U\/6aQpP+hPiD6UwE++7AS6P4dQB8BMOmc\/Qbu4Pz77U77SVoc\/6BcFP2afCz9ZbSi\/+z6UPzLRh72G2cM\/t9mPvuWDcr9qRFE+S5UcQDvrxj+PrpA\/5uOdv3vcSz+R2Aw\/12WUvCScIb\/vxJO\/8++tP2I4gr5fUkM\/vGqCv\/hcB0BLT8y9aX6ov9kOLT5koZW\/6ehyvep6pjyVJ6O\/vfRoPmoOab8R6vk\/biEAP6EDA0BQ+1g+Yq2+vyEjNUAxb4W\/xo5SP3w4nL7caIu+l+LqP14XPL4Ocdm+miuiP43SnD9BJFLAsHSrvwelOL17B7C\/yRbTvirTZT\/a7x+\/JxTpPWf6aT0mlmO\/85AgP4rLmj9cw6K\/zZChP\/ym6T4W3jA\/ligQwPF7n7\/Ewj0\/yK+gPhrjL78IKYY+H2jpP3gncj05e5++GHcrP3vK\/L4usla+ZFMDvVho4r4w2Ls\/lEfVP9p\/nL6mvdu\/gyGDvg=="
    ]
  },
  callback: function(result)
  {
    console.log(result); // work with result
  }
};

async_request(options);

Available responses

HTTP StatusOutput
200OK JSONXML
{
 "result" : {
   "version" : 1,
    "name" : "SpeakerIdentification4MultiResult",
    "model" : "L4",
    "speaker_group" : "",
    "results" : [
      {
        "file" : "",
        "speaker_model" : "",
        "audio_source_profile_1" : "profile_test_1",
        "audio_source_profile_2" : "profile_test_2",
        "channel_scores" : [
          {
            "channel" : 0,
            "scores" : [
              {
                "score" : 13.249981
              }
            ]
          }
        ]
      }
    ]
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <version>1</version>
  <name>SpeakerIdentification4MultiResult</name>
  <model>L4</model>
  <speaker_group/>
  <results>
    <item>
      <file/>
      <speaker_model/>
      <audio_source_profile_1>test_profile_1</audio_source_profile_1>
      <audio_source_profile_2>test_profile_2</audio_source_profile_2>
      <channel_scores>
        <item>
          <channel>0</channel>
          <scores>
            <item>
              <score>13.249981</score>
            </item>
          </scores>
        </item>
      </channel_scores>
    </item>
  </results>
</result>
400Bad Request
  • 1004An invalid value was specified for one of the query parameters in the request URI
  • 1017User model not ready
  • 1025An invalid value was specified for one of the header parameters in the request
  • 1060The capacity for technology has been exceeded
401Unauthorized
  • 1005The request requires user authentication
404Not Found
  • 1015User model not found
405Method Not Allowed
  • 1009Technology is not supported by server