\apibvw\ControllerVoiceAccess

Controller to handle API request to perform voice access operations.

For a clearer documentation of the API, client-oriented, please visit http://docs.biovoiceapi.apiary.io/

The base URL for this actions is v1/voiceaccess

Summary

Methods
Properties
Constants
postEnroll()
postTest()
getStatus()
No public properties found
No constants found
setupLayout()
No protected properties found
N/A
getCorrectExtension()
handleAudio()
No private properties found
N/A

Methods

postEnroll()

postEnroll(string $usuario)

Enrolls a user identified by $username in the syste, creating his model.

URL: POST v1/voiceaccess/enroll/{username}

Parameters

string $usuario

username of the user to enroll

postTest()

postTest(string $usuario)

Performs a speaker verification for $username, using the audio file POSTed via HTTP.

URL: POST v1/voiceaccess/test/{username}

Parameters

string $usuario

username of the user whose identity verify

getStatus()

getStatus(string $usuario)

Checks the status of $username user in the system, returning information of wether he is registered and enrolled or not.

URL: v1/voiceaccess/test/{username}

Parameters

string $usuario

setupLayout()

setupLayout() : void

Setup the layout used by the controller.

getCorrectExtension()

getCorrectExtension(string $filetype) : string

Depending on a Content-Type like string, returns the right extension of a file.

Parameters

string $filetype

Content-Type like string

Returns

string

handleAudio()

handleAudio(string $usuario) : string

Receives a username whose audio sample has been uploaded and processes that file, creating a PCM audio file that can be passed to a speaker verification engine.

Parameters

string $usuario

username for a user whose audio sample has been uploaded

Throws

\apibvw\SpeakerRec\SpeakerRecognitionException

Returns

string