\Aculab\WebServicesWrapper\VoiceBiometrics\UsersWebService

Voice biometrics users web service class

Summary

Methods
Properties
Constants
setWebServicesServer()
setCryptoMethod()
setProxy()
__construct()
parseWebsocketResponse()
registerPutFile()
registerPostFiles()
registerPostUrls()
registerGetWs()
updatePutFile()
updatePostFiles()
updatePostUrls()
updateGetWs()
verifyPutFile()
verifyPostFiles()
verifyPostUrls()
verifyGetWs()
stats()
exists()
delete()
No public properties found
VERSION
WEBSOCKET_END_OF_AUDIO_TEXT
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

VERSION

VERSION

The wrapper version.

The wrapper version number.

WEBSOCKET_END_OF_AUDIO_TEXT

WEBSOCKET_END_OF_AUDIO_TEXT

Text for sending over websocket to mark the end of the audio data.

Methods

setWebServicesServer()

setWebServicesServer(string  $wsserver) 

Set the web services server address.

This allows the web service requests to be directed to a specific server. The default is https://ws-<cloud_id>.aculabcloud.net

Parameters

string $wsserver

The base URL of the web services server.

setCryptoMethod()

setCryptoMethod(integer  $method) 

Set the crypto method used when connectiing to the web services server.

This allows a specific crypto method to be used when connecting to the web service server. The values should be one of the STREAM_CRYPTO_METHOD_TLSv1_N_CLIENT constants. The default is STREAM_CRYPTO_METHOD_ANY_CLIENT.

Parameters

integer $method

The crypto method to use.

setProxy()

setProxy(string  $proxy, boolean  $request_fulluri) 

Configures the proxy server to use when making Web Service requests.

Parameters

string $proxy

URI specifying address of proxy server. (e.g. tcp://proxy.example.com:5100).

boolean $request_fulluri

When set to TRUE, the entire URI will be used when constructing the request. While this is a non-standard request format, some proxy servers require it.

__construct()

__construct(string  $cloud_id, string  $username) 

Create a voice biometrics users web service object.

Creates a web service to manage voice biometrics users.

Parameters

string $cloud_id

The cloud region identifier.

string $username

The cloud account username.

parseWebsocketResponse()

parseWebsocketResponse(string  $response) : \Aculab\WebServicesWrapper\VoiceBiometrics\Users\RegisterResult|\Aculab\WebServicesWrapper\VoiceBiometrics\Users\UpdateResult|\Aculab\WebServicesWrapper\VoiceBiometrics\Users\VerifyResult

Parse the text returned over a websocket.

This parses the text returned over a websocket.

Parameters

string $response

The test response from the web socket.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\RegisterResult|\Aculab\WebServicesWrapper\VoiceBiometrics\Users\UpdateResult|\Aculab\WebServicesWrapper\VoiceBiometrics\Users\VerifyResult

registerPutFile()

registerPutFile(string  $user_id, string  $user_group_key, string  $local_filename) : \Aculab\WebServicesWrapper\VoiceBiometrics\Users\RegisterResult

Register a user using a local file.

This registers a user by putting a local file.

Parameters

string $user_id

The identifier of the user.

string $user_group_key

The key of the user group for the user.

string $local_filename

The name of the local file to register with.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\RegisterResult

registerPostFiles()

registerPostFiles(string  $user_id, string  $user_group_key, array  $local_filenames) : \Aculab\WebServicesWrapper\VoiceBiometrics\Users\RegisterResult

Register a user using local files.

This registers a user by posting a local files.

Parameters

string $user_id

The identifier of the user.

string $user_group_key

The key of the user group for the user.

array $local_filenames

An array containing the names of the local files to register with.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\RegisterResult

registerPostUrls()

registerPostUrls(string  $user_id, string  $user_group_key, array  $urls) : \Aculab\WebServicesWrapper\VoiceBiometrics\Users\RegisterResult

Register a user using URLs.

This registers a user by posting URLs.

Parameters

string $user_id

The identifier of the user.

string $user_group_key

The key of the user group for the user.

array $urls

An array containing the URLs of the files to register with.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\RegisterResult

registerGetWs()

registerGetWs(string  $user_id, string  $user_group_key, \Aculab\WebServicesWrapper\VoiceBiometrics\Users\AudioStreamSettings  $audio_stream_settings = null) : \Aculab\WebServicesWrapper\VoiceBiometrics\Users\GetWsResult

Get a web socket to register a user.

This returns a web socket URL that can be used to register a user.

Parameters

string $user_id

The identifier of the user.

string $user_group_key

The key of the user group for the user.

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\AudioStreamSettings $audio_stream_settings

Settings for the audio stream that will be sent.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\GetWsResult

updatePutFile()

updatePutFile(string  $user_id, string  $user_group_key, string  $local_filename) : \Aculab\WebServicesWrapper\VoiceBiometrics\Users\UpdateResult

Update a user using a local file.

This updates a user by putting a local file.

Parameters

string $user_id

The identifier of the user.

string $user_group_key

The key of the user group for the user.

string $local_filename

The name of the local file to update with.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\UpdateResult

updatePostFiles()

updatePostFiles(string  $user_id, string  $user_group_key, array  $local_filenames) : \Aculab\WebServicesWrapper\VoiceBiometrics\Users\UpdateResult

Update a user using local files.

This updates a user by posting a local files.

Parameters

string $user_id

The identifier of the user.

string $user_group_key

The key of the user group for the user.

array $local_filenames

An array containing the names of the local files to update with.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\UpdateResult

updatePostUrls()

updatePostUrls(string  $user_id, string  $user_group_key, array  $urls) : \Aculab\WebServicesWrapper\VoiceBiometrics\Users\UpdateResult

Update a user using URLs.

This updates a user by posting URLs.

Parameters

string $user_id

The identifier of the user.

string $user_group_key

The key of the user group for the user.

array $urls

An array containing the URLs of the files to update with.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\UpdateResult

updateGetWs()

updateGetWs(string  $user_id, string  $user_group_key, \Aculab\WebServicesWrapper\VoiceBiometrics\Users\AudioStreamSettings  $audio_stream_settings = null) : \Aculab\WebServicesWrapper\VoiceBiometrics\Users\GetWsResult

Get a web socket to update a user.

This returns a web socket URL that can be used to update a user.

Parameters

string $user_id

The identifier of the user.

string $user_group_key

The key of the user group for the user.

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\AudioStreamSettings $audio_stream_settings

Settings for the audio stream that will be sent.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\GetWsResult

verifyPutFile()

verifyPutFile(string  $user_id, string  $user_group_key, string  $local_filename, \Aculab\WebServicesWrapper\VoiceBiometrics\Users\VerifySettings  $verify_settings = null) : \Aculab\WebServicesWrapper\VoiceBiometrics\Users\VerifyResult

Verify a user using a local file.

This verifies a user by putting a local file.

Parameters

string $user_id

The identifier of the user.

string $user_group_key

The key of the user group for the user.

string $local_filename

The name of the local file to verify with.

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\VerifySettings $verify_settings

Settings for the user verification.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\VerifyResult

verifyPostFiles()

verifyPostFiles(string  $user_id, string  $user_group_key, array  $local_filenames, \Aculab\WebServicesWrapper\VoiceBiometrics\Users\VerifySettings  $verify_settings = null) : \Aculab\WebServicesWrapper\VoiceBiometrics\Users\VerifyResult

Verify a user using local files.

This verifies a user by posting a local files.

Parameters

string $user_id

The identifier of the user.

string $user_group_key

The key of the user group for the user.

array $local_filenames

An array containing the names of the local files to verify with.

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\VerifySettings $verify_settings

Settings for the user verification.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\VerifyResult

verifyPostUrls()

verifyPostUrls(string  $user_id, string  $user_group_key, array  $urls, \Aculab\WebServicesWrapper\VoiceBiometrics\Users\VerifySettings  $verify_settings = null) : \Aculab\WebServicesWrapper\VoiceBiometrics\Users\VerifyResult

Verify a user using URLs.

This verifies a user by posting URLs.

Parameters

string $user_id

The identifier of the user.

string $user_group_key

The key of the user group for the user.

array $urls

An array containing the URLs of the files to verify with.

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\VerifySettings $verify_settings

Settings for the user verification.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\VerifyResult

verifyGetWs()

verifyGetWs(string  $user_id, string  $user_group_key, \Aculab\WebServicesWrapper\VoiceBiometrics\Users\VerifySettings  $verify_settings = null, \Aculab\WebServicesWrapper\VoiceBiometrics\Users\AudioStreamSettings  $audio_stream_settings = null) : \Aculab\WebServicesWrapper\VoiceBiometrics\Users\GetWsResult

Get a web socket to verify a user.

This returns a web socket URL that can be used to verify a user.

Parameters

string $user_id

The identifier of the user.

string $user_group_key

The key of the user group for the user.

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\VerifySettings $verify_settings

Settings for the user verification.

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\AudioStreamSettings $audio_stream_settings

Settings for the audio stream that will be sent.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\GetWsResult

stats()

stats(string  $user_id, string  $user_group_key) : \Aculab\WebServicesWrapper\VoiceBiometrics\Users\StatsResult

Get statistics relating to a user.

This gets statistics relating to a user.

Parameters

string $user_id

The identifier of the user.

string $user_group_key

The key of the user group for the user.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\StatsResult

exists()

exists(string  $user_id, string  $user_group_key) : \Aculab\WebServicesWrapper\VoiceBiometrics\Users\ExistsResult

Check if a user exists.

This determines if a user exists.

Parameters

string $user_id

The identifier of the user to delete.

string $user_group_key

The key of the user group for the user.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\ExistsResult

delete()

delete(string  $user_id, string  $user_group_key) : \Aculab\WebServicesWrapper\VoiceBiometrics\Users\DeleteResult

Delete a user.

This deletes a user.

Parameters

string $user_id

The identifier of the user to delete.

string $user_group_key

The key of the user group for the user.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

\Aculab\WebServicesWrapper\VoiceBiometrics\Users\DeleteResult