Package com.vivoka.vsdk.biometrics
Class Model
java.lang.Object
com.vivoka.vsdk.biometrics.Model
Abstract class representing a biometric model.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidAdd a record from a buffer to the model for a specific user.abstract voidAdd a record from file to the model for a specific user.voidaddRecords(String name, List<Buffer> buffer) Add records from a list of buffers to the model for a specific user.abstract android.util.Pair<Boolean, org.json.JSONObject> analyseRecord(Buffer buffer) Analyse a record from a buffer.abstract android.util.Pair<Boolean, org.json.JSONObject> analyseRecord(String path) Analyse a record from a file.abstract voidcompile()Compile the model and save it.abstract voidErase a user from the model.final StringgetName()getType()getUsers()Get the list of users in the model.protected abstract voidrelease()
-
Field Details
-
_name
-
_type
-
_enrollmentModelPath
-
-
Constructor Details
-
Model
- Throws:
Exception
-
-
Method Details
-
release
- Throws:
Exception
-
getName
- Returns:
- The name of the model.
-
getType
- Returns:
- The type of the model TEXT_DEPENDANT or TEXT_INDEPENDANT.
-
getEnrollmentModelPath
- Returns:
- The path of the enrollment model.
-
addRecords
Add records from a list of buffers to the model for a specific user. You will need to call compile() to compile and save the model.- Parameters:
name- The name of the user.buffer- The buffer of the record.- Throws:
Exception- If there is an error adding the records.
-
addRecord
Add a record from file to the model for a specific user. You will need to call compile() to compile and save the model.- Parameters:
name- The name of the user.path- The path of the raw audio file.- Throws:
Exception- If there is an error adding the record.
-
addRecord
Add a record from a buffer to the model for a specific user. You will need to call compile() to compile and save the model.- Parameters:
name- The name of the user.buffer- The buffer of the record.- Throws:
Exception- If there is an error adding the record.
-
eraseUser
Erase a user from the model. Doesn't require you to call compile().- Parameters:
name- The name of the user.- Throws:
Exception- If there is an error erasing the user.
-
compile
Compile the model and save it.- Throws:
Exception- If there is an error compiling the model.
-
getUsers
Get the list of users in the model.- Returns:
- The list of users in the model.
- Throws:
Exception- If there is an error getting the users.
-
analyseRecord
public abstract android.util.Pair<Boolean,org.json.JSONObject> analyseRecord(String path) throws Exception Analyse a record from a file.- Parameters:
path- The path of the raw audio file to analyse.- Returns:
- The result of the analysis. The boolean value of the pair indicates whether the record is acceptable or not. The JSON object contains the analysis result.
- Throws:
Exception- If there is an error analysing the record.
-
analyseRecord
public abstract android.util.Pair<Boolean,org.json.JSONObject> analyseRecord(Buffer buffer) throws Exception Analyse a record from a buffer.- Parameters:
buffer- The buffer to analyse.- Returns:
- The result of the analysis. The boolean value of the pair indicates whether the record is acceptable or not. The JSON object contains the analysis result.
- Throws:
Exception- If there is an error analysing the record.
-