\apibvw\SpeakerRecSpeakerRecognitionPackage

Speaker recognition independant package interface. BVW API will call this methods to provice third parties with a simple way to enroll and test user's identity.

Summary

Methods
Constants
__construct()
getUser()
isEnrolled()
enroll()
testSpeakerIdentity()
deleteUser()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

__construct()

__construct(string $user)

Creates a SpeakerRecognitionPackage for a user ID given

Parameters

string $user

User id. If it's a number, it will be converted to a string.

getUser()

getUser() : string

Returns the string representing the identity of the SpeakerRecognitionPackage user

Returns

string —

User id

isEnrolled()

isEnrolled() : bool

Test if a user is enrolled in a speaker recognition system.

A user being enrolled means there is information about him (data structures, files, database entries, ...) that can be used to compare him to another user.

Returns

bool —

true if $user is enrolled, false if not.

enroll()

enroll(string $audio_file_path) : bool

Create necessary initial information (data structures, files, database entries, .

..) to allow testing the identity of a user against another based on the audio features of his voice.

Parameters

string $audio_file_path

Path to audio file with a sample voice of the subject $user.

Returns

bool —

true if enrollment was succesful, false if not.

testSpeakerIdentity()

testSpeakerIdentity(string $audio_file_path) : float

Checks if the audio file located in $audio_file_path belongs to $user's voice.

$user should be already erolled in the speaker recognition system in order to test his identity

Parameters

string $audio_file_path

Path to audio file with a sample voice to test

                    against existing $user data to check identity matching.

Returns

float —

The value resulting for the speaker verification process.

deleteUser()

deleteUser() : bool

Deletes all files that belong to $user.

Returns

bool —

true if the operation completed successfully, false otherwise